/* Page-specific layout. Depends on tokens.css, base.css and components.css. */

/* ---------- Home: hero ---------- */

.hero--home .hero-copy {
    max-width: 860px;
}

.hero--home h1 {
    font-size: clamp(2.625rem, 1.5rem + 4.6vw, 4.5rem);
}

.hero--home .eyebrow {
    margin-bottom: var(--s-5);
    text-transform: none;
    letter-spacing: 0;
}

.hero-visual--wide {
    max-width: 1080px;
    margin: clamp(48px, 5vw, 72px) auto 0;
}

/* ---------- Home: facts ---------- */

.facts {
    border-block: 1px solid var(--c-border);
    background: var(--c-surface);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

@media (min-width: 900px) {
    .facts-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.fact {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--s-1);
    padding: var(--s-6) var(--s-5);
    border-left: 1px solid var(--c-border);
}

.fact:nth-child(2n + 1) {
    border-left: 0;
}

@media (min-width: 900px) {
    .fact:nth-child(2n + 1) { border-left: 1px solid var(--c-border); }
    .fact:first-child { border-left: 0; }
}

@media (max-width: 899px) {
    .fact:nth-child(n + 3) { border-top: 1px solid var(--c-border); }
}

.fact dd {
    margin: 0;
    color: var(--c-primary);
    font-family: var(--f-display);
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.fact dt {
    color: var(--c-ink-muted);
    font-size: var(--t-small);
}

/* ---------- Home: problem ---------- */

.split {
    display: grid;
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
}

@media (min-width: 1000px) {
    .split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.split h2 + .split-copy,
.split-copy + .split-copy {
    margin-top: var(--s-5);
}

.truths {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr);
    gap: var(--s-4);
    align-items: center;
    padding: var(--s-6);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    background: var(--c-canvas);
}

.truths-chats {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.truth-chat {
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: 12px 12px 12px 4px;
    background: var(--c-surface);
    font-size: var(--t-small);
    line-height: 1.35;
}

.truth-chat:nth-child(2) { transform: translateX(10px); }

.truth-chat b {
    display: block;
    margin-bottom: 2px;
    color: var(--c-ink-faint);
    font-size: var(--t-xs);
    font-weight: 600;
}

.truths-arrow {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
}

.truths-arrow svg {
    width: 18px;
    height: 18px;
}

.truth-card {
    padding: var(--s-4);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-surface);
    box-shadow: var(--sh-lg);
    font-size: var(--t-small);
}

.truth-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--s-2);
    font-weight: 600;
}

.truth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 0;
    border-top: 1px solid var(--c-border);
}

@media (max-width: 560px) {
    .truths {
        grid-template-columns: minmax(0, 1fr);
        padding: var(--s-5);
    }

    .truths-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .truth-chat:nth-child(2) { transform: none; }
}

/* ---------- Home: steps ---------- */

.steps {
    display: grid;
    gap: var(--s-5);
    list-style: none;
}

@media (min-width: 1000px) {
    .steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.step {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-surface);
    box-shadow: var(--sh-sm);
}

.step-visual {
    position: relative;
    height: 220px;
    overflow: hidden;
    padding: var(--s-5) var(--s-5) 0;
    background: linear-gradient(180deg, var(--c-primary-soft), var(--c-surface));
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
    mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.step-visual .mock {
    width: 160%;
    transform: scale(0.625);
    transform-origin: top left;
}

.step-copy {
    padding: var(--s-5);
}

.step-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: var(--s-3);
    border-radius: 50%;
    background: var(--c-saffron-soft);
    color: var(--c-saffron-text);
    font-size: var(--t-small);
    font-weight: 700;
}

.step-copy p {
    margin-top: var(--s-2);
    color: var(--c-ink-muted);
}

/* ---------- Feature and segment cards ---------- */

.card--feature h3,
.card--segment h3 {
    margin-top: var(--s-2);
}

.icon-badge--lg {
    width: 52px;
    height: 52px;
}

.icon-badge--lg svg {
    width: 26px;
    height: 26px;
}

.card--segment {
    padding: var(--s-6);
}

/* ---------- Proof ---------- */

.proof {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(32px, 4vw, 56px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(244, 180, 70, 0.14), transparent 70%),
        var(--c-surface);
    box-shadow: var(--sh-md);
}

.proof-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    background: var(--c-primary);
    color: #fff;
}

.proof-icon svg {
    width: 22px;
    height: 22px;
}

.proof blockquote {
    margin: var(--s-5) 0 0;
}

.proof blockquote p {
    font-family: var(--f-display);
    font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.proof figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-4);
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px solid var(--c-border);
}

.proof figcaption .eyebrow {
    margin: 0;
}

.proof figcaption .link-arrow {
    margin-left: auto;
}

/* ---------- Pricing teaser ---------- */

.teaser {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
    padding: clamp(28px, 3vw, 44px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    background: var(--c-surface);
}

.teaser p.muted {
    margin-top: var(--s-2);
}

/* ---------- Product: sub-nav and modules ---------- */

.subnav {
    position: sticky;
    top: var(--header-h);
    z-index: 20;
    border-block: 1px solid var(--c-border);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.subnav-list {
    display: flex;
    gap: var(--s-2);
    padding-block: var(--s-3);
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.subnav-list::-webkit-scrollbar {
    display: none;
}

.subnav .chip {
    min-height: 36px;
    text-decoration: none;
    white-space: nowrap;
}

.subnav .chip:hover {
    border-color: var(--c-primary-fixed);
    background: var(--c-primary-soft);
    color: var(--c-primary);
}

.module {
    padding-block: clamp(64px, 6vw + 24px, 104px);
    scroll-margin-top: calc(var(--header-h) + 64px);
}

.module:nth-child(even) {
    background: var(--c-canvas);
}

.module-grid {
    display: grid;
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
}

@media (min-width: 1000px) {
    .module-grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }

    .module:nth-child(even) .module-copy {
        order: 2;
    }
}

.module-copy .eyebrow {
    gap: var(--s-3);
}

.module-copy .eyebrow .icon-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
}

.module-copy .eyebrow .icon-badge svg {
    width: 18px;
    height: 18px;
}

.module-copy h2 + .lead {
    margin-top: var(--s-4);
}

.checks {
    display: grid;
    gap: var(--s-3);
    margin-top: var(--s-5);
    list-style: none;
}

.checks li {
    display: flex;
    gap: var(--s-3);
    align-items: flex-start;
}

.checks svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    padding: 3px;
    border-radius: 50%;
    background: var(--c-success-soft);
    color: var(--c-success);
    stroke-width: 3;
}

.module-visual .mock-phone {
    max-width: 300px;
}

.integrations {
    text-align: center;
}

.integrations h2 {
    font-size: var(--t-h3);
}

.integrations-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-3);
    margin-top: var(--s-5);
    list-style: none;
}

.integrations-list .chip {
    padding: 10px 16px;
    font-size: 0.9375rem;
}

.integrations-list svg {
    width: 16px;
    height: 16px;
    color: var(--c-success);
}

/* ---------- Solutions: before / after ---------- */

.compare {
    display: grid;
    gap: var(--s-5);
    max-width: 1040px;
    margin-inline: auto;
}

@media (min-width: 900px) {
    .compare {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.compare-col {
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
}

.compare-col h3 {
    margin-bottom: var(--s-5);
    font-family: var(--f-body);
    font-size: var(--t-small);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compare-col--before {
    background: var(--c-canvas);
}

.compare-col--before h3 {
    color: var(--c-ink-muted);
}

.compare-col--after {
    border-color: var(--c-primary-fixed);
    background: linear-gradient(180deg, var(--c-primary-soft), var(--c-surface) 70%);
    box-shadow: var(--sh-md);
}

.compare-col--after h3 {
    color: var(--c-primary);
}

.compare-col ul {
    display: grid;
    gap: var(--s-5);
    list-style: none;
}

.compare-col li {
    display: flex;
    gap: var(--s-3);
}

.compare-col strong {
    display: block;
    font-weight: 600;
}

.compare-col small {
    display: block;
    margin-top: 2px;
    color: var(--c-ink-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.compare-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--c-danger-soft);
    color: var(--c-danger);
}

.compare-col--after .compare-icon {
    background: var(--c-success-soft);
    color: var(--c-success);
}

.compare-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.75;
}

/* ---------- Resources ---------- */

.resource-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-2);
    margin-top: var(--s-6);
}

.resource-tabs .chip {
    min-height: 40px;
    padding-inline: 18px;
    text-decoration: none;
}

.resource-tabs .chip:hover {
    border-color: var(--c-primary-fixed);
    color: var(--c-primary);
}

.resource-tabs .chip[aria-current="page"] {
    border-color: var(--c-primary);
    background: var(--c-primary);
    color: #fff;
}

/* ---------- Contact ---------- */

.contact-grid {
    display: grid;
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
}

@media (min-width: 1000px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    }
}

.contact-copy h1 + .lead {
    margin-top: var(--s-5);
}

.channels {
    display: grid;
    gap: var(--s-4);
    margin-top: var(--s-7);
    list-style: none;
}

@media (min-width: 640px) {
    .channels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.channel {
    display: flex;
    gap: var(--s-4);
    padding: var(--s-5);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-surface);
}

.channel h2 {
    font-size: 1.125rem;
}

.channel p {
    margin-top: 2px;
    color: var(--c-ink-muted);
    font-size: 0.9375rem;
}

.channel a {
    display: inline-block;
    margin-top: var(--s-2);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-address {
    display: flex;
    gap: var(--s-3);
    margin-top: var(--s-6);
    color: var(--c-ink-muted);
    font-style: normal;
}

.contact-address svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    color: var(--c-primary);
}

.contact-address span span,
.contact-address strong {
    display: block;
}

.contact-address strong {
    color: var(--c-ink);
}

.demo-card {
    padding: clamp(28px, 3vw, 40px);
    border: 2px solid var(--c-primary);
    border-radius: var(--r-xl);
    background:
        radial-gradient(420px 200px at 100% 0%, rgba(244, 180, 70, 0.16), transparent 70%),
        var(--c-surface);
    box-shadow: var(--sh-xl);
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.demo-card h2 {
    margin: var(--s-5) 0 var(--s-3);
    font-size: var(--t-h3);
}

.demo-cta {
    width: 100%;
    margin-top: var(--s-6);
}

.demo-alt {
    margin-top: var(--s-4);
    color: var(--c-ink-muted);
    font-size: var(--t-small);
    text-align: center;
}

/* ---------- Pricing ---------- */

.hero--compact {
    padding-bottom: clamp(48px, 5vw, 80px);
}

.plans {
    display: grid;
    gap: var(--s-5);
    max-width: 1080px;
    margin: clamp(40px, 5vw, 64px) auto 0;
    align-items: stretch;
}

@media (min-width: 900px) {
    .plans {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--s-6);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    background: var(--c-surface);
    box-shadow: var(--sh-sm);
    text-align: left;
}

.plan--featured {
    border: 2px solid var(--c-primary);
    box-shadow: var(--sh-xl);
}

@media (min-width: 900px) {
    .plan--featured {
        transform: translateY(-8px);
    }
}

.plan-badge {
    position: absolute;
    top: -13px;
    left: var(--s-6);
    padding: 4px 12px;
    border-radius: var(--r-full);
    background: var(--c-primary);
    color: #fff;
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.plan h2 {
    font-size: var(--t-h3);
}

.plan-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: var(--s-3);
    color: var(--c-ink-muted);
}

.plan-price strong {
    color: var(--c-ink);
    font-family: var(--f-display);
    font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.plan-price strong.plan-price--text {
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
}

.plan-cta {
    width: 100%;
    margin-top: var(--s-5);
}

.plan-rows {
    display: grid;
    gap: var(--s-3);
    margin-top: var(--s-5);
    padding-top: var(--s-5);
    border-top: 1px solid var(--c-border);
    list-style: none;
    font-size: 0.9375rem;
}

.plan-rows li {
    display: flex;
    gap: var(--s-2);
    align-items: flex-start;
}

.plan-rows svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    color: var(--c-success);
    stroke-width: 2.5;
}

.plan-rows strong {
    font-weight: 600;
}

.plans-note {
    max-width: 640px;
    margin: var(--s-6) auto 0;
    color: var(--c-ink-muted);
    font-size: var(--t-small);
    text-align: center;
}

.table-wrap {
    max-width: 1080px;
    margin-inline: auto;
    overflow: clip; /* not hidden: keeps the sticky header working */
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.compare-table th,
.compare-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--c-border);
    text-align: left;
    vertical-align: top;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.compare-table thead th {
    position: sticky;
    top: var(--header-h);
    z-index: 1;
    background: var(--c-canvas);
    font-family: var(--f-display);
    font-size: 1.0625rem;
    font-weight: 700;
}

.compare-table thead small {
    display: block;
    color: var(--c-ink-muted);
    font-family: var(--f-body);
    font-size: var(--t-small);
    font-weight: 500;
}

.compare-table tbody th {
    width: 28%;
    color: var(--c-ink);
    font-weight: 600;
}

.compare-table td {
    color: var(--c-ink-muted);
}

.compare-table .is-featured {
    background: rgba(237, 242, 250, 0.6);
}

.compare-table thead .is-featured {
    background: var(--c-primary-soft);
    color: var(--c-primary);
}

@media (max-width: 719px) {
    .table-wrap {
        overflow: visible;
        border: 0;
    }

    .compare-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .compare-table,
    .compare-table tbody,
    .compare-table tr,
    .compare-table th,
    .compare-table td {
        display: block;
        width: 100%;
    }

    .compare-table tr {
        margin-bottom: var(--s-4);
        overflow: hidden;
        border: 1px solid var(--c-border);
        border-radius: var(--r-md);
    }

    .compare-table tbody th {
        width: 100%;
        background: var(--c-canvas);
    }

    .compare-table td {
        display: flex;
        justify-content: space-between;
        gap: var(--s-4);
        padding: 10px 20px;
        text-align: right;
    }

    .compare-table td::before {
        content: attr(data-plan);
        color: var(--c-ink);
        font-weight: 600;
        text-align: left;
    }

    .compare-table tbody tr:last-child td {
        border-bottom: 1px solid var(--c-border);
    }

    .compare-table tbody tr td:last-child {
        border-bottom: 0;
    }
}
