* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ---- Type ---- */
    --font-sans: 'Space Grotesk', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* ---- Surfaces ---- */
    --dark-bg: #0b0b16;
    --panel-bg: #131326;
    /* Channel triplets for the rgba() overlays built on these colours. */
    --dark-rgb: 11, 11, 22;
    --panel-rgb: 19, 19, 38;
    --go-rgb: 2, 195, 154;

    /* ---- Brand violet ---- */
    --accent-violet: #7b6ef6;
    --accent-violet-rgb: 123, 110, 246;
    --violet-hover: #8f83ff;   /* button + nav hover */
    --violet-light: #9d8bff;   /* agent name in the terminal */
    --violet-pale: #b8aaff;    /* highlighted figures in the hero beats */

    /* ---- Verdict / status ---- */
    --go: #02c39a;
    --nogo: #f96167;
    --warn: #f5c451;    /* HTTP verb, borderline scores, amber dot */
    --url: #7fd8ff;     /* URLs in the terminal */

    /* Backdrop for copy that sits over the particle field. */
    --scrim: radial-gradient(ellipse 62% 60% at var(--scrim-x, 50%) var(--scrim-y, 50%),
             rgba(var(--dark-rgb), 0.95) 0%,
             rgba(var(--dark-rgb), 0.88) 40%,
             rgba(var(--dark-rgb), 0.58) 62%,
             rgba(var(--dark-rgb), 0.22) 78%,
             transparent 92%);

    /* ---- Text ramp, brightest to dimmest ---- */
    --text-primary: #f2f2f7;
    --text-body: #d6d9e3;       /* running copy */
    --text-muted: #a6abbd;      /* labels, captions, JSON keys */
    --text-secondary: #8a90a4;  /* nav, footer, subtitles */
    --text-dim: #8f8fa8;        /* mono microcopy: terminal chrome, scroll cue */

    /* For the smallest mono on the page (.chain-label, ~10px). Clears AA with room. */
    --text-dim-aa: #9a9ab2;
}

body {
    background: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Stop the rubber-band bounce past the footer on fast scrolls */
    overscroll-behavior-y: none;
}

html {
    scroll-behavior: smooth;
    overscroll-behavior-y: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* ===== FOCUS ===== */
/* One ring for everything the keyboard can reach. */
:where(a, button, [tabindex], summary):focus-visible {
    outline: 2px solid var(--accent-violet);
    outline-offset: 3px;
}

/* Focused programmatically by the skip link, never tabbed to. */
#main-content:focus { outline: none; }

.skip-link {
    position: fixed;
    top: 10px;
    left: 16px;
    z-index: 1100;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--dark-bg);
    background: var(--accent-violet);
    box-shadow: 0 8px 24px rgba(var(--accent-violet-rgb), 0.4);
    transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* The one control that is itself --accent-violet, so the shared violet ring would read as a halo. */
.skip-link:focus-visible { outline-color: var(--text-primary); }

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(var(--dark-rgb), 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--accent-violet-rgb), 0.1);
    z-index: 1000;
    padding: 16px 32px;
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

nav .logo img {
    height: 32px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-violet);
}

nav ul a[aria-current="page"] {
    color: var(--text-primary);
}

nav .nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

nav .nav-actions a { white-space: nowrap; }

/* Shared pill geometry for both nav buttons. */
nav .nav-cta,
nav .nav-ghost {
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.2px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav .nav-cta {
    color: var(--dark-bg);
    background: var(--accent-violet);
    padding: 9px 18px;
    box-shadow: 0 6px 20px rgba(var(--accent-violet-rgb), 0.35);
}

nav .nav-cta:hover {
    color: var(--dark-bg);
    background: var(--violet-hover);
    box-shadow: 0 10px 28px rgba(var(--accent-violet-rgb), 0.5);
}

nav .nav-ghost {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 17px;
}

nav .nav-ghost:hover {
    color: var(--accent-violet);
    border-color: var(--accent-violet);
    background: rgba(var(--accent-violet-rgb), 0.06);
}

/* Hamburger. Hidden above the mobile breakpoint, where the links fit inline. */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text-primary);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO: one screen, claim + action + live proof ===== */
.hero {
    min-height: 100vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 120px 0 70px;
    /* The copy scrim below bleeds 150px past the grid. */
    overflow-x: clip;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 6vw;
    align-items: center;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 max(32px, 4vw);
}

.hero-copy {
    position: relative;
    --scrim-x: 45%;
}

.hero-copy::before {
    content: '';
    position: absolute;
    inset: -140px -150px;
    z-index: -1;
    pointer-events: none;
    background: var(--scrim);
}

.hero-copy h1 {
    font-size: clamp(34px, 3.6vw, 54px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    text-wrap: balance;
    text-shadow: 0 2px 30px rgba(var(--dark-rgb), 0.9);
}

.hero-copy .hero-lead {
    font-family: var(--font-sans);
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.65;
    color: var(--text-body);
    max-width: 34em;
    margin: 0 0 36px;
    text-shadow: 0 2px 18px rgba(var(--dark-rgb), 0.9);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Right column: the live terminal. */
.hero-demo .hero-badge { margin-bottom: 16px; }
.hero-demo .terminal { max-width: 560px; }

/* Scroll affordance, centred under the whole grid. */
.hero .hero-scroll { margin: 56px auto 0; }

@media (max-width: 1000px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
    }

    .hero-demo,
    .hero-demo .terminal { max-width: 100%; }

    .hero-copy { --scrim-x: 50%; }
    .hero-copy::before { inset: -110px -40px; }
}

/* ===== NARRATIVE: three beats over the live sphere scene ===== */
/* Ordinary scrolling blocks, one screenful each. */
.narrative {
    max-width: none;
    padding: 0;

    margin: 18vh 0 0;
    /* Gap between beats; the shortest beat needs 35.2vh at 900px tall. */
    --beat-gap: 36vh;
    position: relative;
    z-index: 2;
    overflow-x: clip;
}

/* Sized by its copy, spaced by --beat-gap, so the pacing is the same on a 13" laptop and a 27" display. */
.beat {
    min-height: 0;
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 15;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.beat + .beat { margin-top: var(--beat-gap); }

.js .beat { opacity: 0; transform: translateY(28px); }
.beat.beat-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .beat { transition: opacity 0.8s ease; }
    .js .beat { transform: none; }
}

/* Legibility scrim. */
.beat::before {
    content: '';
    position: absolute;
    /* Sized to the copy and centred on it, NOT to the block. */
    top: 50%;
    left: -145px;
    right: -145px;

    height: 560px;
    transform: translateY(-50%);
    z-index: -1;
    pointer-events: none;
    background: var(--scrim);
}

.beat h2 {
    font-size: clamp(40px, 6.4vw, 72px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.1;
    /* every beat sits over the live particle field — keep the copy readable */
    text-shadow: 0 2px 30px rgba(var(--dark-rgb), 0.95), 0 0 70px rgba(var(--dark-rgb), 0.85);
    text-wrap: balance;   /* no stranded last word (see .beat-setup) */
}

.hero-accent { color: var(--accent-violet); }

/* Scroll affordance: the whole page is scroll-driven, so say it once. */
.hero-scroll {
    position: relative;   /* containing block for the scrim below */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    /* The mono-microcopy step: reads as chrome, and still clears AA over the sphere. */
    color: var(--text-dim);
    text-shadow: 0 2px 16px rgba(var(--dark-rgb), 1);
    animation: heroScrollNudge 3s ease-in-out infinite;
}

.hero-scroll::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    margin-left: -190px;   /* half the width; no transform, the parent has one */
    width: 380px;
    height: 54px;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse 50% 50% at 50% 50%,
                rgba(var(--dark-rgb), 0.92) 0%,
                rgba(var(--dark-rgb), 0.74) 45%,
                rgba(var(--dark-rgb), 0.3) 72%,
                transparent 100%);
}

@keyframes heroScrollNudge {
    0%, 100% { transform: translateY(0);   opacity: 0.85; }
    55%      { transform: translateY(6px); opacity: 1; }
}

.hero-scroll::after {
    content: '';
    width: 1px;
    height: 34px;
    transform-origin: top;
    background: linear-gradient(180deg, var(--accent-violet), transparent);
    animation: heroScrollCue 2s ease-in-out infinite;
}

@keyframes heroScrollCue {
    0%, 100% { opacity: 0.25; transform: scaleY(0.7); }
    50%      { opacity: 1;    transform: scaleY(1); }
}

/* Staggered entrance, plays once on load. */
.hero-copy > *, .hero-demo { animation: heroIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.20s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.34s; }
.hero-demo { animation-delay: 0.46s; }

@keyframes heroIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-copy > *, .hero-demo { animation: none; }
    /* The hint stays, it just stops moving. */
    .hero-scroll { animation: none; opacity: 1; }
    .hero-scroll::after { animation: none; opacity: 0.6; }
}

.beat-opportunity h2, .beat-solution h2 {
    font-size: clamp(30px, 4.4vw, 48px);
}

/* Chapter marker above a beat's headline. */
.beat-eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--accent-violet);
    margin-bottom: 22px;
    text-shadow: 0 2px 20px rgba(var(--dark-rgb), 1);
}

.beat-risk .beat-eyebrow { color: var(--nogo); }

.beat-solution { margin-bottom: 20vh; }

/* Framing line above a beat's payoff, lighter than the headline it sets up. */
.beat-setup {
    font-size: 26px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.2px;
    color: var(--text-body);
    max-width: 760px;
    margin: 0 auto 26px;
    text-shadow: 0 2px 20px rgba(var(--dark-rgb), 1);
    /* Even out the line lengths so a short last word never strands on a line of its own. */
    text-wrap: balance;
}

.beat-risk h2 {
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
    max-width: 900px;
    text-shadow: 0 2px 30px rgba(var(--dark-rgb), 1), 0 0 60px rgba(var(--dark-rgb), 0.9);
}

/* The page's credibility anchors, and its only four links. */
.beat-source a {
    color: var(--text-body);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-underline-offset: 3px;
}

.beat-source a:hover {
    color: var(--violet-light);
    text-decoration-color: currentColor;
}

/* Attribution under a beat's figures. */
.beat-source {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-top: 4px;
    text-shadow: 0 2px 20px rgba(var(--dark-rgb), 1);
}

/* highlighted numbers work in any hero beat, not just the risk beat */
.beat .beat-stat { color: var(--violet-pale); }
.beat .beat-stat.negative { color: var(--nogo); }

/* ===== SECTIONS ===== */
section {
    padding: 80px 32px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

section[id],
#main-content { scroll-margin-top: 88px; }

/* Opaque band covering layers-section → cta-final. */
.page-solid {
    position: relative;
    z-index: 2;
    background: var(--dark-bg);

    /* Every section boundary in the band is --section-gap, half paid by each side. */
    --section-gap: 144px;
    --section-pad: calc(var(--section-gap) / 2);
}

/* Dissolve the sphere into the band instead of clipping it at a hard edge. */
.page-solid::before {
    content: '';
    position: absolute;
    top: -14vh;
    left: 0;
    right: 0;
    height: 14vh;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(var(--dark-rgb), 0), var(--dark-bg));
}

/* Content sections appear over sphere */
section.layers-section,
section.trusted,
section.cta-final {
    position: relative;
    margin-top: 0;
    background: var(--dark-bg);
    margin-left: auto;
    margin-right: auto;
}

section h2 {
    font-size: clamp(32px, 4.6vw, 48px);
    font-weight: 700;
    margin-bottom: 48px;
    line-height: 1.2;
}

section h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
}

/* ===== BLIND SPOT + TERMINAL (live sphere scene) ===== */
/* "DEMO" badge over the hero terminal. */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--accent-violet);
    border: 1px solid rgba(var(--accent-violet-rgb), 0.45);
    background: linear-gradient(rgba(var(--accent-violet-rgb), 0.1), rgba(var(--accent-violet-rgb), 0.1)),
                var(--dark-bg);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero-badge .hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-violet);
    box-shadow: 0 0 10px var(--accent-violet);
    animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.65); }
}

/* live terminal: the agent's call to Kleyr */
.terminal {
    max-width: 100%;
    margin: 0;
    text-align: left;
    background: rgba(6, 6, 14, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--accent-violet-rgb), 0.35);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-bar .terminal-dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar .terminal-dot.red { background: var(--nogo); }
.terminal-bar .terminal-dot.yellow { background: var(--warn); }
.terminal-bar .terminal-dot.green { background: var(--go); }

.terminal-title {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.terminal-body {
    margin: 0;
    padding: 18px 20px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-body);
    white-space: pre-wrap;
    word-break: break-word;

    min-height: 330px;
}

.terminal-body .code-agent { color: var(--violet-light); }
.terminal-body .code-keyword { color: var(--warn); font-weight: 700; }
.terminal-body .code-string { color: var(--url); }
.terminal-body .code-dim { color: var(--text-dim); }
.terminal-body .code-key { color: var(--text-muted); }
.terminal-body .code-go { color: var(--go); font-weight: 700; }
.terminal-body .code-nogo { color: var(--nogo); font-weight: 700; }
.terminal-body .code-caution { color: var(--warn); font-weight: 700; }

/* ===== HOW IT WORKS: three steps + the call itself ===== */
.how {
    max-width: 1240px;
    padding: var(--section-gap) 32px var(--section-pad);

    --how-panel: 840px;
}

.how-head {
    text-align: center;
    margin-bottom: 52px;
}

.how-heading {
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 0;   /* the head block owns the spacing, not the h2 */
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    list-style: none;
    max-width: 1000px;
    margin: 0 auto 24px;
}

.how-step {
    position: relative;
    background: rgba(var(--panel-rgb), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 22px 22px 24px;
}

@media (min-width: 861px) {
    .how-step + .how-step::before {
        content: '→';
        position: absolute;
        top: 50%;
        left: -18px;
        width: 18px;
        transform: translateY(-50%);
        text-align: center;
        line-height: 1;
        font-family: var(--font-mono);
        font-size: 16px;
        color: var(--accent-violet);
    }
}

.how-step-num {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--accent-violet);
    margin-bottom: 12px;
}

.how-step-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.how-step-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.how-terminal {
    max-width: var(--how-panel);
    margin: 0 auto;
}

.how-bar {
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    flex-wrap: wrap;
    background: none;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.how-tabs { display: flex; gap: 4px; }

.how-tab {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.how-tab:hover { color: var(--text-primary); }

.how-tab[aria-selected="true"] {
    color: var(--accent-violet);
    background: rgba(var(--accent-violet-rgb), 0.12);
    border-color: rgba(var(--accent-violet-rgb), 0.35);
}

.how-copy {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.how-copy:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.3); }
.how-copy.is-copied { color: var(--go); border-color: rgba(var(--go-rgb), 0.45); }

.how-tab:focus-visible,
.how-copy:focus-visible {
    outline: 2px solid var(--accent-violet);
    outline-offset: 2px;
}

/* Code, unlike the hero's log, must not rewrap. */
.how-code,
.how-response {
    min-height: 0;
    padding: 18px 20px;
    white-space: pre;
    word-break: normal;
    overflow-x: auto;
}

.how-code[hidden] { display: none; }

.how-response-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
}

/* Same green as a GO verdict, at chip weight rather than headline weight. */
.how-status {
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--go);
    border: 1px solid rgba(var(--go-rgb), 0.4);
    background: rgba(var(--go-rgb), 0.1);
}

.how-response-label { color: var(--text-dim); }

.how-response {
    padding-top: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.how-protocols {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    max-width: var(--how-panel);
    margin: 30px auto 0;
    font-family: var(--font-mono);

    text-align: center;
}

.how-protocols-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Own wrap context so the four chips break among themselves before they break away from each other. */
.how-protocol-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.how-protocol {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--violet-pale);
    border: 1px solid rgba(var(--accent-violet-rgb), 0.35);
    background: rgba(var(--accent-violet-rgb), 0.08);
    border-radius: 999px;
    padding: 3px 10px;
}

.how-protocols-note {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .how { padding-inline: 16px; }
    .how-protocols { margin-top: 24px; }
    .how-head { margin-bottom: 36px; }
    .how-steps { grid-template-columns: 1fr; }
}

/* ===== 4 LAYERS: peeling stack ===== */
.layers-section {
    max-width: 100%;
    margin: 0;
    padding: var(--section-pad) 0;
}

.layers-section:focus-visible {
    outline: 2px solid var(--accent-violet);
    outline-offset: -6px;
}

.layers-section-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5vw;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

/* Capped so the whole section still fits one screen on a laptop. */
.layers-stage {
    flex: 0 0 48%;
    height: min(52vh, 460px);
    position: relative;
}

/* The canvas is decoration behind the controls; only the arrows take input. */
#layers-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; pointer-events: none; }

/* ---- label tether ---- */
/* Names the plate the panel is currently describing. */
.layers-tether {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;   /* over the canvas (1), under the arrows (3) */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    will-change: transform;
}

/* Set by layers.js when the stage is too short for the chip and its line to sit above the stack. */
.layers-tether.is-off { visibility: hidden; }

/* the hairline down to the plate, brightest where it meets it */
.layers-tether::after {
    content: '';
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom,
                rgba(var(--accent-violet-rgb), 0.18),
                rgba(var(--accent-violet-rgb), 0.75));
}

.layers-tether-chip {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1.5;
    white-space: nowrap;
    padding: 4px 11px;
    border-radius: 999px;

    color: var(--layer-hex, var(--violet-pale));
    border: 1px solid rgba(var(--accent-violet-rgb), 0.5);
    background: rgba(var(--dark-rgb), 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: color 0.4s ease;
}

/* left / right layer navigation arrows, flanking the stage */
.layers-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(var(--accent-violet-rgb), 0.14), rgba(var(--accent-violet-rgb), 0.14)),
                var(--panel-bg);
    border: 1px solid var(--accent-violet);
    color: var(--violet-pale);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}
.layers-nav svg { width: 20px; height: 20px; }

.layers-nav:hover,
.layers-nav:focus-visible {
    background: var(--violet-hover);
    border-color: var(--violet-hover);
    color: var(--dark-bg);
}

.layers-nav.layers-nav-prev { left: 4px; }
.layers-nav.layers-nav-next { right: 4px; }
.layers-nav[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }

.layers-panel { flex: 0 1 420px; }

.layers-eyebrow,
.how-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--accent-violet);
    margin-bottom: 14px;
}

/* section framing: ties the layers back to the API verdict */
.layers-heading {
    font-size: clamp(24px, 2.6vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.layers-lead {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 400px;
    margin-bottom: 28px;
}

.layers-lead strong { color: var(--text-primary); font-weight: 600; }

.layers-copy {
    padding-top: 32px;
    border-top: 1px solid rgba(var(--accent-violet-rgb), 0.18);
}

.layers-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    color: var(--layer-hex, var(--accent-violet));
    transition: color 0.4s ease;
}

.layers-desc {
    font-size: 16px;
    color: var(--text-body);
    line-height: 1.7;
    min-height: 84px;
}

.layers-copy.layers-in { animation: layerIn 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes layerIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.layers-dots { display: flex; gap: 8px; margin-top: 24px; }
.layers-dots button {
    width: 44px; height: 6px; border-radius: 3px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    position: relative;
    overflow: hidden;   /* the fill is clipped to the pill, not rounded twice */
}
.layers-dots button::before {
    content: '';
    position: absolute;
    inset: -12px -5px;
}
.layers-dots button:hover { background: rgba(255, 255, 255, 0.24); }

.layers-dots button > span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--layer-hex, var(--accent-violet));
}
.layers-dots button[aria-current="true"] > span { transform: scaleX(1); }
.layers-dots button.is-timing > span {
    animation: layerFill var(--layer-auto, 5000ms) linear forwards;
}
.layers-dots.is-paused button.is-timing > span { animation-play-state: paused; }
@keyframes layerFill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* The bar itself is 6px tall, so the shared 3px offset would ring a 12px sliver. */
.layers-dots button:focus-visible { outline-offset: 6px; }

@media (max-width: 900px) {
    .layers-section-inner { flex-direction: column; gap: 24px; }
    .layers-stage { flex: none; width: 92%; height: 42vh; }
    .layers-panel { flex: none; width: 92%; text-align: center; }
    .layers-dots { justify-content: center; }
    .layers-title { font-size: 34px; }
    /* Narrower column, so the longest layer runs to four lines here. */
    .layers-desc { min-height: 112px; }

    .layers-tether-chip { font-size: 11px; padding: 3px 9px; }
    .layers-tether::after { height: 14px; }
}

/* ===== TARGETS (who Kleyr is built for) ===== */
.targets {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--section-pad) 32px;
}

.targets h2 {
    text-align: center;
    margin-bottom: 12px;
    padding: 0 16px;
}

.targets-sub {
    text-align: center;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 760px;
    /* Centred copy strands its last line otherwise. */
    text-wrap: balance;
    margin: 0 auto 14px;
}

/* The audience picker + the chain it drives. */
.chain {
    max-width: 1100px;
    margin: 0 auto;
}

.chain-hint {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 34px;
}

.chain-hint-mark {
    color: var(--violet-light);
    font-size: 12px;
    line-height: 1;
}

/* No pill row: the five middle tiles in the drawing below are the tabs. */

.chain-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;   /* the lit tile lifts and glows past the viewBox */
}

/* ---- The money path ---- */
/* One hairline, drawn tile edge to tile edge, on a gradient that brightens towards the merchant. */
.chain-flow path {
    fill: none;
    stroke: url(#chain-flow-grad);
    stroke-width: 1;
    stroke-linecap: round;
}

.chain-chevron {
    fill: none;
    stroke: rgba(214, 217, 227, 0.5);
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chain-pulse {
    fill: var(--violet-light);
    filter: drop-shadow(0 0 5px rgba(var(--accent-violet-rgb), 0.9));
    animation: chainPulse 9s linear infinite;
}

@keyframes chainPulse {
    0% { transform: translateX(92px); opacity: 0; }
    10% { opacity: 1; }
    88% { opacity: 1; }
    100% { transform: translateX(984px); opacity: 0; }
}

/* ---- The tiles ---- */

.chain-node,
.chain-anchor {
    transform: none;
    filter: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.chain-node[aria-selected="true"] {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 12px rgba(var(--accent-violet-rgb), 0.45));
}

.chain-node {
    --tile-line: rgba(255, 255, 255, 0.36);
    --glyph-line: rgba(214, 217, 227, 0.62);
    --label-fill: var(--text-muted);
    cursor: pointer;
}

.chain-node:hover {
    --tile-line: rgba(255, 255, 255, 0.55);
    --glyph-line: var(--text-primary);
    --label-fill: var(--text-primary);
}

/* User and merchant are not audiences. */
.chain-anchor {
    --tile-line: rgba(255, 255, 255, 0.22);
    --glyph-line: rgba(214, 217, 227, 0.5);
    --label-fill: var(--text-dim-aa);
}

.chain-tile {
    fill: #121224;
    stroke: var(--tile-line);
    stroke-width: 1;
    transition: stroke 0.25s ease;
}

.chain-glyph {
    fill: none;
    stroke: var(--glyph-line);
    stroke-width: 1.25;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: stroke 0.25s ease;
}

/* Closed faces, so a glyph's own back edges don't show through it. */
.chain-glyph-face { fill: #121224; }

.chain-dot { fill: var(--text-primary); opacity: 0.75; }

/* The tab's hit area. */
.chain-hit {
    fill: none;
    pointer-events: none;
}

.chain-focus {
    fill: none;
    stroke: none;
    stroke-width: 2;
}

.chain-node:focus { outline: none; }
.chain-node:focus-visible .chain-focus { stroke: var(--accent-violet); }

/* ---- The request ---- */
/* Dashed because it is a call and not money, and its dashes travel up the arc towards Kleyr. */
.chain-link {
    fill: none;
    stroke: var(--accent-violet);
    stroke-width: 1.25;
    stroke-dasharray: 5 6;
    stroke-linecap: round;
    opacity: 0;
    transition: opacity 0.25s ease;
}

@keyframes chainRequestDrift {
    from { stroke-dashoffset: 11; }
    to { stroke-dashoffset: 0; }
}

.chain[data-audience="agents"] [data-for="agents"],
.chain[data-audience="frameworks"] [data-for="frameworks"],
.chain[data-audience="psps"] [data-for="psps"],
.chain[data-audience="rails"] [data-for="rails"],
.chain[data-audience="banks"] [data-for="banks"] {
    opacity: 1;
    --tile-line: var(--accent-violet);
    --glyph-line: var(--violet-light);
    --label-fill: var(--violet-pale);
}

/* ---- Kleyr ---- */
.chain-mark-body {
    fill: rgba(var(--accent-violet-rgb), 0.28);
    stroke: var(--violet-light);
    stroke-width: 1.6;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 12px rgba(var(--accent-violet-rgb), 0.55));
}

.chain-mark-floor { fill: var(--dark-bg); }

/* The brand mark inside the diamond. */
.chain-mark-logo { fill: var(--text-primary); }

/* The verdict, in the same pill the response block upstairs wears. */
.chain-verdict-floor { fill: var(--dark-bg); }

.chain-verdict-pill {
    fill: rgba(var(--go-rgb), 0.1);
    stroke: rgba(var(--go-rgb), 0.4);
    stroke-width: 1;
}

.chain-verdict-text {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    fill: var(--go);
    text-anchor: middle;
}

.chain-verdict { animation: chainGo1 0.18s ease 0.15s both; }
.chain[data-audience="frameworks"] .chain-verdict { animation-name: chainGo2; }
.chain[data-audience="psps"] .chain-verdict { animation-name: chainGo3; }
.chain[data-audience="rails"] .chain-verdict { animation-name: chainGo4; }
.chain[data-audience="banks"] .chain-verdict { animation-name: chainGo5; }

@keyframes chainGo1 { from { opacity: 0; transform: translateY(-3px); } }
@keyframes chainGo2 { from { opacity: 0; transform: translateY(-3px); } }
@keyframes chainGo3 { from { opacity: 0; transform: translateY(-3px); } }
@keyframes chainGo4 { from { opacity: 0; transform: translateY(-3px); } }
@keyframes chainGo5 { from { opacity: 0; transform: translateY(-3px); } }

.chain-label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    fill: var(--label-fill, var(--text-dim-aa));
    text-anchor: middle;
    transition: fill 0.25s ease;
}

.chain-mark-label {
    fill: var(--violet-pale);
    letter-spacing: 2px;
}

/* ---- The copy panel: the figure, in words ---- */

.chain-panel {
    margin-top: 28px;
    min-height: 140px;
}

.chain-copy {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    animation: chainFade 0.2s ease both;
}

.chain-copy[hidden] { display: none; }

@keyframes chainFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.chain-copy-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.chain-copy-title {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.chain-copy-qual {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.chain-copy-body {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-wrap: balance;
}

/* The drawing is 1076 units wide, so below roughly this width every unit is under 0.8 CSS pixels. */
@media (max-width: 900px) {
    .chain-label { display: none; }

    .chain-hit { pointer-events: all; }

    .chain-tile,
    .chain-glyph,
    .chain-flow path,
    .chain-chevron,
    .chain-link,
    .chain-mark-body,
    .chain-verdict-pill { vector-effect: non-scaling-stroke; }

    .chain-tile,
    .chain-glyph,
    .chain-flow path,
    .chain-chevron,
    .chain-link,
    .chain-verdict-pill { stroke-width: 1; }
    .chain-mark-body { stroke-width: 1.3; }

    .chain-link { stroke-dasharray: 7 8; }
}

@media (max-width: 700px) {
    .chain-copy-title { font-size: 21px; }
    .chain-copy-body { font-size: 16px; }
}

@media (max-width: 470px) { .chain-panel { min-height: 154px; } }
@media (max-width: 430px) { .chain-panel { min-height: 182px; } }

/* ===== TRUSTED BY DESIGN ===== */
.trusted {
    background: var(--dark-bg);
    padding: var(--section-pad) 64px;
    max-width: 1400px;
    position: relative;

}

/* Soft violet glow bleeding down from above, across the section boundary. */
.trusted::before {
    content: '';
    position: absolute;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1120px, 92vw);
    height: 720px;
    background: radial-gradient(ellipse at center,
                rgba(var(--accent-violet-rgb), 0.16) 0%,
                rgba(var(--accent-violet-rgb), 0.08) 34%,
                rgba(var(--accent-violet-rgb), 0.02) 58%,
                transparent 74%);
    pointer-events: none;
}

.trusted h2 {
    text-align: center;
    margin-bottom: 14px;
    position: relative;
}

.trusted-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 72px;
    position: relative;
}

.trusted-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: start;
    position: relative;
}

.trusted-item {
    background: rgba(var(--panel-rgb), 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(var(--accent-violet-rgb), 0.2);
    border-radius: 20px;
    padding: 48px 40px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.trusted-item:hover {
    border-color: var(--accent-violet);
    box-shadow: 0 16px 56px rgba(var(--accent-violet-rgb), 0.2);
    transform: translateY(-6px);
}

.trusted-glyph {
    width: 30px;
    height: 30px;
    display: block;
    margin-bottom: 22px;
    fill: none;
    stroke: var(--accent-violet);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trusted-item h3 {
    font-family: var(--font-sans);
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.3;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(var(--accent-violet-rgb), 0.15);
}

.trusted-item p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== CTA FINAL ===== */
.cta-final {
    text-align: center;
    padding: var(--section-gap) 32px;
    background: var(--dark-bg);
    position: relative;
}

/* Focal violet glow behind the call to action, centred on the block. */
.cta-final::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1000px, 92vw);
    /* Capped to the section's own height. */
    height: min(700px, 100%);
    background: radial-gradient(ellipse at center,
                rgba(var(--accent-violet-rgb), 0.20) 0%,
                rgba(var(--accent-violet-rgb), 0.09) 34%,
                rgba(var(--accent-violet-rgb), 0.02) 58%,
                transparent 74%);
    pointer-events: none;
}

.cta-inner { position: relative; max-width: 840px; margin: 0 auto; }

.cta-eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--accent-violet);
    margin-bottom: 24px;
}

.cta-final h2 {
    font-size: clamp(38px, 5.5vw, 68px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.cta-sub {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 44px;
}

/* Keeps a short phrase on one line so wraps land at sentence boundaries. */
.no-wrap { white-space: nowrap; }

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-sans);
    padding: 18px 38px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--accent-violet);
    color: var(--dark-bg);
    box-shadow: 0 10px 34px rgba(var(--accent-violet-rgb), 0.45);
}

.btn-primary:hover {
    background: var(--violet-hover);
    box-shadow: 0 16px 48px rgba(var(--accent-violet-rgb), 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover {
    border-color: var(--accent-violet);
    color: var(--accent-violet);
    background: rgba(var(--accent-violet-rgb), 0.06);
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark-bg);
    border-top: 1px solid rgba(var(--accent-violet-rgb), 0.1);
    padding: 48px 32px 32px;
    margin-top: 80px;
    position: relative;
    z-index: 3;
}

/* Brand column takes the slack, link columns size to their own content. */
.footer-content {
    max-width: 1400px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: minmax(200px, 1fr) repeat(4, auto);

    gap: 40px clamp(32px, 5vw, 72px);
    align-items: start;
}

/* ---- brand column ---- */
/* The nav's lockup at footer scale. */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    /* Only as wide as the lockup, so the hover target isn't the whole column. */
    align-self: flex-start;
}

.footer-brand-mark img {
    height: 26px;
    width: auto;
}

.footer-brand-mark:hover { color: var(--accent-violet); }

.footer-tagline {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 30ch;
}

.footer-section h4 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-violet);
}

.footer-bottom {
    border-top: 1px solid rgba(var(--accent-violet-rgb), 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.footer-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-branding .footer-copyright {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.footer-logo {
    height: 20px;
    width: auto;
    opacity: 0.8;
}

.footer-branding p {
    margin: 0;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 24px 20px;
        background: var(--dark-bg);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(var(--accent-violet-rgb), 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }

    nav ul li { padding: 6px 0; }

    nav .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-top: 8px;
    }

    nav .nav-actions .nav-cta,
    nav .nav-actions .nav-ghost {
        display: block;
        text-align: center;
        white-space: normal;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    nav.nav-open ul {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    section {
        padding: 60px 16px;
    }

    .trusted-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }

    .footer-brand { grid-column: 1 / -1; }

    .page-solid { --section-gap: 96px; }

    .targets { padding-inline: 20px; }
    .layers-section { padding-inline: 0; }
    .trusted { padding-inline: 24px; }
    .cta-final { padding-inline: 20px; }

    .trusted-item { padding: 32px 26px; }

    .narrative { --beat-gap: 18vh; margin-top: 12vh; }

    .hero { padding: 104px 0 56px; }
}

/* ===== REDUCED MOTION ===== */
/* Last block in the file so it wins over anything above it. */
@media (prefers-reduced-motion: reduce) {
    /* The narrative reveals on scroll. Here it is simply already there. */
    .beat { transition: none; }
    .js .beat { opacity: 1; transform: none; }

    .hero-badge .hero-badge-dot,
    .layers-copy.layers-in { animation: none; }

    .layers-dots button > span { animation: none; }

    .chain-node,
    .chain-anchor,
    .chain-tile,
    .chain-glyph,
    .chain-label,
    .chain-link { transition: none; }
    .chain-pulse { display: none; }
    .chain-copy,
    .chain-link { animation: none; }

    .chain[data-audience] .chain-verdict { animation: none; }

    /* Lift-on-hover. */
    .trusted-item:hover { transform: none; }
}

/* ===== SIMPLE PAGES (privacy.html, terms.html, 404.html) ===== */

.simple-main {
    max-width: 720px;
    margin: 0 auto;

    padding: 152px 24px 88px;
}

.simple-main h1 {
    font-size: clamp(34px, 4.6vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.simple-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-body);
}

.simple-body a { color: var(--accent-violet); }

.simple-updated {
    margin-top: 40px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

/* Action row under the body copy (the 404's way back). */
.simple-actions { margin-top: 36px; }

/* ===== LONG-FORM DOCUMENTS (privacy, terms, product/kyd) ===== */

/* The product page runs wider than the legal documents. */
.simple-main.simple-wide {
    max-width: 1040px;
    padding-left: 16px;
    padding-right: 16px;
}

/* Dated at the top, under the title, where a reader checks a legal document. */
.simple-doc .simple-updated {
    margin: -8px 0 44px;
}

/* One sentence between the title and the first section. */
.simple-doc .simple-lede {
    font-size: 18px;
    line-height: 1.75;
    color: var(--text-body);
}

/* The product demo, between the lede and the first clause, wearing the landing page's terminal chrome. */
.simple-doc .simple-video { margin-top: 36px; }

.simple-video .terminal-video {
    display: block;
    width: 100%;
    /* The file's own ratio, declared so the frame holds its height before preload="metadata" resolves. */
    aspect-ratio: 16 / 9;
    background: #06060e;
}

/* A hairline above every section, in the accent at the same 0.15 the trusted cards use. */
.simple-doc > h2 {
    margin: 52px 0 16px;
    padding-top: 28px;
    border-top: 1px solid rgba(var(--accent-violet-rgb), 0.15);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

/* The clause number, set as .how-step-num. */
.simple-doc .simple-num {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--accent-violet);
}

.simple-doc > h3 {
    margin: 30px 0 10px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.2px;
    color: var(--text-primary);
}

.simple-doc > p:not([class]) {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-body);
}

.simple-doc > p:not([class]) + p:not([class]) { margin-top: 14px; }

/* A paragraph that follows something other than a paragraph still needs its air. */
.simple-doc > :is(ul, ol, table, .simple-table-wrap, .simple-cards, .terminal) + p:not([class]) {
    margin-top: 20px;
}

.simple-doc > :is(ul, ol):not([class]) {
    margin-top: 14px;
    padding-left: 24px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-body);
}

.simple-doc > :is(ul, ol):not([class]) > li + li { margin-top: 8px; }

.simple-doc > :is(ul, ol):not([class]) > li::marker { color: var(--accent-violet); }

/* Underlined, unlike every other link on the site. */
.simple-doc a:not([class]) {
    color: var(--accent-violet);
    text-decoration-color: rgba(var(--accent-violet-rgb), 0.45);
    text-underline-offset: 3px;
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.simple-doc a:not([class]):hover {
    color: var(--violet-hover);
    text-decoration-color: var(--violet-hover);
}

.simple-doc strong { font-weight: 600; color: var(--text-primary); }

.simple-doc code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    color: var(--violet-light);
}

/* Built from .how-step's card with the terminal's mono keys as column heads. */
.simple-table-wrap {
    margin-top: 22px;
    overflow-x: auto;
    background: rgba(var(--panel-rgb), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.simple-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    text-align: left;
}

.simple-table th {
    padding: 15px 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--accent-violet);
    border-bottom: 1px solid rgba(var(--accent-violet-rgb), 0.2);
}

.simple-table td {
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    vertical-align: top;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.simple-table tbody tr:first-child td { border-top: none; }

.simple-table td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.simple-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.simple-card {
    background: rgba(var(--panel-rgb), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 22px 22px;
}

.simple-card h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.simple-card p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.simple-doc .simple-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

@media (max-width: 640px) {
    .simple-cards { grid-template-columns: 1fr; }
    .simple-doc > h2 { font-size: 20px; margin-top: 44px; }
}

/* ===== DEVELOPERS (developers.html) ===== */

.dev-facts {
    display: grid;
    /* Three facts share the width; under ~520px they stack two-up, then one-up. */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px 24px;
    margin-top: 28px;
    padding: 16px 20px;
    list-style: none;
    background: rgba(var(--panel-rgb), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.dev-facts li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dev-facts-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.simple-doc .dev-facts code {
    font-size: 13px;
    color: var(--text-primary);
}

/* The verdict enum as chips, in the same three colours the terminal uses. */
.dev-verdict {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.dev-verdict-go {
    color: var(--go);
    border: 1px solid rgba(var(--go-rgb), 0.4);
    background: rgba(var(--go-rgb), 0.1);
}

.dev-verdict-caution {
    color: var(--warn);
    border: 1px solid rgba(245, 196, 81, 0.4);
    background: rgba(245, 196, 81, 0.1);
}

.dev-verdict-nogo {
    color: var(--nogo);
    border: 1px solid rgba(249, 97, 103, 0.4);
    background: rgba(249, 97, 103, 0.1);
}

.simple-card h3 code {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--violet-light);
}

.simple-doc > .terminal { margin-top: 22px; }
.simple-doc > .terminal + .terminal { margin-top: 16px; }

.simple-doc .terminal .how-response + .how-response-head { margin-top: 0; }
