/* Typing Hero landing page. Plain CSS, no build step.
   Colours are copied from src/themes/comic.css (the Comic Book theme) so the
   page matches the game without importing the app's stylesheet. */

:root {
  --ink: #1b1b2f;
  --bg: #f7ecd2;
  --bg2: #f1e2bf;
  --panel: #fffaf0;
  --paper: #fffdf7;
  --muted: #575770;
  --primary: #ffd000;
  --primary-hover: #ffde4d;
  --primary-text: #7a4b00;
  --danger: #c81e32;
  --ok: #166b3a;
  --accent: #1a5fc4;
  --wash-yellow: #fff1b3;
  --wash-red: #ffe1e4;
  --wash-green: #dff3e5;
  --wash-blue: #dce9ff;
  --surface-deep: #ece0c2;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-lift: 7px 7px 0 var(--ink);
  --shadow-press: 1px 1px 0 var(--ink);
  --gutter: 16px;
  --max: 1120px;
  --heading: 'Bangers', 'Nunito', cursive;
}

*, *::before, *::after { box-sizing: border-box; }

/* ---------- Paper + halftone ---------- */
html {
  color-scheme: light;
  background:
    radial-gradient(circle at 1.5px 1.5px, rgba(27, 27, 47, 0.11) 1.2px, transparent 1.9px) 0 0 / 9px 9px,
    radial-gradient(900px 500px at 50% -10%, var(--wash-yellow) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; }

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 10;
  background: var(--primary); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px;
  padding: 8px 14px; text-decoration: none; box-shadow: 4px 4px 0 var(--ink);
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.1; }
h1, h2, .brand, .step-num, .stat b, .plan-price b, .no-sub {
  font-family: var(--heading);
  font-weight: 400;
  letter-spacing: 0.04em;
}
h2 {
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  color: var(--primary);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 26px;
}
h3 { font-size: 1.25rem; font-weight: 900; margin-bottom: 8px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 900;
  color: var(--muted); margin: 0 0 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: inherit; font-weight: 900; line-height: 1.2;
  padding: 12px 22px;
  border: 3px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink);
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s, background 0.15s, box-shadow 0.08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); background: var(--wash-yellow); color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: var(--shadow-press); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-big { font-size: 1.2rem; padding: 14px 28px; box-shadow: 6px 6px 0 var(--ink); }
.btn-big:hover { box-shadow: var(--shadow-lift); }

/* ---------- Cards ---------- */
.bubble, .step, .stat, .plan, .faq-item {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* ---------- Header / hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 18px 0 200px;
  border-bottom: 4px solid var(--ink);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.brand {
  font-size: 1.7rem; line-height: 1; text-decoration: none;
  color: var(--primary);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink);
}
.brand:hover { color: var(--primary-hover); }
.topbar-links { list-style: none; display: flex; gap: 22px; }
.topbar-links a { color: var(--ink); font-weight: 900; text-decoration: none; }
.topbar-links a:hover { text-decoration: underline; }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.logo {
  font-size: clamp(3.4rem, 12vw, 6.6rem);
  line-height: 1;
  color: var(--primary);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--danger), 10px 10px 0 var(--ink);
  letter-spacing: 0.05em;
  margin: 0 0 18px;
}
.pitch { font-size: 1.25rem; font-weight: 700; max-width: 30em; margin-bottom: 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.sub-link { margin-top: 18px; }

/* The cast: four heroes on a yellow burst. */
.cast {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center; gap: 6px;
  padding: 36px 0 12px;
}
.cast::before {
  content: ''; position: absolute; z-index: -1;
  left: 50%; top: 50%; width: min(100%, 540px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 1.5px 1.5px, rgba(27, 27, 47, 0.14) 1.3px, transparent 2px) 0 0 / 8px 8px,
    var(--primary);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.cast img { width: clamp(66px, 18vw, 150px); height: auto; flex: 0 0 auto; }
.cast .cast-fly { width: clamp(112px, 30vw, 230px); align-self: flex-start; margin-bottom: 28px; }
.cast .cast-punch { transform: scaleX(-1); }

/* Skyline along the bottom of the header, like the title screen. */
.skyline {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: space-around;
  opacity: 0.9; pointer-events: none;
}
.building {
  flex: 0 0 auto;
  width: 44px; height: 70px;
  background: var(--accent);
  border: 3px solid var(--ink); border-bottom: 0; border-radius: 3px 3px 0 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 10px, var(--primary) 10px 14px),
    repeating-linear-gradient(90deg, transparent 0 8px, var(--ink) 8px 11px);
  box-shadow: 4px 0 0 var(--ink);
}
.building:nth-child(1)  { height: 60px;  width: 40px; }
.building:nth-child(2)  { height: 118px; width: 56px; }
.building:nth-child(3)  { height: 82px;  width: 44px; }
.building:nth-child(4)  { height: 150px; width: 62px; }
.building:nth-child(5)  { height: 70px;  width: 38px; }
.building:nth-child(6)  { height: 126px; width: 50px; }
.building:nth-child(7)  { height: 96px;  width: 66px; }
.building:nth-child(8)  { height: 164px; width: 54px; }
.building:nth-child(9)  { height: 76px;  width: 42px; }
.building:nth-child(10) { height: 134px; width: 60px; }
.building:nth-child(11) { height: 66px;  width: 46px; }
.building:nth-child(12) { height: 108px; width: 52px; }
.building:nth-child(13) { height: 88px;  width: 40px; }
.building:nth-child(14) { height: 120px; width: 58px; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section + .section { padding-top: 12px; }

/* Note to parents: a speech bubble beside a hero. */
.note { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
.note-hero { width: 150px; justify-self: center; }
.bubble { position: relative; padding: 26px; max-width: 760px; }
.bubble p { max-width: 62ch; }

/* How it works */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: 1fr; gap: 28px; }
.step { position: relative; padding: 24px 22px 22px; }
.step-num {
  position: absolute; left: -14px; top: -18px;
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 2rem; line-height: 1;
  color: var(--primary);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink);
}
.step img { display: block; height: 120px; width: auto; margin: 0 auto 14px; }

/* What's inside */
.stats { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.stat { padding: 18px 16px; display: grid; gap: 6px; align-content: start; }
.stat:nth-child(3n + 1) { background: var(--wash-yellow); }
.stat:nth-child(3n + 2) { background: var(--wash-blue); }
.stat:nth-child(3n + 3) { background: var(--wash-green); }
.stat b {
  font-size: 2.7rem; line-height: 1;
  color: var(--primary);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink);
}
.stat span { font-size: 0.98rem; font-weight: 700; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: stretch; }
.plan { padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.plan-pass { background: var(--wash-yellow); }
.plan-name { font-size: 0.85rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin: 0; }
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan-price b {
  font-size: 3.2rem; line-height: 1;
  color: var(--primary);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}
.plan-price span { font-weight: 700; color: var(--muted); }
.plan ul { padding-left: 1.2em; flex: 1; display: grid; gap: 6px; }
.plan .btn { align-self: flex-start; margin-top: 6px; }
.no-sub {
  margin: 34px 0 0; text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--ink); text-shadow: 2px 2px 0 var(--primary);
}

/* Questions */
.faq { display: grid; gap: 18px; max-width: 820px; }
.faq-item { padding: 20px 22px; border-left: 12px solid var(--primary); }
.faq-item p { max-width: 68ch; }

/* ---------- Footer ---------- */
.footer { border-top: 4px solid var(--ink); background: var(--wash-yellow); padding: 30px 0; margin-top: 30px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
.footer-line { font-weight: 700; margin: 0; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Layout breakpoints ---------- */
@media (max-width: 600px) {
  .building:nth-child(n + 9) { display: none; }
  .hero { padding-bottom: 180px; }
}
@media (min-width: 640px) {
  .note { grid-template-columns: 170px 1fr; }
  .note-hero { width: 170px; }
  .bubble::before, .bubble::after { content: ''; position: absolute; top: 48px; width: 0; height: 0; }
  .bubble::before { left: -22px; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-right: 22px solid var(--ink); }
  .bubble::after { left: -15px; top: 52px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-right: 16px solid var(--panel); }
}
@media (min-width: 720px) {
  .plans { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 780px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 40px; }
  .section { padding: 72px 0; }
  .section + .section { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover, .btn:active { transform: none; transition: none; }
}
