/* Old Gods, New Tales — oldgodsnewtales.com
   Mobile first. Light/dark follow the visitor's system setting; header, hero, subscribe band and footer
   are always dark (the brand: black-figure pottery, bronze, terracotta, parchment).
   Contrast pairs are checked by test_web.py (WCAG AA). */

@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-0130, U+0132-0151, U+0154-017F, U+0180-024F, U+1E00-1EFF; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-italic-latin.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; size-adjust: 112%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-italic-latin-ext.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; size-adjust: 112%;
  unicode-range: U+0100-0130, U+0132-0151, U+0154-017F, U+0180-024F, U+1E00-1EFF; }

:root {
  color-scheme: light dark;
  /* light (parchment) */
  --bg: #f6f0e4;
  --surface: #fffaf1;
  --surface-2: #efe4d0;
  --ink: #1d1611;
  --ink-soft: #54463a;
  --accent: #9a3f1c;
  --gold: #7f5713;
  --line: #d9c7a9;
  /* always-dark zones */
  --night: #0e0b09;
  --night-2: #17120e;
  --night-ink: #f1e4cc;
  --night-soft: #c9b89c;
  --night-gold: #d4a24c;
  --night-line: #3b2f24;
  /* brand fixed */
  --bronze: #c9953f;
  --on-bronze: #0e0b09;
  --terra: #b4532a;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --italic: "Cormorant Garamond", "Source Serif 4", Georgia, serif;
  --wrap: 72rem;
  --text: 42rem;
  --radius: 6px;
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 40 20'%3E%3Cpath d='M0 19h10V3h16v12h-8V9h4' fill='none' stroke='%23c9953f' stroke-width='2.4' stroke-linecap='square'/%3E%3Cpath d='M30 19h10' stroke='%23c9953f' stroke-width='2.4'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b09;
    --surface: #17120e;
    --surface-2: #211a14;
    --ink: #f1e4cc;
    --ink-soft: #c4b297;
    --accent: #e48a5e;
    --gold: #d4a24c;
    --line: #3b2f24;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.65;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; border-radius: 2px; }
em, i { font-family: var(--italic); font-style: italic; font-weight: 500; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: .01em; text-wrap: balance; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--bronze); color: var(--on-bronze); padding: .6rem 1rem; font-family: var(--display); font-weight: 600; }
.skip:focus { top: 1rem; }

/* ---------- eyebrow, buttons ---------- */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 .9rem; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .75rem 1.35rem;
  font-family: var(--display); font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius); border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.btn--primary { background: var(--bronze); color: var(--on-bronze); }
.btn--primary:hover { background: #ddab52; }
.btn--ghost { color: var(--night-ink); border-color: rgba(201, 149, 63, .7); }
.btn--ghost:hover { border-color: var(--bronze); background: rgba(201, 149, 63, .12); }
.btn--line { color: var(--ink); border-color: var(--line); }
.btn--line:hover { border-color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- header ---------- */
.site-header { background: var(--night); color: var(--night-ink); border-bottom: 1px solid var(--night-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--night-ink); text-decoration: none; }
.brand img { width: 3rem; height: 3rem; border-radius: 50%; box-shadow: 0 0 0 1px rgba(201, 149, 63, .35); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: .25rem 1.1rem; flex-wrap: wrap; }
.nav a { color: var(--night-ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; padding: .5rem .1rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--night-gold); }
.nav .btn { min-height: 2.5rem; padding: .45rem .9rem; font-size: .78rem; color: var(--on-bronze); }
.nav .btn:hover { color: var(--on-bronze); }
@media (max-width: 30rem) {
  .brand span { font-size: .9rem; letter-spacing: .07em; }
  .nav { width: 100%; justify-content: space-between; border-top: 1px solid var(--night-line); padding-top: .4rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--night-ink); padding: 4.5rem 0 5.5rem; }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14, 11, 9, .82) 0%, rgba(14, 11, 9, .9) 55%, rgba(14, 11, 9, .97) 100%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1.25rem; height: 18px; background: var(--meander) repeat-x center / 36px 18px; opacity: .85; }
.hero__inner { max-width: 40rem; }
.hero .eyebrow, .band .eyebrow { color: var(--night-gold); }
.hero h1 { font-size: clamp(2.6rem, 1.4rem + 6vw, 5.2rem); line-height: 1.02; letter-spacing: .03em; color: var(--night-gold); text-transform: uppercase; margin-bottom: .35em; text-shadow: 0 3px 0 #000; }
.hero h1 span { display: block; }
.hero__tagline { font-family: var(--italic); font-style: italic; font-weight: 500; font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.2rem); line-height: 1.2; color: var(--night-ink); margin: 0 0 1.2rem; }
.hero__lead { color: var(--night-soft); font-size: 1.08rem; max-width: 34rem; margin-bottom: 1.8rem; }
.hero__note { margin: 1.4rem 0 0; font-size: .95rem; color: var(--night-soft); }
.hero__note strong { color: var(--night-ink); font-weight: 600; }
@media (min-width: 60rem) {
  .hero { padding: 6.5rem 0 7.5rem; }
  .hero__img { left: 34%; width: 66%; object-position: 50% 45%; }
  .hero::before { background: linear-gradient(90deg, var(--night) 0%, var(--night) 34%, rgba(14, 11, 9, .82) 46%, rgba(14, 11, 9, .28) 72%, rgba(14, 11, 9, .5) 100%); }
}

/* ---------- sections ---------- */
.section { padding: 4rem 0; }
.section--alt { background: var(--surface-2); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section__head h2 { margin: 0; }
.rule { display: flex; align-items: center; gap: .8rem; color: var(--gold); margin: 0 0 1rem; }
.rule::before, .rule::after { content: ""; height: 1px; background: currentColor; opacity: .5; flex: 1; max-width: 3.5rem; }
.rule span { width: .5rem; height: .5rem; background: currentColor; transform: rotate(45deg); }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: var(--text); }

/* featured */
.featured { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 56rem) { .featured { grid-template-columns: 1.35fr 1fr; gap: 2.5rem; } }
.featured h3 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); margin-bottom: .5rem; }
.featured h3 a { color: var(--ink); text-decoration: none; }
.featured h3 a:hover { color: var(--accent); }
.thumb { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--night); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(0, 0, 0, .55); }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s ease; }
.thumb:hover img { transform: scale(1.025); }
.thumb .play { left: auto; top: auto; right: .8rem; bottom: .8rem; margin: 0; width: 3.4rem; height: 3.4rem; }
.thumb .play svg { width: 1.25rem; height: 1.25rem; }
.play { position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; border-radius: 50%;
  background: rgba(14, 11, 9, .78); border: 2px solid var(--bronze); display: grid; place-items: center; transition: background-color .15s, transform .15s; }
.play svg { width: 1.6rem; height: 1.6rem; margin-left: .2rem; fill: var(--bronze); }
.thumb:hover .play, .player__poster:hover .play, .player__poster:focus-visible .play { background: var(--bronze); transform: scale(1.06); }
.thumb:hover .play svg, .player__poster:hover .play svg, .player__poster:focus-visible .play svg { fill: var(--on-bronze); }
.meta { font-size: .92rem; color: var(--ink-soft); margin: 0 0 .9rem; font-variant-numeric: lining-nums tabular-nums; }
.meta span + span::before { content: "\00B7"; margin: 0 .45rem; color: var(--gold); }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; background: var(--surface); max-width: var(--text); }
.empty p { color: var(--ink-soft); }

/* pillars */
.pillars { display: grid; gap: 1.25rem; counter-reset: p; }
@media (min-width: 48rem) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.pillar { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--terra); border-radius: var(--radius); padding: 1.6rem 1.4rem 1.2rem; }
.pillar__num { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--gold); line-height: 1; margin: 0 0 .7rem; }
.pillar h3 { margin-bottom: .45rem; }
.pillar p { color: var(--ink-soft); margin: 0; }
.quote { font-family: var(--italic); font-style: italic; font-weight: 500; font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.8rem); line-height: 1.3; color: var(--ink); max-width: 46rem; margin: 2.5rem auto 0; text-align: center; }

/* start here */
.start { display: grid; gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--bronze); border-radius: var(--radius); padding: 1.75rem 1.4rem; }
@media (min-width: 56rem) { .start { grid-template-columns: 1fr 22rem; padding: 2.25rem 2.5rem; } }
.start p { color: var(--ink-soft); font-size: 1.12rem; margin-bottom: 1.2rem; }
@media (max-width: 30rem) { .start { padding: 1.4rem 1.1rem; } .start .btn { padding: .7rem 1rem; letter-spacing: .05em; } }
.start .thumb { max-width: 26rem; }

/* cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); }
.card { display: flex; flex-direction: column; }
.card .thumb { margin-bottom: .9rem; }
.card h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card .meta { margin-bottom: .4rem; font-size: .85rem; }
.card p { color: var(--ink-soft); font-size: .98rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* subscribe band (always dark) */
.band { position: relative; background: var(--night); color: var(--night-ink); padding: 4.5rem 0 4rem; text-align: center; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: 1.25rem; height: 18px; background: var(--meander) repeat-x center / 36px 18px; opacity: .7; }
.band h2 { color: var(--night-gold); }
.band p { color: var(--night-soft); max-width: 36rem; margin: 0 auto 1.6rem; }
.band .btn-row { justify-content: center; }

/* newsletter slot */
.newsletter { max-width: var(--text); }

/* ---------- episode page ---------- */
.crumbs { font-size: .88rem; color: var(--ink-soft); margin: 0 0 1.4rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .5rem; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--gold); }
.crumbs a { color: var(--ink-soft); }
.ep-head { padding: 2.25rem 0 1.5rem; }
.ep-head h1 { max-width: 52rem; }
.player { position: relative; max-width: 60rem; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .7); }
.player__poster { position: absolute; inset: 0; display: block; }
.player__poster img { width: 100%; height: 100%; object-fit: cover; }
.player__poster .play { width: 5.5rem; height: 5.5rem; margin: -2.75rem 0 0 -2.75rem; }
.player__poster .play svg { width: 2rem; height: 2rem; }
.player__hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .8rem; font-size: .85rem; color: #f1e4cc; background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ep-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 0; }
.ep-body { display: grid; gap: 2.5rem; padding: 2.5rem 0 1rem; }
@media (min-width: 64rem) { .ep-body { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; } }
.prose { max-width: var(--text); }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { position: relative; padding: 0 0 0 1.6rem; margin: 0 0 .95rem; }
.facts li::before { content: ""; position: absolute; left: .15rem; top: .62em; width: .48rem; height: .48rem; background: var(--terra); transform: rotate(45deg); }
.names { display: grid; gap: .1rem 1.25rem; margin: 0; }
@media (min-width: 40rem) { .names { grid-template-columns: max-content 1fr; } }
.names dt { font-weight: 700; margin-top: .55rem; }
.names dt small { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-soft); letter-spacing: .02em; }
.names dd { margin: 0 0 .4rem; color: var(--ink-soft); }
@media (min-width: 40rem) { .names dd { margin-top: .55rem; } }
.aside > section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.25rem; margin-bottom: 1.25rem; }
.aside h2 { font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem; }
.chapters { list-style: none; margin: 0; padding: 0; font-size: .97rem; }
.chapters li { display: grid; grid-template-columns: 3.6rem 1fr; gap: .5rem; padding: .32rem 0; border-bottom: 1px solid var(--line); }
.chapters li:last-child { border-bottom: 0; }
.chapters a { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; }
.note-small { font-size: .85rem; color: var(--ink-soft); margin: .8rem 0 0; }
.sources { margin: 0; padding-left: 1.1rem; font-size: .97rem; }
.sources li { margin-bottom: .35rem; }
.credits { padding: 1rem 0 0; max-width: var(--text); }
.credits details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; }
.credits summary { cursor: pointer; padding: 1rem 1.25rem; font-family: var(--display); font-weight: 600; letter-spacing: .06em; }
.credits details > div { padding: 0 1.25rem 1rem; font-size: .92rem; color: var(--ink-soft); }
.credits ol { padding-left: 1.2rem; margin: 0; }
.credits li { margin-bottom: .45rem; overflow-wrap: anywhere; }
.made { border: 1px solid var(--line); border-left: 4px solid var(--terra); background: var(--surface); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin: 1.5rem 0 0; max-width: var(--text); }
.made h2 { font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; }
.made p { margin: 0 0 .6rem; color: var(--ink-soft); font-size: .98rem; }
.made p:last-child { margin: 0; }
.pager { display: grid; gap: 1rem; padding: 2.5rem 0 3.5rem; }
@media (min-width: 48rem) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); background: var(--surface); }
.pager a:hover { border-color: var(--gold); }
.pager small { display: block; font-family: var(--display); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .25rem; }
.pager .next { text-align: right; }

/* ---------- plain pages ---------- */
.page { padding: 3rem 0 4rem; }
.page .prose h2 { margin-top: 2.4rem; }
.page .prose ul { padding-left: 1.2rem; }
.page .prose li { margin-bottom: .4rem; }
.updated { color: var(--ink-soft); font-size: .95rem; }
.notfound { padding: 5rem 0 6rem; text-align: center; }
.notfound .btn-row { justify-content: center; }
.notfound .lede { margin: 0 auto 1.6rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: var(--night-soft); border-top: 1px solid var(--night-line); padding: 3rem 0 2.5rem; font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 1.75rem; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand span { font-size: .95rem; }
.site-footer p { margin: .9rem 0 0; max-width: 24rem; }
.site-footer h2 { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--night-gold); margin-bottom: .7rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: var(--night-ink); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--night-line); padding-top: 1.25rem; font-size: .85rem; margin: 0; max-width: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .band, .site-footer, .player, .ep-actions { display: none; }
}
