/* Inner pages (essays, films, casting). Same palette and type as the home page,
   kept separate so these pages don't load the home page's motion system. */
:root {
  --ivory: #F4EFE7; --ivory-deep: #E9E1D5;
  --wine: #5E1626; --wine-deep: #2A0A12; --wine-soft: #8A2338;
  --black: #0F0C0C; --black-raise: #1B1516;
  --gold: #CBB68C; --gold-dim: #A08E6E;
  --ink: #1A1012; --ink-soft: #5A4A4C;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tight: "Inter Tight", "Inter", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --wrap: 1240px; --gutter: clamp(16px, 4vw, 44px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--wine); color: var(--ivory); }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 720px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--wine); color: var(--ivory); padding: 10px 14px; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 50; background: rgba(42, 10, 18, .96); color: var(--ivory); border-bottom: 1px solid rgba(203, 182, 140, .18); }
.bar-in { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 12px/1 var(--tight); letter-spacing: .26em; text-transform: uppercase; }
.mark span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--gold); border-radius: 50%; font: 500 16px/1 var(--serif); letter-spacing: 0; color: var(--gold); }
.bar nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.bar nav a { text-decoration: none; font: 500 12px/1 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: rgba(244, 239, 231, .78); padding: 6px 0; border-bottom: 1px solid transparent; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--ivory); border-color: var(--gold); }

/* ---------- shared type ---------- */
.tag { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font: 500 12px/1 var(--tight); letter-spacing: .26em; text-transform: uppercase; color: var(--wine-soft); }
.tag::before { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .6; }
.on-dark .tag { color: var(--gold); }
.display { margin: 0 0 24px; font: 800 clamp(40px, 6.4vw, 84px)/.95 var(--tight); letter-spacing: -.02em; text-transform: uppercase; color: var(--wine); }
.on-dark .display { color: var(--ivory); }
.lede { max-width: 46ch; margin: 0; font-size: 18px; color: var(--ink-soft); }
.on-dark .lede { color: rgba(244, 239, 231, .75); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border: 1px solid currentColor; border-radius: 2px; text-decoration: none; font: 600 12px/1 var(--tight); letter-spacing: .16em; text-transform: uppercase; transition: background .2s, color .2s; }
.btn:hover { background: var(--wine); border-color: var(--wine); color: var(--ivory); }
.on-dark .btn:hover { background: var(--ivory); border-color: var(--ivory); color: var(--wine-deep); }

section { position: relative; }
.pad { padding: clamp(70px, 10vw, 130px) 0; }
.dark { background: var(--black); color: rgba(244, 239, 231, .72); }
.wine { background: var(--wine-deep); color: rgba(244, 239, 231, .75); }

/* ---------- essays index ---------- */
.page-head { padding: clamp(70px, 10vw, 120px) 0 clamp(40px, 6vw, 70px); }
.essay-grid { list-style: none; margin: 0; padding: 0 0 clamp(80px, 10vw, 130px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 44px) clamp(18px, 2.4vw, 32px); }
.essay-card a { display: block; text-decoration: none; }
.essay-card .thumb { aspect-ratio: 3 / 2; overflow: hidden; border-radius: 2px; background: var(--ivory-deep); }
.essay-card .thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); transition: scale .8s cubic-bezier(.16, 1, .3, 1); }
.essay-card a:hover .thumb img { scale: 1.04; }
.essay-card .thumb.blank { display: grid; place-items: center; background: var(--wine-deep); color: var(--gold); font: 500 40px/1 var(--serif); }
.essay-card time { display: block; margin: 16px 0 8px; font: 500 11px/1 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dim); }
.essay-card h2 { margin: 0 0 8px; font: 600 25px/1.15 var(--serif); color: var(--wine); }
.essay-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- single essay ---------- */
.essay-head { padding: clamp(70px, 10vw, 120px) 0 36px; }
.essay-head h1 { margin: 0 0 20px; font: 600 clamp(36px, 5.2vw, 62px)/1.06 var(--serif); color: var(--wine); }
.essay-meta { font: 500 12px/1 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dim); }
.essay-hero { width: min(100% - 2 * var(--gutter), 1000px); margin: 0 auto 50px; }
.essay-hero img { width: 100%; max-height: 620px; object-fit: cover; border-radius: 2px; }
.prose { font: 400 19px/1.8 var(--sans); color: #2B1D20; padding-bottom: 40px; }
.prose > * { margin: 0 0 1.3em; }
.prose h2, .prose h3, .prose h4 { margin: 2em 0 .6em; font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--wine); }
.prose h2 { font-size: 34px; } .prose h3 { font-size: 28px; } .prose h4 { font-size: 23px; }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--gold); font: italic 500 24px/1.45 var(--serif); color: var(--wine); }
.prose blockquote p { margin: 0 0 .6em; } .prose blockquote p:last-child { margin: 0; }
.prose figure { margin: 2em 0; } .prose figure img { width: 100%; border-radius: 2px; }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-soft); text-align: center; }
.prose hr { border: 0; height: 1px; margin: 2.4em auto; width: 120px; background: var(--gold); }
.prose a { color: var(--wine); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose mark { background: rgba(203, 182, 140, .35); color: inherit; }
.essay-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 30px 0 clamp(80px, 10vw, 120px); border-top: 1px solid rgba(94, 22, 38, .15); }
.essay-nav a { text-decoration: none; }
.essay-nav small { display: block; margin-bottom: 6px; font: 500 11px/1 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dim); }
.essay-nav b { font: 600 21px/1.2 var(--serif); color: var(--wine); }
.essay-nav .next { text-align: right; }

/* ---------- film page ---------- */
.film-hero { display: grid; grid-template-columns: .8fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.film-hero .poster img { width: 100%; border-radius: 2px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.credits { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px 40px; margin: 30px 0; padding: 22px 0; border-block: 1px solid rgba(203, 182, 140, .2); }
.credits dt { font: 500 11px/1 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.credits dd { margin: 0; font: 500 20px/1.2 var(--serif); color: var(--ivory); }
.screen { position: relative; background: #000; border-radius: 2px; overflow: hidden; }
.screen video { display: block; width: 100%; height: auto; }
.screen-cap { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; font: 500 11px/1.3 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.story p { margin: 0 0 1.2em; font-size: 18px; }
.logline { margin: 0; font: italic 500 clamp(26px, 3vw, 36px)/1.3 var(--serif); color: var(--ivory); }
.crew { columns: 2; column-gap: 40px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.crew li { break-inside: avoid; padding: 9px 0; border-bottom: 1px solid rgba(203, 182, 140, .14); }
.crew span { display: block; font: 500 10px/1 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.bts { display: grid; grid-template-columns: 340px 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.bts .screen { aspect-ratio: 9 / 16; }
.bts .screen video { height: 100%; object-fit: cover; }
.person { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.person img { width: 100%; border-radius: 2px; }
/* logo is trimmed to its artwork with a transparent background, so it sits fully inside the plate with even padding */
.mediculus-logo { display: block; box-sizing: border-box; width: 200px; height: 200px; margin-bottom: 28px; padding: 24px; background: var(--ivory); border-radius: 2px; object-fit: contain; }

/* ---------- photo grids + lightbox ---------- */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.photo-grid button { display: block; width: 100%; padding: 0; border: 0; background: var(--black-raise); aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2px; cursor: zoom-in; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: scale .7s cubic-bezier(.16, 1, .3, 1); }
.photo-grid button:hover img, .photo-grid button:focus-visible img { scale: 1.04; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 60px 16px 24px; background: rgba(10, 6, 7, .96); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); margin: 0 auto; object-fit: contain; }
.lightbox p { grid-column: 1 / -1; margin: 12px 0 0; text-align: center; font: 500 11px/1 var(--tight); letter-spacing: .2em; color: var(--gold); }
.lb-btn { width: 48px; height: 48px; border: 1px solid rgba(203, 182, 140, .4); border-radius: 50%; background: none; color: var(--ivory); font-size: 24px; cursor: pointer; }
.lb-close { position: absolute; top: 14px; right: 16px; }

/* ---------- footer ---------- */
.foot { padding: 50px 0 40px; background: var(--wine-deep); color: rgba(244, 239, 231, .7); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot a { color: var(--gold); text-decoration: none; }

@media (max-width: 1000px) {
  .essay-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .film-hero, .two-col, .bts, .person { grid-template-columns: 1fr; }
  .film-hero .poster { max-width: 420px; }
  .bts .screen { max-width: 340px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar-in { flex-wrap: wrap; padding: 10px 0; gap: 10px; }
  .bar nav { margin-left: 0; gap: 4px 16px; }
  .bar nav a { font-size: 11px; letter-spacing: .14em; }
  .essay-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .prose { font-size: 17.5px; }
  .prose blockquote { font-size: 21px; padding-left: 18px; }
  .credits { grid-template-columns: 1fr 1fr; }
  .crew { columns: 1; }
  .essay-nav { grid-template-columns: 1fr; }
  .essay-nav .next { text-align: left; }
  .lightbox { grid-template-columns: 1fr; padding: 60px 10px 90px; }
  .lb-prev, .lb-next { position: absolute; bottom: 24px; }
  .lb-prev { left: 24px; } .lb-next { right: 24px; }
}

/* WordPress used tiny decorative images as section dividers; keep them at their own size instead of stretching to the column */
.prose img.ornament { width: auto; max-width: 48px; margin: 0 auto; border-radius: 0; }
.prose figure:has(> img.ornament) { margin: 1.6em 0; }

/* ---------- essays search ---------- */
.essay-search { display: block; max-width: 460px; margin-top: 34px; }
.essay-search span { display: block; margin-bottom: 10px; font: 500 11px/1 var(--tight); letter-spacing: .2em; text-transform: uppercase; color: var(--wine-soft); }
.essay-search input { width: 100%; padding: 14px 16px; border: 1px solid rgba(94, 22, 38, .25); border-radius: 2px; background: #fff; font: 400 16px/1.3 var(--sans); color: var(--ink); }
.essay-search input:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(94, 22, 38, .12); }
.essay-count { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); }
.essay-card[hidden] { display: none; }
.essay-empty { padding: 0 0 80px; font: italic 500 24px/1.3 var(--serif); color: var(--wine); }

/* ---------- reading progress (essays) ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: var(--gold); transform: scaleX(0); transform-origin: left; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .read-progress { display: none; } }

/* on the wine section the logo is ivory and plate-less so it blends with the background */
.mediculus-logo.on-wine { background: none; padding: 0; width: 170px; height: auto; }
