/* =========================================================================
   ALTIM-O-TRON — instrument panel stylesheet
   Palette, type scale, and panel treatments are taken from the app itself
   (see marketing/Screenshots). No frameworks, no external requests.
   ========================================================================= */

/* ---- Tokens ---------------------------------------------------------- */
:root {
    --bg:        #07131C;
    --panel:     #122333;
    --border:    #1E4E68;
    --cyan:      #58D9FF;
    --blue:      #2EA5D6;
    --orange:    #F5A64A;
    --text:      #F7F9FB;

    /* Derived tints. Kept as tokens so the whole site retunes from the six
       colors above. */
    --text-dim:    rgba(247, 249, 251, 0.66);
    --text-faint:  rgba(247, 249, 251, 0.40);
    --border-soft: rgba(30, 78, 104, 0.55);
    --panel-soft:  rgba(18, 35, 51, 0.55);
    --glow-cyan:   rgba(88, 217, 255, 0.30);

    /* The app renders every label in the system monospaced face
       (SwiftUI `design: .monospaced` = SF Mono on Apple devices), so the
       site's headings match the app exactly with no webfont download.
       Space Mono / IBM Plex Mono can be dropped in front of this stack. */
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                 "Liberation Mono", monospace;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
                 Helvetica, Arial, sans-serif;

    --measure: 68ch;
    --radius: 14px;
    --section-pad: clamp(4.5rem, 11vh, 9rem);
    --gutter: clamp(1.25rem, 5vw, 3rem);
    --maxw: 1180px;
}

/* ---- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* The sticky nav is ~62px; keep anchored headings clear of it. */
    scroll-padding-top: 5.5rem;
    -webkit-text-size-adjust: 100%;

    /* Guard against sideways scroll from the decorative absolute layers.
       `clip` rather than `hidden`, and on html rather than body, on purpose:
       `overflow-x: hidden` on body computes overflow-y to `auto`, which makes
       body a scroll container — that breaks window.scrollY, every in-page
       anchor link, and scrollIntoView. `clip` never creates one. */
    overflow-x: clip;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.97rem + 0.16vw, 1.0625rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #8ee6ff; }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection { background: rgba(88, 217, 255, 0.28); }

/* ---- Type ------------------------------------------------------------ */
h1, h2, h3, .mono {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.15;
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.6rem, 1.15rem + 2vw, 2.6rem);
    margin: 0 0 1.25rem;
}

h3 {
    font-size: 1rem;
    letter-spacing: 0.12em;
    margin: 0 0 0.6rem;
    color: var(--cyan);
}

p { margin: 0 0 1.1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
    font-size: clamp(1.06rem, 1rem + 0.4vw, 1.25rem);
    color: var(--text-dim);
}

/* Small uppercase instrument label — the app's panel captions. */
.label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--blue);
    margin: 0 0 0.75rem;
    display: block;
}

.readout {
    font-family: var(--font-mono);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    text-shadow: 0 0 22px var(--glow-cyan);
    letter-spacing: 0.02em;
}

.unit {
    font-family: var(--font-mono);
    color: var(--orange);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.aside-note {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-faint);
    border-left: 2px solid var(--border);
    padding-left: 1rem;
    margin: 1.75rem 0 0;
    max-width: 46ch;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.6;
}

/* ---- Layout ---------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

section { padding-block: var(--section-pad); position: relative; }

.split {
    display: grid;
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split.text-right > *:first-child { order: 2; }
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--panel);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    z-index: 100;
    border: 1px solid var(--cyan);
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---- Navigation ------------------------------------------------------ */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 19, 28, 0.82);
    backdrop-filter: saturate(150%) blur(12px);
    -webkit-backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--border-soft); }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 62px;
}

.wordmark {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--text);
    text-decoration: none;
    text-shadow: 0 0 18px var(--glow-cyan);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.25rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--cyan); }

/* The nav's own links collapse on phones; the wordmark + CTA remain. */
@media (max-width: 640px) {
    .nav-links li:not(.nav-cta) { display: none; }
}

.nav-cta a {
    color: var(--cyan);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.nav-cta a:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 18px rgba(88, 217, 255, 0.22);
}

/* ---- Ambient background ---------------------------------------------- */
/* Three stacked, extremely quiet layers: a contour map, a drifting grid,
   and a starfield. All fixed, all pointer-inert, all behind everything. */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.ambient::before,
.ambient::after {
    content: "";
    position: absolute;
    inset: -20%;
}

/* Grid: drifts diagonally, one cell per 40s. */
.ambient::before {
    background-image:
        linear-gradient(rgba(46, 124, 163, 0.30) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 124, 163, 0.30) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: drift 40s linear infinite;
    mask-image: radial-gradient(ellipse 88% 70% at 50% 30%, #000 35%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 88% 70% at 50% 30%, #000 35%, transparent 85%);
}

/* Stars: two sizes of pin-prick radial gradients, breathing slowly. */
.ambient::after {
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(247,249,251,0.55), transparent),
        radial-gradient(1.5px 1.5px at 78% 8%,  rgba(247,249,251,0.42), transparent),
        radial-gradient(1px 1px   at 33% 62%,  rgba(247,249,251,0.38), transparent),
        radial-gradient(1.5px 1.5px at 62% 44%, rgba(247,249,251,0.30), transparent),
        radial-gradient(1px 1px   at 88% 72%,  rgba(247,249,251,0.45), transparent),
        radial-gradient(1px 1px   at 8%  84%,  rgba(247,249,251,0.34), transparent),
        radial-gradient(1.5px 1.5px at 47% 26%, rgba(88,217,255,0.40), transparent),
        radial-gradient(1px 1px   at 22% 40%,  rgba(247,249,251,0.28), transparent);
    animation: breathe 14s ease-in-out infinite;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(64px, 64px, 0); }
}

@keyframes breathe {
    0%, 100% { opacity: 0.75; }
    50%      { opacity: 0.35; }
}

/* The sub-pages are long-form prose rather than short marketing blocks, so
   the ambient layers are damped there — at the home page's brightness the
   contour lines run straight through body copy and cost legibility. */
.page-sub .contour-bg { opacity: 0.34; }
.page-sub .ambient::before { opacity: 0.45; }

/* Contour watermark — an SVG background, sized to the viewport. */
.contour-bg {
    position: absolute;
    inset: 0;
    background: url("../svg/contour.svg") center / cover no-repeat;
    opacity: 0.9;
    mask-image: radial-gradient(ellipse 85% 85% at 50% 40%, #000 25%, transparent 88%);
    -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 40%, #000 25%, transparent 88%);
}

/* ---- Hero ------------------------------------------------------------ */
.hero {
    padding-top: clamp(3rem, 8vh, 6rem);
    padding-bottom: var(--section-pad);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    align-items: center;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hero h1 {
    font-size: clamp(1.85rem, 0.9rem + 4.2vw, 3.75rem);
    letter-spacing: 0.08em;
    margin: 0 0 1.5rem;
    text-shadow: 0 0 40px rgba(88, 217, 255, 0.35);
    /* The en-dashes in the wordmark are break opportunities — without this
       it splits as "ALTIM-O-" / "TRON" at some widths. */
    white-space: nowrap;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 0.85rem + 0.75vw, 1.45rem);
    line-height: 1.4;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cyan);
    margin: 0 0 1.75rem;
    max-width: 22ch;
}

.hero-sub {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    margin-bottom: 2.25rem;
}
.hero-sub span { display: block; }

/* Compass rose watermark behind the hero copy. */
.hero-rose {
    position: absolute;
    top: 50%;
    left: -14%;
    width: min(46rem, 78vw);
    aspect-ratio: 1;
    transform: translateY(-50%);
    opacity: 0.24;
    pointer-events: none;
    animation: slow-spin 240s linear infinite;
}

@keyframes slow-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ---- Buttons --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--cyan);
    color: var(--bg);
    background: var(--cyan);
    box-shadow: 0 0 28px rgba(88, 217, 255, 0.28);
    transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.btn:hover {
    color: var(--bg);
    background: #7fe3ff;
    box-shadow: 0 0 40px rgba(88, 217, 255, 0.45);
}
.btn:active { transform: translateY(1px); }

.btn-ghost {
    background: transparent;
    color: var(--cyan);
    border-color: var(--border);
    box-shadow: none;
}
.btn-ghost:hover {
    background: rgba(88, 217, 255, 0.08);
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 24px rgba(88, 217, 255, 0.18);
}

/* Pre-launch state: the store link doesn't exist yet, so the button is
   rendered as an inert status chip rather than a dead link.
   js/app.js swaps these for real links once APP_STORE_URL is filled in. */
.btn[data-pending] {
    cursor: default;
    background: transparent;
    color: var(--orange);
    border-color: rgba(245, 166, 74, 0.5);
    box-shadow: none;
}
.btn[data-pending]:hover {
    background: transparent;
    color: var(--orange);
    box-shadow: none;
}
.btn[data-pending]::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 10px var(--orange);
    animation: pulse 2.8s ease-in-out infinite;
    flex: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.25; }
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* ---- Device frame ---------------------------------------------------- */
/* Screenshots already include the phone bezel, so the "frame" here is just
   the glow and float that seat them on the page. */
.device {
    position: relative;
    width: min(330px, 74vw);
    margin-inline: auto;
    filter: drop-shadow(0 26px 60px rgba(0, 0, 0, 0.65));
}

.device::after {
    content: "";
    position: absolute;
    inset: 6% 8%;
    background: radial-gradient(ellipse at center, var(--glow-cyan), transparent 68%);
    filter: blur(48px);
    z-index: -1;
}

.device img { border-radius: 12px; }

.device-float { animation: float 12s ease-in-out infinite; }

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

.device-sm { width: min(250px, 62vw); }

/* ---- Panels & cards -------------------------------------------------- */
.panel {
    background: linear-gradient(160deg, var(--panel) 0%, rgba(10, 24, 36, 0.92) 100%);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3vw, 2rem);
}

.cards {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    margin-top: 3rem;
}

.card {
    background: linear-gradient(160deg, var(--panel) 0%, rgba(10, 24, 36, 0.9) 100%);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.card:hover {
    border-color: rgba(88, 217, 255, 0.45);
    box-shadow: 0 0 34px rgba(88, 217, 255, 0.12), inset 0 0 30px rgba(88, 217, 255, 0.05);
    transform: translateY(-3px);
}

.card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.card-icon {
    display: block;
    margin-bottom: 1rem;
    color: var(--cyan);
}

/* ---- Altitude Intel (recreated app panel) ---------------------------- */
.intel-panel {
    text-align: center;
    max-width: 34rem;
    margin-inline: auto;
    padding: clamp(1.8rem, 4vw, 2.75rem);
    position: relative;
    overflow: hidden;
}

.intel-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(88, 217, 255, 0.10), transparent 62%);
    pointer-events: none;
}

.intel-altitude {
    font-size: clamp(3rem, 2rem + 6vw, 5rem);
    line-height: 1;
    margin: 0.35rem 0 0.25rem;
    display: block;
}

.intel-rule {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.75rem auto;
    width: 72%;
}

.intel-lead {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem;
    max-width: none;
}

.intel-subject {
    font-family: var(--font-mono);
    font-size: clamp(1.15rem, 0.9rem + 1.2vw, 1.7rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    margin: 0;
    /* Two lines' worth, always reserved: the longest entries wrap, and
       without this the whole panel changes height mid-cycle. */
    min-height: 3.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 26px var(--glow-cyan);
    transition: opacity 0.6s ease;
}

.intel-subject.fading { opacity: 0; }

.intel-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-top: 2rem;
    text-align: center;
}

/* ---- Unit chips ------------------------------------------------------ */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2.5rem;
    list-style: none;
    padding: 0;
}

.chip {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.7rem 1.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(18, 35, 51, 0.6);
    color: var(--text-dim);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1),
                border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.chip:hover {
    transform: scale(1.07);
    border-color: var(--cyan);
    color: var(--text);
    box-shadow: 0 0 24px rgba(88, 217, 255, 0.25);
}

.chip-odd:hover { border-color: var(--orange); box-shadow: 0 0 24px rgba(245, 166, 74, 0.25); }

/* ---- Stat rows ------------------------------------------------------- */
.stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
    margin-top: 2rem;
}

.stat {
    background: rgba(18, 35, 51, 0.55);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 1.1rem 1rem;
    text-align: center;
}

.stat .label { margin-bottom: 0.4rem; font-size: 0.66rem; }
.stat .readout { font-size: 1.5rem; display: block; }
.stat .unit { font-size: 0.7rem; }

/* ---- Privacy --------------------------------------------------------- */
.privacy-section { text-align: center; }

.no-masters {
    font-family: var(--font-mono);
    font-size: clamp(2.6rem, 1.2rem + 8vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    margin: 0 0 3.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 60px rgba(88, 217, 255, 0.28);
}

.no-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    max-width: 30rem;
}

.no-list li {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 0.9rem + 0.6vw, 1.3rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(30, 78, 104, 0.35);
}
.no-list li:last-child { border-bottom: 0; }

.no-list li.final {
    color: var(--cyan);
    text-shadow: 0 0 26px var(--glow-cyan);
    text-transform: none;
    letter-spacing: 0.06em;
}

/* ---- Download -------------------------------------------------------- */
.download-section { text-align: center; }

.download-icon {
    width: 128px;
    height: 128px;
    margin: 0 auto 2rem;
    border-radius: 28px;
    box-shadow: 0 0 60px rgba(88, 217, 255, 0.25);
}

.download-section .btn-row { justify-content: center; margin-top: 2.25rem; }
.download-section p { margin-inline: auto; }

/* ---- Footer ---------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--border-soft);
    padding-block: 3.5rem;
    background: rgba(7, 19, 28, 0.6);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: flex-start;
}

.footer .wordmark { font-size: 0.85rem; display: block; margin-bottom: 0.75rem; }

.footer-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-faint);
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
}
.footer-links a:hover { color: var(--cyan); }

.copyright {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    margin: 0;
}

/* ---- SVG instrument styling ------------------------------------------ */
.instrument { width: 100%; height: auto; display: block; overflow: visible; }

/* Circular instruments are capped so they don't fill a wide column edge to
   edge — at full column width the glow overhangs the page gutter and the
   section grows a lot of dead space beneath the shorter text column. */
.instrument-dial { max-width: 26.5rem; margin-inline: auto; }

.tick        { stroke: var(--border); stroke-width: 1.5; }
.tick-major  { stroke: var(--orange); stroke-width: 2.5; }
.dial-ring   { fill: none; stroke: rgba(30, 78, 104, 0.5); stroke-width: 1; }
.dial-dotted { fill: none; stroke: rgba(30, 78, 104, 0.7); stroke-width: 1; stroke-dasharray: 2 7; }

/* Arcs and traces draw themselves when scrolled into view. The dash values
   are set inline per-element (they depend on path length); the transition
   is what animates them. */
.draw {
    stroke-dashoffset: var(--len, 1000);
    transition: stroke-dashoffset 2.2s cubic-bezier(0.33, 0.9, 0.3, 1);
}
.is-visible .draw, .draw.is-visible { stroke-dashoffset: 0; }

.trace {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px var(--glow-cyan));
}

.trace-fill {
    fill: url(#traceGradient);
    opacity: 0;
    transition: opacity 1.4s ease 1s;
}
.is-visible .trace-fill { opacity: 1; }

.gauge-arc {
    fill: none;
    stroke: var(--blue);
    stroke-width: 6;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px var(--glow-cyan));
}

.compass-rose { transform-origin: 50% 50%; animation: rose-spin 90s linear infinite; }
@keyframes rose-spin { to { transform: rotate(-360deg); } }

.rose-cardinal {
    fill: var(--text);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
}

.rose-degree {
    fill: var(--blue);
    font-family: var(--font-mono);
    font-size: 9px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.heading-needle { fill: var(--orange); filter: drop-shadow(0 0 6px rgba(245, 166, 74, 0.7)); }

/* ---- Scroll reveal --------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Staggered children (the privacy list, unit chips, stat tiles). */
.stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.stagger.is-visible > * { opacity: 1; transform: none; }
.stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }
.stagger.is-visible > *:nth-child(7) { transition-delay: 0.65s; }
.stagger.is-visible > *:nth-child(8) { transition-delay: 0.75s; }

/* ---- Sub-pages (privacy, support) ------------------------------------ */
.page-header {
    padding-top: clamp(3rem, 7vh, 5rem);
    padding-bottom: 1rem;
}

.page-header h1 {
    font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.9rem);
    margin: 0 0 0.75rem;
}

.effective {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin: 0;
}

.prose { padding-block: 2rem clamp(4rem, 9vh, 7rem); }

.prose h2 {
    font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.4rem);
    color: var(--cyan);
    letter-spacing: 0.1em;
    margin-top: 3rem;
}
.prose h2:first-of-type { margin-top: 1.5rem; }

.prose ul { padding-left: 1.25rem; max-width: var(--measure); }
.prose li { margin-bottom: 0.7rem; color: var(--text-dim); }
.prose li strong { color: var(--text); }
.prose p { color: var(--text-dim); }
.prose .panel p { margin-bottom: 0; }
.prose .panel { margin-bottom: 2rem; }

.faq { margin-top: 1rem; }

.faq details {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: rgba(18, 35, 51, 0.45);
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.faq summary {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    padding: 1.1rem 1.35rem;
    cursor: pointer;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: color 0.2s ease;
}
.faq summary:hover { color: var(--cyan); }
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    color: var(--cyan);
    font-size: 1.2rem;
    line-height: 1;
    flex: none;
}
.faq details[open] summary::after { content: "\2212"; }

.faq details > *:not(summary) {
    padding-inline: 1.35rem;
    color: var(--text-dim);
    font-size: 0.95rem;
}
.faq details > *:last-child { padding-bottom: 1.35rem; }

.contact-block {
    margin-top: 2.5rem;
    text-align: center;
}

.contact-email {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 0.9rem + 0.6vw, 1.3rem);
    letter-spacing: 0.06em;
    color: var(--cyan);
    text-shadow: 0 0 24px var(--glow-cyan);
    word-break: break-word;
}

/* ---- Motion & contrast preferences ----------------------------------- */
/* The plan's animation philosophy is "gentle movement"; for readers who ask
   for less, everything resolves to its final state with no motion at all. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .reveal, .stagger > * { opacity: 1; transform: none; }
    .draw { stroke-dashoffset: 0; }
    .trace-fill { opacity: 1; }
    .device-float, .hero-rose, .compass-rose { animation: none; }
}

@media print {
    .ambient, .nav, .device, .instrument { display: none; }
    body { background: #fff; color: #000; }
}
