@font-face { font-family: "Archivo"; src: url(/assets/fonts/archivo-roman.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(/assets/fonts/archivo-italic.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }

:root {
  --night: #1a0b2e;
  --deep: #0d0618;
  --magenta: #ff2e88;
  --coral: #ff6a3d;
  --amber: #ffb547;
  --cream: #ede6d6;
  --red: #e8323c;
  --mint: #3df2a2;
  --glass: rgba(10, 4, 18, .72);
  --pad: clamp(14px, 1.6vw, 28px);
  --r: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overflow-x: clip; background: var(--deep); color: var(--cream); }
body { font-family: "Archivo", system-ui, sans-serif; font-stretch: 112%; font-weight: 500; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, a, kbd { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
img { display: block; }

#world { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; transition: filter .6s var(--ease); }
body.is-wasted #world { filter: grayscale(1) contrast(1.15) brightness(.82); }
body.is-mission #world { filter: saturate(1.35) brightness(1.08); }
.grade { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(rgba(13, 6, 24, .7), transparent 120px), linear-gradient(transparent 60%, rgba(13, 6, 24, .55)), radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(8, 2, 14, .65) 100%); }

/* ---------- HUD: top ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: var(--pad); z-index: 10; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: var(--night); object-fit: cover; }
.brand__word { font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 22px; letter-spacing: -.01em; line-height: 1; }
.pulse { margin: 0 auto; display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 99px; background: var(--glass); backdrop-filter: blur(10px); font-size: 13.5px; }
.pulse__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: blink 1.6s infinite; }
.pulse.is-down .pulse__dot { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
@keyframes blink { 50% { opacity: .35; } }
.top__right { display: flex; align-items: center; gap: 8px; }
.ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); backdrop-filter: blur(10px); transition: background .2s, transform .2s var(--ease); }
.ico:hover { background: var(--cream); color: var(--deep); transform: rotate(-8deg); }
.ico--pump img { width: 18px; height: 18px; }
.ca { height: 38px; padding: 0 14px; border-radius: 99px; background: var(--glass); backdrop-filter: blur(10px); font-size: 13.5px; white-space: nowrap; }
.ca:hover { background: rgba(237, 230, 214, .16); }
.buy { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 99px; background: var(--magenta); color: var(--cream); font-weight: 800; font-style: italic; font-stretch: 120%; font-size: 14.5px; white-space: nowrap; transition: transform .25s var(--ease), background .2s; }
.buy:hover { transform: translateY(-2px) skewX(-6deg); background: var(--coral); }
.phantom { height: 38px; padding: 0 14px; border-radius: 99px; background: var(--cream); color: var(--deep); font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: transform .25s var(--ease); }
.phantom:hover { transform: translateY(-2px); }
#soundBtn[aria-pressed="false"] #soundWave { opacity: .25; }

/* ---------- HUD: hero (lower left) ---------- */
.hero { position: fixed; left: var(--pad); bottom: calc(var(--pad) + 52px); z-index: 9; max-width: calc(100vw - 2 * var(--pad)); pointer-events: none; }
.hero__title { width: max-content; max-width: 100%; }
.hero__sub { max-width: min(470px, 42vw); }
.hero > * { pointer-events: auto; }
/* a calm pocket behind the headline so it reads over the sunset */
.hero { isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -1; left: -18vw; right: -10vw; top: -14vh; bottom: -12vh; background: radial-gradient(closest-side, rgba(13, 6, 24, .72), rgba(13, 6, 24, .4) 55%, rgba(13, 6, 24, 0)); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { body.is-in .board { animation: boardIn 1s var(--ease) .2s backwards; } }
@keyframes boardIn { from { opacity: 0; transform: translateX(60px); } }
.hero__title { margin: 0; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: clamp(40px, 5.6vw, 104px); line-height: .9; letter-spacing: -.02em; }
.hero__title .line { display: block; overflow: hidden; padding: .04em .1em .06em 0; white-space: nowrap; }
.hero__title .word { display: inline-block; }
.hero__title .ch { display: inline-block; transition: color .15s; }
.hero__title .ch.o { color: transparent; -webkit-text-stroke: 2px var(--cream); }
.hero__enter { display: inline-grid; place-items: center; width: .8em; height: .8em; margin-left: .18em; border-radius: 50%; background: var(--cream); color: var(--deep); font-size: .62em; font-style: normal; vertical-align: .08em; }
.hero__sub { margin: 16px 0 14px; max-width: 470px; font-size: 15.5px; color: rgba(237, 230, 214, .86); text-shadow: 0 2px 14px rgba(13, 6, 24, .9); }
.hero__nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hero__nav button { position: relative; font-size: 16px; font-weight: 650; padding: 4px 0; }
.hero__nav button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--magenta); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.hero__nav button:hover::after, .hero__nav button:focus-visible::after { transform: scaleX(1); }

/* ---------- HUD: board (right) ---------- */
.board { position: fixed; right: var(--pad); top: calc(var(--pad) + 60px); bottom: calc(var(--pad) + 52px); width: min(320px, 28vw); z-index: 9; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: rgba(13, 6, 24, .9); backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(13, 6, 24, .45); overflow: hidden; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.board__tabs { display: flex; gap: 6px; }
.board__tabs button { flex: 1; padding: 8px 6px; border-radius: 9px; font-size: 13px; font-weight: 700; font-style: italic; font-stretch: 118%; color: rgba(237, 230, 214, .6); transition: background .2s, color .2s; }
.board__tabs button[aria-selected="true"] { background: var(--cream); color: var(--deep); }
.board__list, .feed { list-style: none; margin: 0; padding: 0; }
.board__list { display: grid; gap: 4px; min-height: 60px; }
.row { width: 100%; display: grid; grid-template-columns: 22px 30px 1fr auto; align-items: center; gap: 9px; padding: 6px 6px; border-radius: 9px; text-align: left; transition: background .2s; }
.row:hover { background: rgba(237, 230, 214, .09); }
.row__n { font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 15px; color: var(--amber); }
.row img, .row .noimg { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--night); }
.row__sym { font-weight: 750; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__sym small { display: block; font-weight: 500; font-size: 12.5px; color: rgba(237, 230, 214, .58); }
.row__sym { min-width: 0; }
.feed .row__sym small { font-stretch: 94%; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.row__v { font-style: italic; font-weight: 900; font-stretch: 120%; font-size: 15px; }
.row--wasted .row__v { color: var(--red); }
.row--mission .row__v { color: var(--amber); }
.board__head { margin: 6px 0 0; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 19px; line-height: 1; }
.feed { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 4px; scrollbar-width: thin; scrollbar-color: rgba(237,230,214,.25) transparent; }
.feed .row { grid-template-columns: 30px 1fr auto; }
.feed .row.is-new { animation: rowIn .9s var(--ease); }
@keyframes rowIn { from { background: rgba(255, 46, 136, .35); transform: translateX(14px); } }
.empty { padding: 8px 6px; font-size: 13.5px; color: rgba(237, 230, 214, .62); }
.board__src { margin: 0; font-size: 12.5px; color: rgba(237, 230, 214, .55); }

/* ---------- HUD: keys (bottom) ---------- */
.keys { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 22px; padding: 0 var(--pad) calc(var(--pad) - 4px); z-index: 9; font-size: 13.5px; pointer-events: none; color: rgba(237, 230, 214, .82); }
.key { display: flex; align-items: center; gap: 6px; }
.key--touch { display: none; }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; background: var(--cream); color: var(--deep); font-weight: 750; font-size: 12.5px; font-style: normal; box-shadow: 0 2px 0 rgba(0,0,0,.4); }

/* ---------- car file, how, moment ---------- */
.file, .how, .moment { position: fixed; z-index: 12; left: var(--pad); bottom: calc(var(--pad) + 52px); width: min(460px, calc(100vw - 2 * var(--pad))); padding: 20px; border-radius: var(--r); background: rgba(10, 4, 18, .86); backdrop-filter: blur(16px); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.file[hidden], .how[hidden], .moment[hidden] { display: none; }
.file__close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; background: rgba(237,230,214,.1); }
.file__close:hover { background: var(--cream); color: var(--deep); }
.file__id { display: flex; gap: 14px; align-items: center; }
.file__pfp, .moment__pfp { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--night); box-shadow: 0 0 0 3px var(--magenta); }
.file__sym { margin: 0; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 30px; line-height: 1; overflow-wrap: anywhere; }
.file__name { margin: 4px 0 0; font-size: 14px; color: rgba(237,230,214,.7); }
.file__stars { margin: 4px 0 0; font-size: 18px; letter-spacing: .05em; color: var(--amber); }
.file__stars .off { color: rgba(237,230,214,.2); }
.file__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 12px; }
.file__stats div { padding: 8px 10px; border-radius: 9px; background: rgba(237,230,214,.06); }
.file__stats dt { font-size: 12px; color: rgba(237,230,214,.6); }
.file__stats dd { margin: 2px 0 0; font-weight: 800; font-style: italic; font-stretch: 115%; font-size: 15px; white-space: nowrap; }
.up { color: var(--mint); } .down { color: var(--red); }
.file__chart { width: 100%; height: 120px; display: block; border-radius: 9px; background: rgba(237,230,214,.04); }
.file__note { min-height: 1em; margin: 8px 0 12px; font-size: 13px; color: rgba(237,230,214,.62); }
.file__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ghost { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 99px; background: rgba(237,230,214,.1); font-size: 13.5px; font-weight: 650; transition: background .2s; }
.ghost:hover { background: rgba(237,230,214,.22); }
.how__title { margin: 0 0 10px; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 28px; line-height: 1; }
.how p { margin: 0 0 10px; font-size: 14.5px; color: rgba(237,230,214,.86); }
.moment { text-align: left; }
.moment__pfp { width: 64px; height: 64px; }
.moment__line { margin: 14px 0 6px; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 26px; line-height: 1.05; }
.moment__meta { margin: 0 0 14px; font-size: 13.5px; color: rgba(237,230,214,.66); }

/* ---------- WASTED / MISSION PASSED stamp ---------- */
.stamp { position: fixed; inset: 0; z-index: 11; display: grid; place-content: center; text-align: center; pointer-events: none; opacity: 0; }
.stamp__big { margin: 0; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: clamp(56px, 14vw, 230px); line-height: .9; letter-spacing: -.02em; white-space: nowrap; }
.stamp__small { margin: 14px auto 0; max-width: 92vw; white-space: normal; font-style: italic; font-weight: 800; font-stretch: 120%; font-size: clamp(18px, 2vw, 32px); }
.stamp.is-wasted .stamp__big { color: var(--red); text-shadow: 0 0 2px #2a0006, 0 8px 0 rgba(20, 0, 4, .55), 0 20px 60px rgba(0,0,0,.6); }
.stamp.is-mission .stamp__big { color: var(--amber); font-size: clamp(28px, 8.4vw, 150px); text-shadow: 0 8px 0 rgba(60, 26, 0, .55), 0 20px 60px rgba(0,0,0,.5); }
.stamp.is-mission .stamp__small { color: var(--cream); }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #d4cdbd; }
.intro.is-black { background: var(--deep); }
.intro__load { position: relative; display: grid; place-items: center; width: min(820px, 92vw); }
.intro__skull { width: min(300px, 50vw); height: auto; margin-bottom: -70px; filter: drop-shadow(0 30px 40px rgba(26,11,46,.35)); }
.intro__card { position: relative; width: 100%; padding: 26px 30px; border-radius: 16px; background: #0b0510; color: var(--cream); text-align: center; }
.intro__made { margin: 0 0 12px; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 24px; }
.intro__srcs { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; font-weight: 750; font-size: clamp(16px, 2vw, 24px); }
.intro__bar { width: 220px; height: 4px; margin-top: 26px; border-radius: 4px; background: rgba(13,6,24,.15); overflow: hidden; }
.intro__bar i { display: block; height: 100%; width: 0; background: var(--magenta); transition: width .3s; }
.intro__welcome { text-align: center; }
.intro__welcome[hidden], .intro__gate[hidden], .intro__load[hidden] { display: none; }
.stamp[hidden] { display: none; }
.intro__w1, .intro__w2 { margin: 0; font-style: italic; font-weight: 900; font-stretch: 125%; line-height: .95; font-size: clamp(34px, 4.4vw, 70px); white-space: nowrap; }
.intro__w1 { color: transparent; -webkit-text-stroke: 1.5px var(--cream); }
.intro__gate { position: fixed; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 6vw, 110px); background: radial-gradient(70% 70% at 50% 45%, rgba(255,46,136,.18), transparent 70%); }
.gate__q { margin: 0; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: clamp(48px, 8vw, 150px); line-height: 1; white-space: nowrap; }
.gate__q .ch.o { color: transparent; -webkit-text-stroke: 2px var(--cream); }
.gate__btn { display: grid; justify-items: center; gap: 8px; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: clamp(22px, 2.6vw, 40px); }
.gate__btn kbd { width: 64px; height: 64px; border-radius: 50%; font-size: 18px; }
.gate__btn:hover kbd { background: var(--magenta); color: var(--cream); }
.iris { position: fixed; inset: 0; z-index: 19; pointer-events: none; background: var(--deep); clip-path: circle(150% at 50% 50%); display: none; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .pulse { display: none; }
  .board { width: min(300px, 34vw); }
}
@media (max-width: 760px) {
  .top { gap: 8px; padding: 12px; flex-wrap: wrap; }
  .brand__word { font-size: 18px; }
  .brand img { width: 36px; height: 36px; }
  .top__right { margin-left: auto; gap: 6px; }
  #soundBtn { display: none; }
  .top__right { flex-wrap: wrap; justify-content: flex-end; }
  .ca, .phantom { height: 34px; padding: 0 10px; font-size: 12px; }
  .buy { height: 34px; padding: 0 12px; font-size: 13px; }
  .ico { width: 34px; height: 34px; }
  .hero { left: 12px; right: 12px; bottom: auto; top: 150px; max-width: none; }
  .hero__sub { display: none; }
  .hero__nav { margin-top: 10px; }
  .hero__title { font-size: clamp(34px, 11vw, 56px); }
  .hero__sub { font-size: 13.5px; margin: 10px 0 8px; }
  .hero__nav { gap: 4px 16px; }
  .hero__nav button { font-size: 14px; }
  .board { left: 12px; right: 12px; top: auto; bottom: 40px; width: auto; max-height: 36vh; padding: 10px; overflow-y: auto; }
  .board > * { flex-shrink: 0; }
  .feed { flex: none; overflow: visible; }
  .keys { padding-bottom: 12px; }
  .keys .key { display: none; }
  .keys .key--touch { display: flex; }
  .file, .how, .moment { left: 12px; right: 12px; bottom: 12px; width: auto; max-height: 80vh; overflow: auto; }
  .file__stats { grid-template-columns: repeat(2, 1fr); }
  .intro__gate { flex-direction: column; justify-content: center; gap: 30px; }
  .gate__off { order: 2; } .gate__on { order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* pair chip: the coin $WASTED launches quoted in */
.pair{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px 0 5px;border-radius:999px;background:rgba(13,6,24,.62);border:1px solid rgba(255,181,71,.45);color:var(--cream,#ede6d6);text-decoration:none;font:600 13px/1 Archivo,system-ui,sans-serif;white-space:nowrap;backdrop-filter:blur(8px)}
.pair img{width:26px;height:26px;border-radius:50%;object-fit:cover;background:#2a1640}
.pair b{color:#ffb547;font-weight:800}
.pair:hover{border-color:#ffb547}
@media (max-width:1180px){.pair span{display:none}.pair{padding:0 5px}}

/* a moment owns the screen: the copy steps aside */
.hero, .keys { transition: opacity .5s var(--ease), transform .5s var(--ease); }
body.is-wasted .hero, body.is-mission .hero, body.is-wasted .keys, body.is-mission .keys { opacity: 0; transform: translateY(14px); pointer-events: none; }
body.is-wasted .board, body.is-mission .board { opacity: 0; transform: translateX(18px); pointer-events: none; visibility: hidden; transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s .45s; }
body.has-panel .hero { opacity: 0; transform: translateY(14px); pointer-events: none; }

/* the feed scrolls back through older moments: rows dim and lean away as they leave the top edge */
.feed { --fade: 0; mask-image: linear-gradient(to bottom, transparent 0, #0d0618 calc(var(--fade) * 28px)); }
.feed.is-scrolled .row { transition: opacity .3s var(--ease); }
@supports (animation-timeline: view()) {
  .feed .row { animation: rowLeave linear both; animation-timeline: view(); animation-range: exit -10% exit 100%; }
  @keyframes rowLeave { to { opacity: .25; transform: translateX(10px) scale(.97); } }
}
@media (prefers-reduced-motion: reduce) { .feed .row { animation: none; } }

/* a finished stamp leaves the page entirely, not just faded */
.stamp { visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s; }
.stamp.is-wasted, .stamp.is-mission { visibility: visible; transition: opacity .5s var(--ease), visibility 0s; }
