/* ═══════════════════════════════════════════════════════════════════════════
   taylorlee.info

   Design tokens are ported EXACTLY from the Squarespace site — see PLAN.md §8.
   In particular body text is 12.6px (0.9rem on a 14px base) at line-height 1,
   and meta text is weight 100. These are deliberate; Taylor confirmed them on
   2026-08-04 with the readability tradeoff spelled out. Do not "fix" them.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Archivo replaces Acumin Pro, which is Adobe Fonts licensed and cannot be
   self-hosted (PLAN.md §8). One variable file per style covers weights 100–900;
   latin subset from Google Fonts, SIL OFL, committed to static/fonts/. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Type */
  --font-body: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --size-h1: 4rem;      /* 56.0px */
  --size-h2: 2.8rem;    /* 39.2px */
  --size-h3: 2.2rem;    /* 30.8px */
  --size-h4: 1.6rem;    /* 22.4px */
  --size-large: 1.2rem; /* 16.8px */
  --size-meta: 1rem;    /* 14.0px */
  --size-body: 0.9rem;  /* 12.6px */
  --size-nav: 0.8rem;   /* 11.2px — live site-navigation-font-size */
  --size-wordmark: 1.5rem; /* 21px — live site-title-font-size */

  --weight-body: 300;
  --weight-heading: 500;
  --weight-meta: 100;
  --weight-strong: 700; /* nav, wordmark, page titles, <strong> */

  --leading-body: 1;
  --leading-heading: 1.4;
  --tracking-meta: 0.01em;

  /* Color — two tiers. Palette values are defined once; components only ever
     use the role tokens below, so a re-skin touches this block and nothing else.
     Dark by design: sand on black, no saturated color anywhere. PLAN.md §8. */
  --palette-black: #000000;
  --palette-sand: #e1ccbe;
  --palette-olive: #757263;

  --color-bg: var(--palette-black);
  --color-text: var(--palette-sand);
  --color-text-muted: var(--palette-olive);
  --color-scrim: rgb(0 0 0 / 55%);
  color-scheme: dark; /* native scrollbars and form controls follow the page */

  /* Space */
  /* One page margin shared by header, content and footer so they align.
     Live site: 4vw (measured 57px at 1440, 2026-10-05); phones use the 6vw
     from its --sqs-mobile-site-gutter. */
  --page-margin: 6vw;
  /* Live site caps the header at --maxPageWidth: 1326px and centres it (class
     header-width-inset in _archive/css/site.css), so wide screens get larger
     side margins, not a wider header. --page-inset is the resulting side padding. */
  --page-max: 1326px;
  --page-inset: max(var(--page-margin), calc((100% - var(--page-max)) / 2));
  /* /cine rows: half the header's side margin (Taylor, 2026-10-05), plus a
     further 10vw toward the middle from tablet up (see the 768px block). */
  --cine-inset: calc(var(--page-inset) / 2);
  --measure: 44rem;
  --header-h: 5.7rem;   /* ≈80px; live wordmark centres ≈40px down */
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

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

html {
  font-size: 14px; /* the rem base every size above is relative to */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
}

strong { font-weight: var(--weight-strong); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
}

:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }

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

.skip-link {
  position: absolute;
  top: -3rem;
  left: var(--page-margin);
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--color-text);
  color: var(--color-bg);
}
.skip-link:focus { top: 0.5rem; }

/* ── Header & nav ───────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0 var(--page-inset);
}

.wordmark {
  font-size: var(--size-wordmark);
  font-weight: var(--weight-strong);
  line-height: 1.5;
  text-transform: uppercase;
}
.wordmark:hover { text-decoration: none; }

/* Hamburger: shown on small screens only. 44px target per PLAN.md §3. */
.menu-button {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-inline-end: calc(var(--page-margin) * -0.5);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.menu-button__bars,
.menu-button__bars::before,
.menu-button__bars::after {
  display: block;
  width: 20px; height: 1px;
  background: currentColor;
  content: "";
}
.menu-button__bars { position: relative; }
.menu-button__bars::before { position: absolute; top: -6px; }
.menu-button__bars::after { position: absolute; top: 6px; }

.nav { flex-basis: 100%; }
.nav[hidden] { display: none; }

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.75rem;
}

.nav__link,
.nav__sublink {
  display: block;
  padding: 0.7rem 0;          /* ≥44px tap target */
  font-size: var(--size-nav);
  font-weight: var(--weight-strong);
  line-height: 1.5;
  text-transform: uppercase;
}
.nav__sublink { padding-inline-start: 1rem; }
/* The current page is underlined, as on the live site. */
.nav__link[aria-current="page"],
.nav__sublink[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.25em; }

.nav__item--has-children { position: relative; }

.nav__toggle {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: 44px; height: 44px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.nav__chevron {
  display: block;
  width: 7px; height: 7px;
  margin: 0 auto;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.nav__toggle[aria-expanded="true"] .nav__chevron { transform: rotate(-135deg); }

.nav__submenu { display: none; }
.nav__toggle[aria-expanded="true"] + .nav__submenu { display: block; }

/* Collapsed by default on small screens; the button reveals it. */
@media (max-width: 767px) {
  .nav__list { display: none; }
  .menu-button[aria-expanded="true"] ~ .nav .nav__list { display: flex; }
}

@media (min-width: 768px) {
  :root {
    --page-margin: 4vw;
    --cine-inset: calc(var(--page-inset) / 2 + 10vw);
  }

  .menu-button { display: none; }
  .nav { flex-basis: auto; }
  .nav__list { flex-direction: row; gap: 3.5rem; padding-bottom: 0; }
  .nav__link { padding: 0.25rem 0; }
  .nav__toggle { display: none; }

  .nav__submenu {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    min-width: 12rem;
    padding: 0.5rem 0.75rem 0.75rem;
    background: var(--color-bg);
  }
  .nav__sublink { padding: 0.4rem 0; }

  /* Hover only where hovering exists. Focus-within keeps it keyboard-usable. */
  @media (hover: hover) and (pointer: fine) {
    .nav__item--has-children:hover .nav__submenu,
    .nav__item--has-children:focus-within .nav__submenu { display: block; }
  }
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.main { padding-block: 3.5rem 4rem; }
.page-cine .main { padding-block: 0 4rem; }

.footer {
  padding: 2rem var(--page-inset);
  color: var(--color-text-muted);
  font-size: var(--size-meta);
  font-weight: var(--weight-meta);
}

/* ── Two-column pages: home and the directorial pages ──────────────────── */

/* Text left, media right, inside the 1326px column. The media column's width is
   set per page in twelfths (--media-columns), as on the live site. Stacks on
   phones, text first. */
.split {
  display: grid;
  gap: 2rem;
  align-items: start;
  padding-inline: var(--page-inset);
}
.split__media { margin: 0; min-width: 0; }
.split__media--square img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.split .video { max-width: none; }

@media (min-width: 768px) {
  .split {
    grid-template-columns: minmax(0, 1fr) calc(var(--media-columns) / 12 * 100%);
    column-gap: 3rem;
  }
}

/* Directorial pages start closer to the header than the home page does. */
.page-directorial .main { padding-block-start: 1.5rem; }

/* ── Home / about ───────────────────────────────────────────────────────── */

.about__bio p { margin-block: 0 1em; }
.about__education,
.about__contact { margin-block: 2em 0; }
.about__education + .about__contact { margin-block-start: 1em; }
.about__contact a { text-decoration: underline; }

/* ── /cine filmstrip grid ───────────────────────────────────────────────── */

/* Rows are inset, not full-bleed, but wider than the header column. */
.strips { display: block; padding-inline: var(--cine-inset); }

.strip + .strip { margin-block-start: 2px; }

.strip__link {
  position: relative;
  display: grid;
  grid-template-columns: 1fr; /* mobile: one frame, see PLAN.md §2 */
  gap: 0;
}
.strip__link:hover { text-decoration: none; }

/* Every cell is 16:9 whatever the still's own shape, so rows are a standard
   height; object-fit crops the odd 4:3 or 2.39:1 frame (PLAN.md §2). */
.strip__cell { overflow: hidden; aspect-ratio: 16 / 9; }
.strip__cell img { width: 100%; height: 100%; object-fit: cover; }
.strip__cell--desktop { display: none; }

.strip__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-scrim);
}

.strip__title {
  position: absolute;
  inset-inline: 1rem;
  inset-block-end: 1rem;
  color: var(--color-text);
  /* Same type as the header wordmark, so the title reads as part of the site. */
  font-size: var(--size-wordmark);
  font-weight: var(--weight-strong);
  line-height: 1.5;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .strip__link { grid-template-columns: repeat(3, 1fr); }
  .strip__cell--desktop { display: block; }

  .strip__title {
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
  }

  /* Titles and scrim only appear on hover where hovering is real. On touch
     they stay permanently visible — never a two-tap trap. */
  @media (hover: hover) and (pointer: fine) {
    .strip__overlay,
    .strip__title {
      opacity: 0;
      transition: opacity 250ms ease;
    }
    .strip__link:hover .strip__overlay,
    .strip__link:hover .strip__title,
    .strip__link:focus-visible .strip__overlay,
    .strip__link:focus-visible .strip__title { opacity: 1; }
  }
}

/* ── Project pages ──────────────────────────────────────────────────────── */

.project__title {
  font-weight: var(--weight-strong);
  line-height: 1.4;
}
/* Directorial pages: the page title, at the same size as the wordmark's neighbour. */
.split .project__title {
  margin-block-end: 2rem;
  font-size: var(--size-h4);
}

/* Text blocks are body copy at line-height 1: one blank line = 1em. */
.project__credits,
.project__festivals,
.project__format,
.project__status,
.project__note { margin-block: 0 1em; }
.project__format,
.project__status { font-style: italic; }
.project__format + .project__status { margin-block-start: -1em; }

/* Cine project pages: title and credits at the left of the header column, then
   a three-column grid of stills, then previous/next. Layout follows the live
   site (2026-10-05 capture). */
.page-project .main { padding-block-start: 1.5rem; }

.project__header {
  padding-inline: var(--page-inset);
  padding-block-end: 6rem;
}
.page-project .project__title {
  margin-block-end: 2em;
  font-size: var(--size-large);
}
/* Format line sits directly under the credits; festivals are set off by two blank lines. */
.page-project .project__credits { margin-block-end: 0; }
.page-project .project__festivals { margin-block-start: 2em; }

.gallery {
  display: grid;
  gap: 0.6rem;
  padding-inline: var(--page-inset);
}
.gallery__item { margin: 0; min-width: 0; }

/* Phones: one full-frame still per row. Tablet up: three across, every cell
   16:9 so the grid is regular whatever each still's own shape. */
@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(3, 1fr); row-gap: 2.5rem; }
  .gallery__item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-block: 4rem 0;
  padding-inline: var(--page-inset);
  font-size: var(--size-h4);
  font-weight: var(--weight-body);
  line-height: 1.5;
  text-transform: uppercase;
}
.pager__link--next { margin-inline-start: auto; text-align: end; }

/* Thin chevrons, drawn in CSS so there is no glyph for a screen reader to read. */
.pager__link--prev::before,
.pager__link--next::after {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
}
.pager__link--next::after { margin-inline-start: 0.9em; transform: rotate(45deg); }
.pager__link--prev::before { margin-inline-end: 0.9em; transform: rotate(-135deg); }

@media (min-width: 768px) {
  .pager { font-size: var(--size-h3); }
}

/* ── Video ──────────────────────────────────────────────────────────────── */

.video {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  background: var(--color-bg);
}
/* /dp-reel: the video sits in the same column as everything else, so the CV's
   left edge is the video's left edge at every width. */
.page-reel .video {
  max-width: none;
  margin-inline: var(--page-inset);
  width: auto;
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  /* The page is color-scheme: dark; Vimeo's document isn't. A mismatch makes the
     browser paint an opaque white canvas behind the iframe (white bars around
     the video). Resetting it on the iframe keeps the backdrop transparent. */
  color-scheme: normal;
}

/* ── /dp-reel CV ────────────────────────────────────────────────────────── */

.cv {
  margin-block: 4rem 0;
  padding-inline: var(--page-inset);
}

.cv__heading {
  font-size: var(--size-h4);
  letter-spacing: 0.1em;
}

.cv__list { margin-block-start: 2rem; }

/* Stacked blocks, not a table — must not scroll sideways on a phone. */
.cv__entry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding-block: 0.72rem; /* 20% tighter than the original 0.9rem */
  font-size: var(--size-meta);
  font-weight: var(--weight-meta);
  letter-spacing: var(--tracking-meta);
}
.cv__title { font-style: italic; font-weight: var(--weight-body); }
.cv__format,
.cv__by { color: var(--color-text-muted); }
.cv__year { color: var(--color-text-muted); }

/* ── Motion ─────────────────────────────────────────────────────────────── */

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