:root {
  --ink: #2a1c0c;
  --ink-soft: #5a3f24;
  --cream: #fff8e8;
  --paper: #fff3d1;
  --yellow: #ffd24a;
  --yellow-deep: #f0b400;
  --amber: #e8891a;
  --heart: #d94b4b;
  --sand: #f4e0b5;
  --sky: #7eb8d4;
  --navy: #1c2a38;
  --card: #fffdf6;
  --line: rgba(42, 28, 12, 0.12);
  --shadow: 0 16px 40px rgba(42, 28, 12, 0.12);
  --max: 1120px;
  --narrow: 720px;
  --ep101: #d4a017;
  --ep102: #e07020;
  --ep103: #2f6b4f;
  --ep104: #3d5a73;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Nunito, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #ffe27a 0%, transparent 60%),
    radial-gradient(900px 400px at 100% 0%, #ffd9a0 0%, transparent 50%),
    var(--cream);
  line-height: 1.65;
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #8a3b00; }
a:hover { color: #5c2200; }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 20;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.wrap.narrow { width: min(var(--narrow), calc(100% - 2rem)); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--amber);
  margin: 0 0 0.4rem;
}
h1, h2, h3, h4 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0 0 0.6rem; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.12rem; margin-top: 1.2rem; }
.section-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 42rem; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 248, 232, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 0; flex-wrap: wrap;
}
.logo {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
}
.nav nav { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; }
.nav nav a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 0.92rem; }
.nav nav a:hover { color: var(--amber); }

.hero { padding: 2.5rem 0 3.5rem; }
.hero-grid {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.1fr 0.8fr; align-items: center; }
}
.hero-copy .lede { font-size: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }
.hero-art img {
  width: 100%; border-radius: 1.25rem;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
}
@media (min-width: 860px) {
  .hero-art img {
    width: auto;
    max-width: 100%;
    max-height: min(82vh, 40rem);
    margin-inline: auto;
  }
}

.btn {
  display: inline-block; text-decoration: none;
  padding: 0.75rem 1.2rem; border-radius: 999px;
  font-weight: 800; border: 2px solid var(--ink);
}
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--yellow-deep); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: #fff; color: var(--ink); }

.vision, .next, .bigger {
  padding: 3.5rem 0;
  background: #fffaf0;
  border-block: 1px solid var(--line);
}
.vision p, .next p { font-size: 1.15rem; }

.part { padding: 3.5rem 0 4rem; }
.cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 800px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.cards.four {
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .cards.four { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: 0 8px 24px rgba(42, 28, 12, 0.06);
}
.card h3 { margin-bottom: 0.5rem; }
.text-link { font-weight: 800; }

/* World of Success Sitcoms */
.world { padding: 3.5rem 0 3rem; }
.world-setting {
  display: grid; gap: 1.5rem; align-items: center;
  grid-template-columns: 1fr;
  margin: 1.6rem 0 2.4rem;
}
@media (min-width: 800px) {
  .world-setting { grid-template-columns: 1fr 1.1fr; }
}
.world-setting img {
  width: 100%; border-radius: 1rem;
  border: 3px solid #fff; box-shadow: var(--shadow);
}
.codex {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 1.4rem 0 2.2rem;
}
@media (min-width: 700px) {
  .codex { grid-template-columns: 1fr 1fr; }
}
.codex figure { margin: 0; background: var(--card); border-radius: 1rem; overflow: hidden; border: 1px solid var(--line); }
.codex img {
  width: 100%; height: auto;
  object-fit: contain;
  background: #fff8e8;
  aspect-ratio: 16 / 10;
}
.codex figcaption { padding: 0.85rem 1rem 1.1rem; color: var(--ink-soft); font-size: 0.98rem; }
.codex figcaption strong { display: block; color: var(--ink); font-size: 1.15rem; font-family: Fraunces, Georgia, serif; margin-bottom: 0.2rem; }
.themes {
  display: grid; gap: 0.9rem;
  grid-template-columns: 1fr;
  margin: 1rem 0 2rem;
}
@media (min-width: 700px) {
  .themes { grid-template-columns: 1fr 1fr; }
}
.theme {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
}
.theme strong { display: block; margin-bottom: 0.2rem; }
.creator-note {
  background: #fffaf0;
  border-left: 4px solid var(--yellow);
  border-radius: 0 0.9rem 0.9rem 0;
  padding: 1.1rem 1.2rem;
  font-size: 1.08rem;
}

.characters { padding: 3.5rem 0 2rem; }
.cast {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 740px) {
  .cast { grid-template-columns: 1fr 1fr; }
}
.cast figure, .thumbs figure, .ep-cover, .gallery figure, .filmstrip figure {
  margin: 0;
}
.cast img, .ep-cover img, .thumbs img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  object-fit: contain;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  background: #fff8e8;
}
.cast figcaption, .thumbs figcaption, .gallery figcaption, .filmstrip figcaption {
  padding: 0.7rem 0.15rem 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.art { padding: 2rem 0 4rem; }
.gallery {
  columns: 2;
  column-gap: 0.9rem;
  margin-top: 1.5rem;
}
@media (min-width: 700px) { .gallery { columns: 3; } }
@media (min-width: 1000px) { .gallery { columns: 4; } }
.gallery figure {
  break-inside: avoid;
  margin: 0 0 1.1rem;
  background: var(--card);
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery img { width: 100%; }
.shot {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
}
.gallery figcaption { padding: 0.55rem 0.7rem 0.8rem; font-size: 0.86rem; }

.episodes { padding: 1rem 0 4rem; }
.episode {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.5rem 1.3rem 1.7rem;
  margin: 1.5rem 0 2.4rem;
  box-shadow: 0 8px 24px rgba(42, 28, 12, 0.05);
}
.ep-num {
  font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.8rem; color: var(--amber);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem;
}
.ep-layout {
  display: grid; gap: 1.25rem; align-items: start;
  grid-template-columns: 1fr;
  margin: 0.8rem 0 1.2rem;
}
@media (min-width: 800px) {
  .ep-layout { grid-template-columns: 1.4fr 0.8fr; }
}
.ep-cover { margin: 0; }
.ep-cover.placeholder {
  min-height: 16rem;
  display: grid; place-items: center;
  background: repeating-linear-gradient(-45deg, #ffe9a8, #ffe9a8 12px, #fff3c4 12px, #fff3c4 24px);
  border-radius: 1rem; border: 2px dashed rgba(42,28,12,0.25);
  font-family: Fraunces, Georgia, serif; font-size: 1.4rem; color: var(--ink-soft);
}
.video {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 0.9rem; overflow: hidden;
  margin: 0.5rem 0 1.2rem;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.thumbs {
  display: grid; gap: 0.8rem;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 800px) {
  .thumbs { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
.thumbs img {
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff8e8;
}
.status, .badge {
  display: inline-block;
  background: var(--yellow);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-weight: 800; font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* Stage tracker */
.stages {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0; margin: 0.7rem 0 1.1rem;
}
.stages li {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1.5px solid rgba(42,28,12,0.2);
  color: #8a6a45;
  background: transparent;
}
.stages li.done {
  background: #1d6b3a;
  border-color: #1d6b3a;
  color: #fff8e8;
}
.stages li.now {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--ink);
}
.outline {
  margin: 0.4rem 0 1rem;
  padding: 0;
  list-style: none;
}
.outline li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.15rem;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
}
.outline li:first-child { border-top: 0; }
.outline li::before {
  content: "";
  position: absolute; left: 0; top: 0.9rem;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--amber);
}
.outline strong { color: var(--ink); }
.lesson {
  background: rgba(255, 210, 74, 0.28);
  border-radius: 0.8rem;
  padding: 0.85rem 1rem;
  margin: 0.6rem 0 1rem;
  font-size: 1.02rem;
}
.lesson strong { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2rem; }

/* Unique episode treatments */
.ep-flagship {
  background: linear-gradient(180deg, #fff8dc 0%, #fffdf6 40%);
  border: 2px solid #e8c04a;
  box-shadow: 0 12px 36px rgba(212, 160, 23, 0.18);
}
.ep-flagship .ep-num { color: #9a6a00; }
.ep-flagship .badge { background: #1d6b3a; color: #fff8e8; }

.ep-production {
  background: linear-gradient(180deg, #ffe8d2 0%, #fffaf4 45%);
  border: 2px solid #e8a36a;
  border-left: 7px solid var(--ep102);
}
.ep-production .ep-num { color: #b04a00; }
.ep-production .badge { background: #e07020; color: #fff8e8; }
.ep-production .outline li::before { background: var(--ep102); }

.ep-storyboard {
  background: linear-gradient(180deg, #e7f3ea 0%, #f7fbf7 42%);
  border: 2px solid #8fb89a;
  border-left: 7px solid var(--ep103);
}
.ep-storyboard .ep-num { color: #1e4d38; }
.ep-storyboard .badge { background: var(--ep103); color: #f3fff6; }
.ep-storyboard .outline li::before { background: var(--ep103); }
.ep-storyboard .lesson { background: rgba(47, 107, 79, 0.12); }

.filmstrip-wrap { margin: 1.2rem 0 0.4rem; }
.filmstrip-wrap > h4 { margin-bottom: 0.35rem; }
.filmstrip {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 0.8rem;
  padding: 0.7rem 0.55rem;
  background: #1c2a22;
  border-radius: 0.7rem;
  /* film perforations */
  box-shadow: inset 0 0 0 8px #1c2a22;
}
@media (min-width: 700px) {
  .filmstrip { grid-template-columns: repeat(3, 1fr); padding: 0.9rem; }
}
@media (min-width: 1000px) {
  .filmstrip { grid-template-columns: repeat(4, 1fr); }
}
.filmstrip figure {
  background: #0f1713;
  border-radius: 0.35rem;
  overflow: hidden;
}
.filmstrip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}
.filmstrip figcaption {
  color: #e8f0e6;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem 0.6rem;
  line-height: 1.35;
}
.filmstrip .shot { cursor: zoom-in; }

.ep-script {
  background:
    repeating-linear-gradient(transparent, transparent 31px, rgba(42,28,12,0.05) 31px, rgba(42,28,12,0.05) 32px),
    #f7f1e3;
  border: 2px solid #c9b896;
  border-left: 7px solid var(--ep104);
}
.ep-script .ep-num { color: var(--ep104); }
.ep-script .badge { background: var(--ep104); color: #f4f7fb; }
.ep-script .outline li::before { background: var(--ep104); }
.ep-script .ep-cover img {
  background: #f3ead4;
  box-shadow: 0 10px 28px rgba(42,28,12,0.14);
}
@media (min-width: 800px) {
  .ep-script .ep-layout { grid-template-columns: 0.85fr 1.15fr; }
}

/* Investment / bigger picture */
.bigger h2 { margin-bottom: 0.8rem; }
.bigger .vision-words {
  font-size: 1.2rem;
  font-family: Fraunces, Georgia, serif;
  line-height: 1.45;
  margin: 1.2rem 0;
}
.path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.55rem;
  margin: 1rem 0 1.4rem;
  font-weight: 800;
}
.path span {
  background: var(--yellow);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}
.path .arrow { background: none; padding: 0; color: var(--ink-soft); }
.disclaimer {
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.4rem;
}
.est {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-style: italic;
}

.next { text-align: left; }
.site-footer {
  background: var(--navy); color: #f7ecd2;
  padding: 2.5rem 0 3rem; text-align: center;
}
.site-footer a { color: var(--yellow); }
.site-footer p { margin: 0.3rem 0; }

.lightbox {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(20, 12, 6, 0.88);
  display: grid; place-items: center;
  padding: 3rem 1rem 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 82vh;
  width: auto; height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lb-cap { color: #f7ecd2; text-align: center; max-width: 40rem; }
.lb-close {
  position: absolute; top: 0.8rem; right: 0.8rem;
  background: var(--yellow); color: var(--ink);
  border: 0; border-radius: 999px;
  padding: 0.45rem 0.9rem; font-weight: 800; cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .nav nav a { font-size: 0.85rem; }
  .episode { padding: 1.2rem 0.95rem 1.4rem; }
  .filmstrip { gap: 0.5rem; padding: 0.5rem 0.4rem; }
  .filmstrip figcaption { font-size: 0.75rem; }
  .stages li { font-size: 0.7rem; padding: 0.22rem 0.5rem; }
}

/* Contact: LinkedIn + WhatsApp QR */
.contact-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 1.5rem auto 0;
  max-width: 44rem;
  text-align: left;
}
@media (min-width: 700px) {
  .contact-cards { grid-template-columns: 1fr 1fr; align-items: start; }
}
.contact-card {
  background: rgba(255, 248, 232, 0.08);
  border: 1px solid rgba(255, 210, 74, 0.28);
  border-radius: 1.1rem;
  padding: 1.25rem 1.2rem 1.4rem;
}
.contact-card h3 {
  color: #fff8e8;
  margin-bottom: 0.35rem;
}
.contact-card p { margin: 0.3rem 0 0.7rem; color: #f7ecd2; }
.contact-card a { color: var(--yellow); font-weight: 800; }
.wa-qr {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 1rem;
  padding: 0.7rem;
  margin: 0.4rem auto 0;
}
@media (max-width: 600px) {
  .wa-qr { width: min(260px, 86vw); margin-inline: auto; }
  .contact-cards { text-align: center; }
}

/* Keep in-page targets clear of the sticky header */
section[id], .episode[id], footer[id] {
  scroll-margin-top: 4.75rem;
}

.donate { padding: 1.25rem 0 0.15rem; }
.donate-box {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
}
.donate-box h2 { font-size: clamp(1.15rem, 3vw, 1.45rem); margin: 0 0 0.9rem; }
.donate-box img { width: 200px; max-width: 70%; height: auto; margin: 0 auto; background: #fff; border-radius: 8px; }
