/* ================================================================
   SHOAL STUDIO — LANDING PAGE
   ================================================================ */


/* ================================================================
   DESIGN TOKENS
   ================================================================ */

:root {
  /* Color */
  --black:       #0E161F;
  --stone:       #EFEEE5;
  --gold:        #CA7F29;
  --wave-blue:   #33758D;
  --mid-blue:    #143242;

  /* Stone opacity scale */
  --stone-80:    rgba(239, 238, 229, 0.80);
  --stone-65:    rgba(239, 238, 229, 0.65);
  --stone-40:    rgba(239, 238, 229, 0.40);
  --stone-20:    rgba(239, 238, 229, 0.20);
  --stone-10:    rgba(239, 238, 229, 0.10);

  /* Typography */
  --font:        'Graphik', 'Inter', system-ui, sans-serif;

  /* Spacing */
  --pad:         clamp(1.5rem, 5vw, 5rem);
  --max-w:       1380px;

  /* Section rhythm — shared scale so gaps between sections read as
     one deliberate system rather than each section inventing its
     own. --space-lg is reserved for the studio section's intentional
     blue-ground pause. */
  --space-sm:    clamp(1.75rem, 3.5vw, 2.75rem);
  --space-md:    clamp(2.5rem, 5vw, 4rem);
  --space-lg:    clamp(3.5rem, 7vw, 6rem);

  /* Easing + motion timing — one small system for every interaction:
     --dur-move for things that change place or appear in context
     (heights, overlays opening), --dur-fade for crossfades and
     anything leaving, --dur-hover for hover/focus color. */
  --ease:        cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur-move:    240ms;
  --dur-fade:    180ms;
  --dur-hover:   200ms;
}


/* ================================================================
   FONTS — Graphik (place files in assets/fonts/)
   If Graphik files are not available, Inter (Google Fonts) is used.
   ================================================================ */

@font-face {
  font-family: 'Graphik';
  src: url('assets/fonts/Graphik-Regular.woff2') format('woff2'),
       url('assets/fonts/Graphik-Regular.woff')  format('woff');
  font-weight: 400;
  font-style:  normal;
  font-display: swap;
}

@font-face {
  font-family: 'Graphik';
  src: url('assets/fonts/Graphik-Semibold.woff2') format('woff2'),
       url('assets/fonts/Graphik-Semibold.woff')  format('woff');
  font-weight: 600;
  font-style:  normal;
  font-display: swap;
}

/* Inter fallback is loaded via <link> in index.html (no render-blocking @import) */


/* ================================================================
   RESET
   ================================================================ */

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

/* scrollbar-gutter: locking scroll for the lightbox never shifts the
   page sideways on systems with always-visible scrollbars.
   scroll-padding-top: any focus/validation scroll clears the fixed nav. */
html {
  scroll-behavior:   smooth;
  scrollbar-gutter:  stable;
  scroll-padding-top: 5rem;
}

body {
  background-color:          var(--black);
  color:                     var(--stone);
  font-family:               var(--font);
  font-weight:               400;
  -webkit-font-smoothing:    antialiased;
  -moz-osx-font-smoothing:   grayscale;
  overflow-x:                hidden;
}

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

a {
  color:           inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor:      pointer;
}

/* Sections receive focus after nav/anchor jumps (main.js) purely so
   the next Tab starts there — no ring on the section itself. */
section[tabindex="-1"]:focus {
  outline: none;
}

/* One keyboard focus ring for every link and button; components with
   their own (more specific) focus-visible rule keep theirs. */
a:focus-visible,
button:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: 2px;
}


/* ================================================================
   SCROLL REVEAL — fail-safe by design
   Content is VISIBLE by default. main.js adds .reveal-pending
   immediately before observing, then removes it when the element
   enters the viewport (or after a settle timeout). If JavaScript
   is disabled, main.js fails to load, or init throws, nothing was
   ever hidden.
   ================================================================ */

.reveal {
  transition: opacity 0.48s var(--ease),
              transform 0.48s var(--ease);
}

.reveal.reveal-pending {
  opacity:   0;
  transform: translateY(16px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.reveal-pending {
    opacity:    1;
    transform:  none;
    transition: none;
  }

  .work-image {
    transition: none;
  }
}


/* ================================================================
   LAYOUT UTILITIES
   ================================================================ */

.container {
  max-width: var(--max-w);
  margin:    0 auto;
  padding:   0 var(--pad);
}

.container-centered {
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  text-align:      center;
  gap:             2.5rem;
}

.section {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

/* Visually hidden but present for screen readers / document structure —
   used for headings whose visible label was removed from the page but
   whose landmark role (e.g. "Explore our work" before the portfolio)
   still matters for navigation. */
.sr-only {
  position: absolute;
  width:    1px;
  height:   1px;
  padding:  0;
  margin:   -1px;
  overflow: hidden;
  clip:     rect(0, 0, 0, 0);
  white-space: nowrap;
  border:   0;
}


/* ================================================================
   NAVIGATION
   ================================================================ */

/* Transparent by default so hero media reaches the true top edge —
   .scrolled (added by main.js once the visitor moves past roughly
   the hero's midpoint) brings in the solid ground + blur. */
.nav {
  position:           fixed;
  top:                0;
  left:               0;
  right:              0;
  z-index:            100;
  display:            flex;
  align-items:        center;
  justify-content:    space-between;
  padding:            1.4rem var(--pad);
  background:         transparent;
  transition:         background-color 0.3s var(--ease);
}

.nav.scrolled {
  background:         rgba(14, 22, 31, 0.85);
  backdrop-filter:    blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Logo */
.nav-logo {
  display:     flex;
  align-items: center;
  gap:         0.7rem;
  color:       var(--stone);
  transition:  opacity 0.2s;
}

@media (hover: hover) {
  .nav-logo:hover {
    opacity: 0.65;
  }
}

.nav-logo-mark {
  width:  26px;
  height: 26px;
  color:  var(--stone);
  flex-shrink: 0;
}

.nav-wordmark {
  font-weight:    600;
  font-size:      0.7rem;
  letter-spacing: 0.18em;
  color:          var(--stone);
}

/* Nav links */
.nav-links {
  display:     flex;
  align-items: center;
  gap:         2.25rem;
}

.nav-link {
  font-weight:    400;
  font-size:      0.82rem;
  letter-spacing: 0.03em;
  color:          var(--stone-80);
  transition:     color 0.2s;
}

@media (hover: hover) {
  .nav-link:hover {
    color: var(--stone);
  }
}

.nav-cta {
  color: var(--gold);
}

@media (hover: hover) {
  .nav-cta:hover {
    color:   var(--gold);
    opacity: 0.75;
  }
}

/* Hamburger — hidden on desktop; 44px minimum touch target */
.nav-hamburger {
  display:         none;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  gap:             5px;
  width:           44px;
  height:          44px;
  margin:          -8px;
  background:      none;
  border:          none;
  padding:         0;
}

.nav-hamburger span {
  display:    block;
  width:      22px;
  height:     1px;
  background: var(--stone);
  transition: transform var(--dur-move) var(--ease), opacity var(--dur-move);
}

.nav-hamburger.open span:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav-hamburger.open span:last-child {
  transform: rotate(-45deg) translate(4px, -4px);
}


/* ================================================================
   MOBILE OVERLAY MENU
   ================================================================ */

.mobile-overlay {
  display:         none;
  position:        fixed;
  inset:           0;
  z-index:         99;
  background:      var(--black);
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  gap:             2.5rem;
  opacity:         0;
  visibility:      hidden;  /* keeps closed-menu links out of the tab order */
  pointer-events:  none;
  transition:      opacity var(--dur-fade) var(--ease),
                   visibility 0s var(--dur-fade);
}

.mobile-overlay.open {
  opacity:        1;
  visibility:     visible;
  pointer-events: auto;
  transition:     opacity var(--dur-move) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .nav-hamburger span,
  .mobile-overlay,
  .mobile-overlay.open {
    transition: none;
  }
}

.mobile-link {
  font-weight:    600;
  font-size:      clamp(1.8rem, 6vw, 2.6rem);
  letter-spacing: 0.02em;
  color:          var(--stone);
  transition:     color 0.2s;
}

@media (hover: hover) {
  .mobile-link:hover {
    color: var(--gold);
  }
}


/* ================================================================
   SECTION 1 — HERO
   ================================================================ */

.hero {
  position:   relative;
  height:     100vh;
  min-height: 560px;
  overflow:   hidden;
}

/* Video or image — fills the hero */
.hero-media {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  object-fit: cover;
}

/* Subtle tint — legibility comes mainly from the bottom gradient below;
   this just keeps the very top of the frame from fighting the nav. */
.hero-overlay {
  position:   absolute;
  inset:      0;
  background: rgba(14, 22, 31, 0.1);
  z-index:    1;
}

/* Dedicated top gradient — keeps the transparent nav's wordmark/
   links legible against whatever the hero media happens to show,
   independent of .hero-overlay's much lighter full-frame tint. */
.hero::after {
  content:    '';
  position:   absolute;
  top:        0;
  left:       0;
  right:      0;
  height:     180px;
  background: linear-gradient(to bottom, rgba(6, 10, 14, 0.55) 0%, transparent 100%);
  z-index:    1;
  pointer-events: none;
}

/* Bottom gradient — bleeds hero into next section as one surface */
.hero-gradient {
  position:   absolute;
  bottom:     0;
  left:       0;
  right:      0;
  height:     440px;
  background: linear-gradient(to top, var(--black) 0%, transparent 100%);
  z-index:    2;
}

/* Opening line — bottom-left, not centered. Bottom offset is taller
   than it visually needs to be on its own — it's sized to guarantee
   real clearance above .hero-scroll-cue (which sits below it, near
   the true bottom edge) at every viewport height down to the 600px
   cutoff where the cue hides itself. Verified via measured bounding
   boxes, not assumed from the numbers alone. */
.hero-content {
  position:  absolute;
  bottom:    clamp(5rem, 8vh, 6rem);
  left:      var(--pad);
  right:     var(--pad);
  z-index:   3;
  max-width: 1300px;
}

/* Eyebrow — small, uppercase, gold-accented label identifying the
   offering at a glance before the headline; sits tight against
   .hero-line-primary (0.6rem gap) so all three lines (eyebrow,
   headline, supporting line) read as one connected block. Replaced
   the old plain-text "Full service production studio" line, which
   sat below the supporting line instead of above the headline. */
.hero-eyebrow {
  font-weight:    600;
  font-size:      0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  0.6rem;
}

/* Primary action for a production studio's homepage — real weight,
   not a footnote. Icon + text, stone at full opacity, gold on hover. */
.hero-reel-link {
  display:        inline-flex;
  align-items:    center;
  gap:            0.6rem;
  font-weight:    600;
  font-size:      0.95rem;
  letter-spacing: 0.04em;
  color:          var(--stone);
  margin-top:     0.9rem;
  transition:     color 0.2s;
}

.hero-reel-link:hover,
.hero-reel-link:focus-visible {
  color: var(--gold);
}

.hero-reel-icon svg {
  width:  30px;
  height: 30px;
  display: block;
}

.hero-tagline {
  display: block;
}

/* "Where land & water meet." is the dominant statement — largest,
   boldest. text-wrap:balance only matters at narrower widths where
   this now wraps to two lines (it fits on one line at typical
   desktop widths) — it keeps that split even instead of risking a
   single orphaned word on its own line. */
.hero-line-primary {
  display:        block;
  font-weight:    700;
  font-size:      clamp(2.2rem, 5vw, 4.4rem);
  line-height:    1.08;
  letter-spacing: -0.02em;
  color:          var(--stone);
  text-wrap:      balance;
}

/* The continuation reads as clearly secondary — noticeably smaller
   and lighter, not a second headline of equal weight. Natural
   wrapping only (no forced breaks), so it reflows cleanly at any
   width without risking an isolated word. */
.hero-line-secondary {
  display:        block;
  font-weight:    400;
  font-size:      clamp(1.15rem, 2.2vw, 1.7rem);
  line-height:    1.3;
  letter-spacing: -0.005em;
  color:          var(--stone-80);
  margin-top:     0.55rem;
  max-width:      34ch;
  text-wrap:      balance;
}

/* Scroll cue — deliberately secondary: small, muted, bottom-center,
   independent of .hero-content's bottom-left block so it never
   competes with the headline/reel link. Real link to #clients, so
   it works with JS disabled; keyboard-focusable with a visible
   focus ring; padding pads the tap target past 44px without
   visually growing the mark much. */
.hero-scroll-cue {
  position:       absolute;
  left:           50%;
  bottom:         1rem;
  transform:      translateX(-50%);
  z-index:        3;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            0.35rem;
  padding:        0.4rem 0.75rem;
  color:          var(--stone-65);
  transition:     color 0.2s;
}

.hero-scroll-cue:hover,
.hero-scroll-cue:focus-visible {
  color: var(--stone);
}

.hero-scroll-cue:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: 2px;
}

.hero-scroll-label {
  font-weight:    500;
  font-size:      0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height:    1.2;
}

.hero-scroll-arrow svg {
  width:      14px;
  height:     14px;
  display:    block;
  animation:  hero-scroll-bob 2.6s ease-in-out infinite;
}

/* Small travel, slow, with a hold at each end — not a bounce. */
@keyframes hero-scroll-bob {
  0%, 20%   { transform: translateY(0); }
  50%       { transform: translateY(5px); }
  80%, 100% { transform: translateY(0); }
}

/* No safe room to guarantee zero overlap with the headline on very
   short viewports (e.g. landscape phones) — hide rather than risk
   collision. .hero's own min-height is 560px / 500px (see below),
   so this only kicks in below that. */
@media (max-height: 600px) {
  .hero-scroll-cue {
    display: none;
  }
}

/* Placed AFTER the unconditional animation rule above on purpose —
   same specificity, so source order decides the tie, and a media
   query earlier in the file does NOT win just for being conditional.
   (Caught this the hard way: an earlier attempt put this override
   near the top of the file, where the later unconditional rule
   silently beat it regardless of the user's motion preference.) */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-arrow svg {
    animation: none;
  }
}


/* ================================================================
   SECTION 2 — TRUSTED BY (client trust group)
   Continuous right-to-left marquee (see index.html's comment above
   this section for the full rationale). .clients-marquee is a
   sibling of .container, not nested in it, so it can run full
   viewport width; the label stays inset inside .container above it.
   ================================================================ */

.section-clients {
  padding-top:    var(--space-md);
  /* Modest, deliberate gap into the portfolio below — .section-work
     itself carries no top padding, so this is the ENTIRE gap between
     the logo row and the Twin Rivers flagship tile. Keep it as the
     one place that controls that transition. */
  padding-bottom: var(--space-sm);
}

.clients-label {
  font-weight:    600;
  font-size:      0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--stone-65);
  text-align:     center;
  margin-bottom:  1.75rem;
}

/* overflow:hidden viewport for the track; the mask fade is what
   makes logos "enter and leave" rather than hard-cut at the edge —
   fixed px stops (not %) so the fade stays the same modest width at
   every viewport instead of ballooning on wide desktop screens.
   width/margin: full width by default (matches every other full-
   bleed section on the page); main.js caps max-width to exactly one
   logo sequence's own rendered width once it's measured, and the
   auto margins center the resulting band. On phone/tablet the 9-logo
   sequence is already wider than the viewport, so the cap never
   actually binds there — full width, unchanged. It only visibly
   narrows the strip on wide desktop viewports, which is the
   deliberate trade-off: the alternative is either an empty gap at
   the loop point or the same client logo visible twice at once,
   neither of which is acceptable, and repeating logos or shrinking
   them to force a fit was explicitly ruled out too. */
.clients-marquee {
  width:              100%;
  margin:             0 auto;
  overflow:           hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 48px, black calc(100% - 48px), transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0, black 48px, black calc(100% - 48px), transparent 100%);
}

/* width:max-content so the track is exactly as wide as its two
   .clients-set children combined; translateX(-50%) is therefore
   always exactly "one set's width." Because both sets are
   display:contents (below), every logo across both — real and
   duplicate — sits in ONE flex row sharing this same gap, including
   across the seam between them, which is what actually sells the
   loop as seamless, not just the -50% math.
   No animation by default, and .clients-set--duplicate defaults to
   display:none (see below) — .is-marquee-ready (added by main.js
   only once .clients-marquee's width cap and the animation speed are
   both calibrated) is what reveals the duplicate and starts the
   animation, together. A no-JS visitor, or a visitor with reduced
   motion, gets the 9 real logos as a plain static row instead —
   correctly single, never animated, never doubled. */
.clients-track {
  --clients-gap: clamp(1.5rem, 3vw, 2.25rem);
  display:       flex;
  align-items:   center;
  gap:           var(--clients-gap);
  /* Matches `gap` exactly (same variable) and closes a genuine gap in
     the flex math: 18 flat logos only have 17 gaps between them, so
     the natural track width is 2x one true sequence-width MINUS one
     gap — translateX(-50%) would then land half a gap short of where
     the duplicate sequence actually starts, a small but real seam
     misalignment. This trailing pad adds the missing 18th gap so the
     track is exactly 2x one sequence's true width, and -50% is exact. */
  padding-right: var(--clients-gap);
  width:         max-content;
}

.clients-set {
  display: contents;
}

.clients-set--duplicate {
  display: none;
}

.clients-track.is-marquee-ready {
  animation: clients-marquee var(--marquee-duration, 32s) linear infinite;
}

.clients-track.is-marquee-ready .clients-set--duplicate {
  display: contents;
}

@keyframes clients-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.client-logo {
  width:       auto;
  flex-shrink: 0;
  opacity:     0.8;
}

/* Heights are tuned per mark for equal OPTICAL weight, not equal
   box size. Two separate corrections went into these numbers:
   (1) apsu.png, smithey.png, wildfly.png, blueline.png, and hss.png
   all had real transparent padding baked into the source file — each
   was re-cropped to its visible bounding box so a height here maps
   to actual visible ink, not padded canvas.
   (2) Even padding-free, height-only sizing favors wide horizontal
   lockups (Catch Co., SGI, APSU) over compact marks (McEwen,
   Smithey) — a wide logo at the same height simply covers more
   area and reads "bigger". McEwen, Smithey, Blue Line Co., Patterson,
   and HSS (all compact/badge-shaped marks) run taller than the wide
   wordmarks on purpose so total footprint, not just height, lands in
   the same range. Set by eye against the actual rendered row, not a
   pure formula. Now a single set of heights for every width — the
   marquee no longer needs a row to fit the full viewport, so the
   old 1200px fluid-scale and 768px wrap-to-two-rows systems (which
   existed only to solve that fitting problem) are gone entirely. */
.client-logo--mcewen    { height: 58px; }
.client-logo--smithey   { height: 66px; }
.client-logo--catchco   { height: 26px; }
.client-logo--apsu      { height: 36px; }
.client-logo--sgi       { height: 38px; }
.client-logo--wildfly   { height: 38px; }
.client-logo--blueline  { height: 68px; }
.client-logo--patterson { height: 54px; }
.client-logo--hss       { height: 64px; }
.client-logo--shortleaf { height: 36px; }

@media (max-width: 768px) {
  /* A little smaller and tighter on phones — proportion, not a
     fitting requirement (the marquee scrolls regardless of width). */
  .clients-track { --clients-gap: 1.5rem; }

  .client-logo--mcewen    { height: 46px; }
  .client-logo--smithey   { height: 52px; }
  .client-logo--catchco   { height: 21px; }
  .client-logo--apsu      { height: 29px; }
  .client-logo--sgi       { height: 30px; }
  .client-logo--wildfly   { height: 30px; }
  .client-logo--blueline  { height: 54px; }
  .client-logo--patterson { height: 43px; }
  .client-logo--hss       { height: 51px; }
  .client-logo--shortleaf { height: 29px; }
}

/* Reduced motion: main.js's build is skipped entirely in this case
   (see its top-level `if (!prefersReducedMotion)` guard), so normally
   .clients-set--duplicate is already display:none by default and
   there's nothing more to do here — this block is the CSS-level
   safety net for the one case that can still slip past that JS
   check: prefers-reduced-motion is a *live* media query, so a user
   flipping the OS setting mid-session (after the marquee already
   built, revealed the duplicate, and started animating) reaches this
   via CSS alone. Stop the animation, force the duplicate back to
   hidden regardless of .is-marquee-ready, and let the real row
   scroll horizontally so every logo stays reachable even where it
   doesn't all fit. */
@media (prefers-reduced-motion: reduce) {
  .clients-track {
    animation: none;
    transform: none;
  }

  .clients-marquee {
    width:      100%;
    max-width:  none;
    overflow-x: auto;
  }

  .clients-set--duplicate {
    display: none !important;
  }
}


/* ================================================================
   SECTION 3 — SELECTED WORK
   ================================================================ */

.section-work {
  /* No top padding on purpose — the gap between the logo row and
     the flagship tile is controlled entirely by .section-clients'
     padding-bottom, so the sequence reads as one continuous move
     (client roster -> work) instead of two stacked gaps. */
  padding-top:    0;
  padding-bottom: var(--space-md);
}

/* Flat 2-column grid — every .work-item is a direct child, no
   wrapper/pairing divs. Adding or removing a project is just adding
   or removing one <a class="work-item">; the grid re-flows on its
   own. An odd item count leaves one gap in the last row (deliberate
   trade-off — auto-spanning the orphan tile to fill the row would
   reintroduce the oversized "flagship" look this layout dropped). */
.work-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  gap:                   3px;
}

/* Individual work item — a link to the film */
.work-item {
  position:   relative;
  display:    block;
  overflow:   hidden;
}

.work-item:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: 3px;
}

/* Image / image wrapper — same 16:9 for every tile (no more
   flagship-only 21:9 override). 16:9 keeps the full-bleed grid
   shorter than a 4:3 crop and matches the films' native frame. */
.work-image-wrap {
  position:     relative;
  aspect-ratio: 16 / 9;
  overflow:     hidden;
}

.work-image {
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

@media (hover: hover) {
  .work-item[href]:hover .work-image {
    transform: scale(1.025);
  }
}

/* Play affordance — centered on the image. A permanent soft dark
   backing (not just a drop-shadow) keeps it at consistent contrast
   whether it's sitting on a pale sky or a dark tree canopy — a
   drop-shadow alone doesn't guarantee that, and rendered checks
   showed it didn't. Faint at rest so touch devices without hover
   still register it's playable; brightens on hover/focus. */
.work-play {
  position:       absolute;
  inset:          0;
  display:        flex;
  align-items:    center;
  justify-content: center;
  pointer-events: none;
}

.work-play::before {
  content:    '';
  position:   absolute;
  width:      64px;
  height:     64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 10, 14, 0.45) 0%, rgba(6, 10, 14, 0.15) 70%, transparent 100%);
  opacity:    0.9;
  transition: opacity 0.25s;
}

.work-play svg {
  position:   relative;
  width:      50px;
  height:     50px;
  color:      var(--stone);
  opacity:    0.85;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.work-item[href]:focus-visible .work-play svg {
  opacity:   1;
  transform: scale(1.08);
  color:     var(--gold);
}

@media (hover: hover) {
  .work-item[href]:hover .work-play svg {
    opacity:   1;
    transform: scale(1.08);
    color:     var(--gold);
  }
}

/* A tile without an href is a quiet preview: no play icon, no caption */
.work-item:not([href]) .work-play,
.work-item:not([href]) .work-caption {
  display: none;
}

/* Caption — fused to the image via a bottom scrim, not a separate
   bar, so it's unambiguous which caption belongs to which image
   while scrolling. Name + one client/place line only; format words
   ("Property Film" etc.) live in the lightbox, not here. */
.work-caption {
  position:   absolute;
  left:       0;
  right:      0;
  bottom:     0;
  padding:    1.6rem 1.3rem 1.1rem;
  display:    flex;
  flex-direction: column;
  gap:        0.22rem;
  background: linear-gradient(to top, rgba(6, 10, 14, 0.82) 0%, rgba(6, 10, 14, 0.35) 55%, transparent 100%);
  pointer-events: none;
}

.work-name {
  font-weight:    600;
  font-size:      0.92rem;
  letter-spacing: 0.01em;
  color:          var(--stone);
  text-shadow:    0 1px 8px rgba(0, 0, 0, 0.3);
}

.work-desc {
  font-weight:    400;
  font-size:      0.76rem;
  letter-spacing: 0.03em;
  color:          var(--stone-65);
}

/* Held film (data-film in index.html) — the one line that sets it
   apart from its neighbours. */
.work-status {
  margin-top:     0.2rem;
  font-weight:    600;
  font-size:      0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--gold);
}

/* Hover-preview GIF — layered on top of the static cover, invisible
   until main.js confirms it actually loaded (.gif-ready), so a tile
   whose real GIF file hasn't been uploaded yet just keeps showing its
   cover with no broken-image flash. Reveal is also gated to genuine
   hover-capable pointers so it never triggers (or gets "stuck") on
   touch, where a tap already opens the video. main.js separately
   skips the whole lazy-load under prefers-reduced-motion, so there's
   nothing to reveal there regardless of this rule. */
.work-image--gif {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  object-fit: cover;
  opacity:    0;
  transition: opacity 0.4s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .work-item.gif-ready:hover .work-image--gif,
  .work-item.gif-ready:focus-visible .work-image--gif {
    opacity: 1;
  }
}

/* `hidden` on the grid/row switches the whole "more examples" block
   off (see index.html). Needed explicitly because their own display
   values (grid/flex) would otherwise override the attribute. */
.work-grid--more[hidden],
.work-expand-row[hidden] {
  display: none;
}

/* "More examples" expand/collapse toggle */
.work-expand-row {
  display:         flex;
  justify-content: center;
  margin-top:      1.75rem;
}

.work-expand-toggle {
  display:        inline-flex;
  align-items:    center;
  gap:            0.55rem;
  background:     none;
  border:         none;
  cursor:         pointer;
  color:          var(--stone-65);
  font-family:    inherit;
  font-weight:    600;
  font-size:      0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding:        0.6rem 1rem;
  transition:     color 0.2s;
}

.work-expand-toggle:hover,
.work-expand-toggle:focus-visible {
  color: var(--gold);
}

.work-expand-toggle:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: 2px;
}

.work-expand-icon {
  width:      16px;
  height:     16px;
  transition: transform 0.3s var(--ease);
}

.work-expand-toggle[aria-expanded="true"] .work-expand-icon {
  transform: rotate(180deg);
}

/* Continuation grid — same gutter rhythm as .work-grid above it, no
   border on its own so the two read as one grid, not a bolted-on
   block. .work-grid--collapsed (added by main.js, WORK GRID block)
   caps it to a short peek with a bottom fade hinting more content
   continues below; expanding sets an exact measured max-height
   (never a guessed constant) so the transition is smooth regardless
   of how many placeholder/real tiles end up in here. */
.work-grid--more {
  position:    relative;
  overflow:    hidden;
  /* Real tiles hide the 3px grid gap inside busy photography — flat
     placeholder fill has nothing to hide it in, so the gap reads as
     a stark line unless it matches the same fill the tiles use. */
  background:  var(--mid-blue);
  /* padding, not margin, on purpose: margin sits outside this
     element's own background and would show the page's black behind
     it, recreating the exact same seam problem at the boundary with
     .work-grid above — padding stays inside the mid-blue box, so this
     3px gap (matching the grid's own internal gap value) reads
     exactly like every other seam in the section. */
  padding-top: 3px;
  transition:  max-height 0.45s var(--ease);
}

.work-grid--more.work-grid--collapsed::after {
  content:        '';
  position:       absolute;
  left:           0;
  right:          0;
  bottom:         0;
  height:         90px;
  background:     linear-gradient(to bottom, transparent 0%, var(--black) 100%);
  pointer-events: none;
}

/* Placeholder tiles awaiting real cover photos + GIFs — the muted
   fill + label are the only signal these aren't real yet; no boxed/
   dashed treatment, so they sit in the grid exactly like real tiles
   do. */
/* Top-aligned, not centered — a placeholder tile is ~560px tall at
   most widths, but the collapsed peek only shows its top ~127px
   (.work-grid--collapsed max-height). A vertically centered label
   would sit well below that window and never actually appear in the
   peek, reading as an empty band instead of a legible hint that more
   content continues. Top alignment keeps it visible in both states. */
.work-item--placeholder .work-image-wrap {
  display:         flex;
  align-items:     flex-start;
  justify-content: center;
  background:      var(--mid-blue);
  padding:         2rem 1.5rem;
}

.work-placeholder-label {
  font-style:     italic;
  font-size:      0.82rem;
  color:          var(--stone-40);
  text-align:     center;
}

@media (prefers-reduced-motion: reduce) {
  .work-image--gif {
    transition: none;
  }

  .work-grid--more {
    transition: none;
  }
}


/* ================================================================
   PROJECT LIGHTBOX
   ================================================================ */

.lightbox {
  position:       fixed;
  inset:          0;
  z-index:        200;
  display:        flex;
  align-items:    center;
  justify-content: center;
  padding:        5vh 5vw;
  opacity:        0;
  visibility:     hidden;
  transition:     opacity var(--dur-fade) var(--ease), visibility 0s var(--dur-fade);
}

.lightbox.open {
  opacity:    1;
  visibility: visible;
  transition: opacity var(--dur-move) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox.open {
    transition: none;
  }
}

.lightbox-backdrop {
  position:   absolute;
  inset:      0;
  background: rgba(6, 10, 14, 0.92);
}

/* Width is capped by height too: main.js (fitPanel) measures the
   header + info area into --lb-chrome, so the 16:9 video is only as
   wide as the height left over in 90vh allows — the whole panel fits
   without scrolling on short laptop screens. Floor of 560px (or full
   width if narrower) so very short screens scroll rather than shrink
   the video to a thumbnail. Unset --lb-chrome (no JS) = full width. */
.lightbox-panel {
  position:  relative;
  z-index:   1;
  width:     clamp(min(100%, 560px), calc((90vh - var(--lb-chrome, 0px)) * 16 / 9 + 2px), 100%);
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--black);
  border:    1px solid var(--stone-10);
}

/* A dedicated header bar keeps close from sitting on top of the
   YouTube player's own controls (its settings/CC icons occupy the
   same corner). */
.lightbox-header {
  display:         flex;
  justify-content: flex-end;
  padding:         0.5rem;
  background:      var(--black);
}

.lightbox-close {
  width:      44px;
  height:     44px;
  display:    flex;
  align-items: center;
  justify-content: center;
  background: none;
  border:     none;
  color:      var(--stone-65);
  transition: color 0.2s;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: var(--gold);
}

.lightbox-close svg {
  width:  20px;
  height: 20px;
}

/* Wraps just the video's own 16:9 box (its only in-flow child —
   the nav buttons below are position:absolute) so .lightbox-nav's
   vertical centering lands on the video specifically, not on
   whatever happens to be at the midpoint of the full panel —
   which varies with how long the credits text runs. */
.lightbox-media {
  position: relative;
}

.lightbox-nav {
  position:        absolute;
  top:             50%;
  transform:       translateY(-50%);
  z-index:         2;
  width:           44px;
  height:          44px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      rgba(6, 10, 14, 0.5);
  border:          none;
  border-radius:   50%;
  color:           var(--stone-65);
  transition:      color 0.2s, background-color 0.2s;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  color:      var(--stone);
  background: rgba(6, 10, 14, 0.75);
}

.lightbox-nav--prev { left:  clamp(0.5rem, 2vw, 2rem); }
.lightbox-nav--next { right: clamp(0.5rem, 2vw, 2rem); }

.lightbox-nav svg {
  width:  22px;
  height: 22px;
}

/* Single project on the page (or the lightbox otherwise has nothing
   to step to) — main.js hides these rather than leaving a
   non-functional control visible. */
.lightbox-nav[hidden] {
  display: none;
}

.lightbox-video-wrap {
  position:      relative;
  width:         100%;
  aspect-ratio:  16 / 9;
  background:    #000;
}

.lightbox-video-wrap iframe {
  position: absolute;
  inset:    0;
  width:    100%;
  height:   100%;
  border:   0;
}

/* Held film: fills the video's own 16:9 box (so the panel sizes
   exactly as for any project) — the cover under a scrim, one line,
   and an underline-only password field with an arrow. Fades away
   over the player once unlocked (main.js, revealFilm). */
.screening-frame {
  position:        absolute;
  inset:           0;
  z-index:         1;
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         1.25rem;
  background:      var(--black);
  opacity:         1;
  transition:      opacity var(--dur-fade) var(--ease);
}

.screening-frame.is-leaving {
  opacity:        0;
  pointer-events: none;
}

.screening-image {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  object-fit: cover;
}

.screening-frame::after {
  content:    '';
  position:   absolute;
  inset:      0;
  background: rgba(6, 10, 14, 0.7);
}

.screening-form {
  position:   relative;
  z-index:    1;
  width:      min(100%, 19rem);
  text-align: center;
}

.screening-title {
  font-weight:    600;
  font-size:      clamp(1.05rem, 2.4vw, 1.35rem);
  line-height:    1.25;
  letter-spacing: -0.005em;
  color:          var(--stone);
  margin-bottom:  clamp(0.75rem, 2vw, 1.25rem);
}

.screening-field {
  display:       flex;
  align-items:   center;
  border-bottom: 1px solid var(--stone-20);
  transition:    border-color 0.2s;
}

.screening-field:focus-within {
  border-color: var(--gold);
}

/* 16px keeps iOS from zooming the page on focus. The gold underline
   above is the field's focus indicator. */
.screening-input {
  flex:        1;
  min-width:   0;
  min-height:  44px;
  padding:     0;
  background:  transparent;
  border:      none;
  border-radius: 0;
  color:       var(--stone);
  font-family: inherit;
  font-size:   16px;
}

.screening-input:focus {
  outline: none;
}

.screening-input::placeholder {
  color: var(--stone-40);
}

.screening-submit {
  flex-shrink:     0;
  width:           44px;
  height:          44px;
  display:         flex;
  align-items:     center;
  justify-content: flex-end;
  padding:         0;
  background:      none;
  border:          none;
  color:           var(--stone-65);
  transition:      color 0.2s;
}

.screening-submit:focus-visible {
  color: var(--gold);
}

@media (hover: hover) {
  .screening-submit:hover {
    color: var(--gold);
  }
}

.screening-submit svg {
  width:  18px;
  height: 18px;
}

.screening-status {
  min-height:  1.2rem;
  margin-top:  0.55rem;
  font-size:   0.78rem;
  color:       var(--stone-65);
}

/* The way on — "Watch next: <film>" leads (same voice as the press
   link, a step brighter); the password field opens above it behind
   the quiet "Have a screening password?" below. 44px tap targets,
   with the extra height cancelled so the stack stays compact. */
.screening-next {
  display:        inline-flex;
  align-items:    center;
  gap:            0.45rem;
  min-height:     44px;
  padding:        0;
  background:     none;
  border:         none;
  font-family:    inherit;
  font-size:      0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--stone);
  transition:     color 0.2s;
}

.screening-next svg {
  width:       14px;
  height:      14px;
  flex-shrink: 0;
}

.screening-next:focus-visible {
  color: var(--gold);
}

.screening-reveal {
  display:     block;
  min-height:  44px;
  margin:      -0.6rem auto -0.75rem;
  padding:     0;
  background:  none;
  border:      none;
  font-family: inherit;
  font-size:   0.74rem;
  color:       var(--stone-40);
  transition:  color 0.2s;
}

.screening-reveal:focus-visible {
  color: var(--stone-80);
}

@media (hover: hover) {
  .screening-next:hover {
    color: var(--gold);
  }

  .screening-reveal:hover {
    color: var(--stone-80);
  }
}

.screening-reveal[hidden],
.screening-unlock[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .screening-frame,
  .screening-field,
  .screening-submit,
  .screening-next,
  .screening-reveal {
    transition: none;
  }
}

/* Title / tag / press / credits under the video. Hierarchy: bright
   title, small uppercase descriptor, optional "Featured in" callout,
   then an end-credits style role/name grid below a hairline. */
.lightbox-info {
  padding: 1.5rem clamp(1.2rem, 3vw, 2rem) 1.75rem;
}

.lightbox-name {
  font-weight:    600;
  font-size:      1.35rem;
  line-height:    1.25;
  letter-spacing: -0.005em;
  color:          var(--stone);
  margin-bottom:  0.45rem;
}

.lightbox-tag {
  font-size:      0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--stone-65);
}

/* Press callout — a quiet tinted row with a gold hairline, text only
   (no publication logo). Label, outlet, then the link pushed to the
   right; wraps onto its own line on narrow screens. */
.lightbox-press {
  display:     flex;
  flex-wrap:   wrap;
  align-items: baseline;
  gap:         0.3rem 0.8rem;
  margin-top:  1.15rem;
  padding:     0.7rem 0.95rem;
  background:  rgba(239, 238, 229, 0.04);
  border-left: 2px solid rgba(202, 127, 41, 0.75);
}

.lightbox-press[hidden] {
  display: none;
}

.lightbox-press-label {
  font-size:      0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color:          var(--stone-40);
}

.lightbox-press-outlet {
  font-size: 0.92rem;
  color:     var(--stone);
}

/* 44px-tall tap target via vertical padding, cancelled by an equal
   negative margin so the row's height doesn't change. */
.lightbox-press-link {
  display:        inline-flex;
  align-items:    center;
  gap:            0.35rem;
  margin:         -0.95rem 0 -0.95rem auto;
  padding:        0.95rem 0;
  font-size:      0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--stone-80);
  transition:     color 0.2s;
}

.lightbox-press-link svg {
  width:  11px;
  height: 11px;
  flex-shrink: 0;
}

.lightbox-press-link:hover,
.lightbox-press-link:focus-visible {
  color: var(--gold);
}

.lightbox-press-link:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: -0.55rem;
}

/* Role / name credits — flows left to right like end credits on
   wide screens; a tidy two-column grid on phones (see RESPONSIVE). */
.lightbox-credits {
  display:     flex;
  flex-wrap:   wrap;
  gap:         0.9rem 2.25rem;
  margin-top:  1.25rem;
  padding-top: 1.2rem;
  border-top:  1px solid var(--stone-10);
}

.lightbox-credits[hidden] {
  display: none;
}

.lightbox-credits dt {
  font-size:      0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color:          var(--stone-40);
  margin-bottom:  0.3rem;
}

.lightbox-credits dd {
  font-size: 0.86rem;
  color:     var(--stone-80);
}

/* Linked names (see #creditLinks in index.html) — same color as plain
   names, marked only by a faint dotted underline; gold on hover/focus
   like every other link here. Small vertical padding (cancelled by
   margin) enlarges the tap target without shifting the layout. */
.lightbox-credits dd a {
  display:               inline-block;
  padding:               0.35rem 0;
  margin:                -0.35rem 0;
  text-decoration:       underline dotted;
  text-decoration-color: var(--stone-40);
  text-underline-offset: 4px;
  transition:            color 0.2s, text-decoration-color 0.2s;
}

.lightbox-credits dd a:hover,
.lightbox-credits dd a:focus-visible {
  color:                 var(--gold);
  text-decoration-color: var(--gold);
}

.lightbox-credits dd a:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: 2px;
}

/* Free-text credit notes (items without "Role:"), e.g. Sailboat
   Diaries. Gets the hairline itself when there's no grid above it. */
.lightbox-notes {
  font-size:   0.8rem;
  line-height: 1.7;
  color:       var(--stone-65);
  margin-top:  0.9rem;
}

.lightbox-credits[hidden] + .lightbox-notes {
  margin-top:  1.25rem;
  padding-top: 1.2rem;
  border-top:  1px solid var(--stone-10);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox {
    transition: none;
  }
}

@media (max-width: 640px) {
  .lightbox {
    padding: 0;
  }

  .lightbox-panel {
    max-height: 100vh;
    height:     100%;
    border:     none;
  }
}


/* ================================================================
   SECTION 4 — STUDIO / PROCESS
   Real photographs of Shoal's work across projects (on location, a
   product shoot, post-production) — not frames from a single shoot,
   and no testimonial. Kept compact and single-focus on purpose —
   this section explains the portfolio above, it doesn't compete with
   it. Same dark ground as every other section (no more blue shift) —
   the larger top padding is what marks this as a new, distinct
   section now that color no longer does that job; bottom padding is
   intentionally smaller since .section-cta immediately below carries
   its own.
   ================================================================ */

.section-about {
  padding-top:    clamp(2rem, 4vw, 3.25rem);
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
}

.about-heading {
  font-weight:    600;
  font-size:      clamp(1.5rem, 2.6vw, 2.1rem);
  letter-spacing: -0.01em;
  color:          var(--stone);
}

.about-copy {
  font-weight: 400;
  font-size:   clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  color:       var(--stone-80);
  max-width:   700px;
  margin-top:  1rem;
  text-wrap:   pretty; /* avoid a lone last word ("requires.") */
}

/* Real photos across projects (not one shoot): a larger primary
   ("On location") beside a smaller stacked column (in studio, in
   post). CSS Grid, not flex — primary explicitly spans both rows
   (grid-row: 1 / span 2), so its height is the well-defined sum of
   the two stacked rows + gap, which are in turn set by the two
   secondary photos' own fixed 4:3 ratio. A 2.6:1 column split (~72%
   / 28%) was chosen deliberately — wide enough to keep the primary's
   crop mild (a bit of deliberate framing on on-set-people.jpg, not a
   forced fit) while meaningfully shortening the whole group, since a
   narrower stack column means shorter 4:3 rows and thus a shorter
   spanning primary. .process-photo-stack is
   display:contents — it exists in the DOM only to keep the two
   secondary figures grouped/labeled in the markup and for the mobile
   stack order; it generates no box of its own, so its two children
   place themselves straight into the grid (column 2, rows 1 and 2).
   Contained within .container (not full-bleed like .work-grid above)
   so this never competes in scale with the finished portfolio. */
.process-photos {
  display:               grid;
  grid-template-columns: 2.6fr 1fr;
  grid-auto-rows:        auto;
  gap:                   clamp(0.5rem, 1vw, 0.75rem);
  margin-top:            clamp(1.25rem, 2.5vw, 1.75rem);
}

.process-photo-stack {
  display: contents;
}

.process-photo {
  display:        flex;
  flex-direction: column;
  gap:            0.55rem;
  min-height:     0;
}

.process-photo--primary {
  grid-row:   1 / span 2;
  min-height: 0;
}

.process-photo-frame {
  position:   relative;
  overflow:   hidden;
  min-height: 0;
  min-width:  0;
}

/* Primary gets its own deliberate, wider-than-source ratio (16:10 —
   a purposeful edit down from on-set-people.jpg's native ~3:2, not
   an automatic center crop) instead of being left to derive a height
   from the raw image. That matters beyond intent: with no aspect
   ratio here, an unconstrained <img height:100%> falls back to its
   natural 2000x1333 ratio during Grid's row auto-sizing pass, and
   because primary spans both rows, that raw ~1.5 ratio was quietly
   inflating the secondary rows' height too — a real bug, not just a
   style preference. Declaring 16:10 here keeps it comfortably under
   the two 4:3 secondaries' combined height, so THEY end up governing
   the shared row height (primary stretches to match, per below) —
   the intended, predictable, non-circular relationship. Primary's
   frame is the one flex item that should grow — it needs to fill
   the fixed height its grid cell already has (from spanning both
   rows). The secondary frames must NOT grow (flex-grow:0, the
   default) — with flex:1 1 auto here they were growing past their
   own 4:3 aspect-ratio inside their column, quietly inflating both
   the frame and the row/primary heights derived from it. */
.process-photo--primary .process-photo-frame {
  aspect-ratio: 16 / 10;
  flex: 1 1 auto;
}

/* The two smaller stack photos use the same fixed 4:3 the rest of
   the site already uses for supporting tiles — this also drives each
   grid row's height, which is what gives the primary its height. */
.process-photo--secondary .process-photo-frame {
  aspect-ratio: 4 / 3;
}

.process-photo-frame img {
  display:    block;
  width:      100%;
  height:     100%;
  min-width:  0;
  min-height: 0;
  object-fit: cover;
}

.process-photo-caption {
  font-weight:    500;
  font-size:      0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--stone-65);
}


/* ================================================================
   SECTION 6 — INQUIRY / CTA
   ================================================================ */

.section-cta {
  padding-top:    clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

.cta-body {
  font-weight:  400;
  font-size:    clamp(1rem, 1.6vw, 1.2rem);
  line-height:  1.75;
  color:        var(--stone-80);
}

.btn-cta {
  display:        inline-block;
  font-weight:    600;
  font-size:      0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--gold);
  border:         1px solid var(--gold);
  padding:        1.1rem 2.8rem;
  transition:     background-color 0.25s, color 0.25s;
}

@media (hover: hover) {
  .btn-cta:hover {
    background-color: var(--gold);
    color:            var(--black);
  }
}

.btn-cta:active:not(:disabled) {
  background-color: rgba(202, 127, 41, 0.18);
}

.btn-cta:disabled {
  opacity:      0.5;
  cursor:       not-allowed;
  background-color: transparent;
  color:            var(--gold);
}


/* ----------------------------------------------------------------
   Contact form
   Netlify Forms handles delivery — the receiving address lives only
   in the Netlify dashboard, never in this file. main.js
   progressively enhances submission (fetch + inline status); with
   JS off this is a plain POST that Netlify still processes.
   ---------------------------------------------------------------- */

.contact-form {
  width:      100%;
  max-width:  620px;
  text-align: left;
}

.form-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   1.5rem;
  margin-bottom:          1.75rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  display:        block;
  font-size:      0.78rem;
  font-weight:    600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--stone-65);
  margin-bottom:  0.5rem;
}

.form-optional {
  text-transform: none;
  letter-spacing: normal;
  font-weight:    400;
  color:          var(--stone-40);
}

.form-field input,
.form-field textarea {
  width:            100%;
  background-color: transparent;
  border:           1px solid var(--stone-20);
  color:            var(--stone);
  font-family:      inherit;
  font-size:        0.95rem;
  padding:          0.75rem 0.9rem;
  transition:       border-color 0.2s;
}

.form-field textarea {
  resize:      vertical;
  min-height:  6.5rem;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--stone-40);
}

.form-field input:focus,
.form-field textarea:focus {
  outline:      2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}

/* Bot trap — hidden from sighted users and keyboard/screen-reader
   users alike (unlike .sr-only, this content should reach no one;
   a real visitor should never be able to focus or fill it in). */
.form-honeypot {
  position: absolute;
  left:     -9999px;
  width:    1px;
  height:   1px;
  overflow: hidden;
}

.form-status {
  min-height:     1.4rem;
  font-size:      0.88rem;
  margin-bottom:  1.25rem;
}

.form-status--success {
  color: var(--gold);
}

.form-status--error {
  color: rgba(239, 238, 229, 0.85);
}

.form-submit {
  cursor: pointer;
  background: none;
}


/* ================================================================
   FOOTER
   ================================================================ */

.footer {
  padding:    1.75rem 0;
  border-top: 1px solid var(--stone-10);
}

.footer-inner {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  flex-wrap:       wrap;
  gap:             0.6rem 1.5rem;
}

.footer-name {
  font-weight:    400;
  font-size:      0.78rem;
  letter-spacing: 0.06em;
  color:          var(--stone-65);
}

.footer-copy {
  font-weight: 400;
  font-size:   0.75rem;
  color:       var(--stone-65);
}


/* ================================================================
   BACK TO TOP
   Visibility is entirely JS-driven (main.js) via IntersectionObserver
   on #hero and the footer, plus a MutationObserver watching the
   lightbox/mobile-overlay for their .open class — this file only
   defines the two visual states (.back-to-top / .back-to-top.visible)
   and the transition between them. Own translucent dark backing (not
   just color) since it floats over both photography and dark
   sections and needs to stay legible against either.
   ================================================================ */

.back-to-top {
  position:        fixed;
  right:           max(1.25rem, env(safe-area-inset-right, 0px) + 1rem);
  bottom:          max(1.25rem, env(safe-area-inset-bottom, 0px) + 1rem);
  z-index:         90;
  display:         inline-flex;
  align-items:     center;
  gap:             0.55rem;
  min-height:      44px;
  padding:         0.65rem 1.1rem 0.65rem 0.9rem;
  background:      rgba(14, 22, 31, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border:          1px solid var(--stone-20);
  border-radius:   999px;
  color:           var(--stone-80);
  font-weight:     500;
  font-size:       0.7rem;
  letter-spacing:  0.08em;
  text-transform:  uppercase;
  opacity:         0;
  visibility:      hidden;
  pointer-events:  none;
  transition:      opacity var(--dur-fade) var(--ease), visibility 0s var(--dur-fade),
                   color 0.2s, border-color 0.2s;
}

.back-to-top.visible {
  opacity:        1;
  visibility:     visible;
  pointer-events: auto;
  transition:     opacity var(--dur-fade) var(--ease), transform 0.25s var(--ease),
                   color 0.2s, border-color 0.2s;
}

/* Docked: lifted clear of the footer instead of disappearing there —
   see the BACK TO TOP block in main.js for how --back-to-top-lift
   gets set (measured from the footer's real rendered height, not a
   guessed constant). */
.back-to-top.docked {
  transform: translateY(calc(-1 * var(--back-to-top-lift, 0px)));
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color:        var(--stone);
  border-color: var(--stone-40);
}

.back-to-top:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: 2px;
}

.back-to-top svg {
  width:       16px;
  height:      16px;
  flex-shrink: 0;
}

/* Placed after the rules above on purpose — same lesson as the hero
   scroll arrow: a media query earlier in the file does not win a
   same-specificity tie against an unconditional rule later on, only
   source order does. */
@media (prefers-reduced-motion: reduce) {
  .back-to-top,
  .back-to-top.visible {
    transition: none;
  }
}

/* Small screens: compact 44px icon-only circle. The "Back to top"
   text stays in the DOM, visually hidden (same technique as .sr-only),
   so the button keeps its accessible name. */
@media (max-width: 768px) {
  .back-to-top {
    right:           max(0.75rem, env(safe-area-inset-right, 0px) + 0.5rem);
    bottom:          max(0.75rem, env(safe-area-inset-bottom, 0px) + 0.5rem);
    width:           44px;
    height:          44px;
    padding:         0;
    justify-content: center;
  }

  .back-to-top span {
    position:    absolute;
    width:       1px;
    height:      1px;
    margin:      -1px;
    overflow:    hidden;
    clip:        rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .back-to-top svg {
    width:  18px;
    height: 18px;
  }
}


/* ================================================================
   RESPONSIVE — TABLET & MOBILE
   ================================================================ */

@media (max-width: 900px) {
  .work-grid {
    gap: 2px;
  }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .mobile-overlay {
    display: flex;
  }

  /* Hero */
  .hero-content {
    left:  1.5rem;
    right: 1.5rem;
  }

  /* Work — single column, one project per row */
  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-image-wrap {
    aspect-ratio: 16 / 10;
  }

  /* About — full-width copy. */
  .about-copy {
    max-width: 100%;
  }

  /* Photos: "On location" leads full width in a wide 16:9 crop, then
     "In studio" + "In post" side by side at equal 4:3 size — about
     half the height of stacking all three full width. Same grid as
     desktop, just re-placed: .process-photo-stack is display:contents,
     so its two figures drop straight into the two columns of row 2. */
  .process-photos {
    grid-template-columns: 1fr 1fr;
  }

  .process-photo--primary {
    grid-column: 1 / -1;
    grid-row:    auto;
  }

  /* 16:9 from the 3:2 source trims ~15% of height; biased slightly
     upward so both heads (and the Easyrig arm) stay in frame along
     with the camera at mid-frame. */
  .process-photo--primary .process-photo-frame {
    aspect-ratio: 16 / 9;
    flex:         0 0 auto;
  }

  .process-photo--primary .process-photo-frame img {
    object-position: 50% 38%;
  }

  /* Camera + monitor sit right of center in the source. */
  .process-photo--secondary:first-child .process-photo-frame img {
    object-position: 58% 50%;
  }

  /* The desk only fills about half of post-production.jpg, so at
     half-column size it reads as an empty room. Scale inside the
     clipping frame (uniform scale — cropped, never distorted) toward
     the monitors/desk so the edit workspace stays recognizable. */
  .process-photo--secondary:last-child .process-photo-frame img {
    transform:        scale(1.75);
    transform-origin: 49% 50%;
  }

  /* Contact form — single column, full-width fields */
  .form-grid {
    grid-template-columns: 1fr;
    gap:                   1.25rem;
  }

  /* 16px minimum: iOS Safari zooms the page into any smaller field. */
  .form-field input,
  .form-field textarea {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 500px;
  }

  .hero-gradient {
    height: 300px;
  }
}

/* Lightbox credits on phones: two even columns instead of a ragged
   left-to-right flow. */
@media (max-width: 768px) {
  .lightbox-credits {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   0.9rem 1.25rem;
  }

  .lightbox-name {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  /* Link gets its own left-aligned line under "Featured in …". */
  .lightbox-press-link {
    flex-basis:  100%;
    margin-left: 0;
  }
}

/* ================================================================
   MOBILE — PLAY IN PLACE (see main.js, LIGHTBOX > MOBILE: PLAY IN
   PLACE). The tapped tile is hidden and replaced, in the same grid
   slot, by .work-inline: the player, then the same info markup the
   lightbox uses (so the credits grid, press callout and credit links
   pick up their existing styles, including the phone two-column
   credits rule above).
   ================================================================ */

/* Grid items would otherwise ignore the hidden attribute. */
.work-item[hidden] {
  display: none;
}

.work-inline {
  background: var(--black);
}

/* Title is focused programmatically on open (for screen readers). */
.work-inline .lightbox-name {
  outline: none;
}

/* Controls row under title/client/press: "Show credits" left,
   "Close video" right — two clearly labeled 44px text buttons, with
   a hairline above so they read as controls, not as part of the
   title. Credits open below this row, so the player and title above
   never move. */
.work-inline-controls {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             1rem;
  margin-top:      1rem;
  border-top:      1px solid var(--stone-10);
}

.work-inline-toggle,
.work-inline-close {
  display:        inline-flex;
  align-items:    center;
  gap:            0.45rem;
  min-height:     44px;
  padding:        0;
  background:     none;
  border:         none;
  font-family:    inherit;
  font-size:      0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:     color 0.2s;
}

.work-inline-toggle {
  color: var(--stone-80);
}

.work-inline-close {
  color: var(--stone-40);
}

.work-inline-toggle svg,
.work-inline-close svg {
  width:       12px;
  height:      12px;
  flex-shrink: 0;
}

.work-inline-toggle svg {
  transition: transform 0.15s var(--ease);
}

.work-inline-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Hover color only where hover is real — on phones :hover sticks
   after a tap and would leave the toggle looking highlighted. */
@media (hover: hover) {
  .work-inline-toggle:hover,
  .work-inline-close:hover {
    color: var(--gold);
  }
}

.work-inline-toggle:focus-visible,
.work-inline-close:focus-visible {
  color: var(--gold);
}

.work-inline-toggle:focus-visible,
.work-inline-close:focus-visible {
  outline:        2px solid var(--gold);
  outline-offset: 2px;
}

/* Spacing lives with the credits, not under the controls row, so
   hiding credits doesn't leave an empty band below the buttons. The
   region itself is unpadded so it can ease all the way to 0. */
.work-inline-info {
  padding-bottom: 0.35rem;
}

.work-inline-credits-inner {
  padding: 0.35rem 0 1.4rem;
}

/* Anything easing its height (main.js tweenHeight) clips its content
   while it moves. */
.is-tweening {
  overflow: hidden;
}

.work-inline.is-closing {
  pointer-events: none;
}

/* The iframe is sized once, at 16:9 of the full width, pinned to the
   top of the player box — the box's height eases (tile 16:10 <-> 16:9)
   around it, the iframe itself never resizes. */
.work-inline-video iframe,
.work-inline-video .screening-frame {
  inset:        0 auto auto 0;
  width:        100%;
  height:       auto;
  aspect-ratio: 16 / 9;
}

/* The tile's own thumbnail + caption, covering the player: shown the
   moment a tile is tapped (with a small loading ring in place of the
   play icon) until YouTube has loaded, and faded back in on close.
   The desktop lightbox uses the same cover (a copy of the tile's
   image, no caption) while each project's video loads. */
.work-inline-thumb {
  position:       absolute;
  inset:          0;
  z-index:        1;
  aspect-ratio:   auto;
  height:         100%;
  pointer-events: none;
  opacity:        1;
  transition:     opacity 180ms var(--ease);
}

.work-inline-thumb.is-entering,
.work-inline-thumb.is-leaving {
  opacity: 0;
}

.work-inline-thumb.is-loading .work-play {
  opacity: 0;
}

.work-inline-thumb.is-loading::after {
  content:       '';
  position:      absolute;
  top:           50%;
  left:          50%;
  width:         34px;
  height:        34px;
  margin:        -17px 0 0 -17px;
  border:        2px solid var(--stone-20);
  border-top-color: var(--stone);
  border-radius: 50%;
  animation:     work-inline-spin 0.9s linear infinite;
}

@keyframes work-inline-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .work-inline-thumb {
    transition: none;
  }

  .work-inline-thumb.is-loading::after {
    animation: none;
  }
}

/* Credits region — the grid's own divider is dropped here since the
   controls row above already has one. Shown/hidden instantly (no
   height animation: animating a block with a live iframe in it
   stutters on iOS). */

.work-inline-credits .lightbox-credits {
  margin-top:  0;
  padding-top: 0.6rem;
  border-top:  0;
}

@media (prefers-reduced-motion: reduce) {
  .work-inline-toggle svg {
    transition: none;
  }
}
