:root {
  --bg: #0b0809;
  --fg: #f6efe4;
  --muted: #a89f94;
  --line: #2e2624;
  --accent: #ff7a1a;
  --on: #120a06;
  --gut: clamp(24px, 6vw, 112px);
  --title: clamp(32px, 4.4vw, 72px);
  --body: clamp(16px, 0.95vw, 19px);
  --accent-lift: color-mix(in srgb, var(--accent) 82%, var(--fg));
  --accent-deep: color-mix(in srgb, var(--accent) 62%, var(--bg));
  --wm: 6px;
  --hero-bottom: 0px;
  --stage-bottom: 0px;
}

* { box-sizing: border-box; border-radius: 0; }

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 400 16px/1.6 "DM Mono", monospace;
  font-variant-ligatures: none; /* Pixelify Sans draws its fi ligature as an A: "One Ale." */
  overflow-x: clip;
}

a { color: var(--fg); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

#stage, #ascii {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}
#stage { image-rendering: pixelated; }
.no-js #stage, .no-js #ascii, .no-js .fuse, .no-js #mode { display: none; }

/* Top bar */
.bar {
  position: fixed;
  z-index: 3;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--gut) - 4px) 0 var(--gut);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 20px/1 "Pixelify Sans", monospace;
  text-decoration: none;
}
.brand img { image-rendering: pixelated; display: block; }
.bar-end { display: flex; align-items: center; gap: 16px; }

#mode {
  font: 400 13px/1 "DM Mono", monospace;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
  transition: color 120ms ease-out;
}
#mode:hover, #mode[aria-pressed="true"] { color: var(--accent); }

.ghost {
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--muted);
  transition: color 120ms ease-out, border-color 120ms ease-out;
}
.ghost:hover { border-color: var(--accent); }
.js .ghost { visibility: hidden; }
.js .show-dl .ghost { visibility: visible; }

/* The fuse down the right side. It's the scroll position, burning. */
.fuse {
  --p: 0;
  position: fixed;
  z-index: 2;
  top: 72px;
  bottom: 24px;
  right: clamp(8px, 2vw, 28px);
  width: 4px;
  background: repeating-linear-gradient(to bottom, var(--muted) 0 8px, transparent 8px 12px);
}
.fuse::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: calc(var(--p) * 100%);
  background: var(--bg);
}
.fuse i {
  position: absolute;
  left: -4px;
  top: calc(var(--p) * 100%);
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background: var(--accent);
  box-shadow: 0 -4px 0 -2px var(--fg);
}

/* Sections */
main { position: relative; z-index: 1; }

.beat {
  position: relative;
  padding: 0 var(--gut);
}

.js .beat { padding-bottom: 36vh; }
.js #hero { padding-bottom: 0; min-height: 100svh; display: flex; align-items: center; }
.js #problem { min-height: 130vh; }
.js #burn { min-height: 190vh; }
.js #window { min-height: 200vh; }
.js #tiny { min-height: 170vh; }
.js #party { min-height: 120vh; padding-bottom: 0; }

.copy { width: min(36vw, 580px); max-width: 100%; }
.js #hero .copy { width: min(44vw, 760px); }
.js .final .copy { width: min(33vw, 520px); }
@media (max-width: 1200px) { .copy { width: 33vw; } }
.js .beat:not(#hero) .copy { position: sticky; top: 24vh; }

h1 { margin: 0 0 24px; line-height: 0; }
.wordmark {
  image-rendering: pixelated;
  width: calc(39 * var(--wm));
  height: calc(16 * var(--wm));
  display: block;
}

.lede, h2 {
  font-family: "Pixelify Sans", monospace;
  font-weight: 700;
  font-size: var(--title);
  line-height: 1.04;
  margin: 0 0 16px;
  text-wrap: balance;
}
.sub, .copy > p:not(.lede):not(.meta):not(.hint) { margin: 0 0 16px; font-size: var(--body); color: var(--muted); max-width: 44ch; }
.hint { margin: 0; font-size: 13px; color: var(--accent); }
@media (pointer: coarse) { .hint { display: none; } }

/* The download. Notched corners come from four hard shadows, the bottom one doubling as its depth. */
.btn {
  --notch: 4px;
  --face: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 16px var(--notch) 0;
  padding: 12px 16px;
  font: 700 22px/1.1 "Pixelify Sans", monospace;
  text-decoration: none;
  color: var(--on);
  background: var(--face);
  box-shadow:
    0 calc(var(--notch) * -1) 0 0 var(--face),
    calc(var(--notch) * -1) 0 0 0 var(--face),
    var(--notch) 0 0 0 var(--face),
    0 var(--notch) 0 0 var(--face),
    0 calc(var(--notch) * 2) 0 0 var(--accent-deep);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
}
.btn:hover { color: var(--on); --face: var(--accent-lift); }
.btn:active {
  transform: translateY(4px);
  box-shadow:
    0 calc(var(--notch) * -1) 0 0 var(--face),
    calc(var(--notch) * -1) 0 0 0 var(--face),
    var(--notch) 0 0 0 var(--face),
    0 var(--notch) 0 0 var(--accent-deep);
}

.meta { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.meta a { color: var(--muted); }
.for-others { display: none; }
.not-windows .for-others { display: block; }
.not-windows .for-windows, .not-windows .ghost, .not-windows .btn svg { display: none; }

/* What to do with it */
.steps {
  list-style: none;
  counter-reset: s;
  margin: 28px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
  color: var(--muted);
}
.steps li::before {
  content: counter(s) ".";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.steps b { font-weight: 500; color: var(--fg); }

details { margin-top: 8px; font-size: 13px; color: var(--muted); background: var(--bg); position: relative; z-index: 1; }
details[open] { padding-bottom: 8px; }
summary { cursor: pointer; color: var(--fg); padding: 4px 0; }
details ul { margin: 8px 0 0; padding: 0; list-style: none; }
details li { margin-bottom: 8px; }
code { font: inherit; color: var(--fg); }
.sha { word-break: break-all; }

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gut);
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.foot a { color: var(--muted); }

/* Phones and small windows: the stage sits on top, the words sit under it. */
.narrow .copy, .no-js .copy, .narrow #hero .copy { width: 100%; }
.narrow .beat { padding-left: 20px; padding-right: 28px; }
.narrow .bar { padding: 0 20px; }
.narrow .foot { padding: 12px 20px; }
.narrow #hero { align-items: flex-start; }
.narrow #hero .copy { padding-top: var(--hero-bottom); }
.narrow .lede, .narrow h2 { font-size: clamp(28px, 7.6vw, 44px); }
.narrow h1 { margin-bottom: 12px; }
.narrow .btn { font-size: 20px; }
.narrow .final .copy {
  background: var(--bg);
  margin: 0 -28px 0 -20px;
  padding: 20px 28px 24px 20px;
  width: auto;
  border-top: 1px solid var(--line);
}

/* No script: an ordinary page. */
.no-js .beat { padding-top: 48px; padding-bottom: 48px; }
.no-js #hero { padding-top: 88px; }
.mascot { image-rendering: pixelated; display: block; margin-bottom: 24px; }
.no-js .copy { max-width: 620px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
