/* History Twists companion site. Palette sampled from the channel art (banner B1, avatar A1, Story Still thumbnails). */
:root {
  --paper: #f7eee0;
  --paper-2: #efe4d4;
  --kraft: #bb9360;
  --ink: #2d2823;
  --ink-2: #5b4a3e;
  --brick: #9f453b;
  --brick-dark: #7f3530;
  --cream: #fbefdf;
  --focus: #2f5f8a;
  --shadow: 0 1px 0 rgba(45, 30, 16, .08), 0 6px 16px rgba(45, 30, 16, .16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px; --s8: 64px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  /* paper grain: inline SVG noise, no extra request */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .25 0 0 0 0 .14 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font: 1.125rem/1.6 var(--serif);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick-dark); text-underline-offset: .15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2 { line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s3); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: var(--s1); left: var(--s1); z-index: 10; background: var(--ink); color: var(--cream); padding: var(--s1) var(--s2); }

/* header + footer */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  max-width: var(--wrap); margin-inline: auto; padding: var(--s2) var(--s3);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.25rem; min-height: 44px; white-space: nowrap; }
.brand img { border-radius: 50%; box-shadow: var(--shadow); }
.site-head nav { display: flex; gap: var(--s1); }
.site-head nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.site-head nav a:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .site-head { padding-inline: var(--s2); gap: var(--s1); }
  .brand { font-size: 1.0625rem; gap: var(--s1); }
  .brand img { width: 36px; height: 36px; }
  .site-head nav { gap: 0; }
  .site-head nav a { padding-inline: var(--s1); font-size: 1rem; }
}
.site-foot { margin-top: var(--s8); padding: var(--s4) var(--s3); text-align: center; color: var(--ink-2); font-size: 1rem; border-top: 1px solid rgba(45, 40, 35, .15); }
.site-foot p { margin: var(--s1) 0; }

/* shared bits */
.kicker { margin: 0 0 var(--s1); font-size: .875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brick); }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s3);
  background: var(--brick); color: var(--cream); font-weight: 700; text-decoration: none;
  border-radius: 4px; box-shadow: var(--shadow);
}
.btn:hover { background: var(--brick-dark); color: var(--cream); }
.page-title { font-size: clamp(2rem, 5vw, 3rem); margin: var(--s4) 0 var(--s1); }
.lede { color: var(--ink-2); max-width: 60ch; margin: 0 0 var(--s4); }
.section-title { font-size: 1.75rem; margin: var(--s8) 0 var(--s3); }

/* home */
.masthead { margin: 0 auto; max-width: 800px; padding: var(--s4) max(var(--s2), 7%) var(--s2); }
/* The plaque image carries its own paper drop shadow (PhotoCraft layer style) on transparent margins:
   120 px of a 1744 px plaque on each side. Pull those margins out so the plaque itself lines up with the column. */
.masthead img { display: block; max-width: none; height: auto;
  width: calc(100% * 1984 / 1744); margin: calc(-100% * 120 / 1744) 0 calc(-100% * 120 / 1744) calc(-100% * 120 / 1744); }
.intro { text-align: center; }
.intro p:first-child { max-width: 56ch; margin: var(--s4) auto var(--s3); font-size: 1.25rem; }
.feature { display: grid; gap: var(--s4); align-items: center; margin-top: var(--s8); max-width: 880px; }
.feature-video { max-width: 280px; width: 100%; margin-inline: auto; }
.feature h2 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 var(--s2); }
.feature-text p { max-width: 48ch; }
@media (min-width: 760px) {
  .feature { grid-template-columns: minmax(240px, 320px) 1fr; gap: var(--s6); }
}

/* cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card a { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.card img { border-radius: 6px; box-shadow: var(--shadow); transition: transform .2s ease; }
.card a:hover img { transform: translateY(-4px) rotate(-.5deg); }
.card-meta { margin-top: var(--s2); font-size: .875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brick); }
.card-title { font-size: 1.375rem; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.card a:hover .card-title { text-decoration: underline; }
.card-hook { margin-top: var(--s1); color: var(--ink-2); font-size: 1rem; line-height: 1.5; }

/* player: click-to-load */
.player { aspect-ratio: 9 / 16; width: 100%; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); background: var(--ink); }
.player iframe, .yt { display: block; width: 100%; height: 100%; border: 0; }
.yt { position: relative; padding: 0; cursor: pointer; background: none; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; translate: -50% -50%;
  border-radius: 50%; background: var(--brick); box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}
.play::after { content: ""; position: absolute; left: 29px; top: 22px; border-left: 22px solid var(--cream); border-block: 14px solid transparent; }
.yt:hover .play { transform: scale(1.08); background: var(--brick-dark); }
.yt:focus-visible { outline-offset: -6px; }

/* story page */
.hero { margin: 0 auto; max-width: 1400px; }
.hero img { width: 100%; }
.story-head { margin-top: var(--s4); }
.story-head h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); margin: 0 0 var(--s2); }
.dek { font-size: 1.3125rem; color: var(--ink-2); max-width: 46ch; margin: 0 0 var(--s4); }
.story { display: grid; gap: var(--s6); }
.story-video { max-width: 280px; width: 100%; margin-inline: auto; }
.watch { text-align: center; font-size: 1rem; }
.watch a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) {
  .story { grid-template-columns: 320px 1fr; align-items: start; }
  .story-video { position: sticky; top: var(--s3); max-width: none; }
}
.prose { max-width: 65ch; }
.prose h2 { font-size: 1.625rem; margin: 0 0 var(--s2); }
.prose h2:not(:first-child) { margin-top: var(--s6); }
.prose p { margin: 0 0 1.1em; }

.twist {
  position: relative; isolation: isolate; margin: var(--s6) 0 0; padding: var(--s3) var(--s6);
  color: var(--cream); text-align: center; filter: drop-shadow(0 6px 10px rgba(45, 30, 16, .22));
}
.twist::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--brick);
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 50%, 100% 100%, 0 100%, 20px 50%);
}
.twist p { margin: 0; font-size: 1.375rem; font-weight: 700; line-height: 1.35; }
.twist .twist-label { font-size: .875rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--s1); opacity: .9; }

.sources { padding-left: 1.4em; font-size: 1rem; }
.sources li { margin-bottom: var(--s1); }
.sources li::marker { color: var(--brick); font-weight: 700; }

.soon { margin: 0 auto var(--s4); max-width: var(--wrap); padding: 0 var(--s3); }
.soon > p:last-child { max-width: 60ch; }

.pager { display: flex; justify-content: space-between; gap: var(--s2); margin-top: var(--s8); padding-top: var(--s3); border-top: 1px solid rgba(45, 40, 35, .15); }
.pager a { display: flex; flex-direction: column; min-height: 44px; font-weight: 700; font-size: 1.125rem; text-decoration: none; }
.pager a span { font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.pager a:hover { text-decoration: underline; }
.pager .next { margin-left: auto; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
