/* ============================================================
   MERIDIAN LABS — "Meridian Instrument" design system (v3)
   Ink / starlight / meridian gold · Fraunces + Space Grotesk + IBM Plex Mono
   Signature: the meridian line — a vertical survey scale running the page
   ============================================================ */

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

:root {
    /* Ink scale */
    --ink: #080B12;
    --ink-2: #0C101A;
    --ink-3: #111624;
    --ink-veil: rgba(8, 11, 18, 0.86);

    /* Light */
    --starlight: #EDEBE4;
    --star-dim: #A8ACB8;
    --star-mute: #858C9E;

    /* Accent */
    --gold: #C8A84E;
    --gold-bright: #E3C874;
    --gold-dim: rgba(200, 168, 78, 0.16);
    --signal: #D96C5F;

    /* Lines */
    --hairline: rgba(237, 235, 228, 0.13);
    --hairline-strong: rgba(237, 235, 228, 0.24);

    /* Sub-brand identity chips (desaturated for ink) */
    --brand-techprep: #6FB5AE;
    --brand-vitalprep: #5FB6C9;
    --brand-aceprep: #CE8B54;
    --brand-glowstudy: #C9B788;

    /* Type */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Fluid type scale */
    --text-xs: clamp(0.6875rem, 0.65rem + 0.2vw, 0.78rem);
    --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9rem);
    --text-base: clamp(0.9688rem, 0.92rem + 0.25vw, 1.0625rem);
    --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.333rem);
    --text-xl: clamp(1.333rem, 1.1rem + 1vw, 1.777rem);
    --text-2xl: clamp(1.777rem, 1.4rem + 1.6vw, 2.4rem);
    --text-3xl: clamp(2.3rem, 1.7rem + 2.6vw, 3.4rem);
    --text-display: clamp(3rem, 1.6rem + 6.2vw, 6.6rem);

    --max-width: 1120px;
    --max-copy: 640px;
    --nav-height: 60px;
    --radius: 6px;
    --radius-lg: 10px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: calc(var(--nav-height) + 32px);
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--starlight);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--gold);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
}

/* ============================================================
   THE MERIDIAN LINE — page spine
   ============================================================ */

.meridian-line {
    position: fixed;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100vh;
    height: 100dvh;
    background: var(--hairline);
    z-index: 0;
    pointer-events: none;
}

/* survey ticks along the line */
.meridian-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: -3px;
    width: 7px;
    height: 100%;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 119px,
        var(--hairline-strong) 119px,
        var(--hairline-strong) 120px
    );
}

/* gold scroll-progress fill */
.meridian-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--gold) 12%, var(--gold));
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0.55;
}

/* every section paints above the line; text still occludes it */
section, .nav, .footer, .trust-band {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .meridian-line { display: none; }
}

/* ============================================================
   TYPOGRAPHY PRIMITIVES
   ============================================================ */

h1, h2, .display {
    font-family: var(--font-display);
    font-weight: 420;
    font-variation-settings: "opsz" 100;
    letter-spacing: -0.015em;
    line-height: 1.06;
    color: var(--starlight);
}

h3, h4 {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--starlight);
}

/* mono eyebrow */
.section-label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 18px;
}

.section-label::after {
    content: "";
    display: block;
    width: 32px;
    height: 1px;
    background: var(--gold);
    opacity: 0.5;
    margin-top: 14px;
}

.section-head-center { text-align: center; }
.section-head-center .section-label::after { margin-left: auto; margin-right: auto; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--nav-height);
    background: var(--ink-veil);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--starlight);
    text-decoration: none;
    white-space: nowrap;
}

.nav-logo {
    width: 30px;
    height: 26px;
    display: block;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--star-dim);
    text-decoration: none;
    transition: color 0.2s var(--ease-smooth);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--starlight);
}

.nav-mobile-actions { display: none; align-items: center; gap: 12px; }

.nav-mobile-cta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold-dim);
    padding: 7px 10px;
    border-radius: var(--radius);
    white-space: nowrap;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--starlight);
    transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    z-index: 39;
    background: var(--ink);
    padding: 40px 28px;
    display: none;
    flex-direction: column;
    gap: 32px;
}

.mobile-menu.open { display: flex; }

.mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-links a {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--starlight);
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
}

.mobile-menu-cta {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--gold);
    text-decoration: none;
    padding: 13px 22px;
    border-radius: var(--radius);
}

/* ============================================================
   HERO — observatory
   ============================================================ */

.hero {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    min-height: calc(100dvh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 96px 0 150px;
}

/* star field — pure CSS, two densities */
.hero-stars,
.hero-stars::after {
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    pointer-events: none;
}

.hero-stars::after { content: ""; }

.hero-stars {
    background-image:
        radial-gradient(1px 1px at 22px 34px, rgba(237,235,228,0.55) 50%, transparent 51%),
        radial-gradient(1px 1px at 187px 122px, rgba(237,235,228,0.4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 310px 61px, rgba(237,235,228,0.5) 50%, transparent 51%),
        radial-gradient(1px 1px at 92px 219px, rgba(237,235,228,0.35) 50%, transparent 51%),
        radial-gradient(1px 1px at 265px 274px, rgba(237,235,228,0.45) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 143px 158px, rgba(200,168,78,0.5) 50%, transparent 51%);
    background-size: 340px 300px;
    opacity: 0.5;
}

.hero-stars::after {
    background-image:
        radial-gradient(1px 1px at 51px 87px, rgba(237,235,228,0.3) 50%, transparent 51%),
        radial-gradient(1px 1px at 199px 41px, rgba(237,235,228,0.25) 50%, transparent 51%),
        radial-gradient(1px 1px at 121px 190px, rgba(237,235,228,0.28) 50%, transparent 51%);
    background-size: 230px 210px;
    opacity: 0.6;
}

/* horizon arc — faint planetary curve at the hero's base */
.hero-horizon {
    position: absolute;
    left: 50%;
    bottom: -52vw;
    transform: translateX(-50%);
    width: 165vw;
    height: 60vw;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    border-top: 1px solid var(--hairline-strong);
    background: radial-gradient(ellipse at 50% 0%, rgba(200, 168, 78, 0.055), transparent 44%), var(--ink-2);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 34px;
}

.hero h1 {
    font-size: var(--text-display);
    font-weight: 400;
    line-height: 1.02;
}

.hero h1 .hero-gradient-text {
    /* legacy class name; now the italic gold accent line */
    display: block;
    font-style: italic;
    font-weight: 470;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--gold);
}

.hero-tagline {
    font-size: var(--text-lg);
    line-height: 1.55;
    color: var(--star-dim);
    max-width: 34em;
    margin: 30px 0 0;
}

/* instrument readout strip */
.hero-stats {
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin: 56px 0 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 40px;
    position: relative;
}

.hero-stat + .hero-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22%;
    height: 56%;
    width: 1px;
    background: var(--hairline);
}

.hero-stat-value {
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: 500;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    color: var(--starlight);
}

.hero-stat-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--star-mute);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-cta,
.btn-gold {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--ink);
    background: var(--gold);
    text-decoration: none;
    padding: 15px 34px;
    border-radius: var(--radius);
    transition: background 0.2s var(--ease-smooth), transform 0.2s var(--ease-out);
}

.hero-cta:hover,
.btn-gold:hover {
    background: var(--gold-bright);
    transform: translateY(-1px);
}

.hero-cta-secondary,
.btn-ghost {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--starlight);
    background: transparent;
    border: 1px solid var(--hairline-strong);
    text-decoration: none;
    padding: 14px 34px;
    border-radius: var(--radius);
    transition: border-color 0.2s var(--ease-smooth), color 0.2s;
}

.hero-cta-secondary:hover,
.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
}

/* hero load sequence */
@media (prefers-reduced-motion: no-preference) {
    .js .hero-label,
    .js .hero h1,
    .js .hero-tagline,
    .js .hero-stats,
    .js .hero-buttons {
        opacity: 0;
        transform: translateY(14px);
        animation: hero-rise 0.9s var(--ease-out) forwards;
    }
    .js .hero h1 { animation-delay: 0.12s; }
    .js .hero-tagline { animation-delay: 0.26s; }
    .js .hero-stats { animation-delay: 0.4s; }
    .js .hero-buttons { animation-delay: 0.52s; }

    .js .meridian-line {
        transform-origin: top;
        animation: line-draw 1.4s var(--ease-out) 0.1s both;
    }
}

@keyframes hero-rise {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes line-draw {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* ============================================================
   TRUST BAND
   ============================================================ */

.trust-band {
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    background: var(--ink-2);
    padding: 18px 0;
}

.trust-band-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px 34px;
    flex-wrap: wrap;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--star-dim);
}

.trust-icon { color: var(--star-mute); flex-shrink: 0; }

.trust-pill + .trust-pill::before {
    content: "◆";
    font-size: 0.45rem;
    color: var(--gold);
    opacity: 0.6;
    margin-right: 24px;
}

.trust-divider { display: none; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */

.apps-section,
.engine-section,
.how-we-build-section,
.about-section,
.pricing-section,
.founder-section {
    padding: 110px 0;
}

.apps-section { border-bottom: 1px solid var(--hairline); }
.engine-section { background: var(--ink-2); border-bottom: 1px solid var(--hairline); }
.how-we-build-section { border-bottom: 1px solid var(--hairline); }
.about-section { background: var(--ink-2); border-bottom: 1px solid var(--hairline); }
.pricing-section { border-bottom: 1px solid var(--hairline); }

section h2 {
    font-size: var(--text-3xl);
    max-width: 24ch;
    margin-bottom: 18px;
}

.section-head-center h2 { margin-left: auto; margin-right: auto; }

.section-subtitle {
    color: var(--star-dim);
    font-size: var(--text-base);
    max-width: var(--max-copy);
    margin-bottom: 44px;
}

.section-head-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ============================================================
   APPS — the fleet
   ============================================================ */

.apps-heading { margin-bottom: 8px; }

.app-tabs {
    display: flex;
    gap: 4px;
    margin: 40px 0 36px;
    border-bottom: 1px solid var(--hairline);
    overflow-x: auto;
    scrollbar-width: none;
}

.app-tabs::-webkit-scrollbar { display: none; }

.app-tab {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--star-mute);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 18px;
    margin-bottom: -1px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s var(--ease-smooth), border-color 0.2s;
}

.app-tab:hover { color: var(--star-dim); }

.app-tab.active {
    color: var(--starlight);
    border-bottom-color: var(--gold);
}

.brand-section { display: none; }
.brand-section-active { display: block; }

/* wrapped grid replaces the horizontal carousel */
.apps-grid-wrapper { position: relative; }

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.scroll-arrow { display: none; }

.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--ink-3);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 26px 26px 22px;
    transition: border-color 0.25s var(--ease-smooth), transform 0.25s var(--ease-out);
}

.app-card:hover {
    border-color: rgba(200, 168, 78, 0.45);
    transform: translateY(-2px);
}

/* sub-brand identity chip */
.app-card::after {
    content: "";
    position: absolute;
    top: 30px;
    right: 26px;
    width: 8px;
    height: 8px;
    background: var(--chip, var(--gold));
    transform: rotate(45deg);
    opacity: 0.85;
}

.brand-chip-techprep { --chip: var(--brand-techprep); }
.brand-chip-vitalprep { --chip: var(--brand-vitalprep); }
.brand-chip-aceprep { --chip: var(--brand-aceprep); }
.brand-chip-glowstudy { --chip: var(--brand-glowstudy); }

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
    margin-bottom: 18px;
    border: 1px solid var(--hairline);
}

.app-card h3 {
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

.app-card h3 a { color: inherit; text-decoration: none; }

.app-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.85;
    margin-bottom: 12px;
}

.app-desc {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--star-dim);
    margin-bottom: 16px;
}

.app-learn-more {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: var(--starlight);
    text-decoration: none;
    margin-top: auto;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.app-learn-more:hover { color: var(--gold-bright); }

.store-links {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
}

.store-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--star-dim);
    text-decoration: none;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 7px 12px;
    transition: border-color 0.2s var(--ease-smooth), color 0.2s;
}

.store-link:hover {
    border-color: var(--hairline-strong);
    color: var(--starlight);
}

.store-link svg { flex-shrink: 0; }

.store-badge-soon {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px dashed rgba(200, 168, 78, 0.4);
    border-radius: var(--radius);
    padding: 7px 12px;
}

/* ============================================================
   ENGINE
   ============================================================ */

.engine-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 48px;
}

.engine-card {
    background: var(--ink);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 30px;
}

.engine-card-header { margin-bottom: 10px; }

.engine-card h3 {
    font-family: var(--font-display);
    font-weight: 460;
    font-size: var(--text-xl);
    line-height: 1.2;
    margin-bottom: 8px;
}

.tech-name {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold);
}

.engine-card > p {
    font-size: var(--text-sm);
    color: var(--star-dim);
    margin-bottom: 20px;
}

.engine-viz {
    border-top: 1px solid var(--hairline);
    padding-top: 20px;
}

.engine-viz svg { width: 100%; max-width: 340px; height: auto; display: block; }

.engine-link {
    display: inline-block;
    margin-top: 44px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--gold);
    text-decoration: none;
}

.engine-link:hover { color: var(--gold-bright); }

/* ============================================================
   HOW WE BUILD — stations on the meridian
   ============================================================ */

.build-steps-grid {
    position: relative;
    max-width: 760px;
    margin: 56px auto 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
    text-align: left;
}

.build-steps-grid::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 19px;
    width: 1px;
    background: var(--hairline-strong);
}

.build-step {
    position: relative;
    padding-left: 72px;
}

.build-step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    border: 1px solid rgba(200, 168, 78, 0.4);
    transform: rotate(45deg);
    border-radius: 3px;
}

.build-step-number span {
    transform: rotate(-45deg);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gold);
    line-height: 1;
}

.build-step h3 {
    font-size: var(--text-lg);
    margin-bottom: 6px;
}

.build-step p {
    color: var(--star-dim);
    font-size: var(--text-sm);
    max-width: 52ch;
}

/* ============================================================
   REVIEWS — field reports (real App Store quotes)
   ============================================================ */

.reviews-section {
    padding: 110px 0;
    border-bottom: 1px solid var(--hairline);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 48px;
}

.review-card {
    display: flex;
    flex-direction: column;
    background: var(--ink-3);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.review-stars {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    margin-bottom: 16px;
}

.review-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.review-quote {
    font-size: var(--text-sm);
    line-height: 1.65;
    color: var(--star-dim);
    margin-bottom: 20px;
}

.review-attribution {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--star-mute);
    border-top: 1px solid var(--hairline);
    padding-top: 14px;
}

.reviews-note {
    text-align: center;
    margin-top: 28px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: var(--star-mute);
}

@media (max-width: 900px) {
    .reviews-grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
    .reviews-section { padding: 72px 0; }
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-section h2 {
    font-size: var(--text-2xl);
    letter-spacing: 0.02em;
    margin-bottom: 28px;
}

.about-section .container > p {
    color: var(--star-dim);
    max-width: var(--max-copy);
    margin-bottom: 18px;
}

.about-section .container > p:first-of-type {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 420;
    line-height: 1.45;
    color: var(--starlight);
    max-width: 30em;
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 52px;
}

.vision-item {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    background: var(--ink);
}

.vision-icon {
    display: inline-flex;
    color: var(--gold);
    margin-bottom: 16px;
}

.vision-item h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.vision-item p {
    font-size: var(--text-sm);
    color: var(--star-dim);
}

/* ============================================================
   PRICING
   ============================================================ */

.pricing-subtitle {
    color: var(--star-dim);
    max-width: var(--max-copy);
    margin: 0 auto 48px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 920px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    background: var(--ink-3);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 34px 30px;
    text-align: center;
}

.pricing-card h3 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--star-mute);
    margin-bottom: 18px;
}

.pricing-price {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 430;
    color: var(--starlight);
    line-height: 1;
    margin-bottom: 24px;
}

.pricing-period {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--star-mute);
    margin-top: 10px;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    max-width: 210px;
    margin: 0 auto;
}

.pricing-features li {
    font-size: var(--text-sm);
    color: var(--star-dim);
    padding-left: 20px;
    position: relative;
}

.pricing-features li::before {
    content: "◆";
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 0.5rem;
    color: var(--gold);
    opacity: 0.7;
}

.pricing-card-featured {
    border-color: rgba(200, 168, 78, 0.5);
    background: linear-gradient(180deg, rgba(200, 168, 78, 0.06), transparent 40%), var(--ink-3);
}

.pricing-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--gold);
    padding: 4px 12px;
    border-radius: 3px;
    white-space: nowrap;
}

.pricing-free-note,
.pricing-guarantee-note {
    text-align: center;
    color: var(--star-dim);
    font-size: var(--text-sm);
    max-width: 56em;
    margin: 0 auto;
}

.pricing-free-note { margin-top: 40px; }
.pricing-guarantee-note { margin-top: 10px; color: var(--star-mute); }

/* ============================================================
   FAQ — straight answers
   ============================================================ */

.faq-section {
    padding: 110px 0;
    border-bottom: 1px solid var(--hairline);
    background: var(--ink-2);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 48px;
}

.faq-item {
    background: var(--ink);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
}

.faq-item h3 {
    font-family: var(--font-display);
    font-weight: 460;
    font-size: var(--text-lg);
    line-height: 1.25;
    margin-bottom: 10px;
}

.faq-item p {
    font-size: var(--text-sm);
    line-height: 1.65;
    color: var(--star-dim);
}

.about-research-link {
    color: var(--gold);
    text-decoration: none;
}
.about-research-link:hover { color: var(--gold-bright); }

.pricing-shape-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--star-dim);
    margin: 52px 0 24px;
}
.pricing-shape-title:first-of-type { margin-top: 8px; }

@media (max-width: 768px) {
    .faq-grid { grid-template-columns: 1fr; }
    .faq-section { padding: 72px 0; }
}

/* ============================================================
   FOUNDER
   ============================================================ */

.founder-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: var(--ink-2);
    padding: 44px;
    margin-top: 40px;
}

.founder-identity {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.founder-icon {
    width: 100%;
    max-width: 260px;
    border-radius: var(--radius-lg);
    filter: grayscale(0.9) contrast(1.02);
    border: 1px solid var(--hairline);
}

.founder-credentials {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credential-pill {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--star-dim);
    border-left: 2px solid rgba(200, 168, 78, 0.4);
    padding: 3px 0 3px 12px;
}

.founder-bio h3 {
    font-family: var(--font-display);
    font-weight: 440;
    font-size: var(--text-2xl);
    margin-bottom: 4px;
}

.founder-title {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 22px;
}

.founder-bio p {
    color: var(--star-dim);
    font-size: var(--text-base);
    margin-bottom: 16px;
    max-width: 58ch;
}

.founder-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.founder-cv-link {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--star-dim);
    text-decoration: none;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 8px 16px;
    transition: border-color 0.2s, color 0.2s;
}

.founder-cv-link:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    border-top: 1px solid var(--hairline);
    background: var(--ink-2);
    padding: 72px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--starlight);
}

.footer-tagline {
    margin-top: 14px;
    font-size: var(--text-sm);
    color: var(--star-mute);
    max-width: 30em;
}

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 18px;
}

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

.footer-col li { margin-bottom: 10px; }

.footer-col a {
    font-size: var(--text-sm);
    color: var(--star-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--starlight); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--hairline);
    padding-top: 28px;
}

.footer-copy,
.footer-attribution {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--star-mute);
}

.footer-attribution a { color: var(--star-dim); text-decoration: none; }
.footer-attribution a:hover { color: var(--starlight); }

/* ============================================================
   SCROLL REVEAL — progressive enhancement only.
   Content is fully visible without JS; .js gate adds motion.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
    .js .reveal {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    }
    .js .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   PAGES LAYER — shared subpage scaffolding
   ============================================================ */

.page-hero {
    position: relative;
    padding: 96px 0 72px;
    border-bottom: 1px solid var(--hairline);
    background: var(--ink-2);
    overflow: hidden;
}

.page-hero h1 {
    font-size: clamp(2.6rem, 1.8rem + 3.4vw, 4.4rem);
    max-width: 18ch;
}

.em-gold {
    display: block;
    font-style: italic;
    font-weight: 470;
    color: var(--gold);
}

.page-hero-lede {
    margin-top: 22px;
    color: var(--star-dim);
    font-size: var(--text-lg);
    line-height: 1.55;
    max-width: 38em;
}

.ml-section {
    padding: 96px 0;
    border-bottom: 1px solid var(--hairline);
}

.ml-section.alt { background: var(--ink-2); }

.ml-card {
    background: var(--ink-3);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.ml-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.ml-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.readout {
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.prose { max-width: var(--max-copy); }
.prose p { color: var(--star-dim); margin-bottom: 18px; }
.prose h2 { margin-top: 56px; }
.prose h3 { margin-top: 32px; margin-bottom: 10px; }
.prose ul, .prose ol { color: var(--star-dim); padding-left: 22px; margin-bottom: 18px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--gold); text-decoration: none; }
.prose a:hover { color: var(--gold-bright); }

@media (max-width: 768px) {
    .ml-grid-2, .ml-grid-3 { grid-template-columns: 1fr; }
    .ml-section { padding: 64px 0; }
    .page-hero { padding: 64px 0 48px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .apps-grid { grid-template-columns: repeat(2, 1fr); }
    .vision-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    .founder-card { grid-template-columns: 1fr; gap: 32px; }
    .founder-icon { max-width: 200px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-mobile-actions { display: flex; }
    .nav-hamburger { display: flex; }

    .hero { padding: 64px 0 96px; min-height: 0; }
    .hero-stats { flex-wrap: wrap; border: none; gap: 8px; }
    .hero-stat {
        padding: 14px 18px;
        flex: 1 1 40%;
        border: 1px solid var(--hairline);
        border-radius: var(--radius);
    }
    .hero-stat + .hero-stat::before { display: none; }

    .engine-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; }
    .apps-section, .engine-section, .how-we-build-section,
    .about-section, .pricing-section, .founder-section { padding: 72px 0; }

    .trust-pill + .trust-pill::before { display: none; }
    .trust-band-inner { gap: 12px 22px; }
}

@media (max-width: 640px) {
    .apps-grid { grid-template-columns: 1fr; }
    .vision-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .founder-card { padding: 28px 22px; }
    .build-step { padding-left: 60px; }
}

/* ============================================================
   INSTRUMENT MOTION — every animation demonstrates something.
   All hidden initial states live INSIDE no-preference blocks so
   reduced-motion users always get the finished, fully-drawn page.
   ============================================================ */

/* nav CTA (desktop) */
.nav-cta {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--ink);
    background: var(--gold);
    text-decoration: none;
    padding: 9px 18px;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: background 0.2s var(--ease-smooth);
}
.nav-cta:hover { background: var(--gold-bright); }
@media (max-width: 768px) { .nav-cta { display: none; } }

/* exam search */
.app-search {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 36px;
}
#app-search-input {
    flex: 1 1 auto;
    max-width: 480px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--starlight);
    background: var(--ink-3);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    padding: 13px 18px;
    outline: none;
    transition: border-color 0.2s var(--ease-smooth);
}
#app-search-input::placeholder { color: var(--star-mute); }
#app-search-input:focus { border-color: var(--gold); }
.app-search-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}
.apps-section.searching .app-tabs { opacity: 0.35; pointer-events: none; }
.apps-section.searching .brand-section { display: block; }
.apps-section.searching .section-subtitle { display: none; }
.app-card.search-hide { display: none; }

/* meridian reading head + register */
.meridian-head {
    position: absolute;
    left: -2.5px;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px 2px rgba(200, 168, 78, 0.5);
    transform: translateY(calc(var(--f, 0) * (100vh - 6px)));
    opacity: 0.9;
}
.meridian-register {
    position: fixed;
    left: calc(50% + 14px);
    top: calc(var(--nav-height) + 16px);
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--star-mute);
    opacity: 0;
    transition: opacity 0.45s var(--ease-smooth);
    pointer-events: none;
}
.meridian-register.reg-show { opacity: 0.85; }
@media (max-width: 768px) { .meridian-register { display: none; } }

/* phone strip — real product frames */
.phone-strip {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
    margin: 48px 0 52px;
}
.phone-strip img {
    width: clamp(150px, 18vw, 210px);
    height: auto;
    border: 1px solid var(--hairline-strong);
    border-radius: 22px;
    background: var(--ink-3);
}
.phone-strip img:nth-child(2) { margin-top: 26px; }
.phone-strip img:only-child { margin-top: 0; }

.frames-caption {
    margin-top: -28px;
    margin-bottom: 44px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--star-mute);
}
@media (max-width: 640px) {
    .phone-strip { gap: 12px; }
    .phone-strip img:nth-child(3) { display: none; }
}

/* ============================================================
   SHOWCASE — stations on the meridian (real app screens)
   ============================================================ */

.showcase-section {
    padding: 110px 0 96px;
    border-bottom: 1px solid var(--hairline);
    overflow: hidden;
}

.showcase-rail {
    position: relative;
    margin-top: 56px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    /* edge fades */
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.showcase-rail::-webkit-scrollbar { display: none; }
.showcase-rail:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.showcase-track {
    display: flex;
    align-items: flex-start;
    gap: 34px;
    width: max-content;
    margin: 0 auto;
    padding: 14px 8vw 64px;
    /* the horizontal meridian scale the stations sit on */
    background-image:
        linear-gradient(to right, var(--hairline-strong), var(--hairline-strong)),
        repeating-linear-gradient(to right, var(--hairline-strong) 0, var(--hairline-strong) 1px, transparent 1px, transparent 72px);
    background-size: 100% 1px, 100% 7px;
    background-position: 0 calc(100% - 28px), 0 calc(100% - 31px);
    background-repeat: no-repeat;
}

.showcase-station {
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0;
}

.showcase-station img {
    width: clamp(196px, 17vw, 258px);
    height: auto;
    border: 1px solid var(--hairline-strong);
    border-radius: 26px;
    background: var(--ink-3);
    box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.65);
    transition: border-color 0.3s var(--ease-smooth), transform 0.3s var(--ease-out);
}
.showcase-station:hover img { border-color: rgba(200, 168, 78, 0.55); }

.showcase-station figcaption {
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--star-mute);
    position: relative;
    padding-top: 14px;
}
/* gold station marker on the scale */
.showcase-station figcaption::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translateX(-50%) rotate(45deg);
    background: var(--gold);
    opacity: 0.9;
}

/* alternating elevation + gentle float, staggered phases */
.showcase-station:nth-child(even) { margin-top: 30px; }

@media (prefers-reduced-motion: no-preference) {
    .js .showcase-station img { animation: station-float 8s ease-in-out infinite; }
    .js .showcase-station:nth-child(2) img { animation-delay: -1.6s; animation-duration: 9s; }
    .js .showcase-station:nth-child(3) img { animation-delay: -3.1s; animation-duration: 8.4s; }
    .js .showcase-station:nth-child(4) img { animation-delay: -4.7s; animation-duration: 9.4s; }
    .js .showcase-station:nth-child(5) img { animation-delay: -6.2s; animation-duration: 8.7s; }
    .js .showcase-station:nth-child(6) img { animation-delay: -7.8s; animation-duration: 9.8s; }
    .js .showcase-station:nth-child(7) img { animation-delay: -2.4s; animation-duration: 8.9s; }
    .js .showcase-station:nth-child(8) img { animation-delay: -5.3s; animation-duration: 9.2s; }

    /* entrance: stations rise onto the scale in sequence */
    .js .showcase-rail.reveal .showcase-station {
        opacity: 0;
        transform: translateY(22px);
        transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    }
    .js .showcase-rail.reveal.visible .showcase-station { opacity: 1; transform: none; }
    .js .showcase-rail.reveal.visible .showcase-station:nth-child(2) { transition-delay: 0.09s; }
    .js .showcase-rail.reveal.visible .showcase-station:nth-child(3) { transition-delay: 0.18s; }
    .js .showcase-rail.reveal.visible .showcase-station:nth-child(4) { transition-delay: 0.27s; }
    .js .showcase-rail.reveal.visible .showcase-station:nth-child(5) { transition-delay: 0.36s; }
    .js .showcase-rail.reveal.visible .showcase-station:nth-child(6) { transition-delay: 0.45s; }
    .js .showcase-rail.reveal.visible .showcase-station:nth-child(7) { transition-delay: 0.54s; }
    .js .showcase-rail.reveal.visible .showcase-station:nth-child(8) { transition-delay: 0.63s; }
}

@keyframes station-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@media (max-width: 768px) {
    .showcase-section { padding: 72px 0 56px; }
    .showcase-track { gap: 22px; padding: 14px 10vw 56px; }
    .showcase-station img { width: clamp(180px, 56vw, 220px); }
    .showcase-station:nth-child(even) { margin-top: 18px; }
}

/* engine byline */
.engine-byline {
    margin-top: 14px;
    font-size: var(--text-sm);
    color: var(--star-mute);
}
.engine-byline a { color: var(--star-dim); text-decoration: none; border-bottom: 1px solid var(--hairline-strong); }
.engine-byline a:hover { color: var(--gold-bright); border-color: var(--gold); }

/* hover micro-interactions */
.app-card::before,
.pricing-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}
.app-card:hover::before,
.pricing-card:hover::before { transform: scaleX(1); }
.store-link svg { transition: transform 0.2s var(--ease-out); }
.store-link:hover svg { transform: translateX(2px); }
.app-learn-more { display: inline-block; transition: transform 0.2s var(--ease-out), color 0.2s; }
.app-learn-more:hover { transform: translateX(3px); }

@media (prefers-reduced-motion: no-preference) {

    /* tab switch cross-fade (animation, not transition — plays on display:none→block) */
    .js .brand-section-active { animation: brand-in 0.34s var(--ease-out); }

    /* star field drift + collective shimmer */
    .hero-stars { inset: -6%; animation: drift-a 180s linear infinite; }
    .hero-stars::after { animation: drift-b 240s linear infinite, star-breathe 9s ease-in-out infinite; }

    /* station ignition */
    .js .build-step-number { transition: border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
    .js .build-step.visible .build-step-number {
        border-color: rgba(200, 168, 78, 0.7);
        box-shadow: 0 0 0 3px rgba(200, 168, 78, 0.08);
    }

    /* featured pricing card: one-time hairline sweep on reveal */
    .js .pricing-card-featured.visible::before { transform: scaleX(1); transition-delay: 0.3s; }

    /* ---- ENGINE CASCADE — the diagrams run when they enter view ---- */

    /* 1 · calibration matrix: quadrants light in sequence, danger cell settles last */
    .js .engine-card:nth-child(1) .engine-viz svg > * {
        opacity: 0;
        transform-box: fill-box;
        transform-origin: center;
    }
    .js .engine-card:nth-child(1).visible .engine-viz svg > * { animation: viz-in 0.45s var(--ease-out) forwards; }
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(1) { animation-delay: 0.10s; }
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(2) { animation-delay: 0.16s; }
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(5) { animation-delay: 0.30s; }
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(6) { animation-delay: 0.36s; }
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(7) { animation-delay: 0.50s; }
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(8) { animation-delay: 0.56s; }
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(3),
    .js .engine-card:nth-child(1).visible .engine-viz svg > *:nth-child(4) {
        animation: viz-settle 0.7s var(--ease-out) 0.78s forwards;
    }

    /* 2 · misconception flow: lights left to right */
    .js .engine-card:nth-child(2) .engine-viz svg > *:not(defs) { opacity: 0; }
    .js .engine-card:nth-child(2).visible .engine-viz svg > *:not(defs) { animation: viz-in 0.4s var(--ease-out) forwards; }
    .js .engine-card:nth-child(2).visible .engine-viz svg > *:nth-child(n+1) { animation-delay: 0.1s; }
    .js .engine-card:nth-child(2).visible .engine-viz svg > *:nth-child(n+3) { animation-delay: 0.28s; }
    .js .engine-card:nth-child(2).visible .engine-viz svg > *:nth-child(n+6) { animation-delay: 0.5s; }
    .js .engine-card:nth-child(2).visible .engine-viz svg > *:nth-child(n+9) { animation-delay: 0.72s; }
    .js .engine-card:nth-child(2).visible .engine-viz svg > *:nth-child(n+12) { animation-delay: 0.9s; }

    /* 3 · readiness radar: field scales from center, vertices pop */
    .js .engine-card:nth-child(3) .engine-viz svg > * {
        opacity: 0;
        transform-box: fill-box;
        transform-origin: center;
    }
    .js .engine-card:nth-child(3).visible .engine-viz svg > * { animation: viz-in 0.4s var(--ease-out) 0.1s forwards; }
    .js .engine-card:nth-child(3).visible .engine-viz svg polygon:nth-of-type(2) { animation: viz-radar 0.7s var(--ease-out) 0.25s forwards; }
    .js .engine-card:nth-child(3).visible .engine-viz svg circle { animation: viz-pop 0.45s var(--ease-out) forwards; }
    .js .engine-card:nth-child(3).visible .engine-viz svg circle:nth-of-type(1) { animation-delay: 0.75s; }
    .js .engine-card:nth-child(3).visible .engine-viz svg circle:nth-of-type(2) { animation-delay: 0.85s; }
    .js .engine-card:nth-child(3).visible .engine-viz svg circle:nth-of-type(3) { animation-delay: 0.95s; }
    .js .engine-card:nth-child(3).visible .engine-viz svg circle:nth-of-type(4) { animation-delay: 1.05s; }

    /* 4 · forgetting curve draws itself; review lines land as the stroke passes */
    .js .engine-card:nth-child(4) .engine-viz svg > * { opacity: 0; }
    .js .engine-card:nth-child(4).visible .engine-viz svg > * { animation: viz-in 0.4s var(--ease-out) 0.1s forwards; }
    .js .engine-card:nth-child(4) .engine-viz svg path {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
    }
    .js .engine-card:nth-child(4).visible .engine-viz svg path {
        animation: viz-in 0.1s 0.25s forwards, viz-draw 1.7s var(--ease-smooth) 0.3s forwards;
    }
    .js .engine-card:nth-child(4).visible .engine-viz svg line:nth-of-type(3) { animation-delay: 0.9s; }
    .js .engine-card:nth-child(4).visible .engine-viz svg line:nth-of-type(4) { animation-delay: 1.25s; }
    .js .engine-card:nth-child(4).visible .engine-viz svg line:nth-of-type(5) { animation-delay: 1.6s; }
    .js .engine-card:nth-child(4).visible .engine-viz svg text:nth-of-type(3) { animation-delay: 0.9s; }
    .js .engine-card:nth-child(4).visible .engine-viz svg text:nth-of-type(4) { animation-delay: 1.25s; }
    .js .engine-card:nth-child(4).visible .engine-viz svg text:nth-of-type(5) { animation-delay: 1.6s; }
}

@keyframes brand-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
@keyframes drift-a {
    from { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-40px, 20px, 0); }
    to { transform: translate3d(0, 0, 0); }
}
@keyframes drift-b {
    from { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(30px, -24px, 0); }
    to { transform: translate3d(0, 0, 0); }
}
@keyframes star-breathe {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.78; }
}
@keyframes viz-in {
    to { opacity: 1; }
}
@keyframes viz-settle {
    0% { opacity: 0; transform: scale(0.96); }
    60% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes viz-radar {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes viz-pop {
    0% { opacity: 0; transform: scale(0.3); }
    70% { opacity: 1; transform: scale(1.25); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes viz-draw {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .meridian-head { display: none; }
}
