/* Harbour Row Films
   ---------------------------------------------------------------------------
   Follows the Dorothy St Pictures reference: the homepage is the work and
   almost nothing else. A three-column wall of posters, then one mint band
   carrying the whole company statement, then a footer. Midnight blue on white,
   a high-contrast serif with a working italic, and no decoration anywhere.

   The posters are built rather than shipped: a photograph with the title set
   over it in the page, so the type is crisp at any density and is real
   selectable text.
   --------------------------------------------------------------------------- */

/* ---- fonts -------------------------------------------------------------- */

/* Sfizia is a licensed display face, so Instrument Serif stands in — high
   contrast, light, and with the italic the reference leans on. Barlow is
   openly licensed and is what the reference uses for everything else. */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/instrument-serif.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/instrument-serif-italic.woff2') format('woff2');
}
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/barlow.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/barlow-600.woff2') format('woff2'); }
@font-face {
  font-family: 'Serif fallback';
  src: local('Times New Roman'), local('Georgia');
  ascent-override: 88%; descent-override: 22%; line-gap-override: 0%; size-adjust: 106%;
}
@font-face {
  font-family: 'Barlow fallback';
  src: local('Helvetica Neue'), local('Arial');
  ascent-override: 94%; descent-override: 22%; line-gap-override: 0%; size-adjust: 97%;
}

/* ---- tokens ------------------------------------------------------------- */

:root {
  --navy: #191970;       /* 12.2:1 on white — the only text colour that matters */
  --mint: #deecde;
  --ink: #2d2d2d;
  --paper: #ffffff;

  --accent: var(--navy);
  --muted: #5d5d70;      /* 6.4:1 on white, 5.6:1 on mint */
  --rule: #d7d7e2;

  --serif: 'Instrument Serif', 'Serif fallback', Georgia, 'Times New Roman', serif;
  --sans: 'Barlow', 'Barlow fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --wrap: 1180px;
  --gutter: 20px;

  /* Measured: 57 / 46 / 29 / 20 / 13 / 11. */
  --t-h1: clamp(2.4rem, 1.6rem + 2.9vw, 3.56rem);
  --t-h2: clamp(1.9rem, 1.35rem + 2.1vw, 2.875rem);
  --t-h3: clamp(1.3rem, 1.18rem + 0.5vw, 1.8125rem);
  --t-lead: 1.25rem;
  --t-body: 1rem;
  --t-sm: 0.8125rem;
  --t-xs: 0.6875rem;

  --radius: 8px;
  --pad: clamp(52px, 5.5vw, 96px);
}

.on-mint { background: var(--mint); color: var(--navy); --muted: #4d4d63; --rule: #c2d4c2; }
.on-ink  { background: var(--ink);  color: var(--paper); --accent: var(--mint); --muted: #b9b9c4; --rule: rgba(255,255,255,0.2); }

/* ---- reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.1; }
p { margin: 0 0 1.05em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: 16px; }

/* ---- layout ------------------------------------------------------------- */

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 900px) { .wrap { padding-inline: 40px; } }

.section { padding-block: var(--pad); }
.section--tight { padding-block: clamp(34px, 3.5vw, 58px); }
.measure { max-width: 62ch; }

/* ---- type --------------------------------------------------------------- */

.h1 { font-size: var(--t-h1); }
.h2 { font-size: var(--t-h2); }
.h3 { font-size: var(--t-h3); }
.lead { font-size: var(--t-lead); line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }
em, .em { font-style: italic; }

/* The tiny letter-spaced caps the reference uses for every label. */
.caps {
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose a:not(.btn), .link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:not(.btn):hover, .link:hover { text-decoration-thickness: 2px; }

/* ---- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 11px 22px;
  background: var(--navy); color: #fff;
  border: 1px solid var(--navy); border-radius: var(--radius);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.btn:hover { background: transparent; color: var(--navy); }
.on-ink .btn { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.on-ink .btn:hover { background: transparent; color: var(--mint); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- header ------------------------------------------------------------- */

.site-header { padding-block: 26px; }
.site-header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { justify-self: center; grid-column: 2; display: grid; justify-items: center; gap: 1px; text-decoration: none; }
.brand__name { font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1; }
.brand__sub { font-family: var(--serif); font-style: italic; font-size: 0.95rem; line-height: 1; }
.site-nav { grid-column: 1; display: flex; gap: 26px; }
.site-nav--right { grid-column: 3; justify-content: flex-end; }
.site-nav a { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; padding-block: 4px; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current='page'] { border-bottom-color: currentColor; }

.nav-toggle {
  display: none; grid-column: 3; justify-self: end;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; background: none;
  border: 1px solid var(--navy); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle > span { display: grid; gap: 4px; width: 18px; }
.nav-toggle > span > span { height: 1.5px; background: currentColor; }

.menu { position: fixed; inset: 0; z-index: 60; background: var(--navy); color: #fff; padding: 22px var(--gutter) 44px; overflow-y: auto; overscroll-behavior: contain; }
.menu[hidden] { display: none; }
.menu__head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 30px; }
.menu__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 1px solid currentColor; border-radius: var(--radius); cursor: pointer; }
.menu__nav a { display: block; padding: 14px 0; font-family: var(--serif); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.2); }
.menu__nav a:hover { color: var(--mint); }
body.menu-open { overflow: hidden; }

/* ---- the poster wall ----------------------------------------------------
   The homepage. Three columns of built posters — a photograph with the title
   set over it rather than baked into it, which keeps the type crisp and keeps
   the title as real text a screen reader and a search engine can both read. */

.wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 34px); }
@media (max-width: 900px) { .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .wall { grid-template-columns: 1fr; } }

.poster {
  position: relative;
  display: flex; flex-direction: column;
  aspect-ratio: 2 / 3;
  padding: 8%;
  border-radius: 6px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  container-type: inline-size;
  box-shadow: 0 2px 14px rgba(25, 25, 112, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.poster:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(25, 25, 112, 0.26); }
.poster__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* A poster needs its type to hold over any frame, so the scrim is strongest
   where the title sits and clears entirely over the picture below it. */
.poster::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(10, 10, 30, 0.72) 0%, rgba(10, 10, 30, 0.34) 38%, rgba(10, 10, 30, 0.12) 62%, rgba(10, 10, 30, 0.62) 100%);
}
.poster--dark::after {
  background: linear-gradient(to bottom, rgba(10, 10, 30, 0.62) 0%, rgba(10, 10, 30, 0.2) 42%, rgba(10, 10, 30, 0.1) 60%, rgba(10, 10, 30, 0.72) 100%);
}
.poster__cap { font-size: 3.4cqw; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.9; }
.poster__title { font-family: var(--serif); font-size: 12cqw; line-height: 0.98; margin: 3% 0 0; }
.poster__strap { margin-top: auto; font-size: 3.6cqw; line-height: 1.35; opacity: 0.94; }
.poster__meta { margin-top: 2%; font-size: 3.1cqw; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) { .poster, .poster:hover { transition: none; transform: none; } }

/* ---- statement band ----------------------------------------------------- */

.statement { position: relative; }
.statement h2 { max-width: 16ch; }
/* The vertical wordmark the reference runs up the right edge of this band. */
.edge-mark {
  position: absolute; right: 14px; top: clamp(40px, 5vw, 80px);
  writing-mode: vertical-rl;
  font-family: var(--serif); font-size: var(--t-xs);
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 900px) { .edge-mark { display: none; } }

.credit-line { font-size: var(--t-sm); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 22px; }
.credit-line a { text-decoration: underline; text-underline-offset: 3px; }

.partners { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(22px, 3vw, 44px) clamp(16px, 2vw, 34px); margin-top: clamp(34px, 4vw, 58px); }
.partners li { font-family: var(--serif); font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.2rem); text-align: center; line-height: 1.2; }
@media (max-width: 900px) { .partners { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .partners { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- film page ---------------------------------------------------------- */

.film-head { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (max-width: 800px) { .film-head { grid-template-columns: 1fr; } .film-head .poster { max-width: 320px; } }

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 26px; margin: 28px 0; padding-block: 22px; border-block: 1px solid var(--rule); }
.spec dt { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 5px 0 0; font-family: var(--serif); font-size: 1.2rem; }

.credits { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 26px; }
.credits div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.credits dt { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--t-xs); align-self: center; }
.credits dd { margin: 0; }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(22px, 3.5vw, 56px); align-items: start; }
.split + .split { margin-top: clamp(30px, 3.5vw, 52px); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.people h3 { margin-bottom: 3px; }
@media (max-width: 700px) { .people { grid-template-columns: 1fr; } }

/* ---- forms -------------------------------------------------------------- */

.form { display: grid; gap: 18px; max-width: 580px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); width: 100%; min-height: 48px; padding: 12px 14px;
  background: #fff; border: 1px solid #6e6e83; border-radius: var(--radius);
}
.field textarea { min-height: 140px; resize: vertical; }
.field.invalid input, .field.invalid textarea { border-color: #9c1a1a; }
.field .error { margin: 0; font-size: var(--t-sm); color: #8b1414; }
.field:not(.invalid) .error { display: none; }
.field--hp { position: absolute; left: -9999px; }
.form-note { font-size: var(--t-sm); color: var(--muted); max-width: 56ch; }

/* ---- footer ------------------------------------------------------------- */

.site-footer { padding-block: clamp(40px, 4.5vw, 70px) 30px; border-top: 1px solid var(--rule); }
.site-footer .brand { justify-self: center; margin-bottom: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.footer-nav a { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 34px; font-size: var(--t-sm); color: var(--muted); }
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }

/* ---- reveal ------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .wrap { grid-template-columns: 44px 1fr 44px; }
  .site-header .brand { grid-column: 2; }
}
