/* fomoghoss — one committed look: a dark room with something floating in it.
 *
 * Deliberately single-theme. The subject is a graveyard at 3am and a light
 * variant would be a different product, so every colour is painted explicitly
 * rather than inherited from the host, and nothing is left to a media query.
 */

:root {
  /* ground */
  --void: #0b0a12;
  --slab: #14121d;
  --slab-2: #1b1826;
  --edge: #2a2438;

  /* ink — off-white with a violet cast, never pure #fff */
  --bone: #f2f0ff;
  --dim: #8b85a3;
  --dimmer: #5f5a75;

  /* meaning */
  --ecto: #7cff6b;
  --gold: #ffc93f;
  --blood: #ff5470;

  /* the current answer's tone, re-pointed per verdict level */
  --tone: var(--ecto);

  --display: 'Rubik Mono One', ui-sans-serif, system-ui, sans-serif;
  --body: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1080px;
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }

a { color: var(--bone); text-decoration-color: var(--dimmer); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--tone); }

:focus-visible { outline: 2px solid var(--ecto); outline-offset: 3px; border-radius: 4px; }

.sr, .skip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 12px; left: 12px; z-index: 99; width: auto; height: auto;
  clip-path: none; padding: 10px 16px; background: var(--ecto); color: var(--void);
  border-radius: 8px; font-weight: 600;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap--narrow { max-width: 720px; }
.muted { color: var(--dim); }

/* ------------------------------------------------------------------ header */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 12px max(20px, calc(50vw - var(--wrap) / 2));
  background: color-mix(in srgb, var(--void) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
}

.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--display); font-size: 15px; letter-spacing: -0.02em;
  text-decoration: none; color: var(--bone);
}
.brand__mark { border-radius: 6px; }

.top__nav { display: flex; gap: 18px; margin-left: auto; font-size: 14px; }
.top__nav a { color: var(--dim); text-decoration: none; }
.top__nav a:hover { color: var(--bone); }

.ca {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--edge); border-radius: 999px;
  background: var(--slab); text-decoration: none; font-size: 13px;
  max-width: 240px;
}
.ca__label { font-family: var(--display); font-size: 10px; color: var(--tone); }
.ca__value {
  font-family: var(--mono); color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(48px, 9vw, 104px) 20px clamp(36px, 6vw, 64px);
  text-align: center;
  max-width: 820px; margin-inline: auto;
}

.ghosts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ghost {
  position: absolute;
  background: url('../assets/ghost.svg') center / contain no-repeat;
  opacity: 0.07;
  animation: drift 14s ease-in-out infinite;
}
.ghost--a { width: 130px; height: 130px; top: 8%; left: -2%; }
.ghost--b { width: 76px; height: 76px; top: 62%; right: 3%; animation-delay: -5s; animation-duration: 18s; }
.ghost--c { width: 52px; height: 52px; top: 26%; right: 14%; animation-delay: -9s; animation-duration: 11s; opacity: 0.05; }

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-26px) rotate(3deg); }
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero__sub {
  color: var(--dim);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  max-width: 54ch; margin-inline: auto;
}
.hero__sub b { color: var(--bone); font-weight: 600; }

/* ------------------------------------------------------------------ search */

.search { margin-top: clamp(28px, 5vw, 44px); }

.search__box {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px;
  background: var(--slab);
  border: 1px solid var(--edge);
  border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search__box:focus-within {
  border-color: var(--ecto);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ecto) 14%, transparent);
}

.search__dollar { font-family: var(--display); font-size: 1.3rem; color: var(--dimmer); }

.search__box input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--bone);
  font-family: var(--display);
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding: 10px 0;
}
.search__box input::placeholder { color: var(--dimmer); }

.search__go {
  flex: none;
  padding: 13px 24px; border: 0; border-radius: 999px;
  background: var(--ecto); color: var(--void);
  font-family: var(--body); font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.search__go:hover { background: #96ff88; }
.search__go[aria-busy='true'] { opacity: 0.6; cursor: progress; }

.search__hint { margin-top: 12px; font-size: 13.5px; color: var(--dimmer); }

.examples {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  align-items: center; margin-top: 18px; font-size: 13px; color: var(--dimmer);
}
.examples button {
  padding: 6px 13px; border: 1px solid var(--edge); border-radius: 999px;
  background: none; color: var(--dim); font-family: var(--mono); font-size: 13px;
  cursor: pointer;
}
.examples button:hover { color: var(--bone); border-color: var(--dim); }

/* ------------------------------------------------------------------ result */

.result { padding: clamp(20px, 4vw, 40px) 0 clamp(30px, 5vw, 56px); }

.verdict {
  --tone: var(--ecto);
  text-align: center;
  padding: clamp(24px, 5vw, 44px) 20px;
  background: var(--slab);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
}
.verdict[data-level='haunted'], .verdict[data-level='crowded'] { --tone: var(--gold); }
.verdict[data-level='cursed'], .verdict[data-level='massgrave'] { --tone: var(--blood); }
.verdict[data-level='massgrave'] { border-color: color-mix(in srgb, var(--blood) 40%, var(--edge)); }

.verdict__ticker {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
}

.verdict__count {
  font-family: var(--display);
  font-size: clamp(4.5rem, 20vw, 10rem);
  line-height: 0.86;
  color: var(--tone);
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 60px color-mix(in srgb, var(--tone) 30%, transparent);
}

.verdict__unit { color: var(--dim); font-size: 15px; }

.verdict__line {
  font-family: var(--display);
  font-size: clamp(1rem, 3vw, 1.45rem);
  line-height: 1.3;
  margin: 22px auto 0;
  max-width: 22ch;
}

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  list-style: none; padding: 0; margin: 30px auto 0; max-width: 560px;
}
.facts li {
  padding: 14px 6px; background: var(--void); border: 1px solid var(--edge);
  border-radius: 10px;
}
.facts b {
  display: block; font-family: var(--display); font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-variant-numeric: tabular-nums;
}
.facts span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--dim); }

.verdict__you {
  margin-top: 26px; font-family: var(--mono); font-size: 15px; color: var(--bone);
}
.verdict__you b { color: var(--tone); }

.verdict__floor { margin-top: 10px; font-size: 13px; color: var(--dimmer); }

.verdict__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* peak + graveyard */

.peak, .grave { margin-top: 26px; }
.peak h3, .grave h3 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 4px; }
.grave__sub { color: var(--dim); font-size: 14px; margin-bottom: 16px; }
.peak h3 { margin-bottom: 14px; }

.peak__row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px; background: var(--slab); border: 1px solid var(--edge); border-radius: var(--r);
}
.peak__img { width: 48px; height: 48px; border-radius: 8px; background: var(--slab-2); object-fit: cover; }
.peak__id { min-width: 0; }
.peak__id b { display: block; font-size: 15px; }
.peak__id code { font-family: var(--mono); font-size: 12px; color: var(--dimmer); }
.peak__nums {
  display: flex; align-items: baseline; gap: 10px; margin-left: auto;
  font-family: var(--mono); font-variant-numeric: tabular-nums; flex-wrap: wrap;
}
.peak__when { flex-basis: 100%; margin-top: 8px; font-size: 12.5px; color: var(--dimmer); }
.peak__ath { font-size: 1.15rem; color: var(--gold); }
.peak__arrow { color: var(--dimmer); }
.peak__now { font-size: 1.15rem; color: var(--dim); }
.peak__fall { font-size: 13px; color: var(--blood); }

.grave__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }

.stone {
  display: block; padding: 14px; text-decoration: none;
  background: var(--slab); border: 1px solid var(--edge); border-radius: 10px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.stone:hover { transform: translateY(-2px); border-color: var(--dim); }
.stone__name {
  display: block; font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stone__date { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--dimmer); }
.stone__nums {
  display: flex; align-items: baseline; gap: 6px; margin-top: 10px;
  font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums;
}
.stone__ath { color: var(--gold); }
.stone__now { color: var(--dim); }
.stone__fall { margin-left: auto; font-size: 11.5px; color: var(--blood); }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--edge); background: var(--slab);
  color: var(--bone); text-decoration: none;
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.btn:hover { border-color: var(--dim); }
.btn--go { background: var(--ecto); border-color: var(--ecto); color: var(--void); font-weight: 600; }
.btn--go:hover { background: #96ff88; border-color: #96ff88; }
.btn[hidden] { display: none; }

/* ---------------------------------------------------------------- sections */

.section { padding: clamp(48px, 8vw, 88px) 0; }
.section--alt { background: var(--slab); border-block: 1px solid var(--edge); }

.head { margin-bottom: 28px; }
.head h2 { font-family: var(--display); font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: -0.01em; }
.lede { color: var(--dim); margin-top: 10px; max-width: 60ch; }

/* board */

.board { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--slab); border: 1px solid var(--edge);
  border-radius: 10px; text-decoration: none; color: var(--bone);
}
.section--alt .row { background: var(--slab-2); }
.row:hover { border-color: var(--dim); }
.row__n {
  font-family: var(--display); font-size: 1.25rem; color: var(--blood);
  font-variant-numeric: tabular-nums;
}
.row__t { font-family: var(--mono); font-size: 15px; }
.row__meta { font-size: 12.5px; color: var(--dim); text-align: right; }

/* steps + notes */

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 42px 1fr; gap: 16px; align-items: start;
  padding: 18px; background: var(--slab-2); border: 1px solid var(--edge); border-radius: var(--r);
}
.steps li::before {
  content: counter(s);
  font-family: var(--display); font-size: 1.1rem; color: var(--ecto);
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--edge); border-radius: 10px; background: var(--void);
}
.steps h3 { font-size: 16px; margin-bottom: 4px; }
.steps p { color: var(--dim); font-size: 15px; }
.steps code, .notes code { font-family: var(--mono); font-size: 0.92em; color: var(--bone); }

.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.note { padding: 18px; border: 1px solid var(--edge); border-radius: var(--r); background: var(--void); }
.note h4 { font-size: 14px; margin-bottom: 6px; }
.note p { color: var(--dim); font-size: 14px; }
.note b { color: var(--bone); font-weight: 600; }

/* launch */

.launch {
  text-align: center; padding: clamp(28px, 5vw, 44px) 22px;
  background: var(--slab); border: 1px solid var(--edge); border-radius: var(--r);
}
.launch__eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim);
}
.launch__when {
  font-family: var(--display); font-size: clamp(1.15rem, 4.6vw, 2rem);
  margin-top: 8px; color: var(--ecto);
  /* Without this the line breaks after "5 PM" and leaves "UTC" alone on row two,
     which is the one part of the date nobody should have to hunt for. */
  text-wrap: balance;
}

.clock {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  max-width: 400px; margin: 22px auto 0;
}
.clock div { padding: 12px 4px; background: var(--void); border: 1px solid var(--edge); border-radius: 10px; }
.clock b {
  display: block; font-family: var(--display); font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-variant-numeric: tabular-nums;
}
.clock span { display: block; margin-top: 3px; font-size: 11px; color: var(--dim); }

.launch__local { margin-top: 12px; font-size: 13px; color: var(--dimmer); }

.launch__ca {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 24px; padding: 14px; background: var(--void);
  border: 1px solid var(--edge); border-radius: 10px;
}
.launch__ca-label { font-size: 12px; color: var(--dim); }
.launch__ca code {
  font-family: var(--mono); font-size: 13px; color: var(--bone);
  overflow-wrap: anywhere;
}
.copy {
  padding: 7px 14px; border: 1px solid var(--edge); border-radius: 999px;
  background: var(--slab); color: var(--bone); font-size: 13px; cursor: pointer;
}
.copy:hover { border-color: var(--dim); }

.launch__warn { margin-top: 16px; font-size: 13.5px; color: var(--dim); max-width: 52ch; margin-inline: auto; }
.launch__warn b { color: var(--bone); }

/* The one-letter-away warning. Given its own weight because $GHOST is a real
   ticker with 80 corpses behind it, and confusing the two costs money. */
.launch__warn--name {
  margin-top: 18px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--edge));
  border-radius: 10px; background: var(--void);
}
.launch__warn--name b { color: var(--gold); }

.launch__links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

.launch__self { margin-top: 22px; font-size: 14px; color: var(--dim); }
.launch__self b { color: var(--bone); }
.launch__self button {
  background: none; border: 0; padding: 0; margin-left: 6px;
  color: var(--ecto); font: inherit; text-decoration: underline; cursor: pointer;
}

/* ------------------------------------------------------------------ footer */

.foot { padding: 44px 0 60px; border-top: 1px solid var(--edge); }
.foot__fine { color: var(--dimmer); font-size: 13px; max-width: 70ch; }
.foot__meta {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px;
  font-size: 13px; color: var(--dim);
}

/* ------------------------------------------------------------------ states */

.error {
  padding: 20px; background: var(--slab); border: 1px solid color-mix(in srgb, var(--blood) 40%, var(--edge));
  border-radius: var(--r); color: var(--bone); font-size: 15px;
}
.error b { color: var(--blood); }
.error__actions { margin-top: 16px; }

.loading { text-align: center; padding: 40px 20px; color: var(--dim); }
.loading__ghost {
  width: 54px; height: 54px; margin: 0 auto 14px;
  background: url('../assets/ghost.svg') center / contain no-repeat;
  animation: drift 2.4s ease-in-out infinite;
}

.fade { animation: fade 0.28s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 620px) {
  .top__nav { display: none; }
  /* Buy takes its own row so X and Telegram sit together underneath, instead of
     one wrapping alone and reading like an afterthought. */
  .launch__links .btn--go { flex-basis: 100%; justify-content: center; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .peak__nums { margin-left: 0; width: 100%; }
  .row { grid-template-columns: 48px 1fr; }
  .row__meta { grid-column: 2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
