/* ---------------------------------------------------------------
   Harbor & Lens Studio — design tokens
   Palette: monochrome + pure black, bold advertising-photography feel
   Type: Rubik (display, heavy) / Raleway (body, nav)
   --------------------------------------------------------------- */

:root {
  --color-background: #000000;
  --color-foreground: #fafafa;
  --color-surface: #111113;
  --color-surface-raised: #18181b;
  --color-border: #2c2c30;
  --color-mid-grey: #55555a;
  --color-muted: #a1a1aa;
  --color-destructive: #ef4444;
  --color-accent: #f5c518;

  --font-display: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --container-max: 72rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 600ms;

  /* Sized to clear the logo (3.46rem at full size) with the same ~16px
     of air above and below it that the original bar had. Everything
     that offsets for the fixed bar reads this token, so the mobile
     menu, the nav scrim and the gallery pages all follow from here. */
  --nav-height: 5.5rem;
}

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

html {
  scroll-behavior: smooth;

  /* Reserve the scrollbar track at all times.

     Measured cause of a real layout shift: while the intro curtain is up
     the document is not scrollable, so there is no scrollbar. Dismissing
     it makes the page scrollable, the scrollbar appears, the viewport
     narrows by the width of it, and EVERY element on the page jumps a few
     pixels left at once -- the nav links, the eyebrow, the h1, the hero
     paragraph and the buttons all moved together in the trace.

     Small in isolation (0.004 of Cumulative Layout Shift), but it is
     free to remove and it costs nothing visually, because every page on
     this site scrolls and therefore has a scrollbar a moment later
     anyway. */
  scrollbar-gutter: stable;
}

/* Lenis smooth scroll (js/motion.js). These only take effect once Lenis
   adds its classes to <html>; if Lenis fails to load or the visitor has
   reduced-motion on, none of this applies and native scrolling (with the
   scroll-behavior: smooth above) is used instead. The !important override
   is required — Lenis drives scroll position itself and native
   scroll-behavior fights it. */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

::selection {
  background: var(--color-foreground);
  color: var(--color-background);
}

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

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 40rem) {
  .container {
    padding-inline: 2rem;
  }
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

.section {
  position: relative;
  padding-block: var(--space-3xl);
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-mid-grey);
}

.section::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.25rem;
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
}

@media (min-width: 40rem) {
  .section {
    padding-block: var(--space-4xl);
  }

  .section::after {
    left: 2rem;
  }
}

.section--tight::before,
.section--tight::after {
  display: none;
}

/* ---------------------------------------------------------------
   Reduced motion — disable/shorten everything, keep it usable
   --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------
   Scroll-reveal / parallax / pin hooks — progressive enhancement.
   GSAP (js/motion.js) animates [data-reveal]/[data-parallax] elements
   from JS via .from(), so content stays visible by default if the
   animation library fails to load; there is no CSS opacity:0 gate.
   --------------------------------------------------------------- */

/* ---------------------------------------------------------------
   Custom cursor — a flat/graphic loupe that swaps in over anything
   clickable. JS (main.js) only ever activates this on fine-pointer,
   motion-OK devices, and only toggles .cursor-none onto the specific
   element under the mouse, so touch devices and reduced-motion users
   just keep the native cursor untouched everywhere.
   --------------------------------------------------------------- */

.cursor-none {
  cursor: none !important;
}

.cursor-loupe {
  position: fixed;
  top: 0;
  left: 0;
  /* Above everything, including the intro curtain at 9999. main.js
     hides the native cursor on whatever is hovered, so if the loupe is
     ever painted UNDER something there is no pointer on screen at all
     -- which is exactly what happened on the curtain at z-index 400. */
  z-index: 10000;
  width: 44px;
  height: 44px;
  margin-left: -17px;
  margin-top: -17px;
  pointer-events: none;
  /* transform (translate) on this element is owned entirely by GSAP's
     quickTo in main.js for smooth trailing follow — scale/opacity live
     one level down on .cursor-loupe__scale instead, so the two never
     fight over the same inline `transform` property. */
}

.cursor-loupe__scale {
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.cursor-loupe.is-active .cursor-loupe__scale {
  opacity: 1;
  transform: scale(1);
}

.cursor-loupe svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.cursor-loupe__lens {
  fill: rgba(10, 10, 11, 0.5);
  stroke: var(--color-foreground);
  stroke-width: 2;
}

.cursor-loupe__cross {
  fill: none;
  stroke: var(--color-foreground);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.55;
}

.cursor-loupe__reticle {
  fill: var(--color-accent);
}

.cursor-loupe__handle {
  stroke: var(--color-foreground);
  stroke-width: 3.5;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .cursor-loupe {
    display: none;
  }
}

/* ---------------------------------------------------------------
   Skip link
   --------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  background: var(--color-foreground);
  color: var(--color-background);
  padding: 0.6rem 1rem;
  border-radius: 0.25rem;
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------
   Nav
   --------------------------------------------------------------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  /* Own scrim, independent of whatever's behind it (hero photo, its
     overlay gradient, anything else) — guarantees nav-link contrast
     without having to re-tune this every time the hero image changes.
     Sized to exactly --nav-height so it doesn't bleed into the mobile
     menu below once that's open. Floor stays fairly dark rather than
     fading to transparent — verified by pixel-sampling against the
     hero's brightest spot (a sun-glow patch sits right behind the nav)
     that a soft top-fade wasn't nearly enough contrast. */
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.74) 100%);
  background-size: 100% var(--nav-height);
  background-repeat: no-repeat;
  border-bottom: 1px solid transparent;
  transition: background-color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.nav.is-scrolled,
.nav.is-open {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
  border-bottom-color: var(--color-border);
}

.nav__inner {
  height: var(--nav-height);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav__logo img {
  /* 1.4x the original 2.47rem at the top end. It cannot be one fixed
     size: the lockup is 4.09:1, so every bit of height costs four times
     as much width, and on a 375px phone that crowds the menu button.
     The clamp reaches full size by ~1000px and eases down from there
     rather than stepping at a breakpoint. The floor stays just above
     the original height so small screens still gain a little. */
  height: clamp(2.6rem, 5.5vw, 3.46rem);
  width: auto;
}

.nav__links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 40rem) {
  .nav__links {
    display: flex;
  }
}

.nav__links a {
  position: relative;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  color: var(--color-muted);
  padding-block: 0.25rem;
  cursor: pointer;
  /* Safety net for contrast against the transparent hero-photo nav state —
     invisible once .nav gets its solid background on scroll, but keeps
     these legible against bright sky regardless of how the hero photo/
     overlay gets tuned later. */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}

.nav__links a:hover {
  color: var(--color-accent);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
}

@media (min-width: 40rem) {
  .nav__toggle {
    display: none;
  }
}

.nav__toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.nav__toggle .icon-close {
  display: none;
}

.nav.is-open .nav__toggle .icon-menu {
  display: none;
}

.nav.is-open .nav__toggle .icon-close {
  display: block;
}

.nav__mobile {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows var(--duration-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-open .nav__mobile {
  grid-template-rows: 1fr;
  border-bottom-color: var(--color-border);
}

.nav__mobile-inner {
  min-height: 0;
}

.nav__mobile ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1.5rem;
}

.nav__mobile a {
  display: block;
  padding: 0.75rem 0;
  text-decoration: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-foreground);
}

@media (min-width: 40rem) {
  .nav__mobile {
    display: none;
  }
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding-inline: 1.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-foreground);
  color: var(--color-background);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: transparent;
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-background);
  border-color: var(--color-accent);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--duration-base) var(--ease-out);
}

.btn:hover svg {
  transform: translate(2px, -2px);
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: 8rem 4rem;
  overflow: hidden;
  background: radial-gradient(120% 100% at 15% 0%, #1a1a1d 0%, #000000 60%);
}

.hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 1px;
  background: var(--color-mid-grey);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 1.25rem;
  z-index: 2;
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
}

@media (min-width: 40rem) {
  .hero::after {
    left: 2rem;
  }
}

@media (min-width: 40rem) {
  .hero {
    padding-block: 9rem 6rem;
  }
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* motion.js applies a slow ken-burns push + cursor parallax on top of a
     baseline scale, so the element is always slightly oversized — hint the
     compositor. Purely progressive: no JS = plain cover image, no scale. */
  will-change: transform;
  transform-origin: 50% 50%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* No gradient. The photograph carries the hero on its own; every scrim
     tried here cost saturation and micro-contrast across the frame.
     Text legibility now depends entirely on the photo behind it — if the
     hero image is ever swapped, re-measure contrast before shipping.
     The phone layer still uses its own copy plinth (max-width: 39.9375rem),
     because one column has no clear side to put text on. */
  background: none;
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  /* Legibility without a scrim. With the overlay gone the copy crosses a
     lit prop and drops to 1.1:1 in places; a shadow darkens only the few
     pixels touching each glyph, so the photograph keeps full saturation
     everywhere. Two layers: a tight one for edge definition, a wide soft
     one to lift the glyph off busy detail.
     Caveat: WCAG's contrast model samples the background and cannot score
     a shadow, so the formal number stays low even though it reads cleanly.
     If this hero is replaced, look at it rather than trusting the ratio. */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 2px 16px rgba(0, 0, 0, 0.55);
}

.hero h1 {
  margin-top: 1.5rem;
  max-width: 50rem;
  font-size: clamp(2.5rem, 7.5vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero p:not(.eyebrow) {
  margin-top: 1.5rem;
  max-width: 34rem;
  color: var(--color-muted);
  font-size: 1.05rem;
}

@media (min-width: 40rem) {
  .hero p:not(.eyebrow) {
    font-size: 1.15rem;
  }
}

.hero__actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------------------------------------------------------------
   Thesis statement
   --------------------------------------------------------------- */

.thesis {
  /* Aerial b&w shot of the Kenosha streetcar on Main Street, supplied by
     the studio (assets/thesis-bg.webp — see generate_thesis_bg.py). A
     flat mid-grey scrim sits on top to keep the copy legible over it. */
  background-color: var(--color-mid-grey);
  background-image: linear-gradient(
      color-mix(in srgb, var(--color-mid-grey) 40%, transparent),
      color-mix(in srgb, var(--color-mid-grey) 40%, transparent)
    ),
    url("../assets/thesis-bg.webp?v=609c0dc8");
  background-size: cover;
  background-position: center;
}

.thesis p {
  max-width: 44rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.4;
}

.thesis__highlight {
  color: var(--color-accent);
}

/* ---------------------------------------------------------------
   Section headers
   --------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-head h2 {
  margin-top: 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.section-head__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}

.section-head__link:hover {
  color: var(--color-foreground);
}

.section-head__link svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--duration-base) var(--ease-out);
}

.section-head__link:hover svg {
  transform: translate(2px, -2px);
}

/* ---------------------------------------------------------------
   Featured work — pinned crossfade sequence
   Sticky viewport-height stage; scroll progress through the tall
   wrapper drives which block is active (see js/motion.js)
   --------------------------------------------------------------- */

.featured {
  position: relative;
  /* 120vh of scroll per category block (6 blocks). Most of each block's
     slice is a full-opacity "hold" so the category rests and reads before
     it cross-dissolves into the next — see the trapezoidal opacity curve
     in js/motion.js. Lengthen/shorten here to pace the whole sequence. */
  height: 720vh;
}

.featured__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--color-background);
}

.featured__block {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.featured__block.is-active {
  opacity: 1;
  z-index: 2;
}

.featured__media {
  position: absolute;
  inset: -8% -4%;
  will-change: transform;
}

.featured__media .plate {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
}

.featured__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.85) 100%);
}

.featured__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5rem;
}

.featured__index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.featured__title {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: clamp(2.5rem, 9vw, 6rem);
  text-transform: uppercase;
}

.featured__desc {
  margin-top: 1.25rem;
  max-width: 32rem;
  font-size: 1.05rem;
  color: rgba(250, 250, 250, 0.75);
}

/* ---------------------------------------------------------------
   The CTA signature: a viewfinder focus bracket.

   A pill button laid over a full-bleed photograph is the default move
   and it competes with the picture. Four corner marks do not -- they
   are the one piece of interface language this audience reads without
   being taught, they cost almost no ink, and they say the right thing:
   the frame closing on a subject. On hover they travel INWARD and stop
   with a slight overshoot, the way autofocus acquires rather than the
   way a box fades in.

   Drawn with one pseudo-element and eight gradients -- four corners,
   no extra markup across 87 call sites. Animating `inset` is what
   makes them travel; `--len` and `--w` set the arm length and weight
   so the same mark can be used small on a link and large on a card.

   The accent lives entirely in the brackets. The label stays white, so
   there is one bold thing here and not two.
   --------------------------------------------------------------- */

.featured__cta::before,
.plate__reveal::before {
  content: "";
  position: absolute;
  pointer-events: none;
  --bracket: var(--color-accent);
  background:
    linear-gradient(var(--bracket), var(--bracket)) left top / var(--len) var(--w) no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left top / var(--w) var(--len) no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right top / var(--len) var(--w) no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right top / var(--w) var(--len) no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / var(--len) var(--w) no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / var(--w) var(--len) no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / var(--len) var(--w) no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / var(--w) var(--len) no-repeat;
  /* The overshoot is the whole point -- it reads as a mechanical stop
     rather than an ease. Reduced motion flattens it globally. */
  transition: inset 260ms cubic-bezier(0.2, 1.35, 0.35, 1),
              opacity var(--duration-fast) var(--ease-out);
}

.featured__cta {
  position: relative;
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.8rem 1.15rem;
  /* pull the padding back out so the label stays optically flush with
     the paragraph above it */
  margin-inline-start: -1.15rem;
  text-decoration: none;
  /* The display face is what makes this read as deliberate rather than
     as the body text with an arrow stuck on it. */
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--color-foreground);
  cursor: pointer;
  transition: gap var(--duration-base) var(--ease-out);
}

.featured__cta::before {
  --len: 0.7rem;
  --w: 1.5px;
  inset: -0.4rem;
  opacity: 0;
}

.featured__cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--duration-base) var(--ease-out);
}

.featured__cta:hover,
.featured__cta:focus-visible {
  gap: 0.75rem;
}

.featured__cta:hover::before,
.featured__cta:focus-visible::before {
  inset: 0;
  opacity: 1;
}

.featured__cta:hover svg,
.featured__cta:focus-visible svg {
  transform: translate(2px, -2px);
  color: var(--color-accent);
}

/* The brackets are the focus indicator here, so the default ring would
   be a second one saying the same thing. */
.featured__cta:focus-visible {
  outline: none;
}

.featured__progress {
  position: absolute;
  left: 1.25rem;
  bottom: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}

@media (min-width: 40rem) {
  .featured__progress {
    left: 2rem;
  }
}

.featured__dot {
  width: 2rem;
  height: 2px;
  background: var(--color-border);
  transition: background-color var(--duration-base) var(--ease-out);
}

.featured__dot.is-active {
  background: var(--color-foreground);
}

/* ---------------------------------------------------------------
   Placeholder plates (stand in for real photography)
   --------------------------------------------------------------- */

.parallax-frame {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 5;
}

.parallax-frame .plate {
  position: absolute;
  inset: -10% 0;
  width: 100%;
  height: 120%;
  border: none;
  border-radius: 0;
  aspect-ratio: auto;
}

.plate {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 5;
}

.plate--wide {
  aspect-ratio: 8 / 5;
}

.plate--g0 {
  background: linear-gradient(135deg, #1c1c1f 0%, #050505 60%);
}
.plate--g1 {
  background: linear-gradient(135deg, #202024 0%, #0a0a0c 55%, #030303 100%);
}
.plate--g2 {
  background: linear-gradient(160deg, #19191c 0%, #08080a 65%);
}
.plate--g3 {
  background: linear-gradient(200deg, #232326 0%, #060607 60%);
}
.plate--g4 {
  background: linear-gradient(170deg, #1f1f22 0%, #07070a 58%);
}

.plate__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plate__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

.plate__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

@media (min-width: 40rem) {
  .plate__label {
    padding: 1.5rem;
  }
}

.plate__index {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

.plate__name {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: rgba(250, 250, 250, 0.9);
}

@media (min-width: 40rem) {
  .plate__name {
    font-size: 1.3rem;
  }
}

/* ---------------------------------------------------------------
   Portfolio / category covers
   --------------------------------------------------------------- */

.category-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 40rem) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

.category-card {
  /* A real <a> to gallery/<category>.html, so middle-click, "open in new
     tab" and keyboard all work without JS. These three lines are only
     here to undo what an anchor brings with it. */
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.category-card .plate {
  transition: transform var(--duration-slow) var(--ease-out);
}

.category-card:hover .plate {
  transform: scale(1.02);
}

.category-card .plate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: background-color var(--duration-base) var(--ease-out);
}

.category-card:hover .plate::before {
  background: rgba(0, 0, 0, 0.6);
}

.category-card .plate__label {
  transition: opacity var(--duration-base) var(--ease-out);
}

.category-card:hover .plate__label {
  opacity: 0;
}

.category-card:hover .plate__reveal {
  opacity: 1;
}

.category-card--video {
  cursor: default;
}

/* The full per-photo grid still exists in the DOM (unchanged) as the data
   source the lightbox reads from — every category card launches straight
   into that category's click-through, so the grid itself never needs to
   be seen. Compound selector (not source order) is what wins here since
   it needs to beat .gallery's own display: grid. */
.gallery.gallery--archive {
  display: none;
}

.gallery {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 40rem) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.gallery__item {
  cursor: pointer;
  transition: opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.gallery__item .plate {
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery__item:hover .plate {
  transform: scale(1.02);
}

.gallery__item .plate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: background-color var(--duration-base) var(--ease-out);
}

.gallery__item:hover .plate::before {
  background: rgba(0, 0, 0, 0.6);
}

.gallery__item .plate__label {
  transition: opacity var(--duration-base) var(--ease-out);
}

.gallery__item:hover .plate__label {
  opacity: 0;
}

.plate__reveal {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  text-align: center;
  opacity: 0;
  /* The label used to sit straight on the photograph, which is why it
     read as weak -- its contrast changed with every image under it.
     A flat veil fixes that and darkens the frame the way a viewfinder
     does when it meters. */
  background: rgba(0, 0, 0, 0.58);
  transition: opacity var(--duration-base) var(--ease-out);
}

/* Large version of the mark: it frames the whole card, and travels in
   from near the edge to its resting inset. */
.plate__reveal::before {
  --len: 1.5rem;
  --w: 2px;
  inset: 0.35rem;
}

.category-card:hover .plate__reveal::before,
.category-card:focus-within .plate__reveal::before,
.gallery__item:hover .plate__reveal::before {
  inset: 1.15rem;
}

/* The brackets already point at the card. An arrow as well is one
   accessory too many -- left in the markup because it is repeated
   across 81 blocks, most of them in the hidden archive grid. */
.plate__reveal svg {
  display: none;
}

.gallery__item:hover .plate__reveal {
  opacity: 1;
}

.plate__reveal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  /* Wide tracking is what reads as composed at this size; 1.3rem bold
     was shouting to make up for sitting unprotected on the photo. */
  letter-spacing: 0.3em;
  /* indent by one space of tracking so the word stays optically centred */
  text-indent: 0.3em;
  color: var(--color-foreground);
}

.plate__reveal svg {
  width: 1.25rem;
  height: 1.25rem;
}

.plate__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.plate__tag {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-foreground);
  pointer-events: none;
}

.plate__tag svg {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--color-accent);
}

.gallery__item.is-hidden {
  display: none;
}

/* ---------------------------------------------------------------
   Full-bleed media sections (About / LED Studio) — same
   background-image + overlay + grain treatment as the hero, in
   place of a framed picture block sitting next to the copy.
   --------------------------------------------------------------- */

.section--media {
  padding-block: 0 var(--space-3xl);
}

@media (min-width: 40rem) {
  .section--media {
    padding-block: 0 var(--space-4xl);
  }
}

.section__media {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 28rem;
  overflow: hidden;
  margin-bottom: var(--space-3xl);
}

@media (min-width: 40rem) {
  .section__media {
    min-height: 34rem;
  }
}

@media (min-width: 64rem) {
  .section__media {
    min-height: 38rem;
  }
}

.section__bg {
  position: absolute;
  inset: -8% 0;
  z-index: 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
}

/* A <video> can stand in for the still at .section__bg -- see the ambient
   background block in main.js. It is decorative in every sense: no
   controls, no pointer target, no focus stop. It starts transparent and
   fades in once it is actually playing, so the poster painted by
   .section__media--poster underneath carries the section until then and
   there is no jump between the two. */
video.section__bg {
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}

video.section__bg.is-playing {
  opacity: 1;
}

/* The poster sits on the media box rather than the video's own poster
   attribute, so it survives the fade and still shows when autoplay never
   happens (reduced motion, Data Saver, a phone). */
.section__media--poster {
  background-color: var(--color-background);
  background-image: url("../assets/video/harbor-lens-film-poster.webp?v=837115d2");
  background-size: cover;
  background-position: center;
}

.section__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 42%, rgba(0, 0, 0, 0.2) 75%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.7) 100%);
}

.section__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

.section__content {
  position: relative;
  z-index: 2;
  padding-block: var(--space-2xl) var(--space-xl);
}

.section__content h2 {
  margin-top: 0.75rem;
  max-width: 32rem;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.section__content p:not(.eyebrow) {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: var(--color-muted);
}

.section__content p:first-of-type {
  margin-top: 1.5rem;
}

/* ---------------------------------------------------------------
   section--stage  -- a media section sized like a category panel.

   The pinned .featured__pin stage is 100svh. A 38rem media box
   sitting directly after it reads as an interstitial rather than a
   peer, so this matches the height and the AI-backdrop block lands
   as the seventh full-screen frame in that run.

   Phone is excluded on purpose: below 40rem .section__media stops
   being a photo-background and becomes a photo BAND above the copy
   (see the phone layer), which a viewport height would break.
   --------------------------------------------------------------- */

@media (min-width: 40rem) {
  .section--stage .section__media {
    min-height: 100svh;
  }

  /* Match .featured__content's 5rem bottom gutter so the copy sits on
     the same baseline as the category panel immediately above it. */
  .section--stage .section__content {
    padding-bottom: 5rem;
  }
}

/* ---------------------------------------------------------------
   section--panel  -- legibility without a scrim.

   A gradient cannot be aimed: it washes the whole frame to protect
   the corner the type happens to occupy. This dims ONLY the pixels
   under the copy, inside a hard-edged rectangle, and leaves the rest
   of the photograph at full strength.

   brightness(0.42) + a flat 0.22 black is the contrast guarantee,
   and it is analytic rather than measured: sRGB 255 -- the brightest
   pixel any photograph can contain -- lands at 85, which linearises
   to 0.092 relative luminance. That is the WORST the backdrop can
   be, so these floors hold over any image, with none of the
   per-photo tuning the hero and the Portraits block each needed:

     h2        #fafafa        6.99:1
     body      #fff @ 92%     6.50:1
     eyebrow   --color-accent 4.51:1   <- the binding constraint;
                                          12px gold is what sets how
                                          dark the panel has to be.

   saturate(1.45) puts back the colour that dimming costs, so the
   panel reads as a darkened patch of the LED wall rather than mud,
   and the 4px dot grid is the thing that makes it read as wall at
   all -- an emissive panel at low drive, not a translucent card.
   --------------------------------------------------------------- */

@media (min-width: 40rem) {
  .section--panel .section__overlay {
    background: none;
  }

  .section--panel .section__panel {
    position: relative;
    max-width: 38rem;
    padding: clamp(1.5rem, 2.6vw, 2.25rem);
  }

  /* Dim + re-saturate the backdrop, then lay the pixel grid over it.
     z-index -1 keeps it behind the copy; .section__content already
     carries z-index 2, so this stays above the photo and the grain.
     .section__content is a plain stacking context (no filter, mask
     or opacity), so it does not become a backdrop root -- the
     photograph is still what gets sampled here. */
  .section--panel .section__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    -webkit-backdrop-filter: brightness(0.42) saturate(1.45);
    backdrop-filter: brightness(0.42) saturate(1.45);
    background-color: rgba(8, 8, 10, 0.22);
    background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.5) 0.9px, transparent 1px);
    background-size: 4px 4px;
  }

  /* The lit edge. Three sides hairline, the reading edge in accent --
     the same 3px accent tick the section rule uses at the top of
     every other section, turned on its side. */
  .section--panel .section__panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-left: 3px solid var(--color-accent);
  }

  /* The panel is the measure now, so release the copy's own caps. */
  .section--panel .section__panel h2,
  .section--panel .section__panel p:not(.eyebrow) {
    max-width: none;
  }

  /* Body copy at --color-muted over a 0.092 backdrop is ~4.6:1. Inside
     the panel it can afford to be brighter, and it should be: this is
     the only block on the page with no scrim to fall back on. */
  .section--panel .section__panel p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.92);
  }
}

/* No backdrop-filter (older Safari/Firefox builds): the panel still has
   to hold its floors, so it falls back to a flat opaque fill. The photo
   loses that rectangle, which is the correct trade -- legibility is not
   the part that degrades. */
@supports not ((backdrop-filter: brightness(0.5)) or (-webkit-backdrop-filter: brightness(0.5))) {
  @media (min-width: 40rem) {
    .section--panel .section__panel::before {
      background-color: rgba(8, 8, 10, 0.78);
    }
  }
}

/* ---------------------------------------------------------------
   About / process
   --------------------------------------------------------------- */

.about-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 64rem) {
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: start;
  }
}

.about-copy p:not(.eyebrow) {
  margin-top: 1.25rem;
  max-width: 38rem;
  color: var(--color-muted);
}

.about-copy p:first-of-type {
  margin-top: 1.5rem;
}

.process {
  margin-top: 3.5rem;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 40rem) {
  .process {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .process {
    grid-template-columns: repeat(4, 1fr);
  }

  .process--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process__step {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--color-accent);
}

.process__title {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.process__desc {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ---------------------------------------------------------------
   Industries strip
   --------------------------------------------------------------- */

.industries {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem 3rem;
}

.industries span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-muted);
}

.industries-head {
  text-align: center;
}

.industries-section {
  background: var(--color-accent);
}

.industries-section .eyebrow,
.industries-section .industries span {
  color: var(--color-background);
}

.industries-section::after {
  background: var(--color-background);
}

/* ---------------------------------------------------------------
   Client logos
   --------------------------------------------------------------- */

.clients-head {
  text-align: center;
}

.clients-grid {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem 3.5rem;
}

.clients-grid__logo {
  height: 1.75rem;
  width: auto;
  max-width: 8rem;
  opacity: 0.55;
  transition: opacity var(--duration-base) var(--ease-out);
}

.clients-grid__logo:hover {
  opacity: 1;
}

@media (min-width: 40rem) {
  .clients-grid__logo {
    height: 2.25rem;
    max-width: 10rem;
  }
}

/* Bill Blagg's mark is a three-line lockup, not a single-line wordmark.
   At the shared height its type lands around 6px and disappears, so the
   lockup is scaled until "MAGIC" sits at roughly the cap height of the
   wordmarks beside it. Two classes deep so it also beats the phone
   layer's own .clients-grid__logo height further down the file. */
.clients-grid .clients-grid__logo--stacked {
  height: 2.25rem;
}

@media (min-width: 40rem) {
  .clients-grid .clients-grid__logo--stacked {
    height: 3.25rem;
  }
}

/* The sheriff's badge is a pictorial mark, not a wordmark. Two things
   follow. It is taller than it is wide, so at the shared wordmark height
   it occupies about 36px square and collapses into a smudge -- it is
   sized until the star and the inner seal resolve, which is around
   3.5rem. And the supplied art is silver-on-white, which on this black
   strip would be the one full-tone photograph among flat white marks, so
   it is redrawn as white line work: alpha comes from the inverted
   luminance of the original, over a faint 22% plate that keeps the
   shield silhouette reading at a glance. Two classes deep so it also
   beats the phone layer's own .clients-grid__logo height further down. */
.clients-grid .clients-grid__logo--badge {
  height: 2.75rem;
}

@media (min-width: 40rem) {
  .clients-grid .clients-grid__logo--badge {
    height: 3.5rem;
  }
}

/* ---------------------------------------------------------------
   Contact
   --------------------------------------------------------------- */

.contact-grid {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 64rem) {
  .contact-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 5rem;
  }
}

.contact-info p:not(.eyebrow) {
  margin-top: 1.25rem;
  max-width: 26rem;
  color: var(--color-muted);
}

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.field .optional {
  color: var(--color-muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 3rem;
  padding-inline: 1rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  color: var(--color-foreground);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.field select {
  cursor: pointer;
}

.field select option {
  background: var(--color-surface);
}

.field textarea {
  height: auto;
  padding-block: 0.75rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-foreground);
}

.field-row {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 32rem) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field-error {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-destructive);
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea {
  border-color: var(--color-destructive);
}

/* The honeypot. Off-screen rather than display:none, because some bots
   skip hidden inputs and the point is that they fill it in. aria-hidden
   and tabindex="-1" keep it away from real people either way. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Only ever shown when a send actually failed, or when the form has no
   key yet. It carries a mailto, so the visitor is never left with a
   dead end. */
.form-error {
  display: none;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-destructive);
  border-radius: 2px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-foreground);
  font-size: 0.9rem;
}

.form-error.is-visible {
  display: block;
}

.form-error a {
  color: var(--color-accent);
}

.form-status {
  display: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 2px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.form-status.is-visible {
  display: block;
}

.form-status h3 {
  font-size: 1.4rem;
}

.form-status p {
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.contact-form.is-submitted {
  display: none;
}

.submit-btn[data-loading="true"] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.footer {
  position: relative;
  padding-block: 4rem;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-mid-grey);
}

.footer::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.25rem;
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
}

@media (min-width: 40rem) {
  .footer::after {
    left: 2rem;
  }
}

.footer-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 40rem) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand__logo {
  height: 2.93rem;
  width: auto;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 22rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-col-head {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-muted);
}

.footer-col ul {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-col svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

@media (min-width: 40rem) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------------------------------------------------------------
   Lightbox
   --------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-out), visibility 0s var(--duration-base);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration-base) var(--ease-out);
}

.lightbox__figure {
  margin: 0;
  width: min(90vw, 1400px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__stage {
  position: relative;
  width: 100%;
  height: 78dvh;
}

.lightbox__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2px;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.lightbox__img.is-active {
  z-index: 1;
  opacity: 1;
}

.lightbox__caption {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-muted);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-foreground);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  color: var(--color-accent);
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
}

.lightbox__close svg {
  width: 1.5rem;
  height: 1.5rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
}

.lightbox__nav svg {
  width: 1.75rem;
  height: 1.75rem;
}

.lightbox__nav--prev {
  left: 0.25rem;
}

.lightbox__nav--next {
  right: 0.25rem;
}

@media (min-width: 40rem) {
  .lightbox {
    padding: 4rem 5rem;
  }

  .lightbox__close {
    top: 1.5rem;
    right: 1.5rem;
  }

  .lightbox__nav--prev {
    left: 1.5rem;
  }

  .lightbox__nav--next {
    right: 1.5rem;
  }
}

/* ---------------------------------------------------------------
   Hero: copy in a right-hand column
   ---------------------------------------------------------------
   The hero photograph places its subject at 28-48% of the frame, so
   the default left-aligned copy sat straight across him. This moves
   every copy element into a second grid column that starts at 52%.

   Two knock-on changes are required, not optional:
   - The 72rem container would leave a 554px column, which cannot hold
     an 88px headline (one word per line). The hero content goes
     full-bleed with its own padding instead.
   - The headline cap drops from 5.5rem to 3.5rem so it sets in 3-4
     lines in the narrower column rather than 7.

   Below 60rem this does not apply: the phone layer stacks copy at the
   bottom on its own plinth, which already clears the subject.
   --------------------------------------------------------------- */

@media (min-width: 60rem) {
  .hero__content {
    max-width: none;
    padding-inline: clamp(2rem, 5vw, 5rem);
    display: grid;
    /* Three tracks, copy in the middle one. Measured luminance across the
       copy's vertical band: the subject runs to ~48%, then a genuine dark
       pocket from 50% to 78%, then the lit cage spikes to 58 at 80-90%.
       With the overlay gone the copy has to live inside that pocket --
       column 3 exists purely to stop it reaching the cage. */
    grid-template-columns: 50% minmax(0, 30%) 1fr;
    align-content: end;
  }

  .hero__content > * {
    grid-column: 2;
  }

  .hero h1 {
    max-width: none;
    /* Down from 3.5rem: a 30% track is ~430px at 1600, where 56px type
       sets one word per line. 40px fits "PRECISION IMAGERY" on one. */
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  }

  .hero p:not(.eyebrow) {
    max-width: none;
  }
}

/* ---------------------------------------------------------------
   Featured block: copy on the right
   ---------------------------------------------------------------
   Every other category puts its copy bottom-left over a full-width
   bottom scrim. The Portraits photograph has its subject in the left
   ~57% with the alley falling away empty to the right, so the default
   would lay type across his face and darken him for no reason.

   Two changes, both scoped to this block only:
   - copy moves into a grid column starting at 56%
   - the scrim becomes right-weighted, leaving the subject untouched
   Below 60rem the stacked phone layout applies and neither is used.
   --------------------------------------------------------------- */

@media (min-width: 60rem) {
  .featured__block--copy-right .featured__content {
    display: grid;
    grid-template-columns: 56% 1fr;
    align-content: end;
  }

  .featured__block--copy-right .featured__content > * {
    grid-column: 2;
  }

  .featured__block--copy-right .featured__overlay {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 44%,
        rgba(0, 0, 0, 0.5) 58%,
        rgba(0, 0, 0, 0.76) 100%
      ),
      linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.2) 55%, rgba(0, 0, 0, 0.5) 100%);
  }
}

/* ---------------------------------------------------------------
   Featured block: no scrim
   ---------------------------------------------------------------
   The Sports photograph is a finished composite -- graded sky, haze,
   stadium lights -- and the shared bottom scrim flattens all of it.
   Dropped here so the frame runs at full saturation.

   The copy sits bottom-left and the player stands right of centre, so
   the type lands on the dark stand-and-field side of the frame. It is
   carried by a text-shadow instead of a wash, the same approach the
   hero uses: shadow darkens only the pixels touching each glyph.
   Re-measure if this image is ever swapped.
   --------------------------------------------------------------- */

.featured__block--no-scrim .featured__overlay {
  background: none;
}

.featured__block--no-scrim .featured__content {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 2px 16px rgba(0, 0, 0, 0.6);
}

/* ===============================================================
   PHONE LAYER — a deliberate small-screen composition
   ---------------------------------------------------------------
   Everything above this point is mobile-first (min-width queries),
   which gave phones the *unstyled base case* rather than a design:
   desktop proportions simply reflowed into one column. This block is
   the opposite on purpose — a max-width layer that re-composes the
   page for a 375-639px portrait screen, where the constraints differ
   in kind, not just in degree:

     - a phone is portrait, so photographs want height, not letterbox
     - there is no hover, so hover-only affordances are invisible
     - thumb reach makes bottom-anchored controls beat edge-anchored
     - 120vh of pinned scroll per section is punishing with a thumb

   Breakpoint is 39.9375rem (639px) so it meets the 40rem min-width
   queries exactly, with no gap and no overlap.
   =============================================================== */

@media (max-width: 47.9375rem) {
  /* The logo is clamped smaller down here, so the bar does not need the
     full 5.5rem of height to clear it. */
  :root {
    --nav-height: 4.75rem;
  }
}

@media (max-width: 39.9375rem) {
  /* ---- Hero: let the photograph be seen -------------------------
     The desktop hero is a text block over a wide photo; at 375px that
     same stack filled 603px of 812px and the photo became wallpaper.
     Shrink the type, plant the copy on a dark plinth at the bottom,
     and keep the top half of the frame clean so the lighthouse and
     sky actually read. */

  .hero {
    /* No bottom padding: the copy block owns its own bottom spacing so
       its scrim can run all the way to the fold line. */
    padding-block: 6.5rem 0;
  }

  /* A 375x812 box is 0.46:1 against a 1.497:1 photograph, so cover can
     only show ~31% of the frame's width. Centred, that slice falls
     between the subject (28-48% of the frame) and the cage prop,
     catching nothing but the edge of his head. Anchor the window on him.
     window_centre = P*(1-f) + f/2, with f=0.31 and a 0.38 target -> 33%. */
  .hero__bg {
    object-position: 33% 50%;
  }

  /* One column: there is no "copy side" to confine anything to. */
  .hero__overlay::after {
    display: none;
  }

  .hero__overlay {
    /* Light, even wash only. The desktop left-to-right gradient does
       nothing in one column, and a percentage-based bottom ramp can't
       know where the copy actually falls — that job moved to
       .hero__content below, which is exactly as tall as the text. */
    background: linear-gradient(
      180deg,
      rgba(12, 9, 6, 0.4) 0%,
      rgba(12, 9, 6, 0.12) 30%,
      rgba(12, 9, 6, 0.2) 100%
    );
  }

  .hero__content {
    /* The plinth. Anchoring the scrim to the copy block rather than to
       a fraction of the viewport means it fits the text at any length
       or font-scale setting, and leaves the top of the frame — the
       sky, the birds, the lighthouse — genuinely visible instead of
       veiled. Verified against the live photo, not assumed. */
    /* The copy block is bottom-anchored (.hero is justify-content:
       flex-end), so padding-top grows the scrim box UPWARD into the
       photo without moving a single line of text. That padding is the
       gradient's runway: the fade has to finish before the eyebrow,
       not at it. Measured first attempt at 32% put the eyebrow on a
       2.36:1 background (AA needs 4.5:1); 7rem of runway reaching
       0.86 by 18% puts it at 10.4:1 while still leaving the top ~30%
       of the frame genuinely clear. */
    padding-top: 7rem;
    padding-bottom: 3rem;
    background: linear-gradient(
      180deg,
      rgba(8, 6, 4, 0) 0%,
      rgba(8, 6, 4, 0.45) 10%,
      rgba(8, 6, 4, 0.86) 18%,
      rgba(8, 6, 4, 0.95) 100%
    );
  }

  .hero .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .hero h1 {
    margin-top: 1.1rem;
    /* Desktop floors at 2.5rem, which is 5 lines of caps at 375px.
       9.2vw tracks the viewport instead: about 34px on a 375 screen. */
    font-size: clamp(1.9rem, 9.2vw, 2.4rem);
    line-height: 1;
    letter-spacing: -0.025em;
  }

  .hero p:not(.eyebrow) {
    margin-top: 1rem;
    max-width: 34ch;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(250, 250, 250, 0.82);
  }

  .hero__actions {
    margin-top: 1.75rem;
    gap: 0.75rem;
  }

  /* Two ragged, differently sized pills read as an accident.
     Full-width and stacked reads as a decision, and they become
     proper thumb targets. */
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* ---- Full-bleed copy sections (LED Studio, About) -------------
     On desktop these run copy over the photograph, held legible by a
     90deg ramp that darkens the left column. One column has no left
     column, so the back half of every line crossed the clear zone —
     measured 2.6:1 over the whiskey-bottle highlight.

     Scrimming the copy fixed the contrast but buried the picture:
     .section__media is a bottom-aligned flex box whose min-height the
     copy exceeds, so the media box is always exactly as tall as the
     copy — there is no spare frame for the photo to show in, and
     shortening the copy just shrinks the section. Worse for About,
     whose lighthouse and surf sit in the middle of the frame, exactly
     where the text has to go.

     So on a phone these stop being photo-backgrounds and become a
     photo BAND above the copy: the image gets a real frame of its own
     and the copy gets clean black. Both win, and the crop improves
     sharply — a 1400x656 landscape in a tall full-bleed box showed
     only ~20% of its width; in a 42svh band it shows ~52%. */

  .section__media {
    display: block;
    min-height: 0;
    padding-top: 42svh;
  }

  .section__bg {
    /* 48svh of image for a 42svh band: the spare 6svh is bleed room so
       the data-parallax drift (yPercent 6) can never expose an edge. */
    inset: -3svh 0 auto 0;
    height: 48svh;
  }

  .section__overlay {
    inset: 0 0 auto 0;
    height: 42svh;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.12) 0%,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.88) 100%
    );
  }

  .section__grain {
    bottom: auto;
    height: 42svh;
  }

  .section__content {
    padding-top: 2rem;
    padding-bottom: 0;
  }

  /* ---- Featured: pace the pinned sequence for a thumb ------------
     720vh is 120vh of scroll per category: 7.2 screens of swiping
     before Selected Work. 420vh keeps the same trapezoidal
     hold-then-dissolve (the curve is proportional to the slice, see
     js/motion.js) at 70vh per category. */

  .featured {
    height: 420vh;
  }

  .featured__title {
    font-size: clamp(1.9rem, 10vw, 2.6rem);
    line-height: 1;
  }

  .featured__desc {
    margin-top: 1rem;
    max-width: 32ch;
    font-size: 0.95rem;
  }

  .featured__content {
    padding-bottom: 4.5rem;
  }

  /* ---- Category covers: a portrait screen wants portrait photos --
     8/5 at 375px is a 335x209 letterbox strip, a banner rather than a
     photograph. 4/3 gives each cover real presence without turning
     the index into a scroll marathon. */

  .category-grid .plate--wide {
    aspect-ratio: 4 / 3;
  }

  /* ---- Industries: a real index, not a ragged centered wrap ------
     Centered flex-wrap put Healthcare and Automotive on a shared line
     and orphaned the rest. A ruled list is legible and deliberate. */

  .industries-head {
    text-align: left;
  }

  .industries {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .industries span {
    display: block;
    padding-block: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.16);
    font-size: 1.05rem;
    font-weight: 500;
  }

  .industries span:first-child {
    border-top: 0;
    padding-top: 0;
  }

  /* ---- Tap targets ---------------------------------------------
     Audited every <a>/<button> on the page at 375px: the ones below
     are the links a thumb actually has to hit and all came in under
     the 44px minimum — "View gallery" (the primary CTA in the pinned
     sequence) was 21px tall, the footer links 22-24px.
     Padding, not font-size, so nothing about the type changes; the
     negative margin on .featured__cta keeps its optical spacing where
     it was now that the box is twice as tall. */

  .featured__cta {
    margin-top: 1.25rem;
    padding-block: 0.75rem;
  }

  .footer-col a {
    padding-block: 0.72rem;
  }

  .footer-col ul {
    gap: 0.25rem;
  }

  .nav__logo {
    padding-block: 0.15rem;
  }

  /* ---- Client logos: tighter wall ------------------------------- */

  .clients-grid {
    margin-top: 2rem;
    gap: 1.75rem 2.25rem;
  }

  .clients-grid__logo {
    height: 1.5rem;
    max-width: 6.5rem;
  }

  /* ---- Lightbox: thumb-reachable controls ------------------------
     Edge-anchored arrows sat on top of the photo at this width (the
     image spans 20-355px; the arrows sat at 4px and 323px). Move both
     into a bottom bar where a thumb already is, give them a visible
     pill so they read as controls, and leave the frame clean. Swipe
     is wired up in js/main.js. */

  .lightbox {
    padding: 3.25rem 1rem 7.5rem;
    overscroll-behavior: contain;
  }

  .lightbox__stage {
    height: 66dvh;
  }

  .lightbox__nav {
    top: auto;
    bottom: 1.75rem;
    transform: none;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .lightbox__nav--prev {
    left: 50%;
    margin-left: -5rem;
  }

  .lightbox__nav--next {
    right: 50%;
    margin-right: -5rem;
  }

  .lightbox__caption {
    margin-top: 1rem;
    font-size: 0.75rem;
  }

  /* ---- Mobile menu: full-screen overlay, not a cramped accordion --
     The grid-template-rows accordion opened to a ~200px panel with the
     hero headline crashing into its bottom edge. A phone menu has the
     whole screen available; using it costs nothing and removes the
     unfinished-dropdown read. Closed state is visibility:hidden, so
     the links leave the tab order when the menu is shut. */

  /* .nav.is-open sets backdrop-filter, and a filtered ancestor becomes
     the containing block for position:fixed descendants — which clipped
     the overlay below to the height of the nav bar itself. The overlay
     is opaque, so the bar does not need its own blur while open. */
  .nav.is-open {
    backdrop-filter: none;
  }

  .nav__mobile {
    position: fixed;
    inset: 0;
    /* body{overflow:hidden} is unreliable on iOS Safari; this stops the
       page behind from scroll-chaining when the overlay is swiped,
       without the scroll-position jump that position:fixed on <body>
       causes. */
    overscroll-behavior: contain;
    display: block;
    grid-template-rows: none;
    overflow-y: auto;
    padding: calc(var(--nav-height) + 2.5rem) 1.25rem 2.5rem;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-base) var(--ease-out),
      visibility 0s var(--duration-base);
  }

  .nav.is-open .nav__mobile {
    opacity: 1;
    visibility: visible;
    border-bottom: 0;
    transition: opacity var(--duration-base) var(--ease-out);
  }

  .nav__mobile ul {
    padding: 0;
    display: grid;
    gap: 0;
  }

  .nav__mobile a {
    padding-block: 1.1rem;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .nav__mobile li:first-child a {
    border-top: 1px solid var(--color-border);
  }

  /* The bar itself has to stay above the overlay so the X is tappable. */
  .nav__inner {
    position: relative;
    z-index: 2;
  }
}

/* ---------------------------------------------------------------
   Touch devices: hover-only affordances are invisible
   ---------------------------------------------------------------
   Several elements rested in a dimmed "waiting for hover" state that
   a touchscreen can never resolve: client logos sat at 0.55 opacity
   permanently, and the "View Gallery" plate overlay never appeared.
   On no-hover pointers, show the resting state as the finished state.
   --------------------------------------------------------------- */

@media (hover: none) {
  .clients-grid__logo {
    opacity: 0.85;
  }

  /* No hover on a touch screen, so the brackets would never be seen.
     They rest in their closed position instead -- slightly held back,
     since here they are a label for the target rather than a response
     to the pointer. Only one panel is on screen at a time, so this
     never stacks up. */
  .featured__cta::before {
    inset: 0;
    opacity: 0.8;
  }

  .plate__reveal {
    display: none;
  }
}

/* ---------------------------------------------------------------
   Plate labels: scrim so captions survive bright photographs
   ---------------------------------------------------------------
   "Food" over a lit burger and "1 Photo" over white sky were both
   unreadable. The label is already bottom-aligned, so a short
   bottom-up gradient fixes it without touching the image treatment.
   --------------------------------------------------------------- */

.plate__label::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.78) 100%);
}

.plate__index,
.plate__name {
  position: relative;
  z-index: 1;
}

/* Lightbox position counter (appended by js/main.js when a category has
   more than one photo). Flex + baseline so the counter sits on the same
   line as the category label at any size; tabular figures so the number
   doesn't shift the layout as it ticks from 9 to 10. */
.lightbox__caption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.9rem;
}

.lightbox__counter {
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------
   Gallery pages — gallery/<category>.html
   Generated by generate_galleries.py; see that file before editing
   the markup, since hand edits there get overwritten on the next run.
   --------------------------------------------------------------- */

.gallery-page {
  /* .nav is position: fixed, and there is no hero here to sit under it. */
  padding-top: calc(var(--nav-height) + var(--space-2xl));
}

/* The hairline and accent tick mark a division BETWEEN sections. This
   is the only section on the page, so there is nothing to divide. */
.gallery-page::before,
.gallery-page::after {
  display: none;
}

.gallery-page__head {
  max-width: 42rem;
}

.gallery-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--color-muted);
  transition: color var(--duration-fast) var(--ease-out), gap var(--duration-base) var(--ease-out);
}

.gallery-page__back svg {
  width: 0.9rem;
  height: 0.9rem;
}

.gallery-page__back:hover,
.gallery-page__back:focus-visible {
  color: var(--color-foreground);
  gap: 0.6rem;
}

.gallery-page h1 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
}

.gallery-page__desc {
  margin-top: 1rem;
  color: var(--color-muted);
}

/* ---------------------------------------------------------------
   Credential badge

   Typeset, not the FAA seal. A Part 107 certificate licenses the pilot;
   it does not license the agency's mark, and putting a government seal
   on a commercial page reads as endorsement by that agency, which is
   exactly what its use rules exist to prevent. The claim is the asset
   here, so the claim is what gets set.
   --------------------------------------------------------------- */

.credential {
  margin-top: 1.25rem;
  /* .featured__content is a stretch flex column, so without this the
     badge runs the full width of the copy block. */
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-muted);
}

.credential svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: var(--color-accent);
}

/* A category can lead with its film. It takes the whole row -- a 16:9
   reel squeezed into one column of a 4:5 grid would be a letterboxed
   sliver -- and it is a player, not a photo, so it opts out of the
   click-to-zoom cursor. */
.gallery__item--film {
  grid-column: 1 / -1;
}

.gallery--tiles .gallery__item--film {
  cursor: default;
}

.plate--film {
  aspect-ratio: 16 / 9;
}

/* Tiles open to full size on click (js/gallery-zoom.js). The homepage
   grid dims hard on hover because it has a label to sit behind; here
   there is nothing to back, so the dim is just a hint that the tile does
   something, and the cursor says what. */
.gallery--tiles .gallery__item {
  cursor: zoom-in;
}

.gallery--tiles .gallery__item .plate {
  /* the tab stop lands here, so it has to show */
  outline-offset: 3px;
}

.gallery--tiles .gallery__item:hover .plate::before {
  background: rgba(0, 0, 0, 0.28);
}

/* The original is hidden while its copy is open, so the photo is never
   in two places at once. */
.gallery--tiles .gallery__item.is-zoomed .plate__img {
  opacity: 0;
}

/* ---------------------------------------------------------------
   Click-to-zoom overlay
   The frame animates top/left/width/height only -- see the note at the
   top of js/gallery-zoom.js for why object-fit stays on `cover` the
   whole way through.
   --------------------------------------------------------------- */

.zoom-backdrop {
  position: fixed;
  inset: 0;
  /* above .nav, which sits at 100 */
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
  transition: opacity var(--duration-base) var(--ease-out);
}

.zoom-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.zoom-frame {
  position: fixed;
  z-index: 201;
  display: none;
  object-fit: cover;
  /* Clicks land on the photo and stop there -- only the area around it
     closes, which is what makes "click outside to put it back" true. */
  pointer-events: auto;
  cursor: default;
  will-change: top, left, width, height;
}

.zoom-frame.is-visible {
  display: block;
}

/* ---------------------------------------------------------------
   Gallery prose

   The long-form copy under each gallery grid. It exists so a gallery
   page can answer the query that brought someone to it -- a wall of
   photographs with eighty words of furniture around it ranks for
   nothing, however good the photographs are.

   It sits BELOW the grid on purpose. This is a portfolio: the work
   leads, and the reading is there for whoever wants it. Position
   within the document matters far less to a crawler than it did, and
   it matters a great deal to someone who came here to look.

   Measure is capped near 38rem rather than filling .container. Line
   length is the whole of readability on a dark background, where
   long lines are markedly harder to track back.
   --------------------------------------------------------------- */

.gallery-prose {
  max-width: 38rem;
  margin-top: var(--space-4xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.gallery-prose h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  line-height: 1.15;
}

.gallery-prose p {
  margin-top: 1.1rem;
  color: var(--color-muted);
  /* Looser than the site default: this is the only place on the site
     anyone reads five paragraphs in a row. */
  line-height: 1.75;
}

.gallery-prose__faq-head {
  margin-top: var(--space-3xl);
}

.gallery-prose__faq {
  margin-top: var(--space-lg);
}

.gallery-prose__qa + .gallery-prose__qa {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.gallery-prose__qa h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--color-foreground);
}

.gallery-prose__qa p {
  margin-top: 0.6rem;
}

.gallery-page__foot {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.gallery-page__foot p {
  color: var(--color-muted);
}


/* ---------------------------------------------------------------
   Intro curtain

   The mark alone on black; clicking it slides the wordmark out from
   behind the mark, holds, then dissolves the whole thing into the site.

   The reveal is a width animation on a clipped window whose left edge
   sits UNDER the mark, so the first sliver of type is hidden behind it
   and the words genuinely emerge rather than fading up in place. The
   lockup is centred by flex, so as that window widens the pair
   re-centres on its own and the mark drifts left -- no second
   animation, and it lands correctly at any viewport width.
   --------------------------------------------------------------- */

.intro {
  /* One token sizes the whole lockup. */
  --intro-mark-h: clamp(8rem, 24vh, 15rem);
  position: fixed;
  inset: 0;
  /* above .nav (100) and the zoom overlay (201) */
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--color-background);
  transition: opacity 900ms var(--ease-out);
}

.intro.is-dissolving {
  opacity: 0;
  pointer-events: none;
}

.intro__btn {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.intro__lockup {
  display: flex;
  align-items: flex-start;
}

.intro__mark {
  /* Capped at 15rem because the mark is now built from the 404x512
     artwork: 240px on a 2x display is 480 device pixels against 512
     available, so it never upscales. The old 7.5rem cap existed only
     because the supplied colour file holds 99x125. */
  height: var(--intro-mark-h);
  width: auto;
  /* flex items shrink by default, and the global img { max-width: 100% }
     gives the browser a second reason to narrow this one. Either will
     squash the mark horizontally while its height stays pinned, which
     turns the aperture into an ellipse. Both are switched off: the
     logo's proportions are not negotiable. */
  flex: none;
  max-width: none;
  /* keeps the mark over the emerging type */
  position: relative;
  z-index: 2;
}

.intro__word {
  display: block;
  overflow: hidden;
  width: 0;
  /* Same reason as the mark: this window's width is animated, so the
     flex layout must not have an opinion about it. */
  flex: none;
  /* Vertical placement is taken from the supplied lockup, not from
     centring. Measured there, the wordmark's centre sits at 0.600 of
     the mark's height -- it is aligned to the CIRCLE (whose centre is
     at 0.594), not to the mark's bounding box, which is 10% taller at
     the top because of the spire. Centring the two boxes puts the type
     visibly high, which is the misalignment.
       top = 0.600 - 0.4176/2 = 0.3912 */
  align-self: flex-start;
  margin-top: calc(var(--intro-mark-h) * 0.3912);
  /* starts tucked behind the mark */
  margin-left: calc(var(--intro-mark-h) * -0.06);
  transition: width 760ms var(--ease-out), margin-left 760ms var(--ease-out);
}

.intro.is-revealing .intro__word {
  width: var(--wordmark-w, auto);
  /* the lockup's own gutter, as a share of the mark height */
  margin-left: calc(var(--intro-mark-h) * 0.1686);
}

.intro__word img {
  /* Measured off the supplied lockup, not eyeballed, and driven from
     the same token as the mark so the proportions cannot drift. */
  height: calc(var(--intro-mark-h) * 0.4176);
  width: auto;
  /* beat the global img { max-width: 100% }, which would otherwise
     squash it to the clipped window's width */
  max-width: none;
  transform: translateX(-22%);
  transition: transform 760ms var(--ease-out);
}

.intro.is-revealing .intro__word img {
  transform: translateX(0);
}

.intro__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .intro__word img {
    transform: none;
  }
}
