:root {
  --bg: #fff8ef;
  --surface: #ffffff;
  --text: #211a17;
  --muted: #6b5d55;
  --border: rgba(33, 26, 23, 0.12);
  --hot: #d63a1f;
  --hot-2: #ff6b2c;
  --ember: #ffb13b;
  --ink: #1a1210;

  --note-1: #fff27a;
  --note-2: #ffc6d9;
  --note-3: #b8f0c8;
  --note-4: #bfe3ff;

  --display: "Archivo Black", Impact, "Arial Black", system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161110;
    --surface: #211a18;
    --text: #f5ebe6;
    --muted: #b9a79d;
    --border: rgba(255, 177, 59, 0.14);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 80px 0 96px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 177, 59, 0.55), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(120, 10, 0, 0.5), transparent 50%),
    linear-gradient(135deg, var(--hot) 0%, var(--hot-2) 100%);
}
/* Halftone dots, like a comic panel */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(rgba(0, 0, 0, 0.14) 1.2px, transparent 1.6px) 0 0 / 14px 14px;
}

.hero-inner { position: relative; }

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  font-family: var(--hand);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  background: var(--ember);
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 var(--ink);
}

.title {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 10vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--ink);
}
.title span { display: block; }
.title em {
  font-style: normal;
  color: var(--ember);
  display: inline-block;
  animation: rage 3.5s ease-in-out infinite;
}

/* Every so often, the word loses its temper */
@keyframes rage {
  0%, 82%, 100% { transform: none; }
  84% { transform: translate(-2px, 1px) rotate(-3deg); }
  86% { transform: translate(3px, -1px) rotate(3deg); }
  88% { transform: translate(-3px, 0) rotate(-2deg); }
  90% { transform: translate(2px, 1px) rotate(2deg); }
  92% { transform: none; }
}

.lede {
  margin: 0 0 32px;
  max-width: 42ch;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: rgba(255, 255, 255, 0.95);
}

/* The (entirely unscientific) annoyance meter */
.meter {
  max-width: 420px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(26, 18, 16, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.25);
}
.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.meter-value { font-family: var(--hand); font-size: 1.35rem; text-transform: none; letter-spacing: 0; line-height: 1; }
.meter-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.meter-fill {
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe066, var(--ember), #ff3b1f);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.meter-btn {
  margin-top: 12px;
  padding: 7px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: 700 0.9rem/1 system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.meter-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.meter-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.meter-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Steam rising off the header */
.steam {
  position: absolute;
  right: 8%;
  bottom: 0;
  width: 120px;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
.steam span {
  position: absolute;
  bottom: -40px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  filter: blur(10px);
  animation: steam 6s ease-in infinite;
}
.steam span:nth-child(2) { left: 40px; animation-delay: -2s; }
.steam span:nth-child(3) { left: 15px; animation-delay: -4s; }

@keyframes steam {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  20%  { opacity: 0.9; }
  100% { transform: translateY(-420px) scale(1.8); opacity: 0; }
}

/* ---------- Sticky notes ---------- */

main { padding: 72px 16px 48px; }

main h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  text-transform: uppercase;
  color: var(--hot);
}
@media (prefers-color-scheme: dark) {
  main h2 { color: var(--hot-2); }
}

.section-lede { margin: 0 0 32px; color: var(--muted); }

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

.note {
  position: relative;
  padding: 26px 22px 22px;
  color: #2a2118;
  background: var(--note-1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: rotate(-1.5deg);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}
.note:nth-child(4n+2) { background: var(--note-2); transform: rotate(1.2deg); }
.note:nth-child(4n+3) { background: var(--note-3); transform: rotate(-0.6deg); }
.note:nth-child(4n+4) { background: var(--note-4); transform: rotate(1.8deg); }

/* A strip of tape holding each note up */
.note::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 80px;
  height: 22px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.note:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.note h3 {
  margin: 0 0 6px;
  font-family: var(--hand);
  font-size: 1.9rem;
  line-height: 1.05;
}
.note p { margin: 0; font-size: 0.98rem; }

.disclaimer {
  margin: 44px 0 0;
  text-align: center;
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--muted);
}

footer {
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* ---------- Entrance animation ---------- */

.js .reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- 404 page ---------- */

.hero.compact { min-height: 100vh; display: flex; align-items: center; }
.cta {
  display: inline-block;
  padding: 10px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}
.cta:hover, .cta:focus-visible { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); outline: none; }

/* ---------- Respect reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .steam { display: none; }
  .js .reveal { opacity: 1; translate: none; }
}
