/* Abyssal Basket — direction "Abysses": a dive from the surface to the hadal trench.
   One bioluminescent accent; the page background itself darkens with depth (set by JS). */
:root {
  --sea: #0a2c3c;          /* updated live by depth */
  --text: #e6f6f5;
  --muted: #a3c2c3;
  --faint: #86a8aa;
  --glow: #5ef2e0;
  --glow-rgb: 94 242 224;
  --glow-ink: #021412;
  --gold: #e7cf8f;          /* the single "sunken treasure" note */
  --line: rgb(var(--glow-rgb) / .16);
  --line-2: rgb(var(--glow-rgb) / .32);

  --display: "Mona Sans", system-ui, sans-serif;
  --sans: "Mona Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --rail: 132px;            /* room for the depth gauge on wide screens */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #02060c; }
html.lenis, html.lenis body { height: auto; }
.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; color: var(--text); background: var(--sea);
  font: 400 17px/1.6 var(--sans); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .6s linear;
}
a { color: inherit; }
::selection { background: var(--glow); color: var(--glow-ink); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 4px; }

#deep { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
#creatures { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
#sea { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#jelly-img {
  position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; user-select: none;
  height: 560px; width: auto; transform-origin: 50% 30%; will-change: transform, opacity;
  mix-blend-mode: screen;                       /* the near-black background melts into the sea */
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 62%, transparent 100%);
  opacity: 0; transition: opacity .6s ease-out;
}
#jelly-img.ready { opacity: 1; }
#jelly-gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; }
#jelly-img.warped { visibility: hidden; }
main, .nav, .foot, .gauge { position: relative; z-index: 2; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  padding: 14px var(--gutter) 10px;
  background: rgb(2 8 14 / .78);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 -1px 0 var(--line);
}
.nav-row { display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--glow); }
.brand svg { width: 26px; height: 26px; filter: drop-shadow(0 0 6px rgb(var(--glow-rgb) / .6)); }
.brand b { color: var(--text); font: 560 16px/1 var(--display); font-stretch: 118%; letter-spacing: -.01em; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.links a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 4px 0; white-space: nowrap; transition: color .15s ease-out; }
.links a:hover { color: var(--text); }
.links a[aria-current="page"] { color: var(--glow); text-shadow: 0 0 12px rgb(var(--glow-rgb) / .5); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 99px;
  border: 1px solid var(--line-2); color: var(--muted);
  font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #ffb86b; }
.pill[data-state="live"] .dot { background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.pill[data-state="sample"] { color: #ff8ac1; border-color: rgb(255 138 193 / .45); }
.pill[data-state="sample"] .dot { background: #ff8ac1; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgb(2 6 12 / .4); color: var(--glow); cursor: pointer; touch-action: manipulation;
}
.icon-btn svg { width: 13px; height: 13px; }
.icon-btn:active { transform: scale(.94); }

/* ---------- depth gauge ---------- */
.gauge {
  position: fixed; z-index: 5; right: clamp(16px, 2.4vw, 36px); top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 14px; pointer-events: none;
}
.gauge-track { position: relative; width: 2px; height: min(58vh, 520px); background: rgb(var(--glow-rgb) / .12); border-radius: 2px; }
.gauge-fill { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: linear-gradient(to bottom, rgb(var(--glow-rgb) / .1), var(--glow)); border-radius: 2px; }
.gauge-mark {
  position: absolute; left: -5px; top: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 14px var(--glow); transform: translateY(-50%);
}
.gauge-read { display: grid; gap: 2px; min-width: 74px; }
.gauge-read b { font: 400 22px/1 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.gauge-read span { font: 400 11px/1 var(--mono); color: var(--faint); }
.gauge-read em { font: 500 11px/1.2 var(--mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--glow); margin-top: 6px; }
@media (max-width: 900px) {
  .gauge { top: auto; bottom: 14px; right: 14px; transform: none; padding: 8px 12px; border-radius: 99px; background: rgb(2 6 12 / .72); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
  .gauge-track { display: none; }
  .gauge-read { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
  .gauge-read b { font-size: 15px; }
  .gauge-read em { margin: 0 0 0 4px; }
}

/* ---------- zones ---------- */
main { padding: 0 calc(var(--gutter) + var(--rail)) 0 var(--gutter); }
@media (max-width: 900px) { main { padding: 0 var(--gutter); } }
.zone { position: relative; min-height: 100svh; padding: clamp(110px, 15vh, 180px) 0; max-width: 1240px; }
@media (min-width: 900px) { .zone { max-width: min(1000px, 64vw); } }
.zone-tag {
  margin: 0 0 30px; display: inline-flex; align-items: center; gap: 12px;
  font: 500 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.zone-tag span {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--glow); letter-spacing: 0; font-size: 11px;
}
.display {
  margin: 0; font: 240 clamp(52px, 8.4vw, 136px)/.94 var(--display); font-stretch: 125%; letter-spacing: -.045em;
  text-wrap: balance;
}
.display.sm { font-size: clamp(38px, 5.2vw, 84px); line-height: .98; letter-spacing: -.04em; }
.display em { font-style: normal; font-weight: 460; color: var(--glow); text-shadow: 0 0 28px rgb(var(--glow-rgb) / .45); }
.treasure { font-weight: 460; color: var(--gold); text-shadow: 0 0 26px rgb(231 207 143 / .35); }
.lead { max-width: 46ch; margin: 28px 0 0; line-height: 1.6; font-size: clamp(17px, 1.3vw, 20px); color: var(--muted); font-weight: 300; text-wrap: pretty; }
.lead b { color: var(--text); font-weight: 500; }
.fine { margin: 26px 0 0; font: 400 13px/1.65 var(--mono); color: var(--faint); max-width: 72ch; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 99px;
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: transform .1s ease-out, box-shadow .2s ease-out, background .2s ease-out, border-color .2s ease-out;
}
.btn:active { transform: scale(.97); }
.btn-glow { background: var(--glow); color: var(--glow-ink); box-shadow: 0 0 0 0 rgb(var(--glow-rgb) / .5), 0 0 30px rgb(var(--glow-rgb) / .35); }
.btn-glow:hover { box-shadow: 0 0 0 6px rgb(var(--glow-rgb) / .12), 0 0 44px rgb(var(--glow-rgb) / .5); }
.btn-line { border: 1px solid var(--line-2); color: var(--text); }
.btn-line:hover { border-color: var(--glow); }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* hero */
.hero { display: flex; flex-direction: column; justify-content: center; }
.hero .display { max-width: 11ch; }
.readings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: clamp(56px, 10vh, 110px) 0 0; max-width: 980px; }
.readings div { border-top: 1px solid var(--line-2); padding-top: 14px; }
.readings dt { font: 500 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.readings dd { margin: 14px 0 0; font-size: clamp(30px, 3vw, 48px); line-height: 1; color: var(--text); letter-spacing: -.03em; }
@media (max-width: 760px) { .readings { grid-template-columns: 1fr 1fr; gap: 22px; } .hero { padding-top: 46vh; } }

/* twilight: composition rows */
.twi-head { max-width: 760px; }
.rows-head, .row { grid-template-columns: 110px minmax(0, 1fr) minmax(140px, 1.3fr) 120px 120px; }
.rows-head {
  display: grid; gap: 20px; margin-top: 72px; padding: 0 6px 14px; max-width: 900px;
  font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.rows-head span:nth-child(n+4) { text-align: right; }
.rows { max-width: 900px; }
@media (min-width: 900px) { .rows, #rows-foot { margin-right: auto; } }
.row {
  position: relative; display: grid;
  align-items: center; gap: 20px; padding: 22px 6px; border-bottom: 1px solid var(--line);
  transition: background .2s ease-out;
}
.row:first-child { border-top: 1px solid var(--line); }
.row:hover, .row.is-hot { background: linear-gradient(90deg, rgb(var(--glow-rgb) / .08), transparent 70%); }
.row .tk { font: 300 30px/1 var(--display); font-stretch: 125%; letter-spacing: -.02em; }
.row.is-hot .tk { color: var(--glow); text-shadow: 0 0 18px rgb(var(--glow-rgb) / .6); }
.row .role { color: var(--muted); font-size: 15px; }
.row .w { display: flex; align-items: center; gap: 14px; }
.row .w i { position: relative; flex: 1; height: 2px; background: rgb(var(--glow-rgb) / .12); }
.row .w i::after {
  content: ""; position: absolute; inset: 0; background: var(--glow); box-shadow: 0 0 10px var(--glow);
  transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease) .2s;
}
.row.in .w i::after, html:not(.js) .row .w i::after { transform: scaleX(var(--w, 0)); }
.row .w b { font: 400 14px/1 var(--mono); width: 40px; text-align: right; }
.row .c { font: 400 15px/1.3 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.row .c small { display: none; color: var(--faint); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.row .c.wait { color: #ffcf8a; }
@media (max-width: 760px) {
  .rows-head { display: none; }
  .row .c small { display: block; }
  .row { grid-template-columns: 1fr auto; row-gap: 10px; padding: 18px 4px; }
  .row .role { grid-column: 1; grid-row: 2; }
  .row .w { grid-column: 1 / -1; }
  .row .c { text-align: left; }
}

/* midnight: the sinking trade */
.midnight { min-height: auto; }
.sink { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 110px 0 40px; }
.sink-stage { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; margin-top: 48px; }
.line { position: relative; list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 1px dashed var(--line-2); display: grid; gap: 22px; }
.line li { position: relative; font: 400 14px/1.35 var(--mono); color: var(--faint); transition: color .3s ease-out; }
.line li::before {
  content: ""; position: absolute; left: -32px; top: 2px; width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid var(--line-2); background: #02060c; transition: background .3s ease-out, box-shadow .3s ease-out;
}
.line li.on { color: var(--text); }
.line li.on::before { background: var(--glow); box-shadow: 0 0 12px var(--glow); border-color: var(--glow); }
.line li b { display: block; color: inherit; font-weight: 400; margin-top: 3px; }
.sink-read { min-width: 0; }
#sink-cap { margin-top: 64px; }
.step-n { font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--glow); }
.giant.num, .readings dd.num { font-family: var(--display); font-stretch: 125%; font-weight: 220; font-variant-numeric: tabular-nums; }
.giant { margin-top: 18px; font-size: clamp(72px, 13vw, 210px); line-height: .9; letter-spacing: -.05em; color: var(--text); text-shadow: 0 0 40px rgb(var(--glow-rgb) / .25); }
.step-t { margin: 22px 0 0; max-width: 40ch; color: var(--muted); font-size: clamp(17px, 1.4vw, 21px); font-weight: 300; min-height: 3.2em; }
@media (max-width: 760px) {
  .sink-stage { grid-template-columns: 1fr; }
  .line { order: 2; }
}

/* abyss: expedition log */
.log { list-style: none; padding: 0; margin: 56px 0 0; max-width: 980px; }
.log li {
  display: grid; grid-template-columns: 96px 170px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.log .dive { font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--glow); text-transform: uppercase; }
.log .date { font: 400 14px/1.2 var(--mono); color: var(--muted); }
.log .bars { display: flex; gap: 3px; height: 6px; }
.log .bars span { background: var(--glow); opacity: var(--o); border-radius: 3px; box-shadow: 0 0 8px rgb(var(--glow-rgb) / .35); }
.log .amt { font: 400 15px/1.2 var(--mono); text-align: right; }
.log .amt small { display: block; color: var(--faint); font-size: 12px; margin-top: 4px; }
.log .empty { display: block; padding: 28px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .log li { grid-template-columns: 1fr auto; row-gap: 8px; }
  .log .bars { grid-column: 1 / -1; order: 3; }
  .log .date { grid-column: 1; }
}

/* hadal + footer */
.hadal { display: flex; flex-direction: column; justify-content: center; min-height: 90svh; }
.foot {
  padding: 36px var(--gutter) 90px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 40px;
  font: 300 13px/1.6 var(--sans); color: var(--faint);
}
.foot p { margin: 0; max-width: 70ch; }
.foot .mono-s { font-family: var(--mono); }
.foot a { color: var(--muted); text-decoration: none; }

/* reveal (only when JS is ready, so content is complete without it) */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .row .w i::after { transition: none; }
}

.brand b { white-space: nowrap; }
@media (max-width: 420px) { .brand b { font-size: 14.5px; font-stretch: 110%; } .brand svg { width: 22px; height: 22px; } }

/* ===================== type & layout pass (2026-11-24) =====================
   One scale for the whole site:
   label  mono 12 / .16em caps   → title  Mona 125% 240, key word 460 in glow
   → body Mona 400, 17-20, never 300 below 22px   → data  DM Mono 14-15, tabular. */
:root { --muted: #b1cccc; }
.lead, .step-t { font-weight: 400; }
.lead { max-width: 44ch; }
.foot { font-weight: 400; }

/* nav: one line on desktop (brand · pages · status) */
@media (min-width: 900px) {
  .nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 40px; padding: 0 var(--gutter); height: 68px; }
  .nav-row { display: contents; }
  .brand { grid-column: 1; grid-row: 1; }
  .links { grid-column: 2; grid-row: 1; margin: 0; gap: 4px 26px; }
  .links a { font-size: 14.5px; }
  .nav-right { grid-column: 3; grid-row: 1; }
}

/* hero: the copy sits low, the readings land inside the first screen */
.hero { justify-content: flex-end; padding-top: 96px; padding-bottom: clamp(48px, 8vh, 88px); }
.hero .display { font-size: clamp(52px, min(7vw, 11.5vh), 116px); }
.hero .readings { margin-top: clamp(36px, 6vh, 64px); }
.hero { min-height: calc(100svh - 68px); }          /* the sticky nav sits above it in the flow */
@media (max-width: 899px) { .hero { min-height: calc(100svh - 92px); } }
@media (max-width: 760px) { .hero { padding-top: 42vh; } }   /* the jellyfish owns the top of the phone screen */
.hero .lead { max-width: 50ch; }
.hero .lead { margin-top: 24px; }
.hero .actions { margin-top: 30px; }
.readings { margin-top: clamp(44px, 8vh, 84px); gap: 32px; }
.readings dd { margin-top: 12px; }

/* section headings: tag → title → lead, same rhythm in every zone */
.zone-tag { margin-bottom: 26px; }
.display.sm { font-size: clamp(40px, 5vw, 80px); }

/* giant numbers: display figures, not code (no slashed zeros, natural spacing) */
.giant.num, .readings dd.num { font-variant-numeric: proportional-nums lining-nums; }

/* twilight table: room for the longest ticker */
@media (min-width: 761px) { .rows-head, .row { grid-template-columns: 150px minmax(0, 1fr) minmax(140px, 1.3fr) 112px 112px; } }
.rows, .rows-head { max-width: 940px; }
.row .tk { font-size: clamp(24px, 2.1vw, 30px); }
.row .role { font-size: 15px; }
.row .c { font-size: 15px; }

/* midnight: steps a touch larger, caption under the stage */
.line li { font-size: 14.5px; }
.step-t { font-size: clamp(18px, 1.4vw, 21px); }

/* abyss log */
.log { max-width: 940px; }
.log .date { white-space: nowrap; }
.log li { grid-template-columns: 96px 150px minmax(0, 1fr) auto; gap: 24px; }

@media (max-width: 760px) {
  .hero { padding-bottom: 48px; }
  .readings { gap: 26px 20px; }
  .log li { grid-template-columns: auto 1fr; column-gap: 16px; }
  .log .date { grid-column: 2; grid-row: 1; justify-self: end; }
  .log .amt { grid-column: 1 / -1; text-align: left; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav, .gauge { backdrop-filter: none; -webkit-backdrop-filter: none; background: #03080f; }
}

/* ===================== performance pass ===================== */
body { transition: none; }                                   /* the WebGL water covers the body: no repaint while diving */
.nav { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }   /* smaller blur over moving water */
.gauge-fill { height: 100%; transform-origin: 50% 0; transform: scaleY(0); }  /* driven by transform, not height */
.gauge-mark { top: 0; transform: translateY(-50%); }

/* titles: no glow on the coloured word. The title reveal masks each line, which clipped the
   glow into a visible rectangle. The colour alone carries it. */
.display em, .treasure { text-shadow: none; }
