:root {
  --bg: #0b0d12;
  --bg-2: #12151d;
  --panel: #171b25;
  --line: #262c3a;
  --text: #e9ecf1;
  --muted: #9aa3b5;
  --blue: #1f6fe5;
  --yellow: #ffd400;
  --red: #ff4d4d;
  --radius: 14px;
  --max: 1180px;
  --display: "Archivo Black", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--yellow); }
code { font-family: var(--mono); font-size: .85em; background: #0003; padding: 1px 6px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; }
h2 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -.01em; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100% - var(--max)) / 2));
  background: rgba(11, 13, 18, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--display); font-size: 1.25rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo span:last-child { color: var(--yellow); }
.logo-sad { display: inline-block; background: var(--blue); color: #fff; border-radius: 6px; padding: 0 6px; margin-right: 4px; font-family: Arial, sans-serif; }
.topbar nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.topbar nav a:hover { color: var(--text); }
.topbar nav .nav-cta { color: #111; background: var(--yellow); padding: 4px 12px; border-radius: 999px; }
@media (max-width: 760px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .topbar nav { gap: 12px; justify-content: flex-start; }
}

section { padding: 88px max(16px, calc((100% - var(--max)) / 2)); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* ---------- hero ---------- */
.hero {
  padding-top: 110px; padding-bottom: 80px;
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(31, 111, 229, .25), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 2px, transparent 2px 4px);
}
.kicker { font-family: var(--mono); color: var(--yellow); text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; margin: 0 0 18px; }
.hero h1 { font-family: var(--display); font-size: clamp(2.3rem, 6.5vw, 5rem); max-width: 1000px; }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #c9d0dc; max-width: 740px; margin: 0 0 32px; }
.btn { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; font-weight: 800; padding: 14px 26px; border-radius: 999px; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-yellow { background: var(--yellow); color: #111; }

.glitch { position: relative; color: var(--yellow); display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; overflow: hidden;
}
.glitch::before { color: var(--red); transform: translate(2px, 0); clip-path: inset(0 0 60% 0); animation: glitch 3.2s infinite steps(1); opacity: .8; }
.glitch::after { color: #3ad7ff; transform: translate(-2px, 0); clip-path: inset(55% 0 0 0); animation: glitch 2.7s infinite steps(1) reverse; opacity: .8; }
@keyframes glitch {
  0%, 88%, 100% { transform: translate(0); opacity: 0; }
  90% { transform: translate(4px, -2px); opacity: .9; }
  93% { transform: translate(-5px, 1px); opacity: .9; }
  96% { transform: translate(2px, 2px); opacity: .9; }
}

/* ---------- gallery ---------- */
.gallery-section { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stage { max-width: 1000px; margin: 0 auto; }
.bezel {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border: 14px solid #050506; border-radius: 12px;
  box-shadow: 0 0 0 2px #2b2f38, 0 30px 80px rgba(0,0,0,.6);
  overflow: hidden;
}
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .9s ease;
}
.slide.is-active { opacity: 1; }
.stage-empty { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); color: var(--muted); }
.stage-empty[hidden] { display: none; }
.stage-controls { display: grid; grid-template-columns: 48px 1fr 48px; gap: 12px; align-items: center; margin-top: 18px; }
.stage-controls button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.stage-controls button:hover { border-color: var(--yellow); color: var(--yellow); }
.stage-caption { text-align: center; min-height: 4.5em; }
.stage-caption strong { display: block; font-size: 1.2rem; }
.stage-caption span { color: #c9d0dc; display: block; }
.stage-caption small { color: var(--muted); font-size: .8rem; }
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress-bar { height: 100%; width: 0; background: var(--yellow); }
.stage-meta { text-align: center; color: var(--muted); font-family: var(--mono); font-size: .8rem; }
.linkish { background: none; border: 0; color: var(--yellow); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

.wall-title { font-family: var(--display); font-size: 1.6rem; margin: 70px 0 18px; }
.wall-title small { display: block; font-family: var(--body); font-size: .9rem; color: var(--muted); font-weight: 400; margin-top: 6px; }
.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .wall { grid-template-columns: repeat(2, 1fr); } }
.tile {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  border: 6px solid #050506; background: #000; cursor: pointer; padding: 0;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, transform .4s ease; }
.tile:hover img { transform: scale(1.04); }
.tile.swapping img { opacity: 0; }
.tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; font-size: .78rem; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; font-weight: 600;
}

/* ---------- history ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px dashed var(--line); max-width: 860px; }
.timeline li { position: relative; padding: 0 0 38px 16px; }
.timeline li::before {
  content: ""; position: absolute; left: -38px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--yellow);
}
.timeline li:last-child::before { border-color: var(--red); }
.era { font-family: var(--mono); color: var(--yellow); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.timeline h3 { font-size: 1.35rem; margin: 4px 0 6px; }
.timeline p { color: #c9d0dc; margin: 0; }

/* ---------- costs ---------- */
.costs { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.receipt {
  max-width: 560px; margin: 0 auto 48px; background: #f4f1e8; color: #1a1a1a;
  font-family: var(--mono); padding: 28px 28px 34px; border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: rotate(-1deg);
  -webkit-mask: radial-gradient(circle 8px at 50% 100%, transparent 98%, #000) 0 0 / 22px 100% repeat-x;
          mask: radial-gradient(circle 8px at 50% 100%, transparent 98%, #000) 0 0 / 22px 100% repeat-x;
}
.receipt-head { text-align: center; display: grid; gap: 2px; font-size: .82rem; border-bottom: 2px dashed #999; padding-bottom: 14px; margin-bottom: 14px; }
.receipt-head strong { font-size: 1.05rem; }
.receipt dl { margin: 0; }
.receipt dl div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: .86rem; border-bottom: 1px dotted #bbb; }
.receipt dt { flex: 1; }
.receipt dd { margin: 0; text-align: right; font-weight: 700; white-space: nowrap; }
.receipt-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1rem; padding: 14px 0; border-bottom: 2px dashed #999; }
.receipt-total span:last-child { color: #c0001a; }
.receipt-foot { text-align: center; font-size: .78rem; margin: 14px 0 0; }
@media (max-width: 520px) { .receipt dl div { flex-direction: column; gap: 0; } .receipt dd { text-align: left; } }

.cost-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .cost-cards { grid-template-columns: 1fr; } }
.cost-cards article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.big { font-family: var(--display); font-size: 3rem; color: var(--yellow); line-height: 1; }
.cost-cards p { color: #c9d0dc; margin: 10px 0 0; }

/* ---------- shame ---------- */
.shame-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .shame-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .shame-grid { grid-template-columns: 1fr; } }
.fail-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .2s, border-color .2s;
}
.fail-card:hover { transform: translateY(-4px) rotate(-.4deg); border-color: var(--yellow); }
.fail-card h3 { font-size: 1.3rem; margin-top: 12px; }
.fail-card p { color: #c9d0dc; margin: 0; }
.tag { display: inline-block; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; padding: 3px 9px; border-radius: 999px; background: #2a3040; color: var(--muted); }
.tag-blue { background: rgba(31,111,229,.2); color: #7fb0ff; }
.tag-yellow { background: rgba(255,212,0,.15); color: var(--yellow); }
.tag-red { background: rgba(255,77,77,.15); color: #ff8a8a; }

/* ---------- submit ---------- */
.submit-box {
  max-width: 820px; margin: 0 auto; background: linear-gradient(135deg, #1a2235, #141822);
  border: 1px solid var(--line); border-radius: 20px; padding: clamp(26px, 5vw, 52px);
}
.submit-box ul { color: #c9d0dc; padding-left: 20px; }
.fine { color: var(--muted); font-size: .82rem; }

.footer { padding: 40px max(16px, calc((100% - var(--max)) / 2)); border-top: 1px solid var(--line); color: #c9d0dc; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glitch::before, .glitch::after { animation: none; display: none; }
  .slide, .tile img { transition: none; }
}
