/* Blastwick site. Same inks as the game: cobalt, fuse yellow and
   firecracker red on pale sky-blue label paper, everything stamped with a
   navy outline and a hard offset shadow. */

:root {
  --body: #E2E9FB;
  --raised: #FFFFFF;
  --sunk: #CFD9F6;
  --ink: #142152;
  --soft: #4B5888;
  --outline: #142152;
  --cobalt: #2A4BD7;
  --cobalt-ink: #FFFFFF;
  --fuse: #FFC23A;
  --fuse-ink: #2B1D00;
  --spark: #E8452A;
  --mint: #119E74;
  --line: #B9C6EC;
  --display: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --text: "Lexend", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --body: #0E1534;
    --raised: #19234F;
    --sunk: #0A1029;
    --ink: #E9EEFF;
    --soft: #9EABD8;
    --outline: #03061A;
    --cobalt: #4767F5;
    --fuse: #F2BC45;
    --spark: #F2654A;
    --mint: #2CC795;
    --line: #2B3872;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --body: #0E1534; --raised: #19234F; --sunk: #0A1029; --ink: #E9EEFF;
  --soft: #9EABD8; --outline: #03061A; --cobalt: #4767F5; --fuse: #F2BC45;
  --spark: #F2654A; --mint: #2CC795; --line: #2B3872;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--body);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, canvas:focus-visible {
  outline: 3px solid var(--spark);
  outline-offset: 3px;
}

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* ---------- top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; border: 2.5px solid var(--outline); }
.brand b { font: 400 22px/1 var(--display); }
.bar nav { display: flex; gap: 18px; font-weight: 500; }
.bar nav a { text-decoration: none; white-space: nowrap; }
.bar nav a:hover, .bar nav a[aria-current] { text-decoration: underline; }

/* ---------- stamped buttons ---------- */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px;
  border: 2.5px solid var(--outline);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--outline);
  background: var(--raised);
  color: var(--ink);
  font: 400 18px/1 var(--display);
  text-decoration: none;
  cursor: pointer;
  transition: transform 70ms, box-shadow 70ms;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.stamp:active, .stamp.down { transform: translateY(4px); box-shadow: 0 1px 0 var(--outline); }
.stamp.cobalt { background: var(--cobalt); color: var(--cobalt-ink); }
.stamp.fuse { background: var(--fuse); color: var(--fuse-ink); }
.stamp.red { background: var(--spark); color: #fff; }
.stamp svg { width: 20px; height: 20px; }

/* ---------- the fuse ---------- */
.fuse {
  position: relative;
  height: 10px;
  margin: 14px 0 22px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(115deg, transparent 0 9px, rgba(0, 0, 0, 0.22) 9px 11px),
    var(--fuse);
}
.fuse::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 22%;
  border-radius: 6px;
  background: color-mix(in srgb, var(--outline) 55%, transparent);
}
.fuse::after {
  content: "";
  position: absolute;
  left: 22%;
  top: 50%;
  width: 22px;
  height: 22px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF4CF 0 22%, #FFB52E 23% 45%, rgba(255, 107, 44, 0.75) 46% 62%, transparent 63%);
  animation: crackle 0.35s steps(2) infinite;
}
@keyframes crackle { 50% { scale: 1.25; rotate: 45deg; } }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  padding: 28px 0 64px;
}
.hero h1 {
  font: 400 clamp(42px, 6.4vw, 72px)/1.02 var(--display);
  margin: 0;
  letter-spacing: -0.01em;
}
.lede { font-size: 19px; max-width: 34ch; margin: 0 0 26px; color: var(--soft); }
.sub { margin: 14px 0 0; font-size: 15px; color: var(--soft); }

.maze-card {
  background: var(--raised);
  border: 2.5px solid var(--outline);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--outline);
  padding: 14px;
}
.maze-card canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 7;
  border-radius: 12px;
  touch-action: none;
}
.maze-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.pad {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(2, 44px);
  gap: 6px;
}
.pad .stamp { min-height: 0; padding: 0; border-radius: 12px; box-shadow: 0 4px 0 var(--outline); }
.pad .stamp:active, .pad .stamp.down { box-shadow: 0 1px 0 var(--outline); transform: translateY(3px); }
.pad .up { grid-column: 2; }
.pad .left { grid-column: 1; grid-row: 2; }
.pad .down { grid-column: 2; grid-row: 2; }
.pad .right { grid-column: 3; grid-row: 2; }
.bomb-btn { width: 84px; height: 84px; min-height: 0; padding: 0; border-radius: 50%; }
.maze-note { margin: 12px 2px 0; font-size: 15px; color: var(--soft); min-height: 1.55em; }

/* ---------- feature rows ---------- */
.rows { display: grid; gap: 72px; padding: 24px 0 80px; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.row.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.row.flip .shot { order: 2; }
.shot {
  margin: 0;
  border: 2.5px solid var(--outline);
  border-radius: 26px;
  box-shadow: 0 6px 0 var(--outline);
  overflow: hidden;
  background: var(--raised);
}
.row h2 { font: 400 clamp(26px, 3.4vw, 36px)/1.12 var(--display); margin: 0 0 14px; }
.row p { margin: 0 0 12px; max-width: 46ch; }
.row ul { margin: 0; padding-left: 1.2em; max-width: 46ch; }
.row li { margin-bottom: 6px; }

/* ---------- closing band ---------- */
.band {
  background: var(--cobalt);
  color: var(--cobalt-ink);
  border-block: 2.5px solid var(--outline);
  padding: 56px 0;
}
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band h2 { font: 400 clamp(28px, 4vw, 40px)/1.1 var(--display); margin: 0; max-width: 18ch; }
.band p { margin: 8px 0 0; opacity: 0.9; }

/* ---------- documents (privacy, 404) ---------- */
.doc { max-width: 70ch; padding: 20px 0 72px; }
.doc h1 { font: 400 clamp(34px, 5vw, 48px)/1.08 var(--display); margin: 8px 0 8px; }
.doc h2 { font: 400 22px/1.25 var(--display); margin: 36px 0 10px; }
.doc .meta { color: var(--soft); margin: 0 0 24px; }
.doc li { margin-bottom: 6px; }

footer { border-top: 2px solid var(--line); padding: 26px 0 40px; color: var(--soft); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 18px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 8px; }
  .row, .row.flip { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .row.flip .shot { order: 0; }
  .shot { max-width: 300px; }
  .bar nav { gap: 14px; font-size: 15px; }
}

@media (max-width: 400px) {
  .bar nav a[href$="#how"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fuse::after { animation: none; }
  .stamp { transition: none; }
}
