/* ════════════════════════════════════════════════════════════
   CASCADE LAYERS
═══════════════════════════════════════════════════════════ */
@layer reset, tokens, base, layout, components, sections, motion, utilities;

/* ── RESET ─────────────────────────────────────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
  body { min-height: 100svh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  img, svg, video { display: block; max-width: 100%; height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  ul, ol { list-style: none; }
  :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 0; }
}

/* ── DESIGN TOKENS ─────────────────────────────────────── */
@layer tokens {
  :root {
    /* Surfaces — warm parchment scale */
    --paper:   white;
    --paper-2: oklch(0.975 0.012 78);
    --paper-3: oklch(0.952 0.020 78);
    --paper-4: oklch(0.918 0.024 78);

    /* Ink — deep midnight scale */
    --ink:        oklch(0.205 0.048 256);
    --ink-2:      oklch(0.310 0.042 256);
    --ink-3:      oklch(0.420 0.034 256);
    --ink-muted:  oklch(0.560 0.022 256);
    --ink-faint:  oklch(0.700 0.014 256);

    /* Accents */
    --gold:       oklch(0.640 0.118 70);
    --gold-2:     oklch(0.560 0.130 60);
    --gold-soft:  oklch(0.860 0.060 75);
    --cobalt:     oklch(0.420 0.160 255);
    --cobalt-2:   oklch(0.330 0.150 255);
    --rust:       oklch(0.540 0.160 32);
    --moss:       oklch(0.500 0.090 145);

    /* Lines */
    --rule:        color-mix(in oklch, var(--ink) 14%, transparent);
    --rule-strong: color-mix(in oklch, var(--ink) 28%, transparent);
    --rule-faint:  color-mix(in oklch, var(--ink) 7%, transparent);

    /* Typography */
    --serif: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --sans:  'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono:  'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --display-vs:  "opsz" 144, "SOFT" 30, "wght" 540;
    --display-hi:  "opsz" 144, "SOFT" 50, "wght" 700;
    --serif-quote: "opsz" 36,  "SOFT" 80, "wght" 400;

    /* Spacing & geometry */
    --r-xs: 0; --r-sm: 0; --r: 0; --r-lg: 0; --r-xl: 0;
    --gutter: clamp(1rem, 2.4vw, 2rem);
    --container: 1280px;
    --measure: 62ch;
    --header-h: 68px;

    --T-fast: .18s cubic-bezier(.4,0,.2,1);
    --T:      .32s cubic-bezier(.4,0,.2,1);
    --T-slow: .6s  cubic-bezier(.22,1,.36,1);
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
  }
}

/* ── BASE ──────────────────────────────────────────────── */
@layer base {
  body {
    font-family: var(--sans);
    font-weight: 400;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    font-size: clamp(15px, 0.95rem + 0.1vw, 17px);
    overflow-x: clip;
  }

  /* Atlas paper texture */
  body::before {
    content: "";
    position: fixed; inset: 0;
    background:
      radial-gradient(1200px 800px at 80% -10%, color-mix(in oklch, var(--gold) 12%, transparent), transparent 60%),
      radial-gradient(900px 700px at -10% 110%, color-mix(in oklch, var(--cobalt) 8%, transparent), transparent 65%);
    pointer-events: none; z-index: 0;
  }
  body::after {
    content: "";
    position: fixed; inset: 0;
    background-image:
      radial-gradient(circle at 1px 1px, color-mix(in oklch, var(--ink) 12%, transparent) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: .25; mix-blend-mode: multiply;
    pointer-events: none; z-index: 0;
  }
  main, header, footer { position: relative; z-index: 1; }

  h1, h2, h3, h4, h5 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
  }
  h1 { font-size: clamp(2.6rem, 5vw + 0.5rem, 5.6rem); letter-spacing: -0.035em; }
  h2 { font-size: clamp(2rem, 3.4vw + 0.4rem, 3.6rem); letter-spacing: -0.028em; }
  h3 { font-size: clamp(1.4rem, 1.4vw + 0.8rem, 2rem); }
  h4 { font-size: 1.18rem; line-height: 1.25; }

  p { text-wrap: pretty; max-width: var(--measure); }
  em, .italic { font-style: italic; font-variation-settings: "opsz" 36, "SOFT" 80, "wght" 400; }

  ::selection { background: color-mix(in oklch, var(--gold) 60%, transparent); color: var(--ink); }

  .ms {
    font-family: 'Material Symbols Outlined';
    font-weight: 300;
    font-size: 1.1em;
    line-height: 1; vertical-align: -0.18em;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  }
}

/* ── LAYOUT PRIMITIVES ─────────────────────────────────── */
@layer layout {
    .wrap { width: min(100%, var(--container)); margin-inline: auto; padding-inline: var(--gutter); }
    .wrap-top { width: min(100%, var(--container)); margin-inline: auto; padding-inline: var(--gutter); }


  .section { padding-block: clamp(4rem, 8vw, 8rem); position: relative; }
  .section + .section { border-top: 1px solid var(--rule-faint); }
  .section.tight { padding-block: clamp(3rem, 5vw, 5rem); }
  .section.dark  { background: var(--paper-2); }
  .section.darker{ background: var(--paper-3); }

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

  .skip {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 0 0 var(--r-sm) 0;
    font-family: var(--mono); font-size: .8rem; z-index: 9999;
  }
  .skip:focus { left: 0; }
}

/* ── COMPONENTS ────────────────────────────────────────── */
@layer components {

  /* SECTION HEAD ────────────────────────────────── */
  .head {
    display: grid; gap: 1.4rem; margin-bottom: clamp(2rem, 4vw, 3.5rem);
    grid-template-columns: minmax(0, 1fr);
  }
  .head__rail {
    display: flex; align-items: center; gap: .9rem;
    font-family: var(--mono); font-size: .72rem; font-weight: 400;
    text-transform: uppercase; letter-spacing: .16em;
    color: var(--ink-3);
  }
  .head__rail::before {
    content: ""; width: 32px; height: 1px;
    background: var(--ink-3);
  }
  .head__no { color: var(--gold-2); }
  .head__bracket { color: var(--ink-faint); }
  .head__title { font-size: clamp(2rem, 3.6vw + 0.4rem, 3.6rem); max-width: 70vw; }
  .head__sub {
    color: var(--ink-3); font-size: clamp(1rem, 0.4vw + 0.95rem, 1.18rem);
    max-width: 56ch; line-height: 1.55;
  }

  /* HAIRLINE RULE ────────────────────────────────── */
  .rule {
    display: flex; align-items: center; gap: .8rem;
    color: var(--ink-faint); font-family: var(--mono); font-size: .68rem;
    text-transform: uppercase; letter-spacing: .25em;
  }
  .rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

  /* BUTTONS ───────────────────────────────────────── */
  .btn {
    --bg: var(--ink); --fg: var(--paper); --bd: var(--ink);
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .85rem 1.3rem;
    background: var(--bg); color: var(--fg);
    border: 1px solid var(--bd); border-radius: 0;
    font-family: var(--sans); font-size: .92rem; font-weight: 500;
    letter-spacing: .005em;
    transition: background var(--T-fast), color var(--T-fast), border-color var(--T-fast), transform var(--T-fast);
    text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  }
  .btn .ms { font-size: 1.05rem; }
  .btn:hover { transform: translateY(-1px); }
  .btn--ghost {
    --bg: transparent; --fg: var(--ink); --bd: var(--ink);
  }
  .btn--ghost:hover { --bg: var(--ink); --fg: var(--paper); }
  .btn--gold {
    --bg: var(--gold); --fg: oklch(0.16 0.04 70); --bd: var(--gold);
  }
  .btn--gold:hover { --bg: var(--gold-2); --bd: var(--gold-2); --fg: var(--paper); }
  .btn--ink:hover  { --bg: var(--paper); --fg: var(--ink); --bd: var(--ink); }
  .btn--small { padding: .55rem .9rem; font-size: .82rem; }
  .btn--icon  { padding: .55rem; aspect-ratio: 1; justify-content: center; }

  /* CHIP ──────────────────────────────────────────── */
  .chip {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .35rem .8rem;
    border: 1px solid var(--rule);
    border-radius: 0;
    font-family: var(--mono); font-size: .72rem;
    color: var(--ink-3); background: color-mix(in oklch, var(--paper) 60%, transparent);
    backdrop-filter: blur(8px);
    transition: all var(--T-fast);
    cursor: pointer; user-select: none;
  }
  .chip[aria-pressed="true"], .chip.is-on {
    background: var(--ink); color: var(--paper); border-color: var(--ink);
  }
  .chip:hover { border-color: var(--rule-strong); color: var(--ink); }

  /* TAG ─────────────────────────────────────────── */
  .tag {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .25rem .65rem;
    font-family: var(--mono); font-size: .68rem;
    text-transform: uppercase; letter-spacing: .15em;
    color: var(--gold-2);
    border: 1px solid color-mix(in oklch, var(--gold) 35%, transparent);
    background: color-mix(in oklch, var(--gold) 10%, transparent);
    border-radius: 0;
  }

  /* CARD ─────────────────────────────────────────── */
  .card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    padding: clamp(1.4rem, 2.2vw, 2rem);
    transition: border-color var(--T), transform var(--T), box-shadow var(--T);
  }
  .card:hover {
    border-color: var(--rule-strong);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -28px color-mix(in oklch, var(--ink) 35%, transparent);
  }
  .card__icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 0;
    background: color-mix(in oklch, var(--ink) 4%, transparent);
    border: 1px solid var(--rule);
    color: var(--ink);
    margin-bottom: 1.1rem;
  }
  .card__icon .ms { font-size: 22px; }
  .card__title { margin-bottom: .55rem; font-size: 1.18rem; line-height: 1.25; }
  .card__text  { color: var(--ink-3); font-size: .96rem; line-height: 1.55; }
  .card__corner {
    position: absolute; top: 14px; right: 14px;
    font-family: var(--mono); font-size: .65rem;
    color: var(--ink-faint); letter-spacing: .15em; text-transform: uppercase;
  }

  /* COMPASS DECORATION ──────────────────────────── */
  .compass { width: 88px; height: 88px; color: var(--ink-3); }

  /* DIVIDER WITH GLYPH ──────────────────────────── */
  .glyph-divider {
    display: flex; align-items: center; justify-content: center; gap: 1.4rem;
    color: var(--ink-faint);
    margin-block: 2rem;
  }
  .glyph-divider::before, .glyph-divider::after {
    content: ""; height: 1px; flex: 1; max-width: 180px;
    background: var(--rule);
  }
  .glyph-divider span { font-family: var(--serif); font-style: italic; font-size: 1.1rem; }
}

/* ════════════════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════════════ */

/* ── TOPBAR ────────────────────────────────────── */
@layer sections {
  .topbar {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in oklch, var(--paper) 82%, transparent);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid var(--rule-faint);
    transition: background var(--T), border-color var(--T);
  }
  .topbar.is-scrolled {
    background: color-mix(in oklch, var(--paper) 94%, transparent);
    border-bottom-color: var(--rule);
  }
  .topbar__inner {
    height: var(--header-h);
    display: flex; align-items: center; gap: 2rem;
  }
  .brand {
    display: flex; align-items: center; gap: .7rem;
    flex-shrink: 0;
  }
  .brand__mark { color: var(--ink); flex-shrink: 0; }
  .brand__text { line-height: 1; display: flex; flex-direction: column; }
  .brand__name {
    font-family: var(--serif); font-weight: 700;
    font-size: 1.2rem; letter-spacing: .04em;
    color: var(--ink);
    font-variation-settings: "opsz" 36, "SOFT" 30, "wght" 700;
  }
  .brand__sub {
    font-family: var(--mono); font-size: .62rem;
    color: var(--ink-muted);
    letter-spacing: .22em; text-transform: uppercase;
    margin-top: 4px;
  }
  .nav { display: flex; gap: .25rem; flex: 1; justify-content: center; }
  .nav a {
    padding: .55rem .9rem;
    font-size: .87rem; color: var(--ink-3);
    position: relative;
    transition: color var(--T-fast);
  }
  .nav a::after {
    content: ""; position: absolute; left: 50%; right: 50%; bottom: .35rem;
    height: 1px; background: var(--ink); transition: left var(--T-fast), right var(--T-fast);
  }
  .nav a:hover, .nav a.is-active { color: var(--ink); }
  .nav a:hover::after, .nav a.is-active::after { left: .9rem; right: .9rem; }
  .nav-toggle { display: none; }
  @media (max-width: 920px) {
    .nav { position: fixed; inset: var(--header-h) 0 auto 0;
      flex-direction: column; align-items: stretch; gap: 0;
      background: var(--paper); border-bottom: 1px solid var(--rule);
      padding: .5rem var(--gutter) 1rem;
      transform: translateY(-110%); transition: transform var(--T);
    }
    .nav a { padding: .9rem 0; border-bottom: 1px solid var(--rule-faint); }
    .nav.is-open { transform: translateY(0); }
    .nav-toggle { display: inline-flex; }
  }

  /* ── HERO ───────────────────────────────────── */
  .hero { padding-block: clamp(4rem, 9vw, 9rem) clamp(3rem, 6vw, 6rem); position: relative; overflow: clip; }
  .hero__deco {
    position: absolute; top: 1rem; right: var(--gutter);
    color: var(--ink-3);
    display: flex; flex-direction: column; align-items: flex-end; gap: .6rem;
    pointer-events: none;
  }
  .hero__deco-coords {
    font-family: var(--mono); font-size: .68rem;
    color: var(--ink-muted); letter-spacing: .12em;
    text-align: right;
  }
  .hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(2rem, 4vw, 4rem); align-items: end; }
  @media (max-width: 1000px) { .hero__inner { grid-template-columns: 1fr; } }
  .hero__badge {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .4rem .85rem .4rem .55rem;
    background: var(--paper); border: 1px solid var(--rule);
    border-radius: 0;
    font-size: .82rem; color: var(--ink-3);
    margin-bottom: 1.6rem;
  }
  .hero__badge-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
    box-shadow: 0 0 0 4px color-mix(in oklch, var(--gold) 25%, transparent);
  }
  .hero__title {
	font-size: clamp(1.6rem, 3.4vw + 0.4rem, 4.4rem);
	line-height: 0.96;
	letter-spacing: -0.035em;
	font-weight: 800;
  }
  .hero__title em {
    font-style: italic;
    color: var(--ink-2);
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 460;
    background: linear-gradient(95deg, var(--gold-2), var(--cobalt));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .hero__lede {
    margin-top: 1.6rem;
    font-family: var(--serif); font-style: italic;
    font-variation-settings: "opsz" 24, "SOFT" 60, "wght" 380;
    font-size: clamp(1.05rem, 0.5vw + 1rem, 1.3rem);
    color: var(--ink-2);
    max-width: 56ch;
  }
  .hero__cta { margin-top: 2.2rem; display: flex; gap: .7rem; flex-wrap: wrap; }

  .hero__stats { display: grid; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
  .stat { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: baseline;
    padding: .7rem 0; border-bottom: 1px solid var(--rule-faint);
  }
  .stat:last-child { border-bottom: 0; }
  .stat__value {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(2rem, 1vw + 1.6rem, 2.6rem); line-height: 1;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 96, "SOFT" 30, "wght" 600;
    color: var(--ink); min-width: 4ch;
  }
  .stat__label {
    font-family: var(--mono); font-size: .72rem;
    color: var(--ink-muted); letter-spacing: .12em;
    text-transform: uppercase;
  }

  /* ── INTRO ───────────────────────────────────── */
  .intro__lede { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 5rem); }
  @media (max-width: 900px) { .intro__lede { grid-template-columns: 1fr; } }
  .intro__lede h2 { font-size: clamp(2rem, 3vw + 0.6rem, 3.4rem); }
  .intro__body {
    font-size: 1.05rem; color: var(--ink-2); line-height: 1.7;
  }
  .intro__body::first-letter {
    font-family: var(--serif);
    float: left;
    font-size: 4.4em; line-height: .85;
    padding: .3rem .7rem 0 0;
    color: var(--gold-2);
    font-variation-settings: "opsz" 144, "SOFT" 80, "wght" 700;
  }

  .intro__cards {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  .intro__quote {
    margin-top: clamp(3rem, 5vw, 4.5rem);
    padding: clamp(2rem, 4vw, 3rem);
    background: var(--paper-2);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--r-lg) var(--r-lg) 0;
    display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: start;
    max-width: 1000px;
  }
  .intro__quote-mark {
    font-family: var(--serif); font-size: 5rem; line-height: .8;
    color: var(--gold-2);
    font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 700;
  }
  .intro__quote-text {
    font-family: var(--serif); font-style: italic;
    font-size: clamp(1.15rem, 0.4vw + 1.05rem, 1.4rem);
    line-height: 1.4;
    color: var(--ink-2);
    font-variation-settings: var(--serif-quote);
  }
  .intro__quote-author {
    margin-top: 1rem; font-family: var(--mono); font-size: .78rem;
    color: var(--ink-3); letter-spacing: .08em;
  }
  .intro__quote-author strong { color: var(--ink); font-weight: 500; }

  /* ── PLANETS ──────────────────────────────────── */
  .planets__grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .planet {
    position: relative;
    padding: 1.6rem 1.4rem 1.4rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    transition: all var(--T);
    overflow: hidden;
  }
  .planet::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(220px 140px at 90% 0%, var(--planet-glow, transparent), transparent 70%);
    opacity: .5; pointer-events: none;
  }
  .planet:hover {
    border-color: var(--rule-strong);
    transform: translateY(-2px);
  }
  .planet__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    margin-bottom: 1rem;
  }
  .planet__symbol {
    font-family: var(--serif); font-size: 2.4rem; line-height: 1;
    color: var(--ink);
    font-variation-settings: "opsz" 96, "SOFT" 50, "wght" 500;
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--paper-2);
    border: 1px solid var(--rule);
  }
  .planet__level {
    font-family: var(--mono); font-size: .65rem;
    color: var(--ink-muted); letter-spacing: .15em; text-transform: uppercase;
  }
  .planet__name { font-size: 1.4rem; margin-bottom: .35rem; }
  .planet__keywords {
    display: flex; flex-wrap: wrap; gap: .35rem;
    margin: .6rem 0 1rem;
  }
  .planet__kw {
    font-family: var(--mono); font-size: .68rem;
    padding: .2rem .55rem;
    border: 1px solid var(--rule);
    border-radius: 0; color: var(--ink-3);
  }
  .planet__desc { color: var(--ink-3); font-size: .92rem; line-height: 1.55; }

  /* ── ASTROMAP ─────────────────────────────────── */
  .map-section { background: var(--paper-2); }
  .map-shell {
    display: grid; grid-template-columns: 320px 1fr;
    gap: clamp(1.2rem, 2vw, 2rem);
    align-items: stretch;
  }
  @media (max-width: 1000px) { .map-shell { grid-template-columns: 1fr; } }
  .map-controls {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    padding: 1.4rem;
    display: flex; flex-direction: column; gap: 1.4rem;
    height: fit-content;
    position: sticky; top: calc(var(--header-h) + 1rem);
  }
  @media (max-width: 1000px) { .map-controls { position: static; } }
  .mc-section { display: flex; flex-direction: column; gap: .7rem; }
  .mc-label {
    font-family: var(--mono); font-size: .68rem;
    text-transform: uppercase; letter-spacing: .16em;
    color: var(--ink-muted);
  }
  .mc-person {
    padding: 1rem; background: var(--paper-2); border: 1px solid var(--rule);
    border-radius: var(--r);
    display: grid; grid-template-columns: auto 1fr; gap: .9rem;
  }
  .mc-person__avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--rust));
    display: grid; place-items: center;
    color: var(--paper); font-family: var(--serif); font-weight: 700;
    font-variation-settings: "opsz" 36, "SOFT" 50, "wght" 700;
  }
  .mc-person__meta { display: grid; gap: 2px; }
  .mc-person__name { font-weight: 500; font-size: .92rem; color: var(--ink); }
  .mc-person__detail {
    font-family: var(--mono); font-size: .7rem; color: var(--ink-muted);
    letter-spacing: .04em;
  }
  .mc-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
  .planet-chip {
    --c: var(--ink);
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .7rem;
    border: 1px solid var(--rule);
    border-radius: 0;
    font-size: .8rem;
    background: var(--paper);
    transition: all var(--T-fast);
    cursor: pointer; user-select: none;
  }
  .planet-chip__sym {
    width: 18px; text-align: center;
    color: var(--c); font-family: var(--serif); font-weight: 600;
  }
  .planet-chip[aria-pressed="true"] {
    border-color: var(--c);
    background: color-mix(in oklch, var(--c) 12%, var(--paper));
  }
  .planet-chip[aria-pressed="false"] { opacity: .42; }
  .planet-chip:hover { border-color: var(--rule-strong); }

  .axis-legend { display: grid; gap: .55rem; }
  .axis-row {
    display: grid; grid-template-columns: 36px auto 1fr;
    gap: .7rem; align-items: center;
    font-size: .82rem; color: var(--ink-2);
    cursor: pointer; user-select: none;
    padding: .25rem 0;
  }
  .axis-row[aria-pressed="false"] { opacity: .35; }
  .axis-row__line { height: 0; border-top: 2px solid var(--ink-2); }
  .axis-row__line.mc { border-style: solid; }
  .axis-row__line.ic { border-style: dotted; }
  .axis-row__line.ac { border-style: dashed; }
  .axis-row__line.dc {
    border-top-style: solid;
    border-image: repeating-linear-gradient(to right, var(--ink-2) 0 8px, transparent 8px 12px) 1;
    border-top-width: 2px;
  }
  .axis-row__name { font-family: var(--mono); font-size: .72rem; letter-spacing: .15em; color: var(--ink-2); }
  .axis-row__desc { color: var(--ink-muted); font-size: .78rem; }

  .map-frame {
    position: relative;
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--paper-3);
    aspect-ratio: 16 / 11;
    min-height: 480px;
  }
  @media (max-width: 700px) { .map-frame { aspect-ratio: 4 / 3; min-height: 380px; } }
  #astromap { position: absolute; inset: 0; }
  .map-overlay {
    position: absolute; left: 12px; top: 12px;
    background: color-mix(in oklch, var(--paper) 92%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    padding: .55rem .85rem;
    font-family: var(--mono); font-size: .68rem;
    color: var(--ink-2); letter-spacing: .1em;
    z-index: 500;
    pointer-events: none;
  }
  .map-cred {
    position: absolute; right: 12px; bottom: 12px;
    font-family: var(--mono); font-size: .6rem;
    color: var(--ink-muted);
    background: color-mix(in oklch, var(--paper) 80%, transparent);
    padding: .25rem .55rem; border-radius: var(--r-sm);
    z-index: 500;
  }

  .leaflet-container { background: var(--paper-3); font-family: var(--sans); }
  .leaflet-control-zoom a {
    background: var(--paper); color: var(--ink-2);
    border: 1px solid var(--rule);
    font-family: var(--mono); font-weight: 400;
  }
  .leaflet-control-zoom a:hover { background: var(--paper-2); color: var(--ink); }
  .leaflet-control-attribution {
    background: color-mix(in oklch, var(--paper) 80%, transparent) !important;
    font-family: var(--mono); font-size: 9px !important;
    color: var(--ink-muted) !important;
  }
  .leaflet-tooltip.astro-tip {
    background: var(--ink); color: var(--paper);
    border: 0; border-radius: var(--r-sm);
    padding: .35rem .65rem;
    font-family: var(--mono); font-size: .72rem;
    box-shadow: 0 8px 24px -10px rgba(0,0,0,.4);
  }
  .leaflet-tooltip.astro-tip::before { border-top-color: var(--ink); }

  /* ── HOW IT WORKS ────────────────────────────── */
  .steps { display: grid; gap: 1rem; }
  .step {
    display: grid; grid-template-columns: 110px 1fr 1fr;
    gap: clamp(1rem, 3vw, 3rem); align-items: start;
    padding: 1.6rem 0; border-bottom: 1px solid var(--rule);
    transition: background var(--T);
  }
  .step:hover { background: color-mix(in oklch, var(--gold) 4%, transparent); }
  @media (max-width: 800px) {
    .step { grid-template-columns: auto 1fr; }
    .step__detail { grid-column: 2; }
  }
  .step__no {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 1; color: var(--gold-2);
    font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 700;
  }
  .step__title { font-size: 1.3rem; margin-bottom: .5rem; line-height: 1.25; }
  .step__icon { color: var(--ink-3); display: inline-flex; gap: .5rem; align-items: center;
    font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; }
  .step__icon .ms { font-size: 16px; }
  .step__text { color: var(--ink-2); font-size: .98rem; line-height: 1.55; margin-top: .8rem; }
  .step__detail {
    color: var(--ink-muted); font-size: .85rem;
    padding-left: 1rem; border-left: 1px solid var(--rule);
    font-style: italic;
    font-family: var(--serif);
    font-variation-settings: "opsz" 24, "SOFT" 50, "wght" 380;
    line-height: 1.6;
  }

  /* ── FEATURES (Bento) ─────────────────────────── */
  .features__grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(12, 1fr);
  }
  .feat-cat {
    grid-column: span 6;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r-xl);
    padding: clamp(1.6rem, 2.5vw, 2.4rem);
    container-type: inline-size;
  }
  .feat-cat:nth-child(4n+1) { background: linear-gradient(180deg, var(--paper) 0%, color-mix(in oklch, var(--paper-2) 60%, var(--paper)) 100%); }
  .feat-cat:nth-child(4n+2) { background: linear-gradient(180deg, var(--paper) 0%, color-mix(in oklch, var(--gold-soft) 30%, var(--paper)) 100%); }
  @media (max-width: 900px) { .feat-cat { grid-column: 1 / -1; } }
  .feat-cat__head {
    display: flex; align-items: center; gap: .9rem;
    padding-bottom: 1rem; margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--rule);
  }
  .feat-cat__icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--paper-2); border: 1px solid var(--rule);
    border-radius: 0;
  }
  .feat-cat__title { font-size: 1.45rem; line-height: 1.1; }
  .feat-cat__items { display: grid; gap: .9rem; }
  @container (min-width: 540px) { .feat-cat__items { grid-template-columns: 1fr 1fr; gap: 1rem; } }
  .feat {
    display: grid; grid-template-columns: auto 1fr; gap: .8rem;
    padding: .65rem 0;
  }
  .feat__icon {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    color: var(--ink-2);
    border: 1px solid var(--rule); border-radius: 0;
    background: color-mix(in oklch, var(--paper) 60%, transparent);
  }
  .feat__icon .ms { font-size: 17px; }
  .feat__title { font-size: .98rem; font-weight: 500; color: var(--ink); margin-bottom: .15rem; line-height: 1.3; }
  .feat__desc { font-size: .85rem; color: var(--ink-3); line-height: 1.5; }

  /* ── SOFTWARE ─────────────────────────────────── */
  .software__lede { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; }
  @media (max-width: 900px) { .software__lede { grid-template-columns: 1fr; } }
  .software__title { font-size: clamp(2.4rem, 4vw + 0.6rem, 4.4rem); }
  .software__title em {
    background: linear-gradient(95deg, var(--gold-2), var(--rust));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .software__highlights { display: grid; gap: .9rem; }
  .highlight {
    display: grid; grid-template-columns: 32px 1fr; gap: .8rem; align-items: center;
    padding: .9rem 0; border-bottom: 1px solid var(--rule);
    font-size: .96rem; color: var(--ink-2);
  }
  .highlight:last-child { border-bottom: 0; }
  .highlight .ms { color: var(--gold-2); font-size: 22px; }

  .software__screen {
    margin-top: 3rem;
    aspect-ratio: 16 / 9;
    background:
      linear-gradient(135deg, var(--paper-3) 0%, var(--paper-2) 100%);
    border: 1px solid var(--rule); border-radius: var(--r-xl);
    display: grid; place-items: center;
    position: relative; overflow: hidden;
  }
  .software__screen::before {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(0deg, color-mix(in oklch, var(--ink) 5%, transparent) 1px, transparent 1px) 0 0 / 100% 40px,
      linear-gradient(90deg, color-mix(in oklch, var(--ink) 5%, transparent) 1px, transparent 1px) 0 0 / 40px 100%;
    opacity: .5;
  }
  .software__screen-mark { position: relative; text-align: center; }
  .software__screen-mark .ms { font-size: 64px; color: var(--ink-faint); }
  .software__screen-mark p {
    color: var(--ink-muted); font-family: var(--mono); font-size: .78rem;
    margin-top: .5rem; letter-spacing: .12em; text-transform: uppercase;
  }

  .testimonials {
    margin-top: clamp(3rem, 5vw, 4rem);
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .testimonial {
    padding: 1.6rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    display: flex; flex-direction: column; gap: 1rem;
  }
  .testimonial__text {
    font-family: var(--serif); font-style: italic;
    font-size: 1rem; line-height: 1.55;
    color: var(--ink-2);
    font-variation-settings: "opsz" 24, "SOFT" 60, "wght" 380;
  }
  .testimonial__foot {
    display: grid; grid-template-columns: 36px 1fr; gap: .8rem; align-items: center;
    padding-top: 1rem; border-top: 1px solid var(--rule);
  }
  .testimonial__avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cobalt), var(--gold));
    color: var(--paper);
    display: grid; place-items: center;
    font-family: var(--serif); font-weight: 600;
  }
  .testimonial__author { font-weight: 500; font-size: .9rem; color: var(--ink); }
  .testimonial__role { font-family: var(--mono); font-size: .68rem; color: var(--ink-muted); letter-spacing: .05em; }

  /* ── PRICING ──────────────────────────────────── */
  .pricing__grid {
    display: grid; gap: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    max-width: 880px; margin-inline: auto;
  }
  .plan {
    position: relative;
    padding: 2rem 1.8rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r-xl);
    display: flex; flex-direction: column; gap: 1.4rem;
    transition: all var(--T);
  }
  .plan--highlight {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    box-shadow: 0 30px 60px -30px color-mix(in oklch, var(--ink) 40%, transparent);
  }
  .plan--highlight .plan__name,
  .plan--highlight .plan__price,
  .plan--highlight .plan__feature .ms,
  .plan--highlight .plan__desc { color: var(--paper); }
  .plan--highlight .plan__per,
  .plan--highlight .plan__missing { color: var(--ink-faint); }
  .plan--highlight .plan__feature { color: color-mix(in oklch, var(--paper) 90%, transparent); }
  .plan--highlight .plan__divider { background: color-mix(in oklch, var(--paper) 20%, transparent); }
  .plan__badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    padding: .35rem .9rem;
    background: var(--gold); color: oklch(0.16 0.04 70);
    font-family: var(--mono); font-size: .68rem;
    text-transform: uppercase; letter-spacing: .15em;
    border-radius: 0;
  }
  .plan__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
  .plan__name { font-size: 1.6rem; }
  .plan__icon {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: color-mix(in oklch, var(--paper) 60%, transparent);
    border: 1px solid var(--rule);
    color: var(--gold-2);
  }
  .plan--highlight .plan__icon {
    background: color-mix(in oklch, var(--paper) 12%, transparent);
    border-color: color-mix(in oklch, var(--paper) 25%, transparent);
    color: var(--gold);
  }
  .plan__price-row { display: flex; align-items: baseline; gap: .4rem; }
  .plan__currency { font-family: var(--mono); font-size: 1rem; color: var(--ink-3); }
  .plan__price {
    font-family: var(--serif); font-weight: 700;
    font-size: 3.4rem; line-height: 1;
    font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 700;
    letter-spacing: -0.04em;
  }
  .plan__per { font-family: var(--mono); font-size: .82rem; color: var(--ink-muted); }
  .plan__desc { color: var(--ink-3); font-size: .92rem; }
  .plan__divider { height: 1px; background: var(--rule); }
  .plan__features { display: flex; flex-direction: column; gap: .55rem; }
  .plan__feature {
    display: grid; grid-template-columns: 18px 1fr; gap: .7rem; align-items: baseline;
    font-size: .92rem; color: var(--ink-2);
  }
  .plan__feature .ms { font-size: 16px; color: var(--gold-2); }
  .plan__missing { font-size: .84rem; color: var(--ink-muted); text-decoration: line-through; }
  .plan__missing .ms { color: var(--ink-faint); text-decoration: none; display: inline-block; }
  .plan__cta { margin-top: auto; }

  /* ── FAQ (CSS-only via :has + details) ───────── */
  .faq__list { display: flex; flex-direction: column; max-width: 920px; margin-inline: auto; }
  .qa { border-bottom: 1px solid var(--rule); transition: border-color var(--T); }
  .qa summary {
    display: grid; grid-template-columns: auto 1fr auto;
    gap: 1.2rem; align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    list-style: none;
    transition: color var(--T-fast);
  }
  .qa summary::-webkit-details-marker { display: none; }
  .qa summary:hover { color: var(--gold-2); }
  .qa__no {
    font-family: var(--mono); font-size: .72rem;
    color: var(--gold-2); letter-spacing: .12em;
    width: 30px; flex-shrink: 0;
  }
  .qa__q {
    font-family: var(--serif); font-size: clamp(1.1rem, 0.5vw + 1rem, 1.25rem);
    font-weight: 600; color: var(--ink);
    line-height: 1.3;
  }
  .qa__sym {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border: 1px solid var(--rule);
    border-radius: 50%;
    transition: transform var(--T), border-color var(--T);
  }
  .qa[open] .qa__sym { transform: rotate(45deg); border-color: var(--ink); }
  .qa[open] { background: color-mix(in oklch, var(--gold-soft) 25%, transparent); }
  .qa__a {
    padding: 0 0 1.5rem calc(30px + 1.2rem);
    color: var(--ink-2); font-size: 1rem; line-height: 1.65;
    max-width: 70ch;
  }

  /* ── CTA ──────────────────────────────────────── */
  .cta-section {
    padding-block: clamp(5rem, 10vw, 9rem);
    background:
      radial-gradient(700px 400px at 50% 100%, color-mix(in oklch, var(--gold) 18%, transparent), transparent 70%),
      var(--paper-2);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    text-align: center;
  }
  .cta-section h2 {
    font-size: clamp(2.4rem, 4.5vw + 0.4rem, 5rem);
    max-width: 18ch; margin: 0 auto 1.5rem;
    line-height: 1;
  }
  .cta-section h2 em {
    background: linear-gradient(95deg, var(--gold-2), var(--cobalt));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .cta-section p {
    margin: 0 auto 2.4rem;
    color: var(--ink-3); font-size: 1.1rem;
    max-width: 56ch;
  }
  .cta-section .btn-row { justify-content: center; }

  /* ── FOOTER ──────────────────────────────────── */
  .footer {
    padding-block: clamp(3rem, 5vw, 5rem) 2rem;
    border-top: 1px solid var(--rule);
    background: var(--paper-2);
  }
  .footer__grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }
  @media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }
  .footer__brand { display: flex; flex-direction: column; gap: 1rem; max-width: 360px; }
  .footer__tagline {
    font-family: var(--serif); font-style: italic;
    color: var(--ink-3); font-size: 1.05rem; line-height: 1.5;
    font-variation-settings: "opsz" 24, "SOFT" 60, "wght" 380;
  }
  .footer__col h5 {
    font-family: var(--mono); font-size: .7rem;
    font-weight: 400; color: var(--ink-muted);
    letter-spacing: .2em; text-transform: uppercase;
    margin-bottom: 1rem;
  }
  .footer__col a {
    display: block; padding: .35rem 0;
    color: var(--ink-2); font-size: .92rem;
    transition: color var(--T-fast);
  }
  .footer__col a:hover { color: var(--gold-2); }

  .footer__bottom {
    padding-top: 1.6rem; border-top: 1px solid var(--rule);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
    font-family: var(--mono); font-size: .72rem;
    color: var(--ink-muted); letter-spacing: .05em;
  }
  .footer__coords { font-feature-settings: "tnum"; }
}

/* ════════════════════════════════════════════════════════════
   MOTION
═══════════════════════════════════════════════════════════ */
@layer motion {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(.22,1,.36,1), transform 0.8s cubic-bezier(.22,1,.36,1);
  }
  .reveal.is-in { opacity: 1; transform: none; }

  .stagger > * {
    opacity: 0; transform: translateY(14px);
    animation: fadeUp .9s cubic-bezier(.22,1,.36,1) forwards;
  }
  .stagger > *:nth-child(1){ animation-delay: .05s; }
  .stagger > *:nth-child(2){ animation-delay: .15s; }
  .stagger > *:nth-child(3){ animation-delay: .25s; }
  .stagger > *:nth-child(4){ animation-delay: .35s; }
  .stagger > *:nth-child(5){ animation-delay: .45s; }
  .stagger > *:nth-child(6){ animation-delay: .55s; }

  @keyframes fadeUp { to { opacity: 1; transform: none; } }

  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .scroll-reveal {
        animation: scrollReveal linear both;
        animation-timeline: view();
        animation-range: entry 5% cover 30%;
      }
      @keyframes scrollReveal {
        from { opacity: 0; transform: translateY(28px); }
        to   { opacity: 1; transform: none; }
      }
    }
  }
}

/* ════════════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════════ */
@layer utilities {
  .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .text-mono { font-family: var(--mono); }
  .text-muted { color: var(--ink-muted); }
  .text-center { text-align: center; }
  .mt-md { margin-top: 1.5rem; }
  .mt-lg { margin-top: 3rem; }
  .nowrap { white-space: nowrap; }
}
