@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/ebgaramond.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/ebgaramond-italic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #1c2e3a;
  --ink-deep: #15232d;
  --ink-soft: #4a5a64;
  --paper: #f4ede0;
  --paper-deep: #e9dfcc;
  --paper-dim: #c9c2b4;
  --amber: #e2a23b;
  --amber-light: #ebb663;
  --amber-deep: #c98a26;
  /* Darker than the brand teal #3A7580, which is 4.47:1 on the cream: just under AA for body links. */
  --teal: #2f6670;
  --rule: #d8cbb3;
  --rule-dark: #34495a;
  --focus: var(--ink);
  --measure: 38rem;
  --wide: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
body > .masthead { width: 100%; }
::selection { background: rgba(226, 162, 59, 0.45); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
a:active { color: var(--amber-deep); }
.screening a:active, .footer a:active, .dark-top .masthead a:active, .home .masthead a:active { color: var(--amber); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
h1, h2, h3 { font-weight: 500; line-height: 1.12; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }

/* Dark surfaces: the painting's night, the screening band, the player stage, the footer. */
.screening, .stage, .footer, .dark-top .masthead, .home .masthead { --focus: var(--amber); }

.meta { margin: 0.5rem 0 0; color: var(--ink-soft); font-size: 0.95rem; font-variant-numeric: lining-nums; }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 1.6rem; }

.button {
  display: inline-block; padding: 0.7rem 1.35rem 0.75rem; border-radius: 2px;
  background: var(--amber); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  transition: background-color 120ms ease, transform 120ms ease;
}
.button:hover { background: var(--amber-light); color: var(--ink); }
.button:active { background: var(--amber-deep); transform: translateY(1px); }

.play {
  position: absolute; left: 50%; top: 50%; width: 4.4rem; height: 4.4rem; margin: -2.2rem 0 0 -2.2rem;
  border-radius: 50%; background: rgba(21, 35, 45, 0.8); box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  transition: background-color 140ms ease, transform 140ms ease;
}
.play::after {
  content: ""; position: absolute; left: 1.7rem; top: 1.3rem;
  border-style: solid; border-width: 0.9rem 0 0.9rem 1.4rem; border-color: transparent transparent transparent var(--paper);
}
a:hover > .play { background: var(--amber-deep); transform: scale(1.06); }
a:active > .play { background: var(--amber); transform: scale(0.96); }

/* Masthead: the brand, then the sections of the home page */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--wide); margin: 0 auto; padding: 0.85rem var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; flex: none; color: var(--ink); text-decoration: none; font-size: 1.15rem; font-weight: 500; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 50%; }
.site-nav { display: flex; align-items: center; gap: 0.4rem clamp(1rem, 2.4vw, 1.9rem); font-size: 1.05rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.home .masthead { position: absolute; inset: 0 0 auto 0; z-index: 2; max-width: none; }
.home .brand, .home .site-nav a { color: var(--paper); text-shadow: 0 1px 6px rgba(21, 35, 45, 0.75); }
.home .brand img { box-shadow: 0 1px 8px rgba(21, 35, 45, 0.5); }
.dark-top .masthead {
  max-width: none; background: var(--ink-deep);
  padding-inline: max(var(--gutter), calc((100% - var(--wide)) / 2 + var(--gutter)));
}
.dark-top .brand, .dark-top .site-nav a { color: var(--paper); }
.home .brand:hover, .dark-top .brand:hover { color: var(--paper); }
.home .brand:hover span, .dark-top .brand:hover span { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.home .site-nav a:hover, .dark-top .site-nav a:hover { color: var(--amber-light); }
/* Phones: the name and four links cannot share one line, so the name drops and the avatar alone leads home. */
@media (max-width: 560px) {
  .masthead { padding-block: 0.6rem; gap: 0.75rem; }
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .brand img { width: 32px; height: 32px; }
  .site-nav { gap: 0 1.05rem; font-size: 1rem; }
}
@media (max-width: 360px) {
  .masthead { gap: 0.6rem; }
  .site-nav { gap: 0 0.75rem; font-size: 0.92rem; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Hero: the banner painting; the name sits on its plain cream wall */
.hero { position: relative; overflow: hidden; background: var(--ink-deep); }
.hero-art { width: 100%; height: min(72vh, 56vw); min-height: 24rem; object-fit: cover; object-position: 40% 50%; }
.hero-text { position: absolute; left: 6%; top: 59%; transform: translateY(-50%); width: 44%; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 5.6rem); letter-spacing: -0.012em; color: var(--ink); white-space: nowrap; }
.tagline { margin: 0.35em 0 0; font-style: italic; font-size: clamp(1.15rem, 2vw, 2.1rem); line-height: 1.25; color: var(--ink); }

/* Phones: the wall is too narrow for the name, so the name becomes a title card under the painting. */
@media (max-width: 760px) {
  .hero-art { height: auto; min-height: 0; aspect-ratio: 16 / 10; object-position: 72% 50%; }
  .hero-text { position: static; transform: none; width: auto; padding: 1.5rem var(--gutter) 0.6rem; }
  .hero h1 { color: var(--paper); font-size: clamp(2.5rem, 11vw, 3.2rem); }
  .tagline { color: var(--paper-dim); font-size: 1.3rem; }
}

/* Newest episode, on the painting's night */
.screening { background: var(--ink-deep); color: var(--paper); }
.hero + .screening { margin-top: -1px; padding-top: 1px; }
.screening-inner { max-width: var(--wide); margin: 0 auto; padding: clamp(1.4rem, 4vw, 3rem) var(--gutter) clamp(3rem, 7vw, 5rem); }
.deck { max-width: 36rem; margin: 0 0 clamp(1.6rem, 4vw, 2.6rem); color: var(--paper-dim); font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem); line-height: 1.45; }
.latest { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1.5rem, 3.5vw, 3rem); align-items: center; }
.latest-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7); }
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 140ms ease; }
.latest-thumb:active img { opacity: 0.85; }
.latest h2 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
.latest h2 a { color: var(--paper); text-decoration: none; }
.latest h2 a:hover { color: var(--paper); text-decoration: underline; text-decoration-thickness: 1px; }
.screening .meta { color: var(--paper-dim); }
.lede { margin: 1rem 0 1.6rem; color: var(--paper-dim); }
.screening-empty { margin: 0; }
@media (max-width: 1000px) {
  .latest { grid-template-columns: 1fr; gap: 1.4rem; }
  .latest-text { max-width: var(--measure); }
}
@media (max-width: 760px) {
  .screening-inner { padding-top: 0.9rem; }
  .deck { font-size: 1.1rem; }
  .latest-thumb { margin: 0 calc(-1 * var(--gutter)); }
}

/* Earlier episodes */
.episodes { max-width: var(--wide); margin: 0 auto; padding: clamp(2.8rem, 6vw, 4.5rem) var(--gutter) clamp(2.5rem, 5vw, 3.5rem); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 2.4rem 1.75rem; }
.card { display: block; color: var(--ink); text-decoration: none; }
.card:hover { color: var(--ink); }
.card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-deep); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 140ms ease; }
.card:hover .card-thumb img { transform: scale(1.025); }
.card:active .card-thumb img { opacity: 0.82; }
.card-title { display: block; margin-top: 0.85rem; font-size: 1.3rem; line-height: 1.22; font-weight: 500; text-wrap: balance; }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.card-date { display: block; margin-top: 0.35rem; }

/* About */
.about {
  max-width: var(--wide); margin: 0 auto; padding: clamp(2.5rem, 5vw, 3.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
  display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2.4fr); gap: 0 clamp(1.5rem, 5vw, 4rem);
}
.episodes + .about { border-top: 1px solid var(--rule); }
.about-body p { max-width: var(--measure); margin: 0 0 1rem; }
.about-lead { font-size: clamp(1.4rem, 2.3vw, 1.8rem); line-height: 1.3; font-style: italic; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .episodes + .about { border-top: 0; padding-top: 0.5rem; }
  .about .section-title { margin-bottom: 1rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
}

/* Episode page: the player on a dark stage, the reading column on cream */
.stage { background: var(--ink-deep); padding: 0 0 clamp(0rem, 3vw, 2.5rem); }
.player { position: relative; max-width: 64rem; margin: 0 auto; aspect-ratio: 16 / 9; background: #000; }
.player-facade { position: relative; display: block; width: 100%; height: 100%; }
.player-facade img { width: 100%; height: 100%; object-fit: cover; transition: opacity 140ms ease; }
.player-facade:active img { opacity: 0.85; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (min-width: 761px) { .stage { padding: 1.5rem var(--gutter) 2.5rem; } }

.reading { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(1.8rem, 5vw, 3rem) var(--gutter) clamp(3.5rem, 8vw, 6rem); }
.episode-head { margin-bottom: 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--rule); }
.episode h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -0.01em; }
.episode-head .meta { margin-top: 0.8rem; }

.prose { overflow-wrap: anywhere; line-height: 1.62; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: clamp(1.55rem, 2.6vw, 1.9rem); margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.3rem; font-weight: 600; margin: 1.9em 0 0.5em; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.prose li { margin: 0 0 0.45em; padding-left: 0.2em; }
.prose li::marker { color: var(--amber-deep); }
.prose blockquote { margin: 1.8em 0; padding: 0 0 0 1.2em; border-left: 1px solid var(--ink-soft); font-style: italic; font-size: 1.12em; line-height: 1.5; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; height: 1px; width: 5rem; margin: 2.6em auto; background: var(--rule); }
.prose img, .prose figure { margin: 2em 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: 0.6em; color: var(--ink-soft); font-size: 0.92rem; }
.prose strong { font-weight: 600; }
.prose code { font-size: 0.88em; }

.episode-foot { margin: 2.6rem 0 0; padding-top: 1.3rem; border-top: 1px solid var(--rule); }

/* 404 */
.missing { max-width: var(--measure); margin: 0 auto; padding: clamp(3rem, 10vw, 7rem) var(--gutter); }
.missing h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.missing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; }

/* Footer */
.footer { background: var(--ink-deep); color: var(--paper); }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: clamp(2.8rem, 6vw, 4rem) var(--gutter) 1.6rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 2.2rem 3rem; }
.footer-mark { display: flex; align-items: center; gap: 0.9rem; margin: 0; font-size: 1.3rem; font-weight: 500; line-height: 1.2; }
.footer-mark img { border-radius: 50%; flex: none; }
.footer-mark em { display: block; margin-top: 0.2rem; font-weight: 400; font-size: 1rem; color: var(--paper-dim); }
.footer-cols { display: flex; gap: clamp(3rem, 8vw, 6rem); }
.footer-label { margin: 0 0 0.7rem; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); font-variant-numeric: lining-nums; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 0.35rem; }
.footer a { color: var(--paper); text-decoration: none; }
.footer a:hover { color: var(--amber-light); text-decoration: underline; text-decoration-thickness: 1px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 2rem;
  margin-top: clamp(2.2rem, 5vw, 3.2rem); padding-top: 1.2rem; border-top: 1px solid var(--rule-dark);
  font-size: 0.92rem; color: var(--paper-dim);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--paper-dim); }
@media (max-width: 560px) {
  .footer-bottom { flex-direction: column-reverse; }
}

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

/* Newsletter signup: Substack's own form in an iframe, since Substack refuses form posts from other sites */
.subscribe { max-width: var(--wide); margin: 0 auto; padding: clamp(2.5rem, 5vw, 3.5rem) var(--gutter) 0; }
.reading .subscribe { max-width: none; margin: 2.6rem 0 0; padding: 1.6rem 0 0; border-top: 1px solid var(--rule); }
.subscribe-title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.subscribe-note { margin: 0.4rem 0 1rem; color: var(--ink-soft); }
.subscribe-form { display: block; width: 100%; max-width: 22rem; height: 150px; border: 0; background: transparent; color-scheme: light; }
.subscribe-alt { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }
