/* =============================================================================
   Hopelessly Romantic Films — site stylesheet
   -----------------------------------------------------------------------------
   THE single home for every cross-page element. A page's own stylesheet
   (page-*.css) holds ONLY that page's genuinely unique sections. If a second
   page needs something in here, it reuses these class names verbatim — never a
   re-skinned copy under new names.

   Every value below was measured off the mockups with mockup_probe.py; see
   notes/design-system.md and notes/spec-*.md for the evidence.

   Layout system (confirmed independently by the About, Blog, Portfolio and
   Services specs — one system for the whole site, never a per-page decision):
     outer container   1280px   (x161…x1441 on the 1602 design frame)
     content container 1168px   (x217…x1385) = 1280 − 2×56
     inner padding       56px
     header + marquee are FULL-BLEED with 56px side padding, not the 1280 box
   ============================================================================= */

/* ---------------------------------------------------------------- tokens --- */
:root {
  /* palette — every value sampled from the mockups, not eyeballed */
  --cream:          #F7F4EF;
  --burgundy:       #5B0D1A;
  --brown:          #2E2118;
  --tan:            #D8C2A8;
  --body:           #7A6A5F;   /* body copy on cream, nav links */
  --body-on-dark:   #928A83;   /* = cream @50% over --brown */
  --body-on-burg:   #D8C6C4;   /* = cream @80% over --burgundy */
  --cream-alt:      #F2EFEA;   /* the second, very slightly darker cream (Services bands 2 & 5) */
  --rule-light:     #E4D8D5;   /* marquee hairlines on cream */
  --rule-dark:      #3C3027;   /* footer hairline */
  --social-border:  #4B4037;   /* = cream @14.5% over --brown */
  --legal:          #60564E;

  /* Type — POSITIVE IDENTIFICATIONS, not approximations. See notes/typography.md.
     Young Serif was found by screening all 816 Google serif/display families on the display
     face's topological signature (single-storey `a` + BINOCULAR `g`), then confirmed by stem
     width at 88px: T 14/14, L 14/14, a 11,12/11,12, n 13,12/13,12 — four glyphs exact.
     Great Vibes won a 357-family handwriting screen by shape IoU 0.459 vs 0.198 runner-up.
     Jost is the best of 717 sans families on word-start position vectors (0.147 RMS%).
     Young Serif and Great Vibes ship ONE weight (400) each — never synthesise bold. */
  --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --font-body:    'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --font-script:  'Great Vibes', 'Snell Roundhand', cursive;

  /* layout */
  --container:  1280px;
  --content:    1168px;
  --pad:          56px;
  --frame:      1602px;   /* the design frame width, for reference */

  /* rhythm */
  --sp-1:  8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
  --sp-8: 128px;
}

/* ------------------------------------------------------------------ base --- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;                 /* measured: Jost 300 at exactly 14.0px, x-height 6.5 */
  line-height: 27px;               /* 1.93 — unusually loose, but measured across many paragraphs */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--brown);
  font-weight: 400;                /* Young Serif has ONE weight — never synthesise bold */
  letter-spacing: 0;
}

p { margin: 0 0 27px; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

ul { margin: 0; padding: 0; list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* full-bleed band with the content column inside it */
.band { width: 100%; }
.band--cream    { background: var(--cream); }
.band--cream-alt{ background: var(--cream-alt); }
.band--burgundy { background: var(--burgundy); color: var(--body-on-burg); }
.band--brown    { background: var(--brown);    color: var(--body-on-dark); }
.band--burgundy h1, .band--burgundy h2, .band--burgundy h3,
.band--brown    h1, .band--brown    h2, .band--brown    h3 { color: var(--cream); }

/* ------------------------------------------------------------ typography --- */
/* Sizes are the measured desktop values; clamp() gives a mobile floor while
   keeping the desktop rendering EXACTLY as measured at >=1602px. */
/* Line-heights are RATIOS, not fixed px. A fixed 92px leading against a clamp()ed font-size is
   correct at >=1602px and absurd below it — a 44px heading on a 92px line. Each ratio reproduces
   the measured pitch exactly at full size (88x1.0455=92, 68x1.0588=72, 50x1.22=61, 44x1.1818=52)
   and scales sanely down. */
.t-display-xl { font-size: clamp(44px, 5.5vw, 88px); line-height: 1.0455; letter-spacing: -.01em; }
.t-display-l  { font-size: clamp(38px, 4.3vw, 68px); line-height: 1.0588; letter-spacing: -.02em; }
.t-display-m  { font-size: clamp(30px, 3.1vw, 50px); line-height: 1.22; }
.t-display-s  { font-size: clamp(26px, 2.7vw, 44px); line-height: 1.1818; }

.t-script {
  font-family: var(--font-script);
  font-size: clamp(22px, 1.9vw, 30px);
  line-height: 1.3;
  color: var(--burgundy);
  font-weight: 400;
}
/* On the dark bands the script accent is tan, not burgundy (burgundy on burgundy would vanish). */
.band--brown .t-script,
.band--burgundy .t-script { color: var(--tan); }

/* Intermediate display steps, for pages whose measured cap heights land between the main
   four. typography.md finds no true h3 tier in the display face — below .t-display-s the
   next step down is an uppercase Jost micro-label. */
.t-display-ml { font-size: clamp(34px, 3.4vw, 51px); line-height: 1.03; }
.t-display-sm { font-size: clamp(20px, 1.6vw, 23px); line-height: 1.22; }

/* uppercase micro-labels: eyebrows, nav, buttons, marquee, small links */
.t-caps {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 400;
}
.t-caps-xs { font-size: 8px; letter-spacing: .24em; text-transform: uppercase; }

.t-body-s { font-size: 12px; line-height: 22px; }

.eyebrow {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--body);
  font-weight: 400;
  margin: 0 0 var(--sp-3);
}
.band--burgundy .eyebrow, .band--brown .eyebrow { color: var(--tan); }

/* short rule that sits under a section eyebrow */
.eyebrow-rule {
  width: 32px; height: 1px; border: 0; margin: var(--sp-2) 0 0;
  background: var(--burgundy);
}

/* --------------------------------------------------------------- buttons --- */
/* Measured: 163x36, radius 0, fill #5B0D1A, label 11px cream, ~24px h-padding.
   Radius 0 was verified with `radius` (constant 0 inset over 14 rows) — these
   are hard-cornered rectangles, NOT pills. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--solid   { background: var(--burgundy); color: var(--cream); }
.btn--solid:hover  { background: #470a14; }
.btn--cream   { background: var(--cream); color: var(--burgundy); }
.btn--cream:hover  { background: #fff; }
.btn--outline { background: transparent; color: var(--cream); border: 1px solid rgba(247,244,239,.7); }
.btn--outline:hover { background: rgba(247,244,239,.12); border-color: var(--cream); }
/* Hero-scale button — measured 183x43 (Services hero) and 284x44 (About hero). */
.btn--lg { min-height: 44px; padding: 0 30px; letter-spacing: .18em; }

/* inline arrow link — "WATCH THE FILMS ->" / "CHECK YOUR DATE ->" */
.arrowlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.2;            /* explicit: body's 27px strut would make this 33px tall */
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--burgundy);
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
}
/* the underline is a 25%-opacity burgundy on some pages (measured #D0BABA on cream) */
.arrowlink--muted { border-bottom-color: rgba(91, 13, 26, .25); }
/* dark-brown variant (About) rather than burgundy */
.arrowlink--dark  { color: var(--brown); border-bottom-color: #998D83; }
.arrowlink svg    { width: 11px; height: 11px; }
.arrowlink svg { width: 11px; height: 11px; flex: none; }
.band--burgundy .arrowlink, .band--brown .arrowlink { color: var(--cream); }

/* underlined text link — "READ MORE" */
.textlink {
  display: inline-block;
  font-size: 11px;
  line-height: 1.2;            /* explicit — see .arrowlink */
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--burgundy);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(91,13,26,.35);
}
.textlink:hover { border-bottom-color: var(--burgundy); }
/* body-grey variant, tracked to match .arrowlink so the two read as one system (About) */
.textlink--muted { color: var(--body); border-bottom-color: #DCD5CF; letter-spacing: .15em; }

/* ---------------------------------------------------------------- header --- */
/* Full-bleed with 56px side padding — NOT inside the 1280 container. */
.site-head {
  position: relative;
  z-index: 20;
  padding: 0 var(--pad);
}
.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 112px;
}
.site-nav { display: flex; align-items: center; gap: 40px; }
.site-nav__list { display: flex; align-items: center; gap: 40px; }
.site-nav__list a {
  font-size: 10.5px;               /* measured (typography.md); 11px set the list 17px too wide */
  letter-spacing: .175em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--body);
  transition: color .18s ease;
}
.site-nav__list a:hover { color: var(--brown); }
/* No extra left margin. The 8px I originally added pushed the whole nav list 8px left of the
   mockup on every page (FILMS ink x950 vs measured 959.5; CONTACT->CTA gap 48 vs 40.5). */
.site-head__cta { margin-left: 0; }

/* --- logo variant toggle -----------------------------------------------------
   The two logo files are DIFFERENT artwork (trimmed aspect 8.02 vs 6.89), so a
   CSS filter cannot substitute one for the other — both ship and we toggle.
   NOTE the specificity: the base rule is `.logo .logo__img` (0-2-0), so a bare
   `.logo__img--light { display:none }` (0-1-0) would LOSE and both logos would
   render stacked. Every toggle below is qualified to at least match it. */
.logo { display: block; line-height: 0; }
.logo .logo__img        { display: block; height: 27px; width: auto; }
.logo .logo__img--light { display: none; }

body.theme-dark-top .logo .logo__img--dark  { display: none; }
body.theme-dark-top .logo .logo__img--light { display: block; }
body.theme-dark-top .site-nav__list a       { color: rgba(247,244,239,.75); }
body.theme-dark-top .site-nav__list a:hover { color: var(--cream); }

/* --- mobile drawer toggle (hidden on desktop) ------------------------------ */
.navtoggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.navtoggle__bar { display: block; width: 22px; height: 1px; background: var(--brown); }
body.theme-dark-top .navtoggle__bar { background: var(--cream); }

/* --------------------------------------------------------------- marquee --- */
/* Full-bleed strip, hairline top and bottom, items separated by a burgundy ✦. */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  padding: 14px 0;
  background: var(--cream);
}
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee__set   { display: flex; align-items: center; flex: none; }
/* Band totals 46px: 16 (item) + 2x14 (padding) + 2x1 (hairlines). The explicit line-height is
   load-bearing — without it these 10px items inherit body's 27px strut and the band renders 57.
   All three of the Services, Blog and Portfolio measurements independently gave 46. */
.marquee__item {
  font-size: 10px;
  line-height: 16px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--body);
  white-space: nowrap;
}
/* The ✦ bearings are ASYMMETRIC in the mockup — ~21px before, ~41px after — measured
   consistently across all eight occurrences on four pages. */
.marquee__sep {
  font-style: normal;
  color: var(--burgundy);
  font-size: 9px;
  padding: 0 41px 0 21px;
  line-height: 16px;
}
@keyframes marquee { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }

/* ---------------------------------------------------------------- footer --- */
.site-foot { background: var(--brown); color: var(--body-on-dark); }
/* Footer band measures 358.5 tall — confirmed independently on the Services, Blog, Portfolio and
   About mockups. Every rule below sets line-height EXPLICITLY: these are all 8-12px types, and
   body's 27px strut leaking in is what inflated the band to 475. */
.site-foot__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 64px var(--pad) 0;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr;
  gap: var(--sp-6);
}
/* the wordmark sits at footer-top +121.5 in the mockup, i.e. optically centred against the
   columns rather than aligned to their top */
.site-foot__brand { align-self: center; }
.site-foot__logo  { height: 28px; width: auto; }
.site-foot__head {
  font-family: var(--font-body);
  font-size: 8px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 22px;
}
.site-foot__col p { font-size: 12px; line-height: 22px; margin: 0; }
.site-foot__links li { line-height: 22px; }
.site-foot__links li + li { margin-top: 8px; }   /* -> 30px baseline pitch (measured 30.4) */
.site-foot__links a {
  font-size: 12px;
  line-height: 22px;
  text-decoration: none;
  color: var(--body-on-dark);
  transition: color .18s ease;
}
.site-foot__links a:hover { color: var(--cream); }

.social { display: flex; gap: 12px; margin-top: 24px; }
.social__btn {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--social-border);
  border-radius: 0;                       /* measured square, not rounded */
  color: #867E77;
  transition: border-color .18s ease, color .18s ease;
}
.social__btn:hover { border-color: var(--tan); color: var(--cream); }

/* The legal hairline spans the FULL 1280 container (x161…x1441) — deliberately wider than the
   1168 content column, which is why it is a ::before bled out by the inner padding rather than
   a border on the content box. */
.site-foot__legal {
  width: 100%;
  max-width: var(--container);
  /* Solved against the Blog mockup's footer, band top y2194: social-button bottom 2455.5
     (=261.5), hairline 2499.5 (=305.5), copyright baseline 2529.5, band bottom 2552.5 (=358.5). */
  margin: 40px auto 0;
  padding: 0 var(--pad) 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* ROW gap must be 0. `gap: 32px` on a wrapping flex row silently added 32px of row-gap
     between the ::before hairline and the legal row — 32 of the footer's 117px overshoot. */
  gap: 0 var(--sp-4);
  flex-wrap: wrap;
}
.site-foot__legal::before {
  content: '';
  flex: 0 0 100%;
  height: 1px;
  background: var(--rule-dark);
  margin: 0 calc(var(--pad) * -1) 20px;
}
.site-foot__copy,
.site-foot__legallinks a,
.site-foot__legallinks li {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--legal);
  margin: 0;
  text-decoration: none;
}
.site-foot__legallinks { display: flex; gap: 24px; }

/* ----------------------------------------------------------------- cards --- */
/* Shared card shell. Radius 0 everywhere — verified square on every page. */
.card { background: transparent; border-radius: 0; }
.card__media { position: relative; overflow: hidden; border-radius: 0; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__title { font-family: var(--font-display); font-weight: 400; color: var(--brown); }
.card__meta  { font-size: 12px; line-height: 1.15; letter-spacing: .12em; text-transform: uppercase; color: var(--body); }

/* ---------------------------------------------------------------- reveal --- */
/* animations.js drives these. Deliberately NOT hidden in CSS — no-JS and QA
   (?nomotion=1) must read the final state. */
.reveal { will-change: opacity, transform; }

/* ============================================================== responsive ===
   The mockups are a single 1602px desktop frame — there are no tablet or mobile
   comps. Everything below this line is our design call, not a reproduction.
   See notes/design-system.md.
   ========================================================================== */
@media (max-width: 1200px) {
  :root { --pad: 40px; }
  .site-nav, .site-nav__list { gap: 28px; }
}

@media (max-width: 900px) {
  :root { --pad: 24px; }

  .navtoggle { display: flex; }

  .site-head__inner { min-height: 80px; }
  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--pad) var(--sp-5);
    background: var(--cream);
    border-top: 1px solid var(--rule-light);
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav__list { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
  .site-nav__list a { font-size: 13px; color: var(--body); }

  .site-foot__inner { grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
  .site-foot__brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 15px; line-height: 25px; }
  .site-foot__inner { grid-template-columns: 1fr; }
  .site-foot__legal { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  .marquee__sep { padding: 0 18px; }
}

/* motion off: honour the OS setting AND keep the marquee measurable for QA */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
