/* Underdog Docs: the look of the films (Georgia title cards in cream and gold, warm muted grade, vignette,
   film grain, letterbox, 1.5 s dissolves). No web fonts or third-party requests. */
:root {
  --bg: #0e0d0b;
  --panel: #171512;
  --cream: #f4ecdc;
  --muted: #b3a891;
  --gold: #d6b266;
  --yellow: #ffd640;
  --rule: rgba(214, 178, 102, .28);
  --serif: Georgia, "Times New Roman", Times, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--cream); font: 18px/1.7 var(--serif); }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--yellow); }
img { max-width: 100%; display: block; }

/* film grain over everything, like the era look */
body::after {
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}

/* ---------- hero: an establishing shot with the title card ---------- */
.hero {
  position: relative; min-height: min(100vh, 900px); min-height: min(100svh, 900px); display: grid; place-items: center; text-align: center;
  padding: 96px 16px; overflow: hidden; isolation: isolate;
}
.hero::before {                       /* the still, slowly drifting like the films' camera moves */
  content: ""; position: absolute; inset: -4%; z-index: -2;
  background: url("/img/hero.jpg") center 40% / cover no-repeat;
  animation: drift 40s ease-in-out infinite alternate;
}
.hero::after {                        /* vignette and a dark floor for the words */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(14, 13, 11, .25) 0%, rgba(14, 13, 11, .75) 62%, rgba(14, 13, 11, .97) 100%),
    linear-gradient(to bottom, rgba(14, 13, 11, .2), rgba(14, 13, 11, .1) 50%, var(--bg) 100%);
}
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-1.5%, -1%); } }
.letterbox::before, .letterbox::after {
  content: ""; position: absolute; left: 0; right: 0; height: min(6vh, 54px); background: #000; z-index: 1;
}
.letterbox::before { top: 0; } .letterbox::after { bottom: 0; }

.card { animation: dissolve 1.5s ease-out both; max-width: 760px; }
@keyframes dissolve { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wordmark { font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--cream); margin: 0;
  font-size: clamp(30px, 7vw, 64px); line-height: 1.1; text-shadow: 0 2px 24px rgba(0, 0, 0, .7); padding-left: .34em; }
.rule { width: 120px; height: 1px; background: var(--gold); margin: 22px auto; border: 0; }
.tagline { font-style: italic; color: var(--yellow); font-size: clamp(19px, 3vw, 26px); margin: 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.sub { color: var(--muted); margin: 18px auto 0; max-width: 560px; font-size: 17px; }
.cta { display: inline-block; margin-top: 34px; padding: 12px 26px; border: 1px solid var(--gold); color: var(--cream);
  text-decoration: none; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; background: rgba(14, 13, 11, .4);
  transition: background .4s, color .4s; }
.cta:hover { background: var(--gold); color: #14120e; }
.scroll { position: absolute; bottom: calc(min(6vh, 54px) + 18px); left: 50%; transform: translateX(-50%); color: var(--muted);
  font-size: 12px; letter-spacing: .3em; text-decoration: none; z-index: 2; }

/* ---------- chapters ---------- */
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
.chapter { padding: 64px 0 8px; }
.chapter-no { display: block; text-align: center; color: var(--gold); font-size: 13px; letter-spacing: .4em;
  text-transform: uppercase; }
.chapter h2 { text-align: center; font-weight: 400; font-size: clamp(28px, 5vw, 38px); margin: 8px 0 6px; letter-spacing: .02em; }
.chapter .rule { margin: 14px auto 30px; width: 64px; }
p { margin: 0 0 1.1em; }
.dim { color: var(--muted); }

/* latest film: a thumbnail card */
.film { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--panel); border: 1px solid var(--rule);
  text-decoration: none; color: inherit; transition: border-color .4s, transform .4s; }
.film:hover { border-color: var(--gold); transform: translateY(-2px); }
.film img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.film div { padding: 18px 20px 20px; }
.film .label { color: var(--yellow); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.film h3 { margin: 6px 0 6px; font-weight: 400; font-size: 23px; color: var(--cream); line-height: 1.3; }
.film p { margin: 0; color: var(--muted); font-size: 16px; }

/* where to watch */
.watch { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.watch a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px;
  border: 1px solid var(--rule); background: var(--panel); text-decoration: none; color: var(--cream); transition: border-color .4s; }
.watch a:hover { border-color: var(--gold); }
.watch span { color: var(--muted); font-size: 14px; }

.quote { font-style: italic; font-size: 21px; color: var(--cream); text-align: center; margin: 8px auto 0; max-width: 600px; }

footer { max-width: 760px; margin: 56px auto 0; padding: 26px 16px 48px; border-top: 1px solid var(--rule); font-size: 14px;
  color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
footer a { color: var(--muted); }
footer .brand { letter-spacing: .3em; color: var(--cream); }

/* ---------- policy pages: a shorter title card ---------- */
.hero.short { min-height: min(46vh, 420px); padding: 80px 16px 64px; }
.hero.short .wordmark { font-size: clamp(15px, 3vw, 18px); letter-spacing: .4em; }
.hero.short .wordmark a { color: inherit; text-decoration: none; }
.hero.short h1 { font-weight: 400; font-size: clamp(32px, 6vw, 48px); margin: 18px 0 4px; }
.hero.short .letterbox::before, .hero.short .letterbox::after { height: min(3vh, 28px); }
.doc h2 { color: var(--gold); font-weight: 400; font-size: 23px; margin: 40px 0 10px; }
.doc li { margin-bottom: .4em; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .letterbox::before, .letterbox::after { height: min(3.5vh, 30px); }
  .chapter { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  body::after, .hero::before, .card { animation: none; }
}
