/* =====================================================================
   L.E.A.V. — Losing Experiences Are Verboten
   Minimal brutalist flyer system
   ===================================================================== */

:root {
  --paper: #EAE6DF;
  --void: #0D0D0D;
  --void-2: #151413;
  --rust: #9E3B24;
  --ink: #7A756D;
  --ink-dark: #5f5a53;
  --line-dark: rgba(234, 230, 223, 0.12);
  --line-light: rgba(13, 13, 13, 0.15);

  /* Latin glyphs come from Anton / IBM Plex Mono, Greek falls through to Fira */
  --display: 'Anton', 'Fira Sans Extra Condensed', 'Arial Narrow', Impact, sans-serif;
  --mono: 'IBM Plex Mono', 'Fira Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  --max: 1160px;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --erode: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='e'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.6 0 0 0 2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23e)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rust); }
button, input { font: inherit; color: inherit; }
::selection { background: var(--rust); color: var(--paper); }
:focus-visible { outline: 2px dashed var(--rust); outline-offset: 3px; }

.svg-lib { position: absolute; width: 0; height: 0; overflow: hidden; }

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.92;
  margin: 0;
}
.mono { font-family: var(--mono); }
.muted { color: var(--ink); }
.rust { color: var(--rust); }

/* static grain — barely there */
.grain {
  position: fixed; inset: 0; z-index: 90;
  pointer-events: none;
  background-image: var(--noise);
  opacity: 0.05;
}

.paper { background: var(--paper); color: var(--void); }
.paper .muted { color: var(--ink-dark); }
.void { background: var(--void); color: var(--paper); }

/* ---------- redaction ---------- */
.redact {
  display: block;
  height: 0.9em;
  margin: 18px 0 14px;
  background: var(--ink);
  opacity: .5;
}
.redact--w50 { width: 50%; } .redact--w75 { width: 75%; }

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rust);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

/* =====================================================================
   STATUS BAR
   ===================================================================== */
.statusbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px var(--gutter);
  background: var(--void);
  border-bottom: 1px solid var(--line-dark);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.statusbar__cell { display: flex; align-items: center; gap: 10px; white-space: nowrap; min-width: 0; }
.statusbar__cell:first-child span:last-child { overflow: hidden; text-overflow: ellipsis; }
.statusbar__right { color: var(--ink); gap: 14px; }
.statusbar__right b { color: var(--paper); font-weight: 500; }
#link-label:empty { display: none; }
#link-label { color: var(--rust); }
body[data-phase="LIVE"] .statusbar__right b { color: var(--rust); }

/* =====================================================================
   HERO — name, date, countdown, counter
   ===================================================================== */
.hero { padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(48px, 7vw, 88px); }
.hero > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.hero__emblem {
  position: relative;
  background: var(--void);
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: clamp(14px, 2.2vw, 28px);
  overflow: hidden;
}
.hero__emblem svg { width: 74%; height: auto; }
.hero__title { font-size: clamp(76px, 14vw, 190px); line-height: .82; margin-left: -0.04em; }
.hero__expand { font-size: clamp(18px, 2.6vw, 32px); margin-top: 12px; }
.hero__tagline { margin: 16px 0 0; font-size: 13px; color: var(--ink-dark); }
.hero__when { font-size: clamp(32px, 4.4vw, 56px); margin-top: 20px; }

/* countdown — the centrepiece */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--void);
}
.cd { padding: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.cd + .cd { padding-left: clamp(12px, 2vw, 24px); border-left: 1px solid var(--line-light); }
.cd__num { font-size: clamp(56px, 11vw, 150px); line-height: .82; font-variant-numeric: tabular-nums; }
.cd__lbl { font-size: 10px; letter-spacing: .16em; color: var(--ink-dark); }
.countdown__done {
  font-size: clamp(32px, 6vw, 80px);
  color: var(--rust);
  border-top: 2px solid var(--void);
  padding-top: 16px;
}

/* people coming */
.going {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line-light);
}
.going__num {
  font-size: clamp(56px, 8vw, 96px);
  line-height: .82;
  color: var(--rust);
  font-variant-numeric: tabular-nums;
}
.going__lbl { font-size: 11px; letter-spacing: .14em; line-height: 1.5; }
.going__cta { margin-left: auto; }
.going__num.is-bump { animation: bump .5s ease-out; }
@keyframes bump { 0% { transform: translateY(-4px); opacity: .5; } 100% { transform: none; opacity: 1; } }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section h2, .section__title { font-size: clamp(36px, 6vw, 72px); }
.section h2 .muted { color: var(--ink); }
.section__sub { margin-top: 12px; margin-bottom: clamp(24px, 4vw, 40px); font-size: 12.5px; color: var(--ink); max-width: 60ch; }

/* =====================================================================
   JOIN
   ===================================================================== */
.join { max-width: 560px; }
.join__form { display: grid; gap: 24px; }

.field { display: grid; gap: 6px; }
.field__lbl { font-size: 10.5px; letter-spacing: .14em; color: var(--ink); }
.field__input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 4px 0 8px;
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 36px);
  text-transform: uppercase;
  color: var(--paper);
  border-radius: 0;
  caret-color: var(--rust);
}
.field__input::placeholder { color: #34322f; }
.field__input:focus { outline: none; border-bottom-color: var(--paper); }
.field__input--pin { letter-spacing: .5em; font-family: var(--mono); font-weight: 700; max-width: 200px; }
.field.is-error .field__input { border-bottom-color: var(--rust); animation: shake .35s; }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  border: 0; cursor: pointer;
  background: var(--paper); color: var(--void);
  font-family: var(--display); text-transform: uppercase;
  font-size: 20px; letter-spacing: .04em; line-height: 1;
  padding: 16px 18px 14px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--rust); color: var(--paper); }
.btn[disabled] { cursor: progress; background: var(--ink); }
.btn--dark { background: var(--void); color: var(--paper); width: auto; padding: 14px 22px 12px; }

.linkbtn {
  background: none; border: 0; cursor: pointer; padding: 4px 0; margin-top: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--rust); }
.textlink { display: inline-block; margin-top: 10px; font-size: 11.5px; letter-spacing: .1em; }

.join__log { min-height: 24px; margin-top: 12px; font-size: 11.5px; line-height: 1.7; color: var(--ink); }
.log-line { animation: typein .25s steps(8) both; white-space: pre-wrap; word-break: break-word; }
.log-line::before { content: "> "; color: var(--rust); }
.log-line.is-ok { color: var(--paper); }
.log-line.is-err { color: #e0583a; }
.log-line.is-err::before { content: "! "; }
@keyframes typein { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* =====================================================================
   PASS
   ===================================================================== */
.pass-intro { font-size: clamp(32px, 5vw, 56px); margin-bottom: 24px; }
.pass-intro .muted { color: var(--ink); }

.pass {
  position: relative;
  max-width: 420px;
  background: var(--paper);
  color: var(--void);
  animation: issue .5s cubic-bezier(.2,.9,.3,1.15) both;
}
@keyframes issue { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.pass__head {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  background: var(--void); color: var(--paper);
  padding: 14px 18px;
  border: 1px solid var(--paper);
}
.pass__emblem { width: 52px; height: 52px; }
.pass__brand b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: .9; display: block; }
.pass__brand span { font-size: 9px; letter-spacing: .14em; color: var(--ink); display: block; margin-top: 4px; }
.pass__no { font-family: var(--display); font-size: 24px; color: var(--rust); line-height: .9; }

.pass__body { padding: 20px 20px 18px; }
.pass__lbl { font-size: 9px; letter-spacing: .16em; color: var(--ink-dark); display: block; }
.pass__nick {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(38px, 9vw, 58px); line-height: .9;
  margin: 6px 0 18px;
  word-break: break-word;
}
.pass__meta {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--void);
  padding-top: 10px;
  margin: 0;
}
.pass__meta dt { font-size: 8.5px; letter-spacing: .14em; color: var(--ink-dark); }
.pass__meta dd { margin: 2px 0 0; font-family: var(--display); font-size: 18px; line-height: 1; text-transform: uppercase; }
.pass__meta dd.is-redacted { background: var(--void); color: transparent; width: 56px; height: 16px; }
.pass__warn {
  margin: 18px 0 14px;
  color: var(--rust);
  font-family: var(--display); text-transform: uppercase;
  font-size: 20px; line-height: 1;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.pass__warn small { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--void); }
.pass__barcode .barcode { width: 100%; height: 40px; color: var(--void); }

.pass-actions { max-width: 420px; display: grid; justify-items: start; gap: 2px; margin-top: 16px; }
.pass-actions .mono { font-size: 11.5px; color: var(--ink); margin: 0; }
.pass-actions .linkbtn { margin-top: 4px; }

/* =====================================================================
   BILLBOARD
   ===================================================================== */
.board { margin-top: clamp(24px, 4vw, 40px); }
.board__head, .board__row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 100px;
  gap: 12px; align-items: center;
  padding: 12px 0;
}
.board__head { font-size: 10px; letter-spacing: .16em; color: var(--ink); border-bottom: 1px solid var(--paper); }
.board__head span:last-child, .board__row .board__pts { text-align: right; }
.board__list { list-style: none; margin: 0; padding: 0; }
.board__row { border-bottom: 1px solid var(--line-dark); animation: typein .4s steps(10) both; }
.board__rank { font-family: var(--display); font-size: 26px; line-height: 1; color: var(--ink); }
.board__nick { font-family: var(--display); font-size: clamp(22px, 3vw, 32px); line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.board__pts { font-family: var(--display); font-size: clamp(24px, 3.2vw, 36px); line-height: 1; font-variant-numeric: tabular-nums; }
.board__row.is-top { background: var(--rust); color: var(--paper); padding-left: 12px; padding-right: 12px; border-bottom-color: var(--void); }
.board__row.is-top .board__rank { color: var(--paper); }
.board__row.is-you .board__nick::after { content: " ←"; color: var(--ink); }
.board__row.is-top.is-you .board__nick::after { color: var(--paper); }
.board__empty { padding: 36px 0; text-align: center; color: var(--ink); font-size: 11px; letter-spacing: .14em; }

/* =====================================================================
   RULES STRIP
   ===================================================================== */
.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: clamp(32px, 5vw, 56px) var(--gutter);
}
.rules > * { max-width: var(--max); }
.rule h3 { font-size: clamp(22px, 2.4vw, 30px); }
.rule p { margin: 8px 0 0; font-size: 12.5px; }
.rule .location__text { font-family: var(--display); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.05; text-transform: uppercase; }
.rule.is-revealed h3 { color: var(--rust); }

/* =====================================================================
   DAILY CLUES (on dark)
   ===================================================================== */
.clue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}
.clue { position: relative; border: 1px solid var(--line-dark); display: flex; flex-direction: column; }
.clue__top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 8px 10px;
  font-size: 10px; letter-spacing: .12em; color: var(--ink);
}
.clue__top b { font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--paper); }
.clue__img { aspect-ratio: 1; background: #000; overflow: hidden; }
.clue__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4); transition: filter .3s; }
.clue:hover .clue__img img { filter: none; }
.clue__body { padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.clue__title { font-family: var(--display); font-size: 18px; line-height: 1; text-transform: uppercase; margin: 0; }
.clue__hint { font-size: 12px; line-height: 1.55; margin: 0; flex: 1; color: var(--ink); }
.clue__link { font-size: 10.5px; letter-spacing: .12em; text-decoration: none; }
.clue__new { color: var(--rust); }

.clue--locked { border-style: dashed; }
.clue--locked .clue__top b { color: var(--ink); }
.clue__lock { aspect-ratio: 1; display: grid; place-content: center; text-align: center; padding: 16px; }
.clue__lock .display { font-size: 16px; color: #3e3b38; line-height: 1.15; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  display: flex; align-items: center; gap: 16px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line-dark);
}
.footer__emblem { width: 40px; height: 40px; }
.footer p { margin: 0; font-size: 11px; letter-spacing: .1em; color: var(--ink); }

.noscript { position: fixed; bottom: 0; left: 0; right: 0; z-index: 99; background: var(--rust); color: var(--paper); text-align: center; padding: 12px; margin: 0; }

body[data-phase="BILLBOARD"] .countdown,
body[data-phase="BILLBOARD"] .countdown__done { opacity: .35; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__emblem { max-width: 200px; width: 100%; }
  .rules { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .statusbar { font-size: 9.5px; }
  .countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd:nth-child(3) { padding-left: 0; border-left: 0; }
  .cd:nth-child(n+3) { padding-top: 20px; }
  .going__cta { margin-left: 0; width: 100%; }
}

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