/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Quicksand', ui-sans-serif, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, dl, dd, dt, h1, h2, p { margin: 0; padding: 0; }

:root {
  --paper: #f5ecd8;
  --paper-2: #ece0c3;
  --ink: #1c1710;
  --ink-soft: #5c4f3d;
  --orange: #ff7a3d;
  --teal: #1f6f6a;
  --line: rgba(28, 23, 16, 0.16);
}

.section-title {
  font-family: 'Bangers', 'Quicksand', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.chapter-tag {
  display: inline-block;
  font-family: 'Bangers', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--paper);
  padding: 0.35rem 0.8rem;
  transform: rotate(-1.2deg);
  margin-bottom: 1rem;
}
.chapter-tag--light { background: var(--paper); color: var(--ink); }

/* ---------- Halftone overlay ---------- */
.halftone {
  position: fixed; inset: 0; pointer-events: none; z-index: 200;
  background-image: radial-gradient(rgba(28,23,16,0.05) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem;
  background: rgba(245,236,216,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.nav__logo {
  font-family: 'Bangers', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  display: flex; align-items: center; gap: 0.6rem;
}
.nav__pill {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
}
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--orange); }
.nav__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 22px; height: 3px; background: var(--ink); display: block; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  border-radius: 30px;
  border: 3px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn--small { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
.btn--big { padding: 0.8rem 1.5rem; font-size: 0.98rem; }
.btn--orange {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn--orange:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn--ghost:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.icon-x { width: 16px; height: 16px; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px) rotate(var(--tilt, 0deg));
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--tilt, 0deg));
}
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

/* ---------- Speech bubbles ---------- */
.bubble {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 1rem 1.3rem;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--ink);
  width: fit-content;
  box-shadow: 4px 4px 0 var(--ink);
}
.bubble::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  background: var(--paper);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  bottom: -13px; left: 34px;
  transform: rotate(45deg);
}
.bubble--think { border-radius: 50%; text-align: center; }
.bubble--think::after {
  width: 12px; height: 12px; border-radius: 50%;
  bottom: -20px; left: 26px; background: var(--paper);
  border: 3px solid var(--ink); transform: none;
}

/* ---------- Hero ---------- */
.hero { padding: 7rem 1.6rem 3.5rem; scroll-margin-top: 84px; }
.hero__page { max-width: 1180px; margin: 0 auto; }
.hero__panel {
  position: relative;
  border: 4px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  min-height: 62svh;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  box-shadow: 8px 8px 0 var(--ink);
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero__char {
  position: absolute;
  right: 4vw; bottom: 0;
  max-width: min(30vw, 360px);
  max-height: 56svh;
  width: auto; height: auto;
  z-index: 1;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.25));
}
.bubble--hero { position: relative; z-index: 2; max-width: 380px; }
.hero__cap {
  margin-top: 1.6rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.2rem;
}
.hero__cap p { font-size: 1rem; color: var(--ink-soft); max-width: 42ch; }
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ---------- SFX strip ---------- */
.sfx-strip {
  background: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.7rem 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.sfx-strip__track {
  display: inline-flex;
  gap: 3rem;
  animation: scrollLeft 22s linear infinite;
  font-family: 'Bangers', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}
.sfx-strip__track span { color: var(--orange); }
.sfx-strip__track span:nth-child(even) { color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .sfx-strip__track { animation: none; } }

/* ---------- Panels / comic grid ---------- */
.panels { padding: 6rem 1.6rem 6.5rem; scroll-margin-top: 84px; }
.panels__head { max-width: 640px; margin: 0 auto 2.6rem; text-align: center; }

.page-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.4rem;
}
.panel {
  position: relative;
  border: 4px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-2);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 300px;
  padding: 1rem;
}
.panel img { width: auto; height: auto; max-width: 90%; max-height: 94%; object-fit: contain; margin: 0 auto; }
.panel--big { grid-column: 1 / 2; grid-row: 1 / 2; }
.panel--big .bubble--panel { position: absolute; top: 1rem; left: 1rem; z-index: 2; font-size: 1.1rem; }

.panel--zoom { grid-column: 2 / 3; grid-row: 1 / 2; background: var(--teal); padding: 0; }
.panel--zoom__img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; object-position: center 40%; margin: 0; }
.sfx {
  position: absolute; top: 0.6rem; right: 0.8rem;
  font-family: 'Bangers', sans-serif;
  font-size: 2.2rem;
  color: var(--orange);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 3px 3px 0 var(--ink);
  transform: rotate(6deg);
}

.panel--note {
  grid-column: 1 / 2; grid-row: 2 / 3;
  background: var(--ink);
  color: var(--paper);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 1.4rem;
}
.panel__caption {
  font-family: 'Bangers', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 0.5rem;
}
.panel__value {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.2rem;
  line-height: 1.3;
}

.panel--zoom2 { grid-column: 2 / 3; grid-row: 2 / 3; flex-direction: column; gap: 0.9rem; background: var(--paper-2); }
.panel--zoom2__img { width: 110px; height: 110px; max-width: 110px; max-height: 110px; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; object-position: center 20%; flex-shrink: 0; margin: 0; }
.panel--zoom2 .bubble--think { margin: 0 auto; }

/* ---------- Reaction (full-bleed panel) ---------- */
.reaction {
  position: relative;
  min-height: 90svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 6rem 1.6rem;
  text-align: center;
  scroll-margin-top: 84px;
}
.reaction__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.reaction__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,23,16,0.15) 0%, rgba(28,23,16,0.55) 100%); }
.reaction__char {
  position: relative; z-index: 1;
  max-width: min(34vw, 340px);
  max-height: 50svh;
  width: auto; height: auto;
  margin-bottom: 1.4rem;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,0.4));
}
.bubble--reaction { position: relative; z-index: 1; margin: 0 auto; text-align: center; }

/* ---------- Outro ---------- */
.outro {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 6rem 1.6rem;
  text-align: center;
  scroll-margin-top: 84px;
}
.outro__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.outro__scrim { position: absolute; inset: 0; background: rgba(245,236,216,0.72); }
.outro__panel {
  position: relative; z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 16px;
  padding: 2.4rem 2rem;
  box-shadow: 8px 8px 0 var(--ink);
}
.outro__char {
  width: 150px; margin: 0 auto 1rem;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.25));
}
.outro__title {
  font-family: 'Bangers', sans-serif;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.8rem;
}
.outro__sub { color: var(--ink-soft); margin-bottom: 1.6rem; }
.outro__links { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.outro__tbc { font-family: 'Bangers', sans-serif; letter-spacing: 0.06em; color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.footer {
  padding: 2rem 1.6rem;
  border-top: 3px solid var(--ink);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Keyframes ---------- */
@keyframes scrollLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(245,236,216,0.98); padding: 1.2rem 1.8rem; gap: 1rem; border-bottom: 3px solid var(--ink); }

  .hero__panel { flex-direction: column; align-items: center; text-align: center; padding: 1.4rem; min-height: auto; }
  .hero__char { position: static; margin: 1.2rem auto 0; max-width: min(52vw, 240px); max-height: 34svh; }
  .bubble--hero { margin: 0 auto; }
  .hero__cap { flex-direction: column; text-align: center; }
  .hero__cap p { max-width: 34ch; margin: 0 auto; }
  .hero__cta { justify-content: center; }

  .page-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .panel--big, .panel--zoom, .panel--note, .panel--zoom2 { grid-column: 1 / 2; grid-row: auto; }
  .panel--zoom2 { flex-direction: column; text-align: center; }
  .panel--zoom2 .bubble--think { margin: 0.6rem auto 0; }

  .reaction__char { max-width: min(50vw, 240px); }

  .outro__panel { padding: 1.8rem 1.4rem; }
}
