:root {
  --paper: #ffffff; --wash: #f3f3f3; --ink: #1a1a1a; --body-ink: #383838;
  --muted: #6f6f6f; --line: #e4e4e4;
  --flame: #ef4123; --navy: #1c303e; --teal: #0d7a9e;
  --mf-blue: #2036b6; --mf-bright-blue: #003bff;
  --font-serif: Georgia, "Times New Roman", serif;
  --on-dark: #ffffff; --shot-bg: #ffffff; --diff-bg: #000000;
  --shadow: 0 12px 32px rgba(16, 24, 32, 0.12);
  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--body-ink);
  font: 16px/1.6 var(--font-display);
  -webkit-font-smoothing: antialiased;
}
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--flame); outline-offset: 2px;
}

/* Top navigation — transparent overlay on the hero band */
.topnav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 40px;
}
.brand { display: block; }
.brand img { height: 42px; display: block; }
.topnav .links { display: flex; gap: 26px; overflow-x: auto; }
.topnav .links a {
  color: color-mix(in srgb, var(--on-dark) 78%, transparent);
  text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.topnav .links a:hover { color: var(--on-dark); }
.topnav .links a.active { color: var(--on-dark); border-bottom-color: var(--flame); }

/* Hero (root) and page bands (subpages) */
.hero { position: relative; background: var(--teal); color: var(--on-dark); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; background-image: url("assets/hero-kids.jpg");
  background-size: cover; background-position: center;
  filter: grayscale(1); mix-blend-mode: multiply; opacity: 0.5;
}
.hero-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 170px 32px 110px; text-align: center;
}
.hero h1 {
  margin: 0; font-size: clamp(42px, 7vw, 80px); font-weight: 800;
  line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance;
}

/* Narrative sections */
.section { padding: 72px 32px; }
.section.wash { background: var(--wash); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.display {
  margin: 0 0 32px; color: var(--ink); font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.02em;
  max-width: 20ch; text-wrap: balance;
}
.lead { margin: 0 0 24px; font-size: 20px; line-height: 1.65; color: var(--body-ink); max-width: 58ch; text-wrap: pretty; }
.copy { margin: 0 0 20px; font: 16.5px/1.8 var(--font-serif); color: var(--body-ink); max-width: 62ch; text-wrap: pretty; }
.more { color: var(--flame); text-decoration: none; font-weight: 600; font-size: 15.5px; }
.more:hover { text-decoration: underline; }

/* Story layout — headline overlaps the gray band, copy indented right */
.story-band { background: var(--wash); padding: 96px 32px 0; }
.story-band .display {
  position: relative; font-size: 100px; line-height: 1;
  margin-bottom: -100px; margin-left: 6%;
}
.story { padding: 120px 32px 88px; }
.story-copy { margin-left: 28%; }

/* Section headings above tools/grid */
.kicker { margin: 0 0 8px; color: var(--flame); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 24px; max-width: 74ch; text-wrap: pretty; }

/* Controls */
.controls {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 18px; margin: 0 0 16px;
}
body[data-view="compare"] .controls {
  position: sticky; top: 12px; z-index: 5; box-shadow: var(--shadow);
}
.controls label { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
select, button {
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font: 600 14px var(--font-display); cursor: pointer;
}
button:hover, select:hover { border-color: var(--ink); }
input[type=range] { accent-color: var(--flame); }

/* Onion-skin stack */
.stackBox {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--shot-bg); box-shadow: var(--shadow);
}
.stackBox img { position: absolute; top: 0; left: 0; width: 100%; display: block; }

/* Compare */
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.side figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--shot-bg); box-shadow: var(--shadow); }
.side figcaption { background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 14px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.side figcaption a { color: var(--ink); text-decoration: none; }
.side figcaption a:hover { color: var(--flame); }
.side a.shot { display: block; }
.side img { width: 100%; display: block; }
.swipe {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--shot-bg); box-shadow: var(--shadow); user-select: none;
}
.swipe img { width: 100%; display: block; }
.swipe .topClip { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; width: 50%; }
.swipe .topClip img { position: absolute; top: 0; left: 0; }
.swipe .divider { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--flame); left: 50%; cursor: ew-resize; }
.swipe .divider::after {
  content: "↔"; position: absolute; top: 14px; left: -11px; width: 25px; height: 25px;
  background: var(--flame); color: var(--on-dark); border-radius: 50%;
  text-align: center; line-height: 25px; font-size: 13px;
}
.blendBox { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--shot-bg); box-shadow: var(--shadow); }
.blendBox img { width: 100%; display: block; }
.blendBox img.over { position: absolute; top: 0; left: 0; }
.blendBox.diff { background: var(--diff-bg); }

/* All-chapters grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.card {
  display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--paper); color: inherit; text-decoration: none;
  transition: box-shadow 140ms ease, transform 140ms ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .thumb { height: 210px; overflow: hidden; background: var(--shot-bg); border-bottom: 1px solid var(--line); }
.card .thumb img { width: 100%; display: block; }
.card .meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.card .meta .nm { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.card .meta .h { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Footer (Matchfire) */
.upperFooter { background: var(--mf-blue); color: var(--on-dark); padding: 80px 40px 56px; }
.upperFooter-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 48px; }
.footerLogo img { width: 200px; display: block; }
.footerMenus { display: flex; gap: 72px; margin-top: 48px; }
.footerMenus ul { list-style: none; margin: 0; padding: 0; }
.footerMenus li { margin-bottom: 16px; }
.footerMenus a { color: var(--on-dark); text-decoration: none; font: 17px/1.4 var(--font-serif); }
.footerMenus a:hover { text-decoration: underline; }
.footerSocial { list-style: none; display: flex; gap: 28px; margin: 56px 0 0; padding: 0; }
.footerSocial img { height: 18px; display: block; }
.footer25 { width: 210px; align-self: center; }
.siteFooter { background: var(--mf-bright-blue); padding: 26px 40px; }
.siteFooter p { max-width: 1200px; margin: 0 auto; color: var(--on-dark); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }

@media (max-width: 720px) {
  .topnav { padding: 16px; }
  .brand img { height: 32px; }
  .hero-inner { padding: 130px 16px 72px; }
  .story-band { padding: 64px 16px 0; }
  .story-band .display { font-size: 44px; margin: 0 0 -44px; }
  .story { padding: 96px 16px 64px; }
  .story-copy { margin-left: 0; }
  .section { padding: 48px 16px; }
  .side { grid-template-columns: 1fr; }
  .upperFooter { padding: 56px 16px 40px; }
  .siteFooter { padding: 22px 16px; }
}
