@keyframes hero-status-pulse {
    50% {
        opacity: 0.72;
        transform: scale(1.16);
    }
}

.index-page {
    --landing-section-gap: clamp(128px, 16vw, 256px);
    --landing-section-inset: clamp(24px, 3vw, 40px);
    --landing-section-bottom: calc(var(--landing-section-gap) - var(--landing-section-inset));
    --landing-heading-gap: clamp(24px, 3vw, 40px);

    .hero-bg {
        --hero-image-ratio: calc(1671 / 941);
        position: relative;
        max-width: 1920px;
        margin-inline: auto;
        padding-bottom: var(--landing-section-bottom);
        overflow: hidden;
        background-color: var(--bg-main);
    }

    .hero-art {
        position: absolute;
        right: -12%;
        bottom: var(--landing-section-bottom);
        height: calc(100% - var(--landing-section-bottom) + min(2vw, 38px));
        aspect-ratio: var(--hero-image-ratio);
        isolation: isolate;
        mask-image: linear-gradient(to right, transparent, #000 32px);
        pointer-events: none;
    }

    .hero-art img,
    .hero-lights {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .hero-lights {
        mix-blend-mode: screen;
    }

    .hero-shell {
        position: relative;
        display: flex;
        align-items: center;
        min-height: clamp(420px, 48vw, 800px);
        padding-block: 48px clamp(48px, 8vw, 112px);
    }

    .hero-copy {
        min-width: 0;
        font-family: var(--font-sans);
    }

    .hero-title {
        margin: 0;
        color: #f8fafc;
        font-family: var(--font-heading);
        font-size: clamp(34px, 4.5vw, 84px);
        font-weight: var(--heading-weight);
        line-height: 0.96;
    }

    .hero-title span {
        display: block;
        color: var(--accent);
    }

    .hero-description {
        margin: 16px 0 0;
        max-width: 46ch;
        color: #e2e8f0;
        font-size: clamp(16px, 1.55vw, 24px);
        line-height: 1.4;
    }

    .hero-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: clamp(24px, 3vw, 44px);
    }

    .hero-status {
        display: grid;
        width: fit-content;
        max-width: 100%;
        margin-top: 24px;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 3px 10px;
        padding: 11px 14px;
        border: 1px solid var(--border-soft);
        border-radius: 8px;
        background-color: rgba(8, 14, 20, 0.9);
        font-family: var(--font-sans);
        line-height: 1.35;
    }

    .hero-status-check {
        grid-column: 1;
        grid-row: 1 / span 2;
        display: block;
        width: 36px;
        height: 36px;
        color: #4ade80;
        animation: hero-status-pulse 4s ease-in-out infinite;
    }

    .hero-status-title {
        margin: 0;
        color: #f8fafc;
        font-family: var(--font-heading);
        font-size: 16px;
        font-weight: var(--heading-weight);
    }

    .hero-status-meta {
        grid-column: 2;
        margin: 0;
        color: var(--text-muted);
        font-size: 14px;
    }

    .benefits {
        --benefits-surface: #1b1d21;
        --benefits-surface-alt: #202227;
        --benefits-line: #3a3e45;

        color: var(--text-main);
        font-family: var(--font-content-compact);
        padding-block: var(--landing-section-inset) var(--landing-section-bottom);
    }

    .benefits-intro {
        margin-bottom: var(--landing-heading-gap);
        text-align: center;
    }

    .benefits-intro h2 {
        --section-heading-size-offset: 3px;
        margin: 0 0 8px;
    }

    .benefits-intro h2 span {
        color: var(--accent);
    }

    .benefits-intro p {
        font-size: 19px;
        color: var(--text-muted);
        margin: 0;
        line-height: 1.5;
    }

    .benefits-grid {
        display: grid;
        grid-template-columns: repeat(24, minmax(0, 1fr));
        gap: 12px;
        grid-auto-rows: minmax(240px, auto);
    }

    .benefits-card {
        box-sizing: border-box;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
        align-items: start;
        gap: 22px;
        border: 1px solid var(--benefits-line);
        background: var(--benefits-surface);
        padding: 30px;
        min-width: 0;
    }

    .benefits-transport,
    .benefits-autonomy {
        grid-column: span 13;
    }

    .benefits-stability,
    .benefits-routing {
        --benefits-surface: var(--benefits-surface-alt);
        grid-column: span 11;
        grid-template-columns: minmax(0, 1fr) minmax(0, .78fr);
        gap: 18px;
    }

    .benefits-routing {
        grid-template-columns: minmax(0, 1fr) minmax(0, .87fr);
    }

    .benefits-copy {
        min-width: 0;
    }

    .benefits-label {
        color: var(--text-dim);
        font: 11px/1.3 var(--font-mono);
        letter-spacing: .1em;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 18px;
    }

    .benefits-label::before {
        content: '';
        flex: none;
        width: 5px;
        height: 5px;
        background: var(--accent);
        border-radius: 50%;
    }

    .benefits-copy h3 {
        font-family: var(--font-content-compact);
        font-size: 27px;
        font-weight: 500;
        letter-spacing: -.035em;
        margin: 0 0 10px;
        line-height: 1.15;
        text-wrap: pretty;
    }

    .benefits-copy p {
        font-size: 16px;
        line-height: 1.5;
        color: var(--text-muted);
        margin: 0;
        max-width: 39ch;
        text-wrap: pretty;
    }

    .benefits-copy strong {
        color: var(--text-main);
        font-weight: 500;
    }

    .benefits-copy p + p,
    .benefits-copy a {
        margin-top: 8px;
    }

    .benefits-copy p.benefits-emphasis {
        color: var(--accent);
    }

    .benefits-copy .text-link {
        font-size: 14px;
        line-height: 1.4;
    }

    .benefits-art {
        display: block;
        width: 100%;
        height: auto;
        max-width: 290px;
        justify-self: end;
        align-self: center;
        overflow: visible;
    }

    .benefits-art text {
        font-family: var(--font-mono);
    }

    .benefits-card.benefits-stability .benefits-art {
        max-width: 235px;
    }

    .benefits-card.benefits-routing .benefits-art {
        max-width: 274px;
    }

    .benefits-autonomy .benefits-art {
        max-width: 268px;
    }

    @media (max-width: 1200px) {
        .benefits-card {
            padding: 24px;
            gap: 16px;
        }

        .benefits-stability,
        .benefits-routing {
            grid-template-columns: minmax(0, 1fr) minmax(0, .64fr);
            gap: 12px;
        }

        .benefits-routing {
            grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
        }

        .benefits-copy h3 {
            font-size: 24px;
        }

        .benefits-copy p {
            font-size: 15px;
        }
    }

    @media (max-width: 1120px) {
        .benefits-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            grid-auto-rows: auto;
        }

        .benefits-card {
            grid-column: span 1;
            grid-template-columns: 1fr;
            grid-template-rows: auto 1fr;
            gap: 24px;
            padding: 24px;
            min-height: 300px;
        }

        .benefits-card .benefits-art {
            justify-self: start;
            align-self: end;
            width: 100%;
            max-width: 220px;
        }

        .benefits-transport .benefits-art {
            max-width: 235px;
        }

        .benefits-autonomy .benefits-art {
            max-width: 235px;
        }

        .benefits-copy h3 {
            font-size: 27px;
        }

        .benefits-intro {
            text-align: left;
        }

        .benefits-intro p {
            font-size: 17px;
        }
    }

    @media (max-width: 560px) {
        .benefits-grid {
            grid-template-columns: 1fr;
        }

        .benefits-card {
            min-height: 0;
            padding: 24px;
            gap: 24px;
        }

        .benefits-label {
            margin-bottom: 12px;
        }

        .benefits-card .benefits-art {
            max-width: 220px;
        }

        .benefits-intro p {
            font-size: 16px;
        }
    }

    .cql-title {
        font-family: var(--font-content);
        font-size: clamp(1.5rem, 2.45vw, 2.25rem);
        font-weight: 500;
        line-height: 1.04;
        letter-spacing: -.045em;
        -webkit-font-smoothing: antialiased;
    }

    @media (max-width: 900px) {
        .cql-title {
            font-size: clamp(1.5rem, 4.25vw, 2rem);
        }
    }

    .protocol {
        position: relative;
        color: var(--text-main);
        font-family: var(--font-content);
        padding-block: var(--landing-section-inset) var(--landing-section-bottom);
        display: grid;
        grid-template-columns: minmax(0, .93fr) minmax(0, 1.57fr);
        gap: clamp(35px, 5vw, 84px);
        align-items: start;
    }

    .protocol::before {
        content: "";
        position: absolute;
        inset: 0 var(--layout-gutter) auto;
        border-top: 1px solid var(--border-soft);
    }

    .protocol-copy {
        min-width: 0;
    }

    .protocol-label {
        font: 12px/1.5 var(--font-mono);
        letter-spacing: .11em;
        color: var(--text-dim);
        margin: 0;
    }

    .protocol-copy h2 {
        margin: 24px 0 25px;
    }

    .protocol-copy h2 span {
        display: block;
        color: var(--accent);
    }

    .protocol-copy p:not(.protocol-label),
    .platform-description,
    .pricing-description {
        font-size: 17px;
        line-height: 1.65;
    }

    .protocol-copy p:not(.protocol-label) {
        color: var(--text-soft);
        margin: 0 0 16px;
    }

    .protocol-copy strong {
        color: var(--text-main);
        font-weight: 600;
    }

    .protocol-spec {
        border-top: 1px solid var(--border-soft);
        margin-top: 30px;
        padding-top: 22px;
    }

    .protocol-spec .protocol-label {
        margin-bottom: 11px;
    }

    .protocol-spec-values {
        font-size: 16px;
        line-height: 1.65;
        color: #c4d2dd;
    }

    .protocol-link {
        gap: 11px;
        font-size: 17px;
        font-weight: 600;
        margin-top: 27px;
    }

    .protocol-link svg {
        width: 21px;
        height: 21px;
    }

    .protocol-link-arrow {
        font-size: 21px;
        font-weight: 400;
        margin-left: 4px;
    }

    .protocol-figure {
        min-width: 0;
        margin: 0;
        container: protocol-figure / inline-size;
    }

    .protocol-figure-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 0 0 14px;
        border-bottom: 1px solid var(--border-soft);
        font: 11px/1.4 var(--font-mono);
        letter-spacing: .08em;
        color: #9badbb;
    }

    .protocol-figure-head span:last-child {
        color: #71889a;
        text-align: right;
    }

    .protocol-scroll {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-color: #415461 #101820;
    }

    .protocol-scroll:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 4px;
    }

    .protocol-diagram {
        display: block;
        width: 100%;
        min-width: 610px;
        height: auto;
    }

    .protocol-diagram text {
        font-family: var(--font-mono);
        font-variant-numeric: tabular-nums;
    }

    .protocol-diagram .stage {
        fill: #73899b;
        font-size: 10px;
        letter-spacing: 1.05px;
    }

    .protocol-diagram .label {
        font-size: 12px;
        fill: #9eb0bd;
        letter-spacing: .25px;
    }

    .protocol-diagram .name {
        fill: #e2ebf1;
        font-family: var(--font-content);
        font-size: 17px;
        font-weight: 500;
    }

    .protocol-diagram .detail {
        fill: #8fa4b4;
        font-size: 12px;
    }

    .protocol-diagram .quiet {
        fill: #8296a8;
        font-size: 11px;
    }

    .protocol-diagram .wire-name {
        fill: #d7edf4;
        font-family: var(--font-content);
        font-size: 17px;
        font-weight: 500;
    }

    .protocol-diagram .wire-detail {
        fill: #9cbac9;
        font-size: 12px;
    }

    .protocol-diagram .edge {
        stroke: #718897;
        stroke-width: 1.15;
        fill: none;
        stroke-linejoin: round;
        stroke-linecap: round;
    }

    .protocol-diagram .route-edge {
        stroke: #9bc9d9;
        stroke-width: 1.25;
        fill: none;
        stroke-linejoin: round;
        stroke-linecap: round;
    }

    .protocol-diagram .node {
        fill: #131c25;
        stroke: #354550;
        stroke-width: 1;
    }

    .protocol-diagram .key-node {
        fill: #14242d;
        stroke: #587b8b;
        stroke-width: 1;
    }

    .protocol-diagram .crypto-node {
        fill: #17232d;
        stroke: #536976;
        stroke-width: 1;
    }

    .protocol-diagram .sep {
        stroke: #344551;
        stroke-width: 1;
    }

    .protocol-diagram .rule {
        stroke: #263540;
        stroke-width: 1;
        stroke-dasharray: 2 5;
    }

    .protocol-figure figcaption {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 22px;
        border-top: 1px solid var(--border-soft);
        padding-top: 18px;
        align-items: start;
    }

    .protocol-result-title {
        font-size: 16px;
        color: #dce7ed;
        font-weight: 500;
        margin: 0 0 5px;
    }

    .protocol-result-desc {
        font-size: 14px;
        line-height: 1.55;
        color: #91a5b5;
        margin: 0;
        max-width: 510px;
    }

    .protocol-result-stat {
        font: 23px/1.2 var(--font-mono);
        color: var(--accent);
        white-space: nowrap;
        letter-spacing: -.055em;
    }

    .protocol-result-stat small {
        display: block;
        font: 10px/1.5 var(--font-mono);
        letter-spacing: .07em;
        color: #8195a5;
        margin-top: 5px;
        text-align: right;
    }

    .protocol-scroll-hint {
        display: none;
    }

    @media (max-width: 1050px) {
        .protocol-copy p:not(.protocol-label),
        .platform-description,
        .pricing-description {
            font-size: 15px;
        }

        .protocol-spec-values {
            font-size: 14px;
        }

    }

    @media (max-width: 1120px) {
        .protocol {
            display: block;
        }

        .protocol-copy {
            padding: 0;
            max-width: 600px;
        }

        .protocol-figure {
            margin-top: var(--landing-heading-gap);
        }
    }

    @media (max-width: 980px) {

        .protocol-copy p:not(.protocol-label),
        .platform-description,
        .pricing-description {
            font-size: 16px;
        }

        .protocol-figure-head {
            font-size: 10px;
        }

        .protocol-result-stat {
            font-size: 20px;
        }
    }

    @media (max-width: 520px) {
        .protocol-figure figcaption {
            gap: 16px;
            grid-template-columns: 1fr;
        }

        .protocol-result-stat small {
            text-align: left;
        }

    }

    @container protocol-figure (width < 610px) {
        .protocol-scroll {
            padding-bottom: 8px;
        }

        .protocol-scroll-hint {
            display: block;
            color: #8296a8;
            font-size: 12px;
            margin: 9px 0 12px;
        }
    }

    /* Secondary CTA belongs to the benefits grid, not a separate section. */
    .benefits-trial {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px 16px;
        margin-top: 32px;
    }

    .benefits-trial p {
        margin: 0;
        color: var(--text-muted);
        font-size: clamp(18px, 2vw, 22px);
        line-height: 1.5;
    }

    .benefits-trial .btn {
        max-width: 100%;
        flex-shrink: 0;
        white-space: normal;
    }

    @media (max-width: 560px) {
        .benefits-trial {
            align-items: flex-start;
            flex-direction: column;
            margin-top: 28px;
        }
    }

    /* Landing section rhythm; CQL owns its inner layout. */
    section.cql {
        --cql-padding-start: var(--landing-section-inset);
        --cql-padding-end: var(--landing-section-bottom);
    }

    .platform-section {
        position: relative;
        padding: var(--landing-section-inset) 0 var(--landing-section-bottom);
    }

    .platform-layout {

        --apps-content-top: 30px;
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    }

    .platform-content {
        min-width: 0;
        padding: var(--apps-content-top) clamp(24px, 3vw, 48px) 20px 0;
    }

    .section-eyebrow {
        margin: 0 0 12px;
    }

    .platform-title {
        margin: 0 0 14px;
        color: #e9eef2;
    }

    .platform-description {
        margin: 0 0 26px;
        color: #9cabb8;
        font-family: var(--font-content);
    }

    .platform-preview {
        --preview-fade: 40px;
        display: grid;
        grid-template-rows: auto 1fr;
        min-width: 0;
        margin: 0;
        background: linear-gradient(
            to bottom,
            transparent,
            var(--bg-card) var(--preview-fade),
            var(--bg-card) calc(100% - var(--preview-fade)),
            transparent
        );
        border-inline-start: 1px solid var(--border-soft);
        border-image: linear-gradient(
            to bottom,
            transparent,
            var(--border-soft) var(--preview-fade),
            var(--border-soft) calc(100% - var(--preview-fade)),
            transparent
        ) 1;
    }

    .platform-preview-caption {
        margin-inline: 24px;
        padding-block: 16px;
        border-bottom: 1px solid var(--border-soft);
        color: #9cabb8;
        font: 12px/1.5 var(--font-mono);
        letter-spacing: .08em;
    }

    .platform-preview-stage {
        display: grid;
        place-items: center;
        padding: 20px;
    }

    .platform-device {
        display: block;
        width: min(100%, 400px);
        height: auto;
    }

    @media (width > 900px) {
        .platform-preview {
            margin-block-start: var(--apps-content-top);
        }

        .platform-preview-caption {
            padding-block-start: 0;
        }
    }

    @media (max-width: 900px) {
        .platform-layout {
            grid-template-columns: minmax(0, 1fr);
        }

        .platform-content {
            padding-inline-end: 0;
        }

        .platform-preview {
            border-inline-start: 0;
        }

        .platform-device {
            width: min(100%, 350px);
        }
    }

    .pricing-section,
    .faq-section {
        padding: var(--landing-section-inset) 0 var(--landing-section-bottom);
        font-family: var(--font-content);
    }

    .pricing-head,
    .faq-head {
        margin-bottom: var(--landing-heading-gap);
        padding-top: 30px;
        border-top: 1px solid var(--border-soft);
    }

    .pricing-head {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }

    .pricing-head > div {
        grid-column: span 2;
    }

    .pricing-title,
    .faq-title {
        margin: 0;
    }

    .pricing-description {
        max-width: 36ch;
        margin: 0;
        color: var(--text-muted);
    }

    @media (max-width: 900px) {
        .pricing-head {
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .pricing-head > div {
            grid-column: auto;
        }
    }

    @media (max-width: 700px) {
        .pricing-head {
            grid-template-columns: 1fr;
            gap: 12px;
        }
    }

    .faq-list {
        border: 1px solid var(--border-soft);
        border-radius: var(--radius);
        --faq-inset: clamp(16px, 2.4vw, 30px);
        overflow: clip;
    }

    .faq-item + .faq-item {
        border-top: 1px solid var(--border-soft);
    }

    .faq-item[open],
    .faq-question:hover {
        background: var(--bg-card);
    }

    .faq-question {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 16px;
        padding: 18px var(--faq-inset);
        color: var(--text-main);
        font-size: clamp(16px, 1.5vw, 19px);
        font-weight: 500;
        line-height: 1.35;
        list-style: none;
        cursor: pointer;
    }

    .faq-question::-webkit-details-marker {
        display: none;
    }

    .faq-question:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: -2px;
    }

    .faq-question::after {
        width: 12px;
        height: 12px;
        background:
            linear-gradient(var(--accent), var(--accent)) center / 100% 1px no-repeat,
            linear-gradient(var(--accent), var(--accent)) center / 1px 100% no-repeat;
        content: "";
    }

    .faq-item[open] .faq-question::after {
        background-size: 100% 1px, 1px 0;
    }

    .faq-answer {
        padding: 0 var(--faq-inset) 20px;
        color: var(--text-muted);
        font-size: 16px;
        line-height: 1.65;
    }

    .faq-answer p {
        margin: 0;
    }

    .faq-answer p + p {
        margin-top: 12px;
    }

    @media (width > 1920px) {
        .hero-bg {
            mask-image: linear-gradient(to left, transparent, #000 96px);
        }
    }

    @media (max-width: 800px) {
        .hero-art {
            right: 0;
            width: 100%;
            height: auto;
            mask-image: none;
        }

        .hero-shell {
            min-height: 0;
            padding-top: clamp(32px, 7vw, 56px);
            padding-bottom: calc(100% / var(--hero-image-ratio));
        }

        .hero-title {
            font-size: clamp(29px, 7.8vw, 52px);
        }
    }

    @media (max-width: 460px) {
        .hero-actions {
            flex-direction: column;
            align-items: stretch;
            max-width: 340px;
        }
    }
}
