/* ============================================================
   JT · Father's Day Essay — bespoke contributor article styles
   Warm editorial print, magazine long-read. Self-contained.

   v3 — DEPTH + DENSITY pass:
   · every section is a toned, film-grain-textured PANEL (no raw
     white voids; the page reads as distinct "pages")
   · empty side gutters filled by a magazine MARGIN RAIL —
     oversized ghosted folio numerals + section labels
   · longer passages run TWO-COLUMN so type fills the measure
   · wider container, tighter vertical padding (less cavernous)
   Brand canon: cream paper, ink, terracotta, Cormorant/Fraunces.
   Shared by all 8 language editions.
   ============================================================ */

:root {
  --paper:       #FAF8F2;
  --paper-warm:  #F1E9DA;
  --paper-deep:  #E9DEC9;
  --espresso:    #16120D;
  --ink:         #1A1612;
  --ink-2:       #3A352D;
  --ink-3:       #786D5D;
  --ink-4:       #B6AA97;
  --rule:        rgba(26, 22, 18, 0.16);
  --terracotta:  #A0522D;
  --terracotta-2:#8B4423;
  --coral:       #C76B5B;
  --gold:        #B98A36;

  --display: "Cormorant Garamond", "Newsreader", "EB Garamond", Georgia, serif;
  --italic:  "Fraunces", "Cormorant Garamond", Georgia, serif;
  --body:    "DM Sans", "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* film grain — multiplied over each panel for depth */
  --grain: 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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper-warm);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.215rem;
  line-height: 1.74;
  font-weight: 350;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- scroll progress ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--terracotta); z-index: 60; transition: width 90ms linear;
}

/* ---------- masthead ---------- */
.mast {
  position: relative; z-index: 2;
  background: var(--espresso); color: #E9E0D2;
  padding: 1.05rem clamp(1.25rem, 5vw, 3rem);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase;
}
.mast a { text-decoration: none; }
.mast .edition b { color: var(--coral); font-weight: 500; }
.mast .issue { color: #9A8C79; }
@media (max-width: 540px) { .mast .issue { display: none; } }

/* ============================================================
   PANELS — every section sits on a toned, textured band
   ============================================================ */
.band { position: relative; width: 100%; overflow: hidden; }
.band::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--grain); background-size: 200px 200px;
  opacity: 0.14; mix-blend-mode: multiply; pointer-events: none;
}
.band--ink::before, .band--terra::before { opacity: 0.10; mix-blend-mode: overlay; }
.band > * { position: relative; z-index: 1; }

.band--paper { background: var(--paper); }
.band--warm  { background: var(--paper-warm); }
.band--deep  { background: var(--paper-deep); }
.band--ink   { background: var(--espresso); color: #E4DACA; }
.band--terra { background: var(--terracotta); color: #FBF3EC; }

/* subtle warm light wash for depth on light panels */
.band--paper::after, .band--warm::after, .band--deep::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(110% 80% at 88% -8%, rgba(160,82,45,0.10), transparent 52%),
    radial-gradient(90% 70% at 6% 108%, rgba(120,90,60,0.07), transparent 55%);
}

.band-inner {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 3.8rem) clamp(1.25rem, 5vw, 2.5rem);
}

/* ---------- header / title page ---------- */
.title-band .band-inner { text-align: center; padding-block: clamp(3.2rem, 7vw, 5.5rem); }
.title-band .big-bg {
  position: absolute; z-index: 0; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(16rem, 42vw, 46rem); line-height: 0.8;
  color: rgba(160, 82, 45, 0.05); letter-spacing: -0.04em;
  white-space: nowrap; user-select: none;
}
.kicker {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.34em;
  text-transform: uppercase; color: var(--terracotta); margin: 0 0 1.5rem;
}
h1.title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.7rem, 7.2vw, 5.6rem);
  line-height: 1.0; letter-spacing: -0.014em;
  margin: 0; color: var(--ink); text-wrap: balance;
}
.title-band .deck {
  font-family: var(--italic); font-style: italic; font-weight: 300;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.42;
  color: var(--ink-2); max-width: 33rem; margin: 1.6rem auto 0; text-wrap: pretty;
}

/* ---------- byline ---------- */
.byline { display: flex; align-items: center; justify-content: center; gap: 0.95rem; margin-top: 2.1rem; text-align: left; }
.byline-portrait {
  position: relative; width: 52px; height: 52px; flex: none;
  border-radius: 50%; overflow: hidden; background: var(--paper-deep); box-shadow: 0 0 0 1px var(--rule);
}
.byline-portrait::after {
  content: "JT"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--terracotta);
}
.byline-portrait img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.byline-meta { font-size: 0.95rem; line-height: 1.35; }
.byline-meta .by { color: var(--ink-3); font-size: 0.8rem; }
.byline-meta a.author {
  font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 160ms ease;
}
.byline-meta a.author:hover { border-color: var(--terracotta); }
.byline-meta .meta {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 0.25rem;
}
.byline-meta .meta .dot { color: var(--ink-4); margin: 0 0.5em; }

/* ============================================================
   MOVEMENT — margin rail (folio + label) + body
   ============================================================ */
.mvmt .band-inner {
  display: grid;
  grid-template-columns: minmax(7rem, 13rem) 1fr;
  gap: clamp(1.8rem, 5vw, 4.5rem);
  align-items: start;
}
.mvmt-rail { position: sticky; top: 84px; }
.folio {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(4.5rem, 9vw, 8.5rem); line-height: 0.78;
  color: rgba(160, 82, 45, 0.18); letter-spacing: -0.02em; display: block;
}
.band--ink .folio { color: rgba(199, 107, 91, 0.28); }
.rail-label {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-3);
  margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); max-width: 11rem;
}
.band--ink .rail-label { color: #9A8C79; border-color: rgba(255,255,255,0.16); }
.mvmt-body { max-width: 64ch; }
.mvmt-body.twocol { max-width: none; columns: 2; column-gap: clamp(1.8rem, 4vw, 3.2rem); }
.mvmt-body.twocol > p { break-inside: avoid; }
.mvmt-body > *:last-child { margin-bottom: 0; }

@media (max-width: 880px) {
  .mvmt .band-inner { grid-template-columns: 1fr; gap: 0.4rem; }
  .mvmt-rail { position: static; display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem; }
  .folio { font-size: 3rem; }
  .rail-label { margin: 0; padding: 0; border-top: none; }
  .mvmt-body.twocol { columns: 1; }
}

/* ---------- body copy ---------- */
.band p { margin: 0 0 1.4rem; text-wrap: pretty; }
.lead {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.85rem, 3.4vw, 2.7rem); line-height: 1.16; letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 1.6rem;
}
.band--ink .lead { color: #F3EADB; }
p.dropcap::first-letter {
  font-family: var(--display); font-weight: 600; float: left;
  font-size: 4.8rem; line-height: 0.76; padding: 0.4rem 0.58rem 0 0; color: var(--terracotta);
}

/* in-flow statement pull */
.pull { margin: clamp(1.8rem, 4vw, 2.8rem) 0; }
.pull p {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; color: var(--ink); margin: 0 0 0.4rem;
  text-wrap: balance;
}
.pull p + p { color: var(--terracotta-2); }

/* ---------- full-bleed figures ---------- */
figure.fullfig { margin: 0; background: var(--paper-deep); position: relative; }
figure.fullfig::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--grain); background-size: 180px 180px; opacity: 0.06; mix-blend-mode: multiply; pointer-events: none;
}
figure.fullfig img { width: 100%; height: clamp(300px, 60vh, 680px); object-fit: cover; position: relative; z-index: 1; }
figure.fullfig figcaption {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; padding: 0.85rem 1.25rem 1.1rem;
}
figcaption .fig { color: var(--terracotta); }

/* ---------- quote band ---------- */
.quoteband { text-align: center; }
.quoteband .band-inner { padding-block: clamp(3.4rem, 9vw, 6.5rem); }
.quoteband .bigmark {
  position: absolute; z-index: 0; top: -2rem; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-size: clamp(14rem, 34vw, 32rem); line-height: 1;
  color: rgba(255, 243, 236, 0.12); pointer-events: none; user-select: none;
}
.quoteband blockquote {
  position: relative; z-index: 1; margin: 0 auto; max-width: 22ch;
  font-family: var(--italic); font-style: italic; font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.14; letter-spacing: -0.01em; text-wrap: balance;
}

/* ---------- program (AM/PM) ---------- */
.program .band-inner { padding-block: clamp(2.6rem, 5vw, 4rem); }
.program-h {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--terracotta); text-align: center; margin: 0 0 2rem;
}
.program-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 5rem);
  max-width: 760px; margin: 0 auto;
}
.prog-col h4 {
  font-family: var(--display); font-weight: 500; font-size: 1.5rem; margin: 0 0 1rem;
  padding-bottom: 0.55rem; border-bottom: 1px solid var(--rule); color: var(--ink-2);
}
.prog-step { display: flex; align-items: baseline; gap: 0.9rem; padding: 0.5rem 0; }
.prog-step .n { font-family: var(--display); font-style: italic; font-size: 1.7rem; color: var(--terracotta); line-height: 1; flex: none; width: 1.4em; }
.prog-step .t { font-family: var(--display); font-size: 1.4rem; color: var(--ink); line-height: 1.2; }
@media (max-width: 600px) { .program-grid { grid-template-columns: 1fr; gap: 1.4rem; } }

/* ---------- dark interstitial ---------- */
.dark .band-inner {
  display: grid; grid-template-columns: minmax(7rem, 13rem) 1fr; gap: clamp(1.8rem, 5vw, 4.5rem);
  align-items: start; padding-block: clamp(3.2rem, 7vw, 5.5rem);
}
.dark .dark-body { max-width: 64ch; }
.dark p { color: #CFC4B3; }
.dark-aside {
  font-family: var(--italic); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.28; color: #F3EADB !important; margin: 1.8rem 0; padding-left: 1.3rem; border-left: 2px solid var(--coral);
}
.dark figure { margin: 2.2rem 0 0; }
.dark figure img { width: 100%; height: clamp(220px, 34vh, 360px); object-fit: cover; }
.dark figcaption { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8E8170; margin-top: 0.7rem; }
@media (max-width: 880px) {
  .dark .band-inner { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- split (text + tall image) ---------- */
.split .band-inner {
  display: grid; grid-template-columns: 1fr 0.82fr; gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center;
}
.split .inset { aspect-ratio: 4 / 5; overflow: hidden; box-shadow: 0 20px 50px -36px rgba(26,22,18,0.6); }
.split .inset img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .split .band-inner { grid-template-columns: 1fr; }
  .split .inset { aspect-ratio: 16 / 10; }
}

/* ---------- closing ---------- */
.closing { text-align: center; }
.closing .band-inner { padding-block: clamp(3.5rem, 9vw, 7rem); }
.closing .bigword {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(4rem, 16vw, 11rem); line-height: 0.85; letter-spacing: -0.02em;
  color: var(--coral); margin: 0;
}
.closing .pre { font-family: var(--italic); font-style: italic; font-size: 1.25rem; color: #C9BEAD; margin: 0 auto 1.5rem; max-width: 30ch; }

/* ---------- author card ---------- */
.author-card .band-inner { display: flex; gap: 1.3rem; align-items: center; max-width: 64ch; padding-block: clamp(1.9rem, 4vw, 2.6rem); }
.author-card .byline-portrait { width: 68px; height: 68px; }
.author-card .byline-portrait::after { font-size: 1.5rem; }
.author-card .ac-name { font-family: var(--display); font-size: 1.55rem; font-weight: 600; margin: 0; }
.author-card .ac-role { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin: 0.3rem 0 0.7rem; }
.author-card a.ac-link { font-size: 0.9rem; color: var(--terracotta); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.author-card a.ac-link:hover { border-color: var(--terracotta); }

/* ---------- footer ---------- */
.foot .band-inner { max-width: 64ch; text-align: center; }
.foot .fmark { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.foot .fmark b { color: var(--terracotta); }
.foot .flinks {
  margin: 1.1rem 0 1.3rem; display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.foot .flinks a { color: var(--ink-2); text-decoration: none; }
.foot .flinks a:hover { color: var(--terracotta); }
.foot .fcopy { font-size: 0.8rem; color: var(--ink-3); }

/* ---------- reveal (gated behind .js → no-JS safe) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 760ms cubic-bezier(0.2,0.7,0.2,1), transform 760ms cubic-bezier(0.2,0.7,0.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
