/* ═══════════════════════════════════════════════════════════════════════════
   BETWEEN WORLDS — DESIGN SYSTEM  ·  "Two Worlds"

   One stylesheet. Every page links this and nothing else.

   The core idea: the site exists in two worlds. MACHINE is ink and signal.
   HUMAN is warm paper and ink. Same brand hues, same components, same
   geometry — every component reads semantic tokens only, so a single
   [data-world] swap on <html> re-skins the entire site.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════ 1. BRAND CONSTANTS ── */

:root {
    /* Hues that identify the brand, independent of world. */
    --h-violet: 262;
    --h-cyan:   190;
    --h-amber:  38;

    /* Type */
    --font-sans:  'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
    --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Fluid scale. Display sizes are deliberately extreme — the whole
       hierarchy hangs off the gap between --t-display and --t-mono. */
    --t-mono:    0.6875rem;
    --t-xs:      0.8125rem;
    --t-sm:      0.9375rem;
    --t-base:    1.0625rem;
    --t-lg:      clamp(1.125rem, 0.35vw + 1.03rem, 1.3125rem);
    --t-xl:      clamp(1.375rem, 0.9vw + 1.1rem, 1.75rem);
    --t-2xl:     clamp(1.75rem, 1.9vw + 1.2rem, 2.625rem);
    --t-3xl:     clamp(2.125rem, 3.2vw + 1.2rem, 3.75rem);
    --t-4xl:     clamp(2.5rem, 5vw + 1rem, 5rem);
    --t-display: clamp(2.6rem, 6.2vw + 0.4rem, 6.5rem);

    /* Space */
    --s-1: .25rem;  --s-2: .5rem;   --s-3: .75rem;  --s-4: 1rem;
    --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
    --s-9: 6rem;    --s-10: 8rem;

    --section-y:  clamp(4.5rem, 9vw, 9.5rem);
    --gutter:     clamp(1.25rem, 4vw, 2.75rem);
    --wrap:       1280px;
    --wrap-wide:  1560px;
    --wrap-tight: 720px;

    /* Radius — restrained. Big soft blobs read cheap; tight radii read built. */
    --r-xs: 4px;  --r-sm: 8px;  --r-md: 12px;  --r-lg: 18px;  --r-xl: 26px;
    --r-pill: 999px;

    /* Motion */
    --ease:     cubic-bezier(.22, 1, .36, 1);
    --ease-io:  cubic-bezier(.65, 0, .35, 1);
    --dur-fast: .16s;
    --dur:      .34s;
    --dur-slow: .7s;

    --nav-h: 68px;

    color-scheme: dark;
}

/* ════════════════════════════════════════════════════ 2. WORLD: MACHINE ── */

[data-world="machine"] {
    color-scheme: dark;

    --bg:    #06070d;
    --bg-2:  #0a0c15;
    --bg-3:  #10131e;

    --surface:    rgba(255, 255, 255, .032);
    --surface-2:  rgba(255, 255, 255, .062);
    --surface-3:  rgba(255, 255, 255, .10);
    --panel:      rgba(10, 12, 21, .72);

    --line:    rgba(255, 255, 255, .09);
    --line-2:  rgba(255, 255, 255, .17);
    --line-3:  rgba(255, 255, 255, .30);

    /* --tx-4 is the dimmest tier and carries 11px mono metadata, so it is
       held at ~4.8:1 against --bg rather than pushed further down. */
    --tx:    #f2f4fb;
    --tx-2:  #b2b9cd;
    --tx-3:  #949cb2;
    --tx-4:  #828a9f;

    --violet:  hsl(var(--h-violet) 100% 71%);
    --cyan:    hsl(var(--h-cyan) 86% 58%);
    --amber:   hsl(var(--h-amber) 100% 61%);

    --violet-rgb: 139, 109, 255;
    --cyan-rgb:   38, 209, 235;
    --amber-rgb:  255, 180, 58;

    /* Contrast-safe ink for accent text. In MACHINE the accent IS the ink. */
    --on-accent: #07040f;

    --halo:      .55;   /* glow intensity multiplier */
    --grain-op:  .055;
    --field-op:  .55;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
    --shadow-md: 0 14px 38px rgba(0, 0, 0, .55);
    --shadow-lg: 0 40px 90px rgba(0, 0, 0, .65);
}

/* ══════════════════════════════════════════════════════ 3. WORLD: HUMAN ── */

[data-world="human"] {
    color-scheme: light;

    /* Warm bone, not white. White is a default; bone is a decision. */
    --bg:    #f5f2ea;
    --bg-2:  #fffdf6;
    --bg-3:  #e9e5d9;

    --surface:    rgba(24, 20, 34, .028);
    --surface-2:  rgba(24, 20, 34, .055);
    --surface-3:  rgba(24, 20, 34, .085);
    --panel:      rgba(255, 253, 246, .80);

    --line:    rgba(26, 22, 36, .13);
    --line-2:  rgba(26, 22, 36, .24);
    --line-3:  rgba(26, 22, 36, .42);

    --tx:    #14121c;
    --tx-2:  #413e4f;
    --tx-3:  #5b5769;
    --tx-4:  #635f71;

    /* Same hues, driven down in lightness so they hold contrast on bone.
       Amber is the tightest of the three — it has to clear 4.5:1 at 11px
       where it labels the human side of the duality panel. */
    --violet:  hsl(var(--h-violet) 76% 48%);
    --cyan:    hsl(var(--h-cyan) 92% 24%);
    --amber:   hsl(var(--h-amber) 90% 26%);

    --violet-rgb: 91, 51, 214;
    --cyan-rgb:   5, 99, 118;
    --amber-rgb:  126, 82, 7;

    --on-accent: #fffdf6;

    --halo:      .20;
    --grain-op:  .035;
    --field-op:  .38;

    --shadow-sm: 0 2px 8px rgba(38, 30, 18, .07);
    --shadow-md: 0 14px 34px rgba(38, 30, 18, .10);
    --shadow-lg: 0 36px 80px rgba(38, 30, 18, .14);
}

/* Derived tokens — shared by both worlds. */
:root {
    --seam: linear-gradient(90deg,
        rgb(var(--amber-rgb)) 0%,
        rgb(var(--violet-rgb)) 48%,
        rgb(var(--cyan-rgb)) 100%);
    --seam-v: linear-gradient(180deg,
        rgb(var(--amber-rgb)) 0%,
        rgb(var(--violet-rgb)) 48%,
        rgb(var(--cyan-rgb)) 100%);

    /* Per-component accent. Components set --accent-rgb; everything else
       derives from it, so one custom property re-tints a whole card. */
    --accent-rgb: var(--violet-rgb);
}

/* --accent and --accent-tx must be re-derived on EVERY element, not once on
   :root. A custom property is substituted where it is *declared* — so a
   root-level `--accent: rgb(var(--accent-rgb))` freezes to the root's violet
   and silently ignores the --accent-rgb a card sets on itself. Declaring them
   here makes each element resolve its own inherited triplet.

   On bone, raw product accents (lime, gold, neon teal) blow out, so accent
   *text* is mixed toward ink while dots and borders keep the pure hue.

   --accent-tx  — accent for graphics and LARGE text (>=24px, needs 3:1).
   --accent-ink — accent for SMALL text, dragged hard toward the page's own
   ink so it clears 4.5:1 at 11px. A saturated mid-tone hue cannot clear that
   on near-black or on bone otherwise; gold on bone reaches only 2.2:1 raw.
   Anything under 24px that wants the accent must use --accent-ink. */
* { --accent: rgb(var(--accent-rgb)); }
[data-world="machine"] * {
    --accent-tx:  rgb(var(--accent-rgb));
    --accent-ink: color-mix(in srgb, rgb(var(--accent-rgb)) 62%, #f2f4fb);
}
[data-world="human"] * {
    --accent-tx:  color-mix(in srgb, rgb(var(--accent-rgb)) 58%, #14121c);
    --accent-ink: color-mix(in srgb, rgb(var(--accent-rgb)) 45%, #14121c);
}

/* ═══════════════════════════════════════════════════════ 4. RESET / BASE ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 2rem);
}

body {
    font-family: var(--font-sans);
    font-size: var(--t-base);
    line-height: 1.6;
    color: var(--tx-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis-weight: none;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    color: var(--tx);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.032em;
    text-wrap: balance;
}

p { text-wrap: pretty; }
strong { color: var(--tx); font-weight: 600; }
em { font-style: italic; }

::selection { background: rgba(var(--violet-rgb), .28); color: var(--tx); }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--line-2);
    border-radius: var(--r-pill);
    border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

.skip-link {
    position: fixed;
    top: -100%;
    left: var(--s-4);
    z-index: 3000;
    padding: var(--s-3) var(--s-5);
    background: var(--violet);
    color: var(--on-accent);
    font-weight: 600;
    border-radius: var(--r-sm);
    transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════ 5. AMBIENT / BACKDROP ── */

/* Two soft fields and a fine grain. That is the entire background system —
   the previous build stacked four competing layers and the result was mud. */

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}

.backdrop__field {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: var(--field-op);
    will-change: transform;
    transition: opacity var(--dur-slow) var(--ease);
}
.backdrop__field--1 {
    width: 52vw; height: 52vw; min-width: 420px; min-height: 420px;
    top: -18vw; right: -12vw;
    background: radial-gradient(circle, rgba(var(--violet-rgb), .40), transparent 66%);
    animation: drift-a 34s var(--ease-io) infinite;
}
.backdrop__field--2 {
    width: 42vw; height: 42vw; min-width: 340px; min-height: 340px;
    bottom: -16vw; left: -10vw;
    background: radial-gradient(circle, rgba(var(--cyan-rgb), .26), transparent 68%);
    animation: drift-b 42s var(--ease-io) infinite;
}

@keyframes drift-a {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(-5vw, 4vw, 0) scale(1.14); }
}
@keyframes drift-b {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(6vw, -4vw, 0) scale(1.18); }
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: var(--grain-op);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    contain: strict;
}
[data-world="human"] .grain { mix-blend-mode: multiply; }

.progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(var(--p, 0));
    background: var(--seam);
    z-index: 1600;
    pointer-events: none;
}

/* ═════════════════════════════════════════════════════════════ 6. LAYOUT ── */

/* `clip`, not `hidden` — contains reveal transforms without creating a
   scroll container, so position:sticky keeps working inside. */
.page { position: relative; z-index: 10; overflow-x: clip; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.wrap--wide  { max-width: var(--wrap-wide); }
.wrap--tight { max-width: var(--wrap-tight); }

.section { padding-block: var(--section-y); position: relative; }
.section--flush { padding-top: 0; }
.section--tight { padding-block: var(--s-8); }

/* The seam — the signature graphic device. A hairline that carries the
   brand gradient, used as a section rule and a structural divider. */
.seam {
    height: 1px;
    border: 0;
    background: var(--seam);
    opacity: .5;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
    gap: clamp(var(--s-6), 5vw, var(--s-9));
    align-items: center;
}
.grid-2--top { align-items: start; }

/* ═════════════════════════════════════════════════════════════ 7. NAVBAR ── */

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1200;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
                backdrop-filter var(--dur) var(--ease);
}
.nav.is-stuck {
    background: var(--panel);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-bottom-color: var(--line);
}

.nav__inner {
    width: 100%;
    max-width: var(--wrap-wide);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.03em;
    color: var(--tx);
    flex-shrink: 0;
}

/* The mark is the thesis: one square, split by the seam. */
.brand__mark {
    position: relative;
    width: 26px; height: 26px;
    flex-shrink: 0;
    border-radius: 7px;
    overflow: hidden;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    transition: transform var(--dur) var(--ease);
}
.brand__mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--seam);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    opacity: .9;
}
.brand__mark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent calc(50% - .6px), var(--tx) 50%, transparent calc(50% + .6px));
    opacity: .85;
}
.brand:hover .brand__mark { transform: rotate(-90deg); }

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    margin-inline: auto;
}
.nav__link {
    position: relative;
    display: block;
    padding: var(--s-2) var(--s-4);
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--tx-3);
    border-radius: var(--r-pill);
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav__link:hover { color: var(--tx); background: var(--surface-2); }
.nav__link[aria-current="page"] { color: var(--tx); }
.nav__link[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 1px;
    width: 14px; height: 2px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--seam);
}

.nav__end {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-shrink: 0;
}

/* ── World toggle. Not a moon icon — a labelled switch between two worlds. */

/* Hidden until JS arrives — the switch does nothing without it, and a dead
   control is worse than no control. JS also measures the thumb into place,
   because "Human" and "Machine" are not the same width. */
.world { display: none; }
.js .world {
    position: relative;
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: auto;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.world__thumb {
    position: absolute;
    top: 3px; bottom: 3px;
    left: 0;
    width: var(--thumb-w, 50%);
    transform: translateX(var(--thumb-x, 3px));
    border-radius: var(--r-pill);
    background: var(--tx);
    transition: transform var(--dur) var(--ease), width var(--dur) var(--ease);
    pointer-events: none;
}

.world__opt {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 11px;
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tx-3);
    border-radius: var(--r-pill);
    white-space: nowrap;
    transition: color var(--dur) var(--ease);
}
.world__opt svg { width: 12px; height: 12px; }
[data-world="human"]   .world__opt:first-child,
[data-world="machine"] .world__opt:last-child { color: var(--bg); }

.nav__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: .5rem 1.05rem;
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--tx);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    background: var(--surface);
    white-space: nowrap;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}
.nav__cta:hover {
    border-color: rgba(var(--violet-rgb), .55);
    background: rgba(var(--violet-rgb), .10);
    transform: translateY(-1px);
}

.nav__toggle {
    display: none;
    width: 40px; height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.nav__toggle span {
    display: block;
    position: relative;
    width: 16px; height: 1.5px;
    background: var(--tx);
    border-radius: 2px;
    transition: background var(--dur-fast) var(--ease);
}
.nav__toggle span::before,
.nav__toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 16px; height: 1.5px;
    background: var(--tx);
    border-radius: 2px;
    transition: transform var(--dur) var(--ease);
}
.nav__toggle span::before { top: -5px; }
.nav__toggle span::after  { top: 5px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════ 8. BUTTONS ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: .85rem 1.5rem;
    font-size: var(--t-sm);
    font-weight: 600;
    letter-spacing: -0.006em;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    white-space: nowrap;
    position: relative;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
                background var(--dur) var(--ease), border-color var(--dur) var(--ease),
                color var(--dur) var(--ease), translate var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(0) scale(.985); }
.btn__arrow { transition: transform var(--dur) var(--ease); flex-shrink: 0; }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--primary {
    background: var(--violet);
    color: var(--on-accent);
    box-shadow: 0 6px 22px rgba(var(--violet-rgb), calc(var(--halo) * .6));
}
.btn--primary:hover {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--violet) 88%, var(--tx));
    box-shadow: 0 14px 38px rgba(var(--violet-rgb), calc(var(--halo) * .9));
}

.btn--amber {
    background: var(--amber);
    color: var(--on-accent);
    box-shadow: 0 6px 22px rgba(var(--amber-rgb), calc(var(--halo) * .55));
}
.btn--amber:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(var(--amber-rgb), calc(var(--halo) * .85));
}

.btn--ghost {
    background: var(--surface);
    border-color: var(--line-2);
    color: var(--tx);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover {
    transform: translateY(-2px);
    background: var(--surface-2);
    border-color: var(--line-3);
}

.btn--lg { padding: 1rem 1.9rem; font-size: var(--t-base); }
.btn--sm { padding: .5rem 1rem; font-size: var(--t-xs); }

/* ══════════════════════════════════════════════════ 9. TEXT PRIMITIVES ── */

.mono {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tx-3);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--tx-3);
}
.eyebrow::before {
    content: '';
    width: 24px; height: 1px;
    flex-shrink: 0;
    background: var(--seam);
}

/* The serif is a counterpoint voice, not a gradient sticker. Solid, warm,
   set at the same size as the grotesk around it so the contrast is in the
   letterforms rather than in a colour effect. */
.serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.012em;
    color: var(--amber);
    padding-right: .06em;
}
.serif--violet { color: var(--violet); }
.serif--plain  { color: inherit; }

.lede {
    font-size: var(--t-lg);
    line-height: 1.55;
    color: var(--tx-2);
    max-width: 60ch;
}

.section-head { margin-bottom: var(--s-8); max-width: 30ch; }
.section-head--wide { max-width: 46ch; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head__title {
    font-size: var(--t-3xl);
    margin-block: var(--s-4) var(--s-4);
}
.section-head__sub {
    font-size: var(--t-lg);
    color: var(--tx-3);
    max-width: 52ch;
    text-wrap: pretty;
}
.section-head--center .section-head__sub { margin-inline: auto; }

.prose { max-width: 68ch; }
.prose p { margin-bottom: var(--s-5); color: var(--tx-2); }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
    font-size: var(--t-xl);
    margin-block: var(--s-7) var(--s-4);
}
.prose h2:first-child { margin-top: 0; }
.prose a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }

/* Status pill */
.status {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    padding: .4rem .95rem .4rem .7rem;
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tx-2);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.status__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: pulse-dot 2.6s var(--ease-io) infinite;
}
@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
    70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag {
    display: inline-flex;
    align-items: center;
    padding: .35rem .8rem;
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .07em;
    color: var(--tx-2);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
}

.backlink {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tx-3);
    transition: color var(--dur-fast) var(--ease), gap var(--dur-fast) var(--ease);
}
.backlink:hover { color: var(--tx); gap: var(--s-3); }

/* ═══════════════════════════════════════════════════════════════ 10. HERO ── */

.hero {
    position: relative;
    min-height: min(100svh, 940px);
    display: flex;
    align-items: center;
    padding-block: calc(var(--nav-h) + var(--s-8)) var(--s-9);
}
.hero--short {
    min-height: auto;
    padding-block: calc(var(--nav-h) + var(--s-8)) var(--s-7);
}
.hero__inner { width: 100%; position: relative; z-index: 2; }

/* Display type is the whole design. Extreme size, extreme tracking, short
   measure — everything else on the page is quiet so this can be loud. */
.hero__title {
    font-size: var(--t-display);
    font-weight: 600;
    line-height: .93;
    letter-spacing: -0.048em;
    margin-block: var(--s-5) var(--s-6);
    max-width: 21ch;
}
.hero__title .serif { letter-spacing: -0.022em; }

.hero__sub {
    font-size: clamp(1.0625rem, .9vw + .82rem, 1.3125rem);
    line-height: 1.55;
    color: var(--tx-2);
    max-width: 52ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    margin-top: var(--s-7);
}

/* The constellation: twelve deliberate nodes, not random particles.
   Two poles — one human, one machine — with the crew strung between them. */
/* A canvas is a replaced element: `inset: 0` alone leaves it at its intrinsic
   300x150, so the size has to be stated explicitly. */
.constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s var(--ease);
    mask-image: radial-gradient(ellipse 75% 85% at 72% 50%, #000 32%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 75% 85% at 72% 50%, #000 32%, transparent 78%);
}
.constellation.is-ready { opacity: 1; }

.scroll-cue {
    position: absolute;
    left: var(--gutter);
    bottom: var(--s-6);
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--tx-4);
    z-index: 2;
}
.scroll-cue__line {
    display: block;
    width: 52px; height: 1px;
    background: var(--line-3);
    position: relative;
    overflow: hidden;
}
.scroll-cue__line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--seam);
    animation: cue-sweep 2.6s var(--ease-io) infinite;
}
@keyframes cue-sweep {
    0%   { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}

/* Word-by-word reveal for headlines */
.reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(.42em);
    animation: word-in .85s var(--ease) forwards;
}
@keyframes word-in { to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════════════ 11. STAT RAIL ── */

/* Editorial, not boxed. Hairline rules and tabular numerals do the work. */
.rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--s-5) var(--s-7);
    margin-top: var(--s-9);
    padding-top: var(--s-5);
    border-top: 1px solid var(--line);
}
.rail__num {
    font-size: clamp(1.75rem, 2.4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    color: var(--tx);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.rail__label {
    margin-top: var(--s-2);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--tx-4);
}

/* ═════════════════════════════════════════════════════ 12. SHIPPED BOARD ── */

.board {
    position: relative;
    border-block: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.board__track {
    display: flex;
    width: max-content;
    animation: board-roll 58s linear infinite;
}
.board:hover .board__track { animation-play-state: paused; }
@keyframes board-roll { to { transform: translateX(-50%); } }

.board__item {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-5) var(--s-6);
    border-right: 1px solid var(--line);
    font-size: var(--t-sm);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--tx-2);
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.board__item:hover { color: var(--tx); background: var(--surface-2); }
.board__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), calc(var(--halo) + .2));
}
.board__tag {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tx-4);
}

/* ═════════════════════════════════════════════════════ 13. TWO WORLDS ── */

/* The thesis, made structural: two panels that hold the site's two skins
   simultaneously, with the seam running between them. */
.duo {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--bg-2);
}
.duo__seam { background: var(--seam-v); opacity: .75; }

.duo__side {
    padding: clamp(var(--s-6), 4vw, var(--s-8));
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    position: relative;
    isolation: isolate;
}
.duo__side::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .5;
}
.duo__side--human::before {
    background: radial-gradient(120% 90% at 10% 0%, rgba(var(--amber-rgb), .13), transparent 62%);
}
.duo__side--machine::before {
    background: radial-gradient(120% 90% at 90% 0%, rgba(var(--cyan-rgb), .13), transparent 62%);
}

.duo__kind {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.duo__side--human   .duo__kind { color: var(--amber); }
.duo__side--machine .duo__kind { color: var(--cyan); }

.duo__avatar {
    width: 68px; height: 68px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: var(--bg-3);
}
.duo__avatar img { width: 100%; height: 100%; object-fit: cover; }

.duo__name {
    font-size: var(--t-xl);
    font-weight: 600;
    letter-spacing: -0.03em;
}
.duo__role {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--tx-3);
}
.duo__body { color: var(--tx-2); font-size: var(--t-sm); line-height: 1.65; }
.duo__list { display: flex; flex-direction: column; gap: var(--s-2); margin-top: auto; padding-top: var(--s-4); }
.duo__list li {
    display: flex;
    gap: var(--s-3);
    font-size: var(--t-sm);
    color: var(--tx-2);
}
.duo__list li::before {
    content: '';
    width: 5px; height: 5px;
    margin-top: .62em;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--line-3);
}

/* When a side is a link, deepen its own colour wash rather than laying a
   background over it — the wash sits behind the element's background. */
a.duo__side:hover::before { opacity: 1; }
a.duo__side .card__meta { color: var(--tx-4); }
a.duo__side:hover .card__meta { color: var(--tx); gap: var(--s-3); }

/* ═════════════════════════════════════════════════════════ 14. PIPELINE ── */

/* How the studio actually runs. The horizontal seam behind the steps is the
   through-line: a brief enters on the left and a live product exits right. */
.flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--s-5);
    counter-reset: step;
}
.flow::before {
    content: '';
    position: absolute;
    top: 21px;
    left: 6%;
    right: 6%;
    height: 1px;
    background: var(--seam);
    opacity: .45;
}

.flow__step { position: relative; display: flex; flex-direction: column; gap: var(--s-3); }

.flow__no {
    position: relative;
    z-index: 1;
    width: 42px; height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--line-2);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--tx-2);
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}
/* The ring carries the accent; the numeral just brightens to ink, which is
   legible at 11px whatever hue the step uses. */
.flow__step:hover .flow__no {
    border-color: var(--accent);
    color: var(--tx);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .10),
                0 0 22px rgba(var(--accent-rgb), calc(var(--halo) * .7));
}

.flow__name {
    font-size: var(--t-lg);
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-top: var(--s-2);
}
.flow__body { font-size: var(--t-sm); color: var(--tx-3); line-height: 1.6; }
.flow__who {
    margin-top: auto;
    padding-top: var(--s-3);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--tx-4);
}

/* ═══════════════════════════════════════════════════════ 15. CARD SYSTEM ── */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--s-6);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
                background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* Cursor-tracked glow, driven by --mx/--my from JS. */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%),
                rgba(var(--accent-rgb), .13), transparent 70%);
    transition: opacity var(--dur) var(--ease);
}
.card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), .40);
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
}
.card:hover::before { opacity: 1; }

.card__title {
    font-size: var(--t-xl);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: var(--s-3);
}
.card__body { font-size: var(--t-sm); color: var(--tx-3); line-height: 1.65; }
.card__meta {
    margin-top: auto;
    padding-top: var(--s-5);
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--tx-4);
    transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
/* Brightens to page ink rather than the accent. At 11px an accent-coloured
   label fails contrast for most product hues (gold on bone reaches 2.2:1),
   and the card already signals the accent through its border, wash and
   glyph. Ink is legible whatever colour a future product brings. */
.card:hover .card__meta { color: var(--tx); gap: var(--s-3); }

/* ═══════════════════════════════════════════════════════ 16. PROJECT WALL ── */

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: var(--s-5);
}

.project { min-height: 260px; }

/* A wash of the product's own colour, so nine tiles read as nine products
   rather than nine identical glass rectangles. */
.project::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: .55;
    background: linear-gradient(160deg, rgba(var(--accent-rgb), .13), transparent 55%);
    transition: opacity var(--dur) var(--ease);
}
.project:hover::after { opacity: 1; }

.project__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    margin-bottom: var(--s-6);
}
.project__glyph {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    color: var(--accent-tx);
    background: rgba(var(--accent-rgb), .13);
    border: 1px solid rgba(var(--accent-rgb), .26);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.project:hover .project__glyph {
    transform: scale(1.06) rotate(-4deg);
    box-shadow: 0 0 26px rgba(var(--accent-rgb), calc(var(--halo) * .8));
}
.project__tag {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tx-4);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: .25rem .6rem;
}
.project__name {
    font-size: var(--t-xl);
    font-weight: 600;
    letter-spacing: -0.035em;
    margin-bottom: var(--s-3);
}
.project__desc { font-size: var(--t-sm); color: var(--tx-3); line-height: 1.65; }
/* The label reads in page ink; the accent shows as tint and ring only. A
   solid accent fill needs a contrasting ink per product, and accent-coloured
   text fails at 11px whenever a product picks a deep hue (crimson on black,
   lime on bone). This way any accent a future product brings is legible. */
.project__new {
    position: absolute;
    top: var(--s-5); right: var(--s-5);
    z-index: 2;
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tx);
    background: rgba(var(--accent-rgb), .18);
    border: 1px solid rgba(var(--accent-rgb), .48);
    border-radius: var(--r-pill);
    padding: .2rem .55rem;
}
.project__new + .project__head { padding-right: 4.5rem; }

/* ══════════════════════════════════════════════════ 17. AGENT ROSTER ── */

/* The showpiece. The team is the product, so it is rendered as a live ops
   console — dense, monospaced, statused — rather than a grid of avatars. */
.roster {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface);
}

.roster__head {
    display: grid;
    grid-template-columns: var(--roster-cols);
    gap: var(--s-4);
    align-items: center;
    padding: var(--s-3) var(--s-5);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tx-4);
}

.roster { --roster-cols: 34px 40px minmax(120px, 1.1fr) minmax(150px, 1.3fr) minmax(0, 2fr) 96px; }

.agent {
    position: relative;
    display: grid;
    grid-template-columns: var(--roster-cols);
    gap: var(--s-4);
    align-items: center;
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--line);
    isolation: isolate;
    transition: background var(--dur-fast) var(--ease);
}
.agent:last-child { border-bottom: 0; }

/* Accent bleeds in from the left edge on hover — reads as a signal on a
   console rather than a card lifting off the page. */
.agent::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), .16), transparent 42%);
    transition: opacity var(--dur) var(--ease);
}
.agent::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: 50% 50%;
    transition: transform var(--dur) var(--ease);
}
.agent:hover { background: var(--surface-2); }
.agent:hover::before { opacity: 1; }
.agent:hover::after  { transform: scaleY(1); }

.agent__id {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    color: var(--tx-4);
    font-variant-numeric: tabular-nums;
}
.agent__av {
    width: 36px; height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.agent__av img { width: 100%; height: 100%; object-fit: cover; }
.agent:hover .agent__av {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), calc(var(--halo) * .8));
}

.agent__name {
    font-size: var(--t-base);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--tx);
    display: flex;
    align-items: baseline;
    gap: var(--s-2);
}
/* Also used standalone as the badge on a profile page, so it carries its own
   display rather than relying on being a flex item. */
.agent__kind {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    font-style: normal;
    letter-spacing: .14em;
    padding: .12rem .34rem;
    border-radius: var(--r-xs);
    border: 1px solid currentColor;
    opacity: .8;
}
.agent__kind--ai    { color: var(--cyan); }
.agent__kind--human { color: var(--amber); }

.agent__role { font-size: var(--t-sm); color: var(--tx-2); }
.agent__quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--t-base);
    color: var(--tx-3);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--dur) var(--ease);
}
.agent:hover .agent__quote { color: var(--tx-2); }

.agent__status {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .12em;
    color: var(--tx-4);
}
.agent__bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.agent__bars i {
    display: block;
    width: 2px;
    background: var(--accent);
    border-radius: 1px;
    opacity: .45;
    animation: bar-idle 1.9s var(--ease-io) infinite;
}
.agent__bars i:nth-child(1) { height: 4px; animation-delay: 0s; }
.agent__bars i:nth-child(2) { height: 8px; animation-delay: .18s; }
.agent__bars i:nth-child(3) { height: 11px; animation-delay: .36s; }
@keyframes bar-idle {
    0%, 100% { opacity: .3; transform: scaleY(.6); }
    50%      { opacity: 1;  transform: scaleY(1); }
}
/* The signal bars beside it are already the agent's colour, so the label
   itself brightens to ink rather than tinting. */
.agent:hover .agent__status { color: var(--tx); }

/* Off the clock. Declared after the hover rules so it wins at equal
   specificity — an offline row should not light up on hover. */
.agent.is-offline .agent__av { opacity: .55; filter: saturate(.35); }
.agent.is-offline .agent__status,
.agent.is-offline:hover .agent__status { color: var(--tx-4); }
.agent.is-offline .agent__bars i {
    height: 3px;
    opacity: .45;
    background: var(--tx-4);
    animation: none;
    transform: none;
}
.agent.is-offline:hover .agent__av {
    border-color: var(--line-2);
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════════ 18. TEAM GRID ── */

.team {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(178px, 100%), 1fr));
    gap: var(--s-4);
}

.member {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-5);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
                background var(--dur) var(--ease);
}
.member::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(165deg, rgba(var(--accent-rgb), .16), transparent 58%);
    transition: opacity var(--dur) var(--ease);
}
.member:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), .42);
    background: var(--surface-2);
}
.member:hover::before { opacity: 1; }

.member__photo {
    width: 60px; height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member:hover .member__photo {
    border-color: var(--accent);
    box-shadow: 0 0 22px rgba(var(--accent-rgb), calc(var(--halo) * .8));
}

.member__kind {
    position: absolute;
    top: var(--s-4); right: var(--s-4);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .14em;
    padding: .12rem .34rem;
    border-radius: var(--r-xs);
    border: 1px solid currentColor;
    opacity: .75;
}
.member__kind--ai    { color: var(--cyan); }
.member__kind--human { color: var(--amber); }

.member__name {
    font-size: var(--t-lg);
    font-weight: 600;
    letter-spacing: -0.03em;
}
.member__role {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tx-4);
}
.member__quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--t-sm);
    color: var(--tx-3);
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════ 19. PROFILE ── */

.profile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-5);
}
@media (min-width: 640px) {
    .profile { flex-direction: row; align-items: center; gap: var(--s-6); }
}

/* Declared after the media query so a centred profile stays centred at every
   width. */
.profile--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--s-5);
}

.profile__photo {
    width: 112px; height: 112px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    box-shadow: 0 0 40px rgba(var(--accent-rgb), calc(var(--halo) * .55));
}
/* The member's colour, worn. */
.profile__photo--ring {
    width: 128px; height: 128px;
    border: 3px solid var(--accent);
    box-shadow: 0 0 46px rgba(var(--accent-rgb), calc(var(--halo) * 1.1));
}
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile__name {
    font-size: var(--t-4xl);
    font-weight: 600;
    letter-spacing: -0.045em;
}
.profile__role {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

/* ══════════════════════════════════════════════════════ 19b. BIO PAGES ── */

/* A profile is the one place the member's own colour leads. Headings, the
   quote rule, the trait borders and the ambient field all read --accent-rgb,
   so thirteen pages share one layout and none of them look alike.

   Spacing lives on the block, not on the heading: each section owns its own
   margin, which is what the old `.prose h2:first-child` rule could never do
   once every section became its own container. */

.bio__block { margin-bottom: var(--s-8); }
.bio__block:last-child { margin-bottom: 0; }

.bio__title {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-size: var(--t-xl);
    font-weight: 600;
    letter-spacing: -0.028em;
    color: var(--accent-tx);
    margin-bottom: var(--s-5);
}
.bio__title::before {
    content: '';
    width: 4px;
    height: 1.05em;
    flex-shrink: 0;
    border-radius: 2px;
    background: var(--accent);
}

.bio__block p {
    font-size: var(--t-lg);
    line-height: 1.75;
    color: var(--tx-2);
    margin-bottom: var(--s-5);
    max-width: 68ch;
}
.bio__block p:last-child { margin-bottom: 0; }

/* Bordered card with a watermark quote mark, rather than a full-bleed
   pullquote — a profile opens with a voice, not a billboard. */
.bio-quote {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--s-9);
    padding: var(--s-6) var(--s-6) var(--s-6) var(--s-7);
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-lg);
}
.bio-quote::before {
    content: '"';
    position: absolute;
    top: -.28em; left: .1em;
    font-family: var(--font-serif);
    font-size: 9rem;
    line-height: 1;
    color: var(--accent);
    opacity: .13;
    pointer-events: none;
}
.bio-quote__text {
    position: relative;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.25rem, 2.1vw, 1.75rem);
    line-height: 1.36;
    letter-spacing: -0.012em;
    color: var(--tx);
    text-wrap: pretty;
}

.tags--accent .tag {
    color: var(--tx);
    border-color: rgba(var(--accent-rgb), .55);
    transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tags--accent .tag:hover {
    background: rgba(var(--accent-rgb), .16);
    transform: translateY(-2px);
}

.backlink--accent { color: var(--accent-ink); }
.backlink--accent:hover { color: var(--tx); }

/* The ambient field picks up the member's hue too. */
.backdrop--accent .backdrop__field--1 {
    background: radial-gradient(circle, rgba(var(--accent-rgb), .38), transparent 66%);
}

/* ════════════════════════════════════════════════════════════ 20. ALBUM ── */

.disc {
    position: relative;
    aspect-ratio: 1;
    width: min(100%, 420px);
    margin-inline: auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        repeating-radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, .028) 0 1px, transparent 1px 4px),
        conic-gradient(from 0deg,
            #12131c, #1d1f2e, #101119, #22243a, #12131c);
    box-shadow: var(--shadow-lg),
                0 0 90px rgba(var(--amber-rgb), calc(var(--halo) * .45)),
                inset 0 0 60px rgba(0, 0, 0, .6);
    animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.disc::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 210deg,
        transparent 0deg, rgba(var(--amber-rgb), .22) 30deg,
        transparent 90deg, transparent 180deg,
        rgba(var(--violet-rgb), .20) 220deg, transparent 300deg);
    mix-blend-mode: screen;
}

.disc__label {
    position: relative;
    z-index: 2;
    width: 46%; height: 46%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    text-align: center;
    padding: var(--s-4);
    background: linear-gradient(150deg, #1b1424, #0d0a14);
    border: 1px solid rgba(var(--amber-rgb), .30);
    animation: spin 26s linear infinite reverse;
}
.disc__label::after {
    content: '';
    position: absolute;
    width: 13%; height: 13%;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, .12);
}
.disc__title {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.25rem, 3.4vw, 1.9rem);
    letter-spacing: .01em;
    color: hsl(var(--h-amber) 100% 66%);
    line-height: 1;
}
.disc__sub {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.wave { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.wave i {
    display: block;
    width: 2px; height: 100%;
    background: hsl(var(--h-amber) 100% 62%);
    border-radius: 1px;
    transform-origin: 50% 100%;
    animation: wave-bob 1.15s var(--ease-io) infinite;
}
@keyframes wave-bob {
    0%, 100% { transform: scaleY(.24); opacity: .55; }
    50%      { transform: scaleY(1);   opacity: 1; }
}

.tracks { display: flex; flex-direction: column; }
.track {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: var(--s-5);
    padding-block: var(--s-6);
    border-top: 1px solid var(--line);
    transition: background var(--dur) var(--ease);
}
.track:last-child { border-bottom: 1px solid var(--line); }
.track__no {
    font-family: var(--font-mono);
    font-size: var(--t-lg);
    color: var(--tx-4);
    font-variant-numeric: tabular-nums;
    transition: color var(--dur) var(--ease);
}
.track:hover .track__no { color: var(--amber); }
.track__name {
    font-size: var(--t-xl);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: var(--s-3);
}
.track__desc { font-size: var(--t-sm); color: var(--tx-3); line-height: 1.7; }

/* ══════════════════════════════════════════════════ 21. QUOTES & BANDS ── */

.pullquote { text-align: center; padding-block: var(--s-8); }
.pullquote__text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.75rem, 4.4vw, 3.25rem);
    line-height: 1.14;
    letter-spacing: -0.02em;
    color: var(--tx);
    max-width: 22ch;
    margin-inline: auto;
    text-wrap: balance;
}
.pullquote__by {
    margin-top: var(--s-5);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--tx-4);
}

.band {
    position: relative;
    padding: clamp(var(--s-7), 6vw, var(--s-9)) var(--gutter);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: var(--bg-2);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}
.band::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(80% 120% at 15% 0%, rgba(var(--amber-rgb), .11), transparent 55%),
        radial-gradient(80% 120% at 85% 100%, rgba(var(--cyan-rgb), .11), transparent 55%);
}
.band::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--seam);
    opacity: .8;
}
.band__title {
    font-size: var(--t-2xl);
    margin-bottom: var(--s-4);
    text-wrap: balance;
}
.band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    justify-content: center;
    margin-top: var(--s-7);
}

/* ════════════════════════════════════════════════════════════ 22. PAGER ── */

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4);
    padding-top: var(--s-6);
    border-top: 1px solid var(--line);
}
.pager__link {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--tx-3);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}
.pager__link:hover {
    border-color: rgba(var(--accent-rgb), .45);
    background: var(--surface-2);
    transform: translateY(-2px);
}
.pager__link--next { justify-content: flex-end; text-align: right; }
.pager__label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tx-4);
}
.pager__name {
    display: block;
    margin-top: 3px;
    font-size: var(--t-base);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--tx);
}

/* ═══════════════════════════════════════════════════════════ 23. FOOTER ── */

.footer {
    position: relative;
    border-top: 1px solid var(--line);
    padding-block: var(--s-9) var(--s-6);
    background: var(--bg-2);
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--seam);
    opacity: .32;
}
.footer__grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(130px, 1fr));
    gap: var(--s-7) var(--s-6);
}
.footer__about p {
    margin-top: var(--s-4);
    font-size: var(--t-sm);
    color: var(--tx-3);
    max-width: 34ch;
}
.footer__col h4 {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    font-weight: 500;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--tx-4);
    margin-bottom: var(--s-4);
}
.footer__col li + li { margin-top: var(--s-3); }
.footer__col a {
    font-size: var(--t-sm);
    color: var(--tx-2);
    transition: color var(--dur-fast) var(--ease);
}
.footer__col a:hover { color: var(--tx); }

.footer__base {
    margin-top: var(--s-8);
    padding-top: var(--s-5);
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    letter-spacing: .1em;
    color: var(--tx-4);
}

/* ═══════════════════════════════════════════════ 23. SCROLL REVEALS ── */

/* Scoped to .js so the page renders fully when JavaScript never arrives. */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.js [data-reveal="left"]  { transform: translateX(-26px); }
.js [data-reveal="right"] { transform: translateX(26px); }
.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* ══════════════════════════════════════════ 24. WORLD TRANSITION ── */

/* The toggle wipes the new world in from the switch itself. Where View
   Transitions are unsupported this degrades to a plain token swap. */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ═══════════════════════════════════════════════════════ 25. RESPONSIVE ── */

@media (max-width: 1080px) {
    .flow { grid-template-columns: repeat(2, 1fr); gap: var(--s-7) var(--s-6); }
    .flow::before { display: none; }
    .roster { --roster-cols: 30px 36px minmax(110px, 1fr) minmax(130px, 1fr) 92px; }
    .agent__quote, .roster__head span:nth-child(5) { display: none; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    :root { --nav-h: 62px; }

    .nav__links {
        position: fixed;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--s-4) var(--gutter) var(--s-6);
        margin: 0;
        background: var(--panel);
        backdrop-filter: blur(22px) saturate(150%);
        -webkit-backdrop-filter: blur(22px) saturate(150%);
        border-bottom: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
                    visibility var(--dur);
    }
    .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
    .nav__link {
        padding: var(--s-4) var(--s-2);
        font-size: var(--t-lg);
        border-radius: var(--r-sm);
        border-bottom: 1px solid var(--line);
    }
    .nav__link[aria-current="page"]::after { left: var(--s-2); transform: none; }

    .nav__inner { justify-content: space-between; }
    .nav__cta { display: none; }
    .nav__toggle { display: inline-flex; }

    .duo { grid-template-columns: 1fr; }
    .duo__seam { height: 1px; background: var(--seam); }

    .hero { min-height: auto; padding-block: calc(var(--nav-h) + var(--s-8)) var(--s-8); }
    .hero__title { max-width: 100%; }
    .constellation { opacity: 0 !important; }
    .scroll-cue { display: none; }
}

@media (max-width: 720px) {
    .roster { --roster-cols: 36px 1fr auto; }
    .roster__head { display: none; }
    .agent { padding: var(--s-4); row-gap: var(--s-1); }
    .agent__id { display: none; }
    .agent__role { grid-column: 2; font-size: var(--t-xs); color: var(--tx-3); }
    .agent__av { grid-row: span 2; }
    .agent__status { grid-row: span 2; }

    .pager { grid-template-columns: 1fr; }
    .track { grid-template-columns: 1fr; gap: var(--s-2); }
    .footer__grid { grid-template-columns: 1fr; gap: var(--s-6); }
    .footer__base { flex-direction: column; gap: var(--s-2); }
    .world__opt span { display: none; }
    .world__opt { padding: 5px 9px; }
}

@media (max-width: 480px) {
    .team { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
    .btn { width: 100%; }
    .hero__actions .btn, .band__actions .btn { flex: 1 1 100%; }
}

/* ═══════════════════════════════════════════════════ 26. REDUCED MOTION ── */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .js [data-reveal] { opacity: 1; transform: none; }
    .reveal-word { opacity: 1; transform: none; animation: none; }
    .constellation { display: none; }
    .board__track { animation: none; }
    .disc, .disc__label { animation: none; }
}

/* ═══════════════════════════════════════════════════════════ 27. PRINT ── */

@media print {
    .nav, .backdrop, .grain, .progress, .constellation, .board, .scroll-cue { display: none !important; }
    body { background: #fff; color: #000; }
    .page { z-index: auto; }
}
