/* ════════════════════════════════════════════════════════════
   OBSHALKA × RELIK — "two servers, one crew"
   dark/light theming via semantic tokens; vibrant gradient accents.
   master curve cubic-bezier(0.16,1,0.3,1). 1px hairlines. 2px radii.
   ════════════════════════════════════════════════════════════ */

/* ---------- tokens: LIGHT (default) ---------- */
:root {
  --bg:        #FAFAF8;
  --panel:     #FFFFFF;
  --hairline:  #E4E3DE;
  --text:      #1A1A1C;
  --muted:     #6E6B63;

  --c-brand:   #E63B1F;  /* ember coral — global accent */
  --c-discord: #DB2777;  /* rose */
  --c-mc:      #D97706;  /* gold */
  --c-crew:    #0284C7;  /* sky — the one cool counterpoint */
  --grad: linear-gradient(92deg, #DB2777 0%, #E63B1F 45%, #D97706 100%);
  --adv-gold:  #A16207;  /* advancement title, readable on paper */

  --glow-o: 0.55;
  --grain-o: 0.04;
  --scan-o: 0.18;
  --photo-blend: multiply;
  --scroll-thumb: #D9D8D2;

  --font-display: "Tanker", sans-serif;
  --font-text: "Cabinet Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --curve: cubic-bezier(0.16, 1, 0.3, 1);
  --curve-return: cubic-bezier(0.65, 0, 0.35, 1);

  --margin: clamp(20px, 5vw, 96px);
  --maxw: 1440px;

  --accent: var(--c-brand); /* sections override this locally */
}

/* ---------- tokens: DARK (explicit choice) ---------- */
html[data-theme="dark"] {
  --bg:        #070708;
  --panel:     #0E0E10;
  --hairline:  #1F1F22;
  --text:      #EDEAE3;
  --muted:     #8A867C;

  --c-brand:   #FF4D2E;
  --c-discord: #FF3D81;
  --c-mc:      #FFB02E;
  --c-crew:    #4CC9F0;
  --grad: linear-gradient(92deg, #FF3D81 0%, #FF4D2E 45%, #FFB02E 100%);
  --adv-gold:  #FCFC54;

  --glow-o: 1;
  --grain-o: 0.05;
  --scan-o: 0.4;
  --photo-blend: screen;
  --scroll-thumb: #1F1F22;
}

/* ---------- tokens: DARK (system preference, no explicit choice) ---------- */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:        #070708;
    --panel:     #0E0E10;
    --hairline:  #1F1F22;
    --text:      #EDEAE3;
    --muted:     #8A867C;

    --c-brand:   #FF4D2E;
    --c-discord: #FF3D81;
    --c-mc:      #FFB02E;
    --c-crew:    #4CC9F0;
    --grad: linear-gradient(92deg, #FF3D81 0%, #FF4D2E 45%, #FFB02E 100%);
    --adv-gold:  #FCFC54;

    --glow-o: 1;
    --grain-o: 0.05;
    --scan-o: 0.4;
    --photo-blend: screen;
    --scroll-thumb: #1F1F22;
  }
}

/* section-scoped accents — this is where the color story lives */
.sec--lobby { --accent: var(--c-discord); }
.sec--world { --accent: var(--c-mc); }
.sec--crew  { --accent: var(--c-crew); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: clip; } /* hero "SERVERS" clips off-edge on purpose */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 240ms var(--curve), color 240ms var(--curve);
}

::selection { background: var(--c-brand); color: #fff; }

html { scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.skip {
  position: fixed; left: -9999px; top: 8px; z-index: 200;
  font-family: var(--font-mono); font-size: 12px;
  background: var(--panel); border: 1px solid var(--hairline);
  padding: 8px 14px;
}
.skip:focus { left: 8px; }

/* gradient text utility — the Apple trick: paint a gradient, clip it to glyphs.
   background-size > 100% + a slow position drift makes the colors flow. */
.grad {
  background: var(--grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: grad-flow 9s ease-in-out infinite alternate;
}
@keyframes grad-flow {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* mono micro-label layer */
.kicker__text, .hero__tag, .hero__cue, .tgl,
.voice__head, .voice__caption, .voice__status, .voice__live,
.terminal__hint, .chip, .row__index, .row__role,
.footer__bar, .footer__psst, .rail__item, .toast {
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- atmosphere ---------- */
.grain {
  position: fixed; inset: 0; z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms var(--curve);
  animation: grain-flicker 1s steps(1) infinite;
}
html.is-loaded .grain { opacity: var(--grain-o); }
@keyframes grain-flicker {
  0%    { background-position: 0 0; }
  12.5% { background-position: -32px 16px; }
  25%   { background-position: 16px -48px; }
  37.5% { background-position: -48px -16px; }
  50%   { background-position: 32px 48px; }
  62.5% { background-position: -16px 32px; }
  75%   { background-position: 48px -32px; }
  87.5% { background-position: 0 -16px; }
}

/* scanlines are permanent now — the texture from the old konami effect */
.crt-overlay {
  position: fixed; inset: 0; z-index: 95;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 1px, transparent 1px 3px);
  opacity: var(--scan-o);
}
body.party .crt-overlay { animation: crt-flicker 120ms steps(2) infinite; }
@keyframes crt-flicker { 0% { opacity: calc(var(--scan-o) * 0.7); } 100% { opacity: var(--scan-o); } }

/* party mode: 6 seconds of konami payoff */
body.party .marquee__track { animation-duration: 9s !important; }
body.party .row__avatar { animation: party-spin 1s linear infinite; }
@keyframes party-spin { to { transform: rotate(360deg); } }

.burst { position: fixed; inset: 0; z-index: 60; pointer-events: none; width: 100%; height: 100%; }

/* ---------- theme toggle ---------- */
.tgl {
  position: fixed; top: 18px; right: var(--margin); z-index: 80;
  font-size: 10px; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 2px;
  background: var(--bg);
  padding: 8px 12px;
  transition: color 180ms, border-color 180ms, background-color 240ms var(--curve);
}
.tgl:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- custom cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor body, html.has-cursor a, html.has-cursor button,
  html.has-cursor [role="button"] { cursor: none; }
  .cursor { display: block; position: fixed; z-index: 100; pointer-events: none; top: 0; left: 0; }
  .cursor__dot {
    position: fixed; width: 6px; height: 6px; border-radius: 50%;
    background: var(--text); transform: translate(-50%, -50%);
  }
  .cursor__ring {
    position: fixed; width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--text); transform: translate(-50%, -50%);
    display: grid; place-items: center;
    transition: width 240ms var(--curve), height 240ms var(--curve), border-radius 240ms var(--curve);
  }
  .cursor__label {
    font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
    color: var(--text); opacity: 0; transition: opacity 180ms var(--curve);
  }
  .cursor--link .cursor__ring { width: 48px; height: 48px; }
  .cursor--link .cursor__label { opacity: 1; }
  .cursor--copy .cursor__ring { width: 40px; height: 40px; border-radius: 2px; }
  .cursor--copy .cursor__label { opacity: 1; }
}

/* ---------- left rail ---------- */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: 56px; z-index: 40;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  align-items: center;
  opacity: 0; transform: translateY(8px);
}
html.is-loaded .rail { opacity: 1; transform: none; transition: opacity 700ms var(--curve) 1420ms, transform 700ms var(--curve) 1420ms; }

.rail__item { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding: 4px; }
.rail__item i { font-style: normal; font-size: 11px; color: var(--muted); transition: color 180ms; }
.rail__item b {
  font-weight: 400; font-size: 9px; color: var(--muted);
  writing-mode: vertical-rl;
  opacity: 0; transition: opacity 180ms var(--curve);
}
.rail__item:hover b { opacity: 1; }
.rail__item:hover i { color: var(--text); }

.rail__indicator {
  position: absolute; left: 50%; width: 16px; height: 2px;
  background: var(--grad);
  transform: translateX(-50%);
  transition: top 700ms var(--curve);
}

/* ---------- reveal primitives ---------- */
.hline { display: block; overflow: hidden; }
.hline__in { display: inline-block; transform: translateY(110%); }
.io.is-in .hline__in, .is-in .hline__in { transform: translateY(0); transition: transform 900ms var(--curve); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  padding: 0 var(--margin);
}

/* aurora glows: blurple top-right, emerald bottom-left — the two servers */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  border-radius: 50%;
  opacity: var(--glow-o);
}
.hero::before {
  top: -18vw; right: -14vw;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,61,129,0.15), transparent 70%);
  animation: aurora-a 16s ease-in-out infinite alternate;
}
.hero::after {
  bottom: -22vw; left: -16vw;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,176,46,0.12), transparent 70%);
  animation: aurora-b 21s ease-in-out infinite alternate;
}
/* the two glows drift toward each other and back — slow, like weather */
@keyframes aurora-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-7vw, 5vh, 0) scale(1.18); }
}
@keyframes aurora-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, -4vh, 0) scale(1.14); }
}

.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
html.is-loaded .hero__canvas { opacity: 1; transition: opacity 1200ms var(--curve) 900ms; }
.hero__canvas--back { z-index: 1; }
.hero__canvas--front { z-index: 4; }

.hero__photo {
  position: absolute; right: 0; bottom: 0; z-index: 2;
  width: 38vw; height: 80vh;
}
.hero__photo img {
  width: 100%; height: 100%; object-fit: cover;
  mix-blend-mode: var(--photo-blend);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%), linear-gradient(0deg, transparent, #000 25%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 35%), linear-gradient(0deg, transparent, #000 25%);
  mask-composite: intersect;
}

.hero__bar {
  position: absolute; top: 24px; left: var(--margin); right: var(--margin); z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.hero__bar-rule {
  position: absolute; top: 8px; left: 0; right: 0; height: 1px;
  background: var(--hairline);
  transform: scaleX(0); transform-origin: left;
}
html.is-loaded .hero__bar-rule { transform: scaleX(1); transition: transform 600ms var(--curve) 200ms; }

.hero__tag {
  font-size: 11px; color: var(--muted);
  background: var(--bg); padding: 0 12px 0 0;
  transform: translateY(-50%); margin-top: 8px;
  opacity: 0;
}
html.is-loaded .hero__tag { opacity: 1; transition: opacity 240ms var(--curve) 350ms; }

.hero__clockbox {
  display: flex; align-items: center;
  background: var(--bg); padding: 0 64px 0 12px; /* room for the fixed toggle */
  transform: translateY(-50%); margin-top: 8px;
  opacity: 0;
}
html.is-loaded .hero__clockbox { opacity: 1; transition: opacity 240ms var(--curve) 350ms; }
.clock {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; font-variant-numeric: tabular-nums;
  color: var(--c-brand);
}

.hero__center {
  position: absolute; z-index: 3;
  left: 0; right: 0; top: 50%;
  transform: translateY(-56%);
}
.hero__stack {
  display: flex; flex-direction: column;
  padding-left: calc(var(--margin) + 8.4%);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(64px, 13vw, 200px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero__stack .hline__in { transform: translateY(110%); }
html.is-loaded .hero__stack .hline:nth-child(1) .hline__in { transform: translateY(0); transition: transform 900ms var(--curve) 500ms; }
html.is-loaded .hero__stack .hline:nth-child(2) .hline__in { transform: translateY(0); transition: transform 900ms var(--curve) 620ms; }
html.is-loaded .hero__stack .hline:nth-child(3) .hline__in { transform: translateY(0); transition: transform 900ms var(--curve) 740ms; }

/* L2 "SERVERS": outline only, right-anchored, clips ~4% off the right edge */
.hline--outline {
  align-self: flex-end;
  margin-right: -4vw;
  color: transparent;
  -webkit-text-stroke: 1px var(--text);
}

.hero__sub {
  margin: 40px 0 0 calc(var(--margin) + 8.4%);
  font-size: 17px; color: var(--muted);
  opacity: 0; transform: translateY(12px);
}
html.is-loaded .hero__sub { opacity: 1; transform: none; transition: opacity 700ms var(--curve) 1100ms, transform 700ms var(--curve) 1100ms; }

.hero__cue {
  position: absolute; left: var(--margin); bottom: 34px; z-index: 10;
  font-size: 11px; color: var(--muted); text-transform: lowercase; letter-spacing: 0.06em;
  opacity: 0; transform: translateY(8px);
}
.hero__cue i { font-style: normal; display: inline-block; animation: cue-bob 3s ease-in-out infinite; }
@keyframes cue-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
html.is-loaded .hero__cue { opacity: 1; transform: none; transition: opacity 700ms var(--curve) 1300ms, transform 700ms var(--curve) 1300ms; }

/* ---------- section chrome ---------- */
.sec {
  position: relative;
  max-width: var(--maxw);
  margin-left: auto; margin-right: auto;
  padding: 0 var(--margin);
}
/* deliberately uneven rhythm */
.sec--lobby { margin-top: 22vh; }
.marquee    { margin-top: 6vh; }
.sec--world { margin-top: 14vh; }
.sec--map   { margin-top: 18vh; }
.sec--crew  { margin-top: 22vh; }
.footer     { margin-top: 30vh; }

/* per-section ambient glow */
.sec--lobby::after, .sec--world::after, .sec--crew::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  width: 55%; height: 90%; border-radius: 50%;
  opacity: var(--glow-o);
}
.sec--lobby::after {
  right: -12%; top: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,61,129,0.13), transparent 70%);
}
.sec--world::after {
  left: -12%; top: 10%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,176,46,0.11), transparent 70%);
}
.sec--crew::after {
  right: -15%; top: 20%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(76,201,240,0.09), transparent 70%);
}

.ghost {
  position: absolute; top: -10vw; left: -8vw; z-index: 0;
  font-family: var(--font-display); font-size: 24vw; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--hairline);
  pointer-events: none; user-select: none;
  will-change: transform;
}
.ghost--right { left: auto; right: -8vw; }

.kicker {
  position: relative; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: clamp(32px, 5vh, 64px);
}
.kicker__text { font-size: 12px; color: var(--accent); white-space: nowrap; }
.kicker__line {
  flex: 1; height: 1px; background: var(--hairline);
  transform: scaleX(0); transform-origin: left;
}
.kicker--right .kicker__line { transform-origin: right; }
.kicker.is-in .kicker__line { transform: scaleX(1); transition: transform 900ms var(--curve); }

.headline {
  position: relative; z-index: 10;
  font-family: var(--font-text); font-weight: 800;
  font-size: clamp(34px, 4.5vw, 64px);
  letter-spacing: -0.03em; line-height: 1.05;
}
.body { max-width: 52ch; color: var(--muted); margin-top: 24px; position: relative; z-index: 10; }
.io.body, .terminal__hint.io { opacity: 0; transform: translateY(16px); }
.io.body.is-in, .terminal__hint.io.is-in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--curve), transform 700ms var(--curve);
}

/* ---------- 01 · discord ---------- */
.lobby__grid {
  position: relative; z-index: 10;
  display: grid;
  grid-template-columns: 5fr 1fr 6fr;
  align-items: start;
}
.lobby__left { grid-column: 1; }
.voice { grid-column: 3; }

.btn-mag {
  position: relative; z-index: 10;
  display: inline-flex; align-items: center;
  height: 56px; padding: 0 32px; margin-top: 40px;
  border: 1px solid var(--text); border-radius: 2px;
  overflow: hidden;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  opacity: 0; transform: translateY(16px);
  will-change: transform;
}
.btn-mag.is-in { opacity: 1; transform: none; transition: opacity 700ms var(--curve) 150ms, transform 700ms var(--curve) 150ms; }
.btn-mag__fill {
  position: absolute; inset: 0; background: var(--c-discord);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 240ms var(--curve);
}
.btn-mag:hover .btn-mag__fill { transform: scaleY(1); }
.btn-mag__label { position: relative; transition: color 180ms var(--curve); display: inline-flex; gap: 10px; }
.btn-mag:hover .btn-mag__label { color: #fff; }
.btn-mag__label i { font-style: normal; transition: transform 180ms var(--curve); }
.btn-mag:hover .btn-mag__label i { transform: translateX(6px); }

.voice {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 32px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
/* reveal curtain: clip-path on the element itself would make
   IntersectionObserver never fire (zero visible area), so we
   cover the panel and shrink the cover away instead */
.voice::after, .mc-live::after {
  content: ""; position: absolute; inset: -1px; z-index: 5;
  background: var(--bg);
  transform: scaleY(1); transform-origin: bottom;
  pointer-events: none;
}
.voice.is-in::after, .mc-live.is-in::after {
  transform: scaleY(0);
  transition: transform 900ms var(--curve);
}
.voice__head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; margin-bottom: 24px;
}
.voice__head b { font-weight: 700; }
.voice__live { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); }
.voice__live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--c-discord);
  animation: live-pulse 2s var(--curve) infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,61,129,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(255,61,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,61,129,0); }
}
.voice__scope { width: 100%; height: 96px; display: block; }
.voice__caption { font-size: 10px; color: var(--muted); margin-top: 12px; }
.voice__status { list-style: none; margin-top: 24px; }
.voice__status li {
  font-size: 11px; color: var(--muted);
  padding: 14px 0; border-top: 1px solid var(--hairline);
}

/* ---------- marquee ---------- */
.marquee { overflow: clip; }
.marquee__row { display: flex; overflow: clip; line-height: 1; }
.marquee__track {
  display: flex; align-items: center;
  width: max-content; flex-shrink: 0;
  font-family: var(--font-display); font-size: 48px; text-transform: uppercase;
  white-space: nowrap;
  animation: marquee-left 60s linear infinite;
}
/* margin instead of flex gap so the -50% loop point is mathematically exact */
.marquee__track span, .marquee__track i { margin-right: 48px; }
.marquee__row--rev .marquee__track { animation: marquee-left 75s linear infinite reverse; }
.marquee__track span { color: var(--text); opacity: 0.18; }
.marquee__track i { font-style: normal; font-size: 0.5em; }
.marquee__track i:nth-of-type(odd) { color: var(--c-discord); }
.marquee__track i:nth-of-type(even) { color: var(--c-mc); }
.marquee__row:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee-left { to { transform: translateX(-50%); } }

/* ---------- 02 · minecraft (mirrored) ---------- */
.world__copy {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: flex-end;
}
.world__copy .headline, .world__copy .body { width: min(100%, 56%); }

.terminal {
  position: relative; z-index: 10;
  margin-top: clamp(48px, 8vh, 96px);
  padding: 28px 0;
}
.terminal__rule {
  position: absolute; left: 0; right: 0; height: 1px;
  background: var(--hairline);
  transform: scaleX(0); transform-origin: left;
}
.terminal__rule--top { top: 0; }
.terminal__rule--bottom { bottom: 0; transform-origin: right; }
.terminal.is-in .terminal__rule { transform: scaleX(1); transition: transform 900ms var(--curve); }

.terminal__line {
  font-family: var(--font-mono); font-weight: 400;
  font-size: clamp(17px, 2.6vw, 40px);
}
.t-mut { color: var(--muted); }
.t-ip { color: var(--text); }
.t-copied { color: var(--c-mc); }
.term-br { display: none; }
.terminal__caret {
  display: inline-block; width: 0.6em; height: 1em;
  margin-left: 0.15em; vertical-align: text-bottom;
  background: var(--c-mc);
  animation: caret-blink 1s steps(2) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.terminal__hint { font-size: 10px; color: var(--muted); text-transform: lowercase; letter-spacing: 0.06em; margin-top: 16px; position: relative; z-index: 10; }

.chips {
  position: relative; z-index: 10;
  margin-top: clamp(48px, 8vh, 80px);
  display: flex; align-items: center; gap: 32px;
  flex-wrap: wrap;
}
.chips__rule { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--hairline); }
.chip {
  position: relative; font-size: 11px; color: var(--muted);
  background: var(--bg); padding: 0 12px;
}
.chip:first-of-type { padding-left: 0; }
.chip__tick { position: relative; width: 1px; height: 12px; background: var(--hairline); }
.chips.io { opacity: 0; }
.chips.io.is-in { opacity: 1; transition: opacity 700ms var(--curve) 200ms; }

/* ---------- live server status ---------- */
.mc-live {
  position: relative; z-index: 10;
  margin-top: clamp(48px, 8vh, 80px);
  background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 28px 32px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.mc-live__head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.mc-live__head b { font-weight: 700; }
.mc-live__state {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; color: var(--muted);
}
.mc-live__state i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--c-mc);
  animation: mc-pulse 2s var(--curve) infinite;
}
@keyframes mc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,176,46,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(255,176,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,176,46,0); }
}
.mc-live--off .mc-live__state i { background: var(--muted); animation: none; }

.mc-live__list {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 20px;
}
.mc-live__list:empty { margin-top: 0; }
.mc-live__list li {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 8px 14px 8px 8px;
}
.mc-live__list img {
  width: 28px; height: 28px;
  image-rendering: pixelated; /* keep the Minecraft heads crisp, not blurry */
  border-radius: 2px;
}
.mc-live__list span {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.mc-live__empty {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: lowercase;
  color: var(--muted);
  margin-top: 16px;
}
.mc-live__empty[hidden] { display: none; }

/* ---------- postcards gallery ---------- */
.postcards {
  position: relative; z-index: 10;
  margin-top: clamp(48px, 8vh, 96px);
}
.postcards.io { opacity: 0; transform: translateY(16px); }
.postcards.io.is-in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--curve), transform 700ms var(--curve);
}
.postcards__top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.postcards__label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.postcards__nav { display: flex; align-items: center; gap: 12px; }
.postcards__count {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}
.postcards__count b { font-weight: 400; color: var(--text); }
.pc-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--hairline); border-radius: 2px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--muted);
  display: grid; place-items: center;
  transition: color 180ms, border-color 180ms;
}
.pc-btn:hover { color: var(--accent); border-color: var(--accent); }

/* the track: native scroll + snap does the heavy lifting */
.postcards__track {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;            /* firefox */
  -webkit-overflow-scrolling: touch;
  user-select: none;
}
.postcards__track::-webkit-scrollbar { display: none; }
.postcards__track.is-dragging { scroll-snap-type: none; }
.postcards__track:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }

.postcards__track figure {
  flex: 0 0 auto;
  height: clamp(240px, 44vh, 420px);
  aspect-ratio: 16 / 10;            /* width follows from the fixed height */
  border: 1px solid var(--hairline); border-radius: 2px;
  overflow: hidden;
  background: var(--panel);
  scroll-snap-align: start;
}
.postcards__track figure:first-child { aspect-ratio: 3 / 4; } /* the statue stays tall */
.postcards__track img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  pointer-events: none;             /* so mouse-drag grabs the track, not the image */
  transition: transform 900ms var(--curve);
}
.postcards__track figure:hover img { transform: scale(1.04); }

.postcards__bar {
  height: 2px; margin-top: 20px;
  background: var(--hairline);
  overflow: hidden;
}
.postcards__bar i {
  display: block; height: 100%;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--curve);
}

/* ---------- the map ---------- */
.sec--map .headline, .sec--map .body { position: relative; z-index: 10; }

.mapbox {
  position: relative; z-index: 10;
  margin-top: clamp(40px, 6vh, 72px);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline); border-radius: 2px;
  overflow: hidden;
  background: var(--panel);
}
.mapbox.io { opacity: 0; transform: translateY(16px); }
.mapbox.io.is-in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--curve), transform 700ms var(--curve);
}
.mapbox iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

.mapbox__placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start;
  gap: 20px;
  padding: clamp(20px, 4vw, 40px);
  background:
    linear-gradient(to top, rgba(7,7,8,0.75), rgba(7,7,8,0.25)),
    url("../img/world/harbor.jpg") center / cover no-repeat;
}
.mapbox__placeholder .btn-mag { margin-top: 0; border-color: #EDEAE3; color: #EDEAE3; }
.mapbox__tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #EDEAE3;
}
.mapbox__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-mc);
  animation: mc-pulse 2s var(--curve) infinite;
}
.mapbox--off .mapbox__dot { background: #8A867C; animation: none; }
.mapbox__hint {
  position: relative; z-index: 10;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: lowercase;
  color: var(--muted);
  margin-top: 16px;
}
.mapbox__hint a { color: var(--text); }
.mapbox__hint a:hover { color: var(--c-brand); }
.mapbox__hint.io { opacity: 0; }
.mapbox__hint.io.is-in { opacity: 1; transition: opacity 700ms var(--curve) 200ms; }

/* ---------- 03 · crew ---------- */
.roster { list-style: none; position: relative; z-index: 10; }

.row {
  position: relative;
  height: 140px; /* fixed — hover must never change layout */
  display: grid;
  grid-template-columns: 80px 72px 1fr auto;
  gap: 0 24px;
  align-items: center;
  transition: background-color 200ms var(--curve);
}
.row::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--hairline);
  transform: scaleX(0); transform-origin: left;
}
.row.is-in::before { transform: scaleX(1); transition: transform 900ms var(--curve); }
.row:nth-child(2).is-in::before { transition-delay: 80ms; }
.row:nth-child(3).is-in::before { transition-delay: 160ms; }
.row:nth-child(4).is-in::before { transition-delay: 240ms; }
.row:nth-child(5).is-in::before { transition-delay: 320ms; }
.row:nth-child(6).is-in::before { transition-delay: 400ms; }
.row:last-child { border-bottom: 1px solid var(--hairline); }

/* broken alignment on purpose */
.row:nth-child(even) { padding-left: 8%; }

.row:hover, .row.is-tapped { background: var(--panel); }

.row__index { font-size: 12px; color: var(--muted); transition: color 200ms; }
.row:hover .row__index, .row.is-tapped .row__index { color: var(--accent); }

.row__avatar {
  position: relative; width: 72px; height: 72px;
  border-radius: 50%; /* the only circles on the site */
  overflow: hidden;
  transition: transform 200ms var(--curve);
}
.row:hover .row__avatar, .row.is-tapped .row__avatar { transform: rotate(6deg) scale(1.05); }
.row__avatar canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.row__avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.1);
  transition: filter 240ms var(--curve);
}
.row:hover .row__avatar img { filter: grayscale(0) contrast(1); }
.row__avatar b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 400; font-size: 26px;
  color: var(--text);
}

.row__name {
  font-family: var(--font-text); font-weight: 800;
  font-size: 40px; letter-spacing: -0.03em; line-height: 1.1;
}
.row__role { font-size: 11px; color: var(--muted); text-align: right; text-transform: lowercase; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  max-width: var(--maxw); margin-left: auto; margin-right: auto;
  padding: 0 var(--margin) 32px;
}

.footer__mega {
  position: relative; display: inline-block;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(56px, 11vw, 180px);
  line-height: 0.95; text-transform: uppercase;
}

.footer__bar {
  display: flex; align-items: center; gap: 40px;
  border-top: 1px solid var(--hairline);
  margin-top: clamp(48px, 8vh, 96px);
  padding-top: 20px;
  font-size: 11px; color: var(--muted);
  flex-wrap: wrap;
}
.footer__links { display: inline-flex; align-items: center; gap: 16px; text-transform: lowercase; letter-spacing: 0.06em; }
.footer__links i { font-style: normal; }
.footer__links a, .footer__links button {
  position: relative; color: var(--text);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: lowercase;
  transition: color 180ms;
}
.footer__links a::after, .footer__links button::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 180ms var(--curve);
}
.footer__links a:hover, .footer__links button:hover { color: var(--c-brand); }
.footer__links a:hover::after, .footer__links button:hover::after { transform: scaleX(1); }
.footer__links button.is-copied { color: var(--c-mc); }
.footer__col--right { margin-left: auto; }
.footer__psst { font-size: 9px; color: var(--text); opacity: 0.3; margin-top: 24px; text-transform: lowercase; letter-spacing: 0.06em; }

/* ---------- toasts (theme-aware) ---------- */
.toasts--chat {
  position: fixed; left: 24px; bottom: 24px; z-index: 61;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 10px 14px;
  font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(16px); opacity: 0;
  transition: transform 240ms var(--curve), opacity 240ms var(--curve);
}
.toast b { color: var(--text); font-weight: 400; }
.toast.is-on { transform: none; opacity: 1; }
.toast--ember { border-left: 2px solid var(--c-brand); }

.toasts--adv { position: fixed; right: 24px; bottom: 24px; z-index: 61; }
.adv {
  display: flex; align-items: center; gap: 14px;
  height: 64px; min-width: 280px; padding: 0 18px 0 12px;
  background: var(--panel);
  border: 2px solid var(--hairline); border-radius: 2px;
  box-shadow: inset 0 0 0 2px rgba(127,127,127,0.10), 0 4px 16px rgba(0,0,0,0.10);
  transform: translateX(340px);
}
.adv.is-on { transform: translateX(0); transition: transform 700ms var(--curve); }
.adv.is-off { transform: translateX(340px); transition: transform 700ms var(--curve); }
.adv__icon { position: relative; width: 40px; height: 40px; }
.adv__icon i {
  position: absolute; top: 8px; left: 8px; width: 6px; height: 6px;
  background: var(--c-mc);
  box-shadow:
    6px 0 0 var(--c-mc), 12px 6px 0 var(--c-mc),
    0 12px 0 var(--c-mc), 6px 12px 0 var(--c-mc),
    6px 6px 0 var(--text);
}
.adv__text { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); }
.adv__text b { font-size: 12px; font-weight: 700; color: var(--adv-gold); }
.adv__text span { font-size: 12px; color: var(--text); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hline__in, .io, .voice, .row::before, .kicker__line,
  .terminal__rule, .hero__canvas, .hero__tag, .hero__clockbox,
  .hero__cue, .hero__sub, .rail, .grain, .btn-mag, .chips.io {
    transition-duration: 200ms !important;
    transition-property: opacity !important;
    animation: none !important;
    transform: none !important;
    clip-path: none !important;
  }
  .marquee__track { animation: none !important; }
  .terminal__caret { animation: none; }
  .cursor { display: none !important; }
  .voice::after, .mc-live::after { display: none; }
  .grad, .hero::before, .hero::after, body.party .row__avatar { animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .row__name { font-size: 32px; }
}

@media (max-width: 900px) {
  .rail { display: none; }
  .lobby__grid { grid-template-columns: 1fr; gap: 48px; }
  .lobby__left, .voice { grid-column: 1; }
  .world__copy .headline, .world__copy .body { width: 100%; }
  .marquee__track { font-size: 32px; }
  .row__name { font-size: 28px; }
  .row:nth-child(even) { padding-left: 16px; }
  .sec--lobby { margin-top: 13vh; }
  .marquee    { margin-top: 4vh; }
  .sec--world { margin-top: 9vh; }
  .sec--map   { margin-top: 11vh; }
  .sec--crew  { margin-top: 13vh; }
  .footer     { margin-top: 18vh; }
}

@media (max-width: 700px) {
  /* the photo goes full-bleed behind the type instead of hiding */
  .hero__photo { width: 100%; height: 100svh; }
  .hero__photo img {
    opacity: 0.45; /* dimmed so the headline stays readable */
    -webkit-mask-image: linear-gradient(0deg, transparent, #000 30%, #000 75%, transparent);
    mask-image: linear-gradient(0deg, transparent, #000 30%, #000 75%, transparent);
    -webkit-mask-composite: source-over;
    mask-composite: add;
  }
  .postcards__track figure { height: clamp(200px, 52vw, 300px); }
  .row {
    height: auto; min-height: 96px;
    grid-template-columns: auto 1fr;
    grid-template-areas: "ava id" "ava role";
    padding-top: 20px; padding-bottom: 20px;
    gap: 4px 20px;
  }
  .row__index { display: none; }
  .row__avatar { grid-area: ava; align-self: start; }
  .row__id { grid-area: id; }
  .row__role { grid-area: role; text-align: left; }
  .footer__mega { font-size: 15vw; }
}

@media (max-width: 600px) {
  .hero__tag { font-size: 9px; max-width: 50%; }
  .hero__sub { font-size: 15px; margin-top: 28px; }
}

@media (max-width: 480px) {
  .term-br { display: block; }
  .terminal__line { font-size: clamp(16px, 5vw, 22px); }
  .footer__bar { gap: 16px; }
  .footer__col--right { margin-left: 0; }
}

/* tighter hero stack: SERVERS hugs its neighbors */
.hline--outline { margin-top: -0.12em; margin-bottom: -0.10em; }

/* one cursor at a time: the map provides its own */
html.map-hover .cursor { display: none !important; }
