/* ========================================================================
   INBOUND LANDING PAGE
   Uses shared design system tokens. Only ib- prefixed classes for
   page-specific layout elements (cards, grids, hero visual, animation).
   ======================================================================== */


/* ========================================================================
   GLOBAL OVERRIDES — left-align section headers on this page
   ======================================================================== */

.ib-features .section-header,
.ib-how-lead-capture .section-header,
.ib-how-email .section-header,
.ib-benefits .section-header {
    text-align: left;
}


/* ========================================================================
   SECTION BACKGROUNDS
   Hero: transparent → Features: #dbeafe → HowLeadCapture: #ffffff →
   HowEmail: #0f172a → Benefits: #dbeafe → CTA: #ff6f3c (accent)
   ======================================================================== */

.ib-features {
    background: #dbeafe;
    position: relative;
    z-index: 1;
}

.ib-how-lead-capture {
    background: #ffffff;
    position: relative;
    z-index: 1;
}

.ib-how-email {
    background: var(--color-ink);
    position: relative;
    z-index: 1;
}

.ib-benefits {
    background: #dbeafe;
    position: relative;
    z-index: 1;
}

.ib-cta {
    background: var(--color-accent);
    position: relative;
    z-index: 1;
}


/* ========================================================================
   WAVE DIVIDERS
   ======================================================================== */

.ib-features::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C300,80 900,0 1440,60 L1440,80 L0,80 Z' fill='%23dbeafe'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.ib-how-lead-capture::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C420,80 1020,0 1440,60 L1440,80 L0,80 Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.ib-how-email::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C360,80 1080,0 1440,60 L1440,80 L0,80 Z' fill='%230f172a'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.ib-benefits::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C480,80 960,0 1440,60 L1440,80 L0,80 Z' fill='%23dbeafe'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.ib-cta::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C300,80 900,0 1440,60 L1440,80 L0,80 Z' fill='%23ff6f3c'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}


/* ========================================================================
   DARK SECTION TEXT OVERRIDES
   ======================================================================== */

.ib-how-email .section-header .section-title,
.ib-cta .section-title {
    color: #ffffff;
}

.ib-how-email .section-header .section-subtitle,
.ib-cta .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}


/* ========================================================================
   HERO VISUAL — animated inbox with form + email + pipeline
   Light card on light page bg. 3D perspective.
   JS toggles .ib-phase-form / .ib-phase-email / .ib-phase-pipeline
   ======================================================================== */

.ib-hero-visual {
    width: 100%;
    max-width: 420px;
    margin: 50px auto 0;
}

.ib-hero-visual .ib-inbox-demo {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
    transform-style: preserve-3d;
}


/* CAPTURE FORM CARD */

.ib-hero-visual .ib-inbox-demo .ib-capture-form {
    background: linear-gradient(160deg, #eef1f8, #e4e8f0);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 12px 24px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ib-inbox-demo.ib-phase-form .ib-capture-form {
    opacity: 1;
    transform: translateY(0);
}

.ib-hero-visual .ib-inbox-demo .ib-capture-form .ib-capture-form__header {
    display: flex;
    gap: 6px;
    padding: 10px 10px 0;
}

.ib-hero-visual .ib-inbox-demo .ib-capture-form .ib-capture-form__header .ib-capture-form__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.ib-hero-visual .ib-inbox-demo .ib-capture-form .ib-capture-form__body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ib-hero-visual .ib-inbox-demo .ib-capture-form .ib-capture-form__field {
    background: #ffffff;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ib-inbox-demo.ib-phase-form .ib-capture-form .ib-capture-form__field--1 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

.ib-inbox-demo.ib-phase-form .ib-capture-form .ib-capture-form__field--2 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.6s;
}

.ib-inbox-demo.ib-phase-form .ib-capture-form .ib-capture-form__field--3 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.9s;
}

.ib-hero-visual .ib-inbox-demo .ib-capture-form .ib-capture-form__label {
    color: #94a3b8;
    font-weight: 500;
}

.ib-hero-visual .ib-inbox-demo .ib-capture-form .ib-capture-form__value {
    color: #0f172a;
    font-weight: 600;
}

.ib-hero-visual .ib-inbox-demo .ib-capture-form .ib-capture-form__submit {
    background: var(--color-primary);
    color: #ffffff;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ib-inbox-demo.ib-phase-form .ib-capture-form .ib-capture-form__submit {
    opacity: 1;
    transform: scale(1);
    transition-delay: 1.2s;
    animation: ib-pulse 2s ease-in-out 2.5s infinite;
}


/* EMAIL NOTIFICATION */

.ib-hero-visual .ib-inbox-demo .ib-email-notif {
    background: linear-gradient(160deg, #eef1f8, #e4e8f0);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ib-inbox-demo.ib-phase-email .ib-email-notif {
    opacity: 1;
    transform: translateY(0);
}

.ib-hero-visual .ib-inbox-demo .ib-email-notif .ib-email-notif__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(28, 145, 228, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ib-hero-visual .ib-inbox-demo .ib-email-notif .ib-email-notif__icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.ib-hero-visual .ib-inbox-demo .ib-email-notif .ib-email-notif__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ib-hero-visual .ib-inbox-demo .ib-email-notif .ib-email-notif__from {
    color: #0f172a;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ib-hero-visual .ib-inbox-demo .ib-email-notif .ib-email-notif__subject {
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* PIPELINE INDICATOR */

.ib-hero-visual .ib-inbox-demo .ib-pipeline-indicator {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ib-inbox-demo.ib-phase-pipeline .ib-pipeline-indicator {
    opacity: 1;
    transform: translateY(0);
}

.ib-hero-visual .ib-inbox-demo .ib-pipeline-indicator .ib-pipeline-indicator__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ib-hero-visual .ib-inbox-demo .ib-pipeline-indicator .ib-pipeline-indicator__icon svg {
    width: 20px;
    height: 20px;
    color: #22c55e;
}

.ib-hero-visual .ib-inbox-demo .ib-pipeline-indicator .ib-pipeline-indicator__text {
    color: #16a34a;
    font-weight: 600;
}


@keyframes ib-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(28, 145, 228, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(28, 145, 228, 0); }
}


/* ========================================================================
   FEATURE CARDS
   ======================================================================== */

.ib-features .ib-features__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.ib-features .ib-features__grid .ib-feature-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--color-border);
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__icon {
    width: 48px;
    height: 48px;
    background: rgba(28, 145, 228, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__title {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 10px;
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__desc {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 25px;
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__highlights li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #334155;
    line-height: 1.5;
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__highlights .ib-feature-card__check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #22c55e;
    margin-top: 2px;
}

.ib-features .ib-features__grid .ib-feature-card .ib-feature-card__highlights .ib-feature-card__check svg {
    width: 20px;
    height: 20px;
}


/* ========================================================================
   STEP CARDS (shared by both How It Works sections)
   ======================================================================== */

.ib-steps__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
    margin-top: 50px;
    position: relative;
}

.ib-steps__grid .ib-step-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--color-border);
    position: relative;
    z-index: 1;
}

.ib-how-email .ib-steps__grid .ib-step-card {
    background: #1e293b;
    border-color: rgba(28, 145, 228, 0.15);
}

.ib-steps__grid .ib-step-card .ib-step-card__number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.ib-steps__grid .ib-step-card .ib-step-card__title {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 10px;
}

.ib-how-email .ib-steps__grid .ib-step-card .ib-step-card__title {
    color: #ffffff;
}

.ib-steps__grid .ib-step-card .ib-step-card__desc {
    color: #475569;
    line-height: 1.6;
}

.ib-how-email .ib-steps__grid .ib-step-card .ib-step-card__desc {
    color: rgba(255, 255, 255, 0.7);
}


/* STEP CONNECTORS */

.ib-steps__grid .ib-step-connector {
    position: absolute;
    top: 42px;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.ib-how-email .ib-steps__grid .ib-step-connector {
    background: rgba(28, 145, 228, 0.2);
}

.ib-steps__grid .ib-step-connector--1 {
    left: calc(33.333% + 12px);
    width: calc(33.333% - 50px);
}

.ib-steps__grid .ib-step-connector--2 {
    left: calc(66.666% + 12px);
    width: calc(33.333% - 50px);
}


/* ========================================================================
   HIGHLIGHT LIST (benefits section)
   ======================================================================== */

.ib-benefits__body {
    max-width: 720px;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 25px;
}

.ib-benefits__body p {
    margin: 0 0 10px;
}

.ib-benefits__body strong {
    color: #0f172a;
}

.ib-highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 720px;
}

.ib-highlight-list .ib-highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #334155;
    line-height: 1.5;
}

.ib-highlight-list .ib-highlight-item .ib-highlight-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--color-primary);
    margin-top: 1px;
}

.ib-highlight-list .ib-highlight-item .ib-highlight-icon svg {
    width: 22px;
    height: 22px;
}


/* ========================================================================
   CTA SECTION
   ======================================================================== */

.ib-cta .ib-cta__inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.ib-cta .ib-cta__inner .section-title {
    margin-bottom: 10px;
}

.ib-cta .ib-cta__inner .section-subtitle {
    margin-bottom: 25px;
}

.ib-cta .ib-cta__inner .btn {
    margin-bottom: 10px;
}

.ib-cta .ib-cta__subtext {
    color: rgba(255, 255, 255, 0.5);
}


/* ========================================================================
   RESPONSIVE — tablet
   ======================================================================== */

@media (max-width: 1024px) {

    .ib-hero-visual {
        max-width: 360px;
    }

    .ib-features .ib-features__grid {
        grid-template-columns: 1fr;
    }

}


/* ========================================================================
   RESPONSIVE — mobile
   ======================================================================== */

@media (max-width: 768px) {

    .ib-hero-visual {
        max-width: 100%;
        margin: 25px auto 0;
    }

    .ib-hero-visual .ib-inbox-demo {
        transform: none;
    }

    .ib-features .ib-features__grid {
        grid-template-columns: 1fr;
    }

    .ib-steps__grid {
        grid-template-columns: 1fr;
    }

    .ib-steps__grid .ib-step-connector {
        display: none;
    }

    /* WAVE DIVIDERS */

    .ib-features::before,
    .ib-how-lead-capture::before,
    .ib-how-email::before,
    .ib-benefits::before,
    .ib-cta::before {
        height: 50px;
        top: -49px;
    }

}
