/* =========================================================================
   Isla Noctura — The Isle
   Design language: "moonlit island night"
     - near-black navy canvas, moonlit silver type, chiselled stone edges
     - palette sampled directly from the server logo (see docs/FEATURES.md)
   Readability rule for this file: no body-weight text below #A7B4C0.
   ========================================================================= */

:root {
  /* ---- surfaces: sampled from the logo's night sky ---- */
  --ink:        #04070E;   /* deepest — page backdrop base            */
  --bg:         #070D18;   /* brand night navy                        */
  --bg-2:       #0A1220;   /* raised band                             */
  --surface:    #0C1521;   /* card                                    */
  --surface-2:  #111C29;   /* card hover / nested                     */
  --surface-3:  #16212F;   /* input wells                             */

  /* ---- stone: the logo's chiselled ring ---- */
  --line:       #21303E;   /* hairline border                         */
  --line-2:     #2C3E4E;   /* emphasised border                       */
  --stone:      #4A5A68;   /* inert stone                             */
  --stone-lit:  #8C9BA8;   /* lit stone edge                          */

  /* ---- moonlight: the type ----
     Ratios measured against --bg. AA needs 4.5:1; the lowest combination
     anywhere in this file is 5.21:1 (--silver-mut on --surface-3). */
  --moon:       #E9EDEF;   /* headings / moon white   (16.51:1 on --bg) */
  --silver:     #C9D4DC;   /* body text               (12.90:1)         */
  --silver-dim: #A7B4C0;   /* secondary text          ( 9.20:1)         */
  --silver-mut: #8494A2;   /* card labels only        ( 6.24:1)  FLOOR  */

  /* ---- signals ---- */
  --live:       #6FD79A;   /* online                                  */
  --live-dim:   #2A5B44;
  --warn:       #E3B778;   /* degraded / snapshot                     */
  --down:       #E08A8A;   /* offline                                 */
  --accent:     #9FB6C9;   /* moonlit highlight — links, focus        */
  --accent-hi:  #C4D6E4;

  /* ---- type ---- */
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --ui:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* ---- rhythm ---- */
  --gut: 20px;
  --maxw: 1180px;
  --r: 10px;      /* card radius   */
  --r-s: 7px;     /* control radius */

  --shadow: 0 1px 0 rgba(255,255,255,.028) inset, 0 10px 30px -18px rgba(0,0,0,.9);
  --glow: 0 0 34px -8px rgba(159,182,201,.28);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--silver);
  font: 400 16px/1.65 var(--ui);
  letter-spacing: .006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: var(--moon); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 500; color: var(--moon); letter-spacing: -.005em; line-height: 1.18; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* focus — visible against the dark canvas */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* skip link (a11y; also the very first focusable node) */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--surface-2); color: var(--moon);
  padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 0 0 var(--r-s) 0;
}
.skip:focus { left: 0; }

/* ---------- the night canvas ----------
   Fixed backdrop, painted in four cheap layers (2026-08-06 atmosphere wave):
     the sky gradient + a REAL MOON top-right   (.night background)
     a tiled starfield that twinkles            (.night::before)
     slow cloud bands drifting across it        (.night::after)
   Fixed (not scrolling) so long pages stay cheap to paint. */
.night {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    /* the moon: bright core, lit limb, wide halo */
    radial-gradient(52px 52px at 84% 11%, rgba(240,246,250,.98) 0 46%, rgba(214,228,238,.9) 58%, transparent 62%),
    radial-gradient(140px 140px at 84% 11%, rgba(186,206,222,.30), transparent 68%),
    radial-gradient(520px 420px at 84% 11%, rgba(150,175,196,.17), transparent 66%),
    radial-gradient(900px 520px  at 12% 104%, rgba(48,78,102,.20), transparent 66%),
    linear-gradient(180deg, var(--bg) 0%, var(--ink) 58%, #030509 100%);
}
/* the stars: two point sizes on one tiled layer, breathing very slowly.
   Tiles are prime-ish offsets so no repeat grid ever reads. */
.night::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 22px 34px,  rgba(226,236,244,.85), transparent 55%),
    radial-gradient(1px 1px     at 187px 118px, rgba(206,220,232,.7),  transparent 55%),
    radial-gradient(1.6px 1.6px at 311px 71px,  rgba(238,244,250,.9),  transparent 55%),
    radial-gradient(1px 1px     at 92px 203px,  rgba(196,212,226,.6),  transparent 55%),
    radial-gradient(1.1px 1.1px at 259px 226px, rgba(222,232,242,.75), transparent 55%),
    radial-gradient(.9px .9px   at 141px 12px,  rgba(206,220,232,.55), transparent 55%),
    radial-gradient(1.4px 1.4px at 356px 176px, rgba(232,240,248,.8),  transparent 55%);
  background-size: 397px 263px;
  background-repeat: repeat;
  opacity: .8;
  animation: twinkle 9s ease-in-out infinite;
  /* stars thin out toward the horizon like a real sky */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.75) 46%, rgba(0,0,0,.22) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.75) 46%, rgba(0,0,0,.22) 78%, transparent 100%);
}
@keyframes twinkle {
  0%, 100% { opacity: .8; } 50% { opacity: .5; }
}
/* slow cloud drift — two offset bands, GPU-cheap, motion-safe only */
.night::after {
  content: ""; position: absolute; inset: -10% -30%;
  background:
    radial-gradient(46% 22% at 20% 24%, rgba(126,150,170,.09), transparent 70%),
    radial-gradient(38% 18% at 68% 12%, rgba(126,150,170,.07), transparent 72%),
    radial-gradient(52% 20% at 44% 62%, rgba(90,116,138,.05),  transparent 74%);
  animation: drift 128s linear infinite;
}
@keyframes drift {
  0%   { transform: translate3d(-3%, 0, 0)  scale(1.04); }
  50%  { transform: translate3d( 3%, -1.2%, 0) scale(1.09); }
  100% { transform: translate3d(-3%, 0, 0)  scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .night::before, .night::after { animation: none; }
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
main { display: block; }
.section { padding: 64px 0; }
.section + .section { padding-top: 0; }

/* section heading with the logo's triple claw-mark motif */
.sec-head { margin-bottom: 26px; }
.eyebrow {
  font: 600 11.5px/1 var(--ui);
  letter-spacing: .19em; text-transform: uppercase;
  color: var(--silver-mut);
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 12px;
}
.eyebrow::before {
  content: ""; width: 20px; height: 11px; flex: none;
  background:
    linear-gradient(105deg, transparent 42%, var(--stone) 42%, var(--stone) 58%, transparent 58%) 0 0/7px 100% no-repeat,
    linear-gradient(105deg, transparent 42%, var(--stone-lit) 42%, var(--stone-lit) 58%, transparent 58%) 7px 0/7px 100% no-repeat,
    linear-gradient(105deg, transparent 42%, var(--stone) 42%, var(--stone) 58%, transparent 58%) 14px 0/7px 100% no-repeat;
  opacity: .95;
}
.sec-head h2 { font-size: clamp(23px, 3.1vw, 31px); }
.sec-head p { margin-top: 9px; color: var(--silver-dim); max-width: 62ch; }

/* ---------- top nav — FIRST in the DOM, on every page ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(7,13,24,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(11px) saturate(1.15);
  -webkit-backdrop-filter: blur(11px) saturate(1.15);
}
.nav-in { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 7px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-txt b {
  font: 500 16.5px/1.1 var(--display); color: var(--moon);
  letter-spacing: .012em; white-space: nowrap;
}
.brand-txt span {
  font: 600 9.5px/1 var(--ui); letter-spacing: .24em;
  text-transform: uppercase; color: var(--silver-mut); margin-top: 3px;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: var(--r-s);
  font: 500 14px/1 var(--ui); color: var(--silver-dim);
  white-space: nowrap; transition: background .16s, color .16s;
}
.nav-links a:hover { color: var(--moon); background: rgba(159,182,201,.09); }
.nav-links a[aria-current="page"] { color: var(--moon); background: rgba(159,182,201,.13); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--r-s);
  background: linear-gradient(180deg, #223243, #18242F);
  border: 1px solid var(--line-2); color: var(--moon);
  font: 600 13.5px/1 var(--ui); white-space: nowrap;
  box-shadow: var(--shadow); transition: border-color .16s, transform .16s;
}
.nav-cta:hover { border-color: var(--stone); transform: translateY(-1px); color: var(--moon); }

/* ---------- session lane: the topbar identity slot ----------
   Signed OUT this is a button, signed IN it is the player. It is never an
   empty box: the HTML ships the signed-out gate and JS only ever replaces it
   with another rendered state. */
.nav-auth { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-auth-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--silver); font: 600 13.5px/1 var(--ui); white-space: nowrap;
  transition: border-color .16s, color .16s;
}
.nav-auth-btn:hover { border-color: var(--stone); color: var(--moon); }
.nav-auth-btn[aria-disabled="true"] { opacity: .62; cursor: not-allowed; }
.nav-auth-btn[aria-disabled="true"]:hover { border-color: var(--line); color: var(--silver); }

/* signed-in chip + dropdown (owner ruling 2026-08-06: sign out lives in the
   menu the chip opens, never on the bar) */
.nav-chip-wrap { position: relative; }
.nav-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 11px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  max-width: 220px; cursor: pointer;
  transition: border-color .16s;
}
.nav-chip:hover { border-color: var(--stone); }
.nav-chip[aria-expanded="true"] { border-color: var(--stone-lit); }
.nav-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--surface-3); object-fit: cover;
  border: 1px solid var(--line-2);
}
.nav-who-name {
  font: 600 13px/1 var(--ui); color: var(--moon);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 140px;
}
.nav-caret {
  width: 0; height: 0; flex: none;
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-top: 5.5px solid var(--silver-mut);
  transition: transform .16s;
}
.nav-chip[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 60;
  min-width: 224px; padding: 8px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.nav-menu-id { display: flex; align-items: center; gap: 11px; padding: 8px 9px 10px; }
.nav-menu-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--surface-3); object-fit: cover; border: 1px solid var(--line-2);
}
.nav-menu-id b {
  display: block; font: 600 14px/1.25 var(--ui); color: var(--moon);
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-menu-sub { font: 500 11.5px/1.3 var(--ui); color: var(--silver-mut); }
.nav-menu-sep { height: 1px; background: var(--line); margin: 2px 6px 6px; }
.nav-menu-item {
  display: block; padding: 9px 10px; border-radius: var(--r-s);
  font: 600 13px/1 var(--ui); color: var(--silver);
}
.nav-menu-item:hover { color: var(--moon); background: rgba(159,182,201,.09); }
.nav-menu-out { color: var(--silver-mut); }
.nav-menu-out:hover { color: var(--down); background: rgba(224,138,138,.08); }

/* burger — hidden on desktop */
.burger {
  display: none; width: 40px; height: 38px; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-s);
  cursor: pointer; padding: 0; position: relative;
}
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: var(--silver); border-radius: 2px; transition: transform .2s, opacity .2s;
}
.burger::before { top: 12px; } .burger span { top: 18px; } .burger::after { top: 24px; }
.burger[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span { opacity: 0; }
.burger[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 52px 0 18px; }
.hero-grid {
  display: grid; grid-template-columns: 1.06fr .94fr;
  gap: 46px; align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 6.1vw, 61px);
  line-height: 1.04; letter-spacing: -.017em;
  background: linear-gradient(176deg, #F2F5F6 12%, #C2CED7 52%, #8FA0AE 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--moon);
  text-wrap: balance;
}
.hero .kicker {
  font: 600 11.5px/1 var(--ui); letter-spacing: .28em; text-transform: uppercase;
  color: var(--stone-lit); margin-bottom: 16px;
}
.hero .lede {
  margin-top: 17px; font-size: 17.5px; color: var(--silver-dim);
  max-width: 52ch; line-height: 1.62;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 27px; }

.hero-art { position: relative; justify-self: center; width: 100%; max-width: 420px; }
.hero-art img { width: 100%; height: auto; border-radius: 15px; }
/* moon halo behind the logo art */
.hero-art::before {
  content: ""; position: absolute; inset: -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle at 58% 30%, rgba(176,199,216,.24), transparent 58%);
  filter: blur(16px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 21px; border-radius: var(--r-s);
  font: 600 14.5px/1 var(--ui); letter-spacing: .012em;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--moon);
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .16s, border-color .16s, background .16s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); border-color: var(--stone); color: var(--moon); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #DCE4EA, #AFC0CD);
  color: #0A121C; border-color: #C3D0DA; font-weight: 700;
  box-shadow: var(--glow), var(--shadow);
}
.btn-primary:hover { color: #060B12; background: linear-gradient(180deg, #E9EFF3, #BDCCD8); }
.btn-ghost { background: transparent; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface), #0A1119);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 21px; box-shadow: var(--shadow);
  position: relative;
}
/* chiselled top edge — the stone-ring highlight from the logo */
.card::before {
  content: ""; position: absolute; left: 13px; right: 13px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176,199,216,.30), transparent);
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--silver-dim); font-size: 14.6px; }

.grid { display: grid; gap: 15px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- live status card ---------- */
.status {
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: linear-gradient(180deg, #0E1926, #0A121C);
  padding: 19px 21px; box-shadow: var(--shadow);
}
.status-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--line);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stone); flex: none; }
.dot.on  { background: var(--live); box-shadow: 0 0 0 4px rgba(111,215,154,.15); animation: pulse 2.6s ease-in-out infinite; }
.dot.off { background: var(--down); box-shadow: 0 0 0 4px rgba(224,138,138,.13); }
.dot.wait{ background: var(--warn); box-shadow: 0 0 0 4px rgba(227,183,120,.13); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.status-label { font: 600 13.5px/1 var(--ui); color: var(--moon); letter-spacing: .02em; }
.status-src {
  margin-left: auto; font: 500 10.5px/1 var(--mono);
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--silver-mut); border: 1px solid var(--line);
  padding: 5px 8px; border-radius: 5px; white-space: nowrap;
}
.status-figs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.fig { min-width: 0; }
.fig b {
  display: block; font: 500 26px/1.05 var(--mono);
  color: var(--moon); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.fig span {
  display: block; margin-top: 6px;
  font: 600 10.5px/1.3 var(--ui); letter-spacing: .13em;
  text-transform: uppercase; color: var(--silver-mut);
}
.status-note { margin-top: 14px; font-size: 13px; color: var(--silver-mut); }

/* ---------- join / connect ---------- */
.copyrow {
  display: flex; align-items: stretch; gap: 8px;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 5px 5px 5px 13px;
}
.copyrow code {
  font: 500 14.5px/1 var(--mono); color: var(--moon);
  align-self: center; overflow-x: auto; white-space: nowrap;
  padding: 6px 0; flex: 1; min-width: 0;
  scrollbar-width: thin;
}
.copyrow button {
  flex: none; padding: 8px 13px; border-radius: 5px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--silver); font: 600 12.5px/1 var(--ui); cursor: pointer;
  transition: background .16s, color .16s;
}
.copyrow button:hover { background: #1B2836; color: var(--moon); }
.copyrow button.ok { color: var(--live); border-color: var(--live-dim); }

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li {
  counter-increment: s; position: relative;
  padding: 0 0 18px 40px; color: var(--silver-dim); font-size: 14.8px;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2);
  font: 600 12.5px/1 var(--mono); color: var(--stone-lit);
}
.steps li b { color: var(--moon); font-weight: 600; }
/* the connecting rail between steps */
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 27px; bottom: 8px;
  width: 1px; background: linear-gradient(180deg, var(--line-2), transparent);
}

/* ---------- restart schedule ---------- */
.restarts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.restart {
  text-align: center; padding: 15px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
}
.restart b {
  display: block; font: 500 21px/1 var(--mono); color: var(--moon);
  font-variant-numeric: tabular-nums;
}
.restart span {
  display: block; margin-top: 6px; font: 600 10px/1 var(--ui);
  letter-spacing: .12em; text-transform: uppercase; color: var(--silver-mut);
}

/* ---------- feature grid ---------- */
.feat {
  display: flex; gap: 13px; align-items: flex-start;
  background: linear-gradient(180deg, var(--surface), #0A1119);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 17px; transition: border-color .18s, transform .18s;
}
.feat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feat-ico {
  flex: none; width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #1A2836, #121C27);
  border: 1px solid var(--line-2); color: var(--stone-lit);
}
.feat-ico svg { width: 18px; height: 18px; }
.feat h3 { font-family: var(--ui); font-size: 14.8px; font-weight: 650; letter-spacing: 0; }
.feat p { font-size: 13.4px; margin-top: 4px; color: var(--silver-mut); line-height: 1.55; }

/* ---------- notice / gate panels ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: linear-gradient(180deg, #101B27, #0B131C);
  padding: 15px 17px; color: var(--silver-dim); font-size: 14.4px;
}
.notice b { color: var(--moon); font-weight: 600; }
.notice-ico { flex: none; color: var(--warn); margin-top: 2px; }
.notice-ico svg { width: 17px; height: 17px; }

.gate {
  display: grid; place-items: center; text-align: center;
  padding: 46px 24px; gap: 6px;
  border: 1px dashed var(--line-2); border-radius: var(--r);
  background: rgba(12,21,33,.55);
}
.gate h3 { font-size: 19px; }
.gate p { color: var(--silver-dim); max-width: 42ch; font-size: 14.5px; }
.gate .btn { margin-top: 10px; }
.gate-ico { color: var(--stone); margin-bottom: 4px; }
.gate-ico svg { width: 30px; height: 30px; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 3px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-s); overflow-x: auto; scrollbar-width: thin;
}
.tabs button {
  flex: none; padding: 9px 16px; border-radius: 5px; border: 0;
  background: transparent; color: var(--silver-dim);
  font: 600 13.5px/1 var(--ui); cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tabs button:hover { color: var(--moon); }
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--moon); }

/* ---------- footer ---------- */
.foot {
  margin-top: 76px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10,18,28,.6), rgba(4,7,14,.9));
  padding: 34px 0 30px;
}
.foot-in { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.foot-brand img { width: 38px; height: 38px; border-radius: 8px; }
.foot-brand b { display: block; font: 500 15.5px/1.2 var(--display); color: var(--moon); }
.foot-brand span { display: block; font-size: 13px; color: var(--silver-mut); margin-top: 3px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 7px 20px; }
.foot-links a { font-size: 14px; color: var(--silver-dim); }
.foot-links a:hover { color: var(--moon); }
.foot-legal {
  width: 100%; padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--line);
  font-size: 12.8px; color: var(--silver-mut);
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
}

/* ---------- utility ---------- */
.mono { font-family: var(--mono); }
.dim  { color: var(--silver-mut); }
.mt-s { margin-top: 12px; } .mt-m { margin-top: 22px; } .mt-l { margin-top: 34px; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 100px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  font: 600 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase;
  color: var(--silver-dim);
}
.pill.live { color: var(--live); border-color: var(--live-dim); }
.pill.soon { color: var(--warn); }

/* =========================================================================
   RESPONSIVE — phone-first checkpoints. Verified at 390px in proof/.
   ========================================================================= */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { max-width: 360px; order: -1; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .burger { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6,11,20,.98);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 14px;
    display: none;
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-links a { padding: 12px 10px; border-radius: var(--r-s); font-size: 15px; }
  .nav-in { position: relative; }
  .nav-cta { padding: 9px 13px; font-size: 13px; }
  /* On a phone the identity chip keeps the face and drops the words — the
     avatar is still a rendered state, so the slot never goes blank. The
     dropdown itself keeps the full name. */
  .nav-chip { max-width: none; padding: 4px; }
  .nav-who-name, .nav-caret { display: none; }
  .nav-auth-btn { padding: 9px 12px; font-size: 13px; }
}

@media (max-width: 640px) {
  :root { --gut: 16px; }
  .section { padding: 44px 0; }
  .hero { padding: 34px 0 28px; }
  .hero .lede { font-size: 16.4px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .restarts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .status-figs { grid-template-columns: 1fr; gap: 15px; }
  .fig b { font-size: 23px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .brand-txt b { font-size: 15px; }
  .status-src { margin-left: 0; width: 100%; text-align: center; }
}

@media (max-width: 400px) {
  .brand img { width: 30px; height: 30px; }
  .brand-txt span { letter-spacing: .18em; }
  .nav-cta span.nav-cta-txt { display: none; }
  .nav-cta { padding: 9px 11px; }
  .nav-auth-btn span.nav-auth-txt { display: none; }
  .nav-auth-btn { padding: 9px 11px; }
}

/* =========================================================================
   THE SHORELINE — site-wide bottom live bar (2026-08-06).
   Fangs & Ferns instrument-ribbon layout in the moonlit-night language:
   population + activity bars on the left, restart countdown + weather in
   the middle, source chip on the right. No storm segment (owner ruling).
   ========================================================================= */
#noct-livebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 9px calc(var(--gut) + 4px);
  background: rgba(5, 9, 17, .92);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  border-top: 1px solid var(--line);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--silver-dim);
}
body.has-livebar { padding-bottom: 44px; }
body.has-livebar .foot { padding-bottom: 30px; }

.lb-left, .lb-mid, .lb-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-k { color: var(--silver-mut); white-space: nowrap; }
.lb-v { color: var(--moon); font-weight: 600; white-space: nowrap; }
.lb-v.soon { color: var(--warn); }
.lb-sep { width: 1px; height: 14px; background: var(--line-2); flex: none; }
.lb-wx { display: inline-flex; align-items: center; gap: 10px; }
.lb-wx[hidden] { display: none; }

.lb-pulse { position: relative; width: 9px; height: 9px; flex: none; }
.lb-pulse i {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 9px rgba(111,215,154,.75);
  animation: lb-breathe 2.8s ease-in-out infinite;
}
@keyframes lb-breathe {
  0%, 100% { opacity: 1; } 50% { opacity: .45; }
}

.lb-bars { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 14px; }
.lb-bars i {
  width: 2.5px; height: 3px; border-radius: 1px;
  background: var(--accent); opacity: .75;
  transition: height .9s ease;
}

.lb-src {
  padding: 5px 10px; border-radius: 4px; border: 1px solid var(--line-2);
  font: 600 10.5px/1 var(--mono); letter-spacing: .17em; white-space: nowrap;
}
.lb-src.on   { color: var(--live); border-color: var(--live-dim); }
.lb-src.part { color: var(--warn); border-color: rgba(227,183,120,.4); }
.lb-src.off  { color: var(--down); border-color: rgba(224,138,138,.35); }

@media (max-width: 860px) {
  .lb-bars { display: none; }
  #noct-livebar { gap: 10px; }
}
@media (max-width: 640px) {
  .lb-wx { display: none; }
  .lb-k { letter-spacing: .09em; }
  #noct-livebar { padding: 8px var(--gut); font-size: 10.5px; }
  body.has-livebar { padding-bottom: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-pulse i { animation: none; }
  .lb-bars i { transition: none; }
}

/* =========================================================================
   MOTION & ATMOSPHERE (2026-08-06 design wave)
   One system, three rules:
     - entrances are earned once (hero on load, sections on first scroll-in)
     - hover states move TOWARD the moonlight (lift + lit edge), never jiggle
     - everything answers prefers-reduced-motion, and nothing here can hide
       content if JS never runs (.rv only arms under html.js)
   ========================================================================= */

/* ---------- easing tokens ---------- */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* exponential settle */
  --ease-soft: cubic-bezier(.2, .9, .25, 1);
}

/* ---------- scroll reveals ---------- */
html.js .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--rvd, 0ms);
}
html.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero entrance (runs once, pure CSS) ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes art-in {
  from { opacity: 0; transform: scale(.965) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.hero .kicker   { animation: rise-in .7s var(--ease-out) both; }
.hero h1        { animation: rise-in .8s var(--ease-out) .07s both; }
.hero .lede     { animation: rise-in .8s var(--ease-out) .15s both; }
.hero .hero-cta { animation: rise-in .8s var(--ease-out) .23s both; }
.hero-art       { animation: art-in 1s var(--ease-out) .12s both; }

/* the emblem floats on the night air; its halo breathes with it */
@keyframes art-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}
@keyframes halo-breathe {
  from { opacity: .75; } to { opacity: 1; }
}
.hero-art img { animation: art-float 6.5s ease-in-out infinite alternate; }
.hero-art::before { animation: halo-breathe 6.5s ease-in-out infinite alternate; }

/* ---------- fireflies (site.js injects .motes; 7 sparks) ---------- */
.motes { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.motes i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(196, 222, 190, .8);
  box-shadow: 0 0 7px 1.5px rgba(170, 214, 160, .45);
  opacity: 0;
  animation: mote-drift var(--mt, 17s) ease-in-out var(--md, 0s) infinite;
}
.motes i:nth-child(3n)   { background: rgba(202, 220, 236, .85); box-shadow: 0 0 7px 1.5px rgba(170, 196, 220, .4); }
.motes i:nth-child(1) { left: 8%;  top: 68%; }
.motes i:nth-child(2) { left: 21%; top: 84%; --mt: 21s; --md: 3s; }
.motes i:nth-child(3) { left: 37%; top: 74%; --mt: 19s; --md: 7s; }
.motes i:nth-child(4) { left: 58%; top: 88%; --mt: 23s; --md: 1.5s; }
.motes i:nth-child(5) { left: 72%; top: 71%; --mt: 18s; --md: 5s; }
.motes i:nth-child(6) { left: 86%; top: 82%; --mt: 22s; --md: 9s; }
.motes i:nth-child(7) { left: 47%; top: 92%; --mt: 25s; --md: 11s; }
@keyframes mote-drift {
  0%   { opacity: 0; transform: translate3d(0, 0, 0); }
  8%   { opacity: .9; }
  45%  { opacity: .55; transform: translate3d(26px, -46px, 0); }
  70%  { opacity: .8; transform: translate3d(-14px, -84px, 0); }
  100% { opacity: 0; transform: translate3d(10px, -128px, 0); }
}
@media (prefers-reduced-motion: reduce) { .motes { display: none; } }

/* ---------- nav: living links + scrolled shell ---------- */
.nav { transition: background .25s ease, box-shadow .25s ease; }
.nav.scrolled {
  background: rgba(5, 10, 19, .94);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .85);
}
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px;
  height: 1.5px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transform: scaleX(0); transform-origin: left center;
  transition: transform .28s var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.brand img { transition: filter .3s ease, transform .3s var(--ease-soft); }
.brand:hover img {
  filter: drop-shadow(0 0 9px rgba(176, 199, 216, .55));
  transform: rotate(-4deg);
}

/* ---------- buttons: moonlight sheen ---------- */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -68%; width: 46%;
  background: linear-gradient(103deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  transition: left .55s var(--ease-soft);
  pointer-events: none;
}
.btn-primary:hover::after { left: 122%; }
.btn:hover { box-shadow: var(--glow), var(--shadow); }

/* ---------- cards and features lean into the light ---------- */
.card, .feat { transition: border-color .22s ease, transform .25s var(--ease-soft), box-shadow .25s ease; }
.card:hover { border-color: var(--line-2); box-shadow: 0 0 0 1px rgba(159,182,201,.06), var(--glow), var(--shadow); }
.feat:hover {
  border-color: var(--line-2); transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(159,182,201,.07), 0 18px 34px -22px rgba(0,0,0,.9), var(--glow);
}
.feat-ico { transition: transform .3s var(--ease-soft), color .3s ease, border-color .3s ease; }
.feat:hover .feat-ico {
  transform: translateY(-2px) rotate(-5deg);
  color: var(--accent-hi); border-color: var(--stone);
}

/* the claw-mark eyebrow draws itself on reveal */
html.js .rv .eyebrow::before {
  transform: scaleX(0); transform-origin: left center;
  transition: transform .5s var(--ease-out) .12s;
}
html.js .rv.in .eyebrow::before { transform: scaleX(1); }

/* status figures land with a soft pop once values arrive */
.fig b { transition: color .3s ease; }
.fig b.bump { animation: fig-bump .5s var(--ease-out); }
@keyframes fig-bump {
  0% { transform: translateY(4px); opacity: .2; }
  100% { transform: none; opacity: 1; }
}

/* shop cards: the specimen window brightens as the card lifts */
.item { transition: border-color .22s ease, transform .25s var(--ease-soft), box-shadow .25s ease; }
.item:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(159,182,201,.07), 0 20px 38px -24px rgba(0,0,0,.95), var(--glow);
}

/* footer: the shoreline picks up a faint moon-line */
.foot { position: relative; }
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent 6%, rgba(176,199,216,.35) 50%, transparent 94%);
}
