/* ==========================================================================
   Osama Rahman — Producer / Director
   Static portfolio. Plain CSS, no build step.

   Sections
   01 tokens            07 grid + tiles
   02 base              08 work CTA
   03 header            09 footer
   04 hero              10 lightbox
   05 clients           11 inner pages
   06 work intro        12 responsive / motion
   ========================================================================== */

/* ---------- 01. Tokens ---------- */
:root {
  --ink: #0a0a0b;
  --ink-soft: #101012;
  --paper: #f2f0ec;
  --dim: #9d9a94;
  --dim-2: #7f7c77;
  --line: rgba(242, 240, 236, 0.13);
  --line-soft: rgba(242, 240, 236, 0.07);
  --accent: #f1ba2e;

  /* One family for the whole site: Inter, in upright for interface text and
     in italic for headlines. Variable weight keeps it to a single request. */
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 72px;
  --max: 1560px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 02. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: #000;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 200;
  background: var(--paper);
  color: #000;
  padding: 12px 18px;
  font-size: 13px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Small caps label — used for every eyebrow on the site */
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}

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

.serif {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- 03. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter);
  background: rgba(10, 10, 11, 0.92);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease);
}

/* The opening screen is the brand and nothing else: the header is invisible
   until you scroll, then the bar and its links fade in beneath the name.
   Scoped to the home page, which is the only one with a hero mark. */
.js.has-hero .site-header {
  background: transparent;
  border-bottom-color: transparent;
}

.js.has-hero .site-header.is-scrolled {
  background: rgba(10, 10, 11, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}

.site-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.site-title,
.menu-toggle {
  position: relative;
  z-index: 95;
}

.site-title,
.main-nav,
.nav-cta {
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

/* Brand only on the first screen. The menu button stays so phones can always
   navigate; the word links and CTA arrive with the first scroll. */
.js.has-hero .site-header:not(.is-revealed) .site-title,
.js.has-hero .site-header:not(.is-revealed) .main-nav,
.js.has-hero .site-header:not(.is-revealed) .nav-cta {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}

.main-nav a {
  position: relative;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 6px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.35s var(--ease);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
}

.main-nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-cta {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.nav-cta:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: #000;
}

/* Burger */
.menu-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-right: -10px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--paper);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Full-screen mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  background: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    visibility 0.35s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(30px, 8.5vw, 44px);
  font-style: italic;
  line-height: 1.15;
  color: var(--paper);
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
}

.mobile-menu a[aria-current="page"] {
  color: var(--accent);
}

.mobile-menu__foot {
  margin-top: 40px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.mobile-menu__foot a {
  font-family: var(--font-ui);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.16em;
  border: 0;
  padding: 2px;
  color: var(--dim);
}

body.menu-open {
  overflow: hidden;
}

/* ---------- 04. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vh, 48px);
  padding: calc(var(--header-h) + 20px) var(--gutter) clamp(70px, 12vh, 120px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  background: radial-gradient(
      42% 46% at 50% 40%,
      rgba(241, 186, 46, 0.13) 0%,
      rgba(241, 186, 46, 0) 70%
    ),
    radial-gradient(60% 50% at 78% 10%, rgba(70, 110, 255, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: auraDrift 18s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(58% 52% at 50% 50%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(
    58% 52% at 50% 50%,
    #000 0%,
    transparent 100%
  );
}

/* The name lockup is layered so each kind of light owns its own surface:
   .hero__mark        scroll zoom (JS) — pinned, then shrinks away
   .hero__mark-inner  one-off entrance (blur + rise)
   .hero__mark-float  slow breathing drift
   .hero__shine       masked light — ambient drift, glint sweep, cursor glow
   The wordmark itself never moves with the pointer.                       */
.hero__mark {
  width: min(1600px, 96vw);
  max-width: 1600px;
  z-index: 5;
}

/* With JS the mark is pinned to the viewport so the zoom-out happens on
   screen, exactly like the old site: huge at rest, shrinking as you scroll.
   Without JS it simply sits in the hero and scrolls with the page. */
.js .hero__mark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform, opacity;
}

.hero__mark-inner {
  position: relative;
  display: block;
  animation: markIn 1.2s var(--ease) 0.1s both;
}

.hero__mark-float {
  position: relative;
  display: block;
  animation: markBreathe 13s ease-in-out infinite alternate;
}

.hero__logo {
  width: 100%;
  height: auto;
}

/* Scroll cue: one hairline of amber travelling down a thread, with a very
   small label. It is the only affordance on the first screen — no nav, no
   buttons — and it retires as soon as the scroll starts. */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4.5vh, 42px);
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.3s var(--ease), opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.hero__scroll:hover {
  color: var(--paper);
}

.hero__scroll.is-hidden {
  opacity: 0;
  transform: translate(-50%, 6px);
  pointer-events: none;
}

.hero__scroll-track {
  position: relative;
  display: block;
  width: 1px;
  height: 38px;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    rgba(242, 240, 236, 0.42),
    rgba(242, 240, 236, 0.06)
  );
}

.hero__scroll-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 12px;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(241, 186, 46, 0.55);
  animation: scrollCue 2.4s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

@keyframes scrollCue {
  0% {
    transform: translateY(-12px);
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  100% {
    transform: translateY(38px);
    opacity: 0;
  }
}

/* Cursor light: a warm pool that sits on the letterforms and follows the
   pointer. Registered as a number so it fades in and out smoothly. */
@property --spot {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

.hero__shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(
    circle 230px at var(--mx, 50%) var(--my, 50%),
    rgb(255 255 255 / calc(var(--spot, 0) * 0.72)) 0%,
    rgb(241 186 46 / calc(var(--spot, 0) * 0.44)) 42%,
    rgb(241 186 46 / 0) 72%
  );
  transition: --spot 0.5s var(--ease);
  -webkit-mask-image: url("../img/name-banner.png");
  mask-image: url("../img/name-banner.png");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Ambient sheen — a soft band of light that never stops drifting, so the
   letters always have movement without ever looking tinted. */
.hero__shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 200%;
  background: linear-gradient(
    100deg,
    rgba(241, 186, 46, 0) 44%,
    rgba(241, 186, 46, 0.15) 48%,
    rgba(255, 255, 255, 0.38) 50%,
    rgba(241, 186, 46, 0.15) 52%,
    rgba(241, 186, 46, 0) 56%
  );
  animation: ambientDrift 8s ease-in-out infinite alternate;
  will-change: transform;
}

/* The sharper glint. */
.hero__shine::before {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 22%;
  background: linear-gradient(
    90deg,
    rgba(241, 186, 46, 0) 0%,
    rgba(241, 186, 46, 0.7) 34%,
    rgba(255, 255, 255, 0.98) 50%,
    rgba(241, 186, 46, 0.7) 66%,
    rgba(241, 186, 46, 0) 100%
  );
  transform: translate3d(-320%, 0, 0) skewX(-13deg);
  animation: shineSweep 6.8s cubic-bezier(0.45, 0.05, 0.35, 1) 1.9s infinite;
  will-change: transform, opacity;
}

@keyframes markIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.984);
    filter: blur(12px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* Barely-there vertical drift, so the mark is alive even between glints. */
@keyframes markBreathe {
  from {
    transform: translate3d(0, 3px, 0) scale(1);
  }
  to {
    transform: translate3d(0, -7px, 0) scale(1.014);
  }
}

@keyframes ambientDrift {
  from {
    transform: translate3d(-18%, 0, 0);
  }
  to {
    transform: translate3d(18%, 0, 0);
  }
}

@keyframes shineSweep {
  0% {
    transform: translate3d(-320%, 0, 0) skewX(-13deg);
    opacity: 0;
  }
  7% {
    opacity: 1;
  }
  52% {
    transform: translate3d(600%, 0, 0) skewX(-13deg);
    opacity: 1;
  }
  60%,
  100% {
    transform: translate3d(600%, 0, 0) skewX(-13deg);
    opacity: 0;
  }
}

/* The ambient pool behind the mark breathes too. */
@keyframes auraDrift {
  from {
    opacity: 0.72;
    transform: translate3d(-2%, 0, 0) scale(1);
  }
  to {
    opacity: 1;
    transform: translate3d(2%, 2%, 0) scale(1.06);
  }
}

.hero__cta,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  color: #000;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  padding: 16px 24px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero__cta svg,
.btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.3s var(--ease);
}

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

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

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--paper);
  color: var(--paper);
}

/* ---------- 05. Clients marquee ---------- */
.clients {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--ink-soft);
}

.clients__label {
  flex: none;
  padding-left: var(--gutter);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim-2);
  white-space: nowrap;
}

.marquee {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__track ul {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0 34px 0 0;
  list-style: none;
}

.marquee__track li {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

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

/* ---------- 06. Work intro ---------- */
/* An editorial index page rather than a heading: a numbered rail, a kinetic
   three-line statement where the last line arrives as an outline and fills
   in, then the count and the filters sitting on the baseline of the index. */
.work-intro {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 8vh, 88px) var(--gutter) clamp(24px, 3.4vh, 38px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 2.6vw, 34px);
}

/* --- index rail: 01 / Selected work / rule / 36 films · 20 brands --- */
.work-intro__top {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.work-intro__index {
  color: var(--accent);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.work-intro__rule {
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
}

.work-intro__stats {
  margin: 0;
  color: var(--dim-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --- the statement --- */
.work-intro__title {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 62px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

/* Each line is its own mask so the type can rise out of nothing. The bottom
   padding keeps descenders (the g in "digital", the comma) from being cut. */
.work-intro__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.work-intro__line-inner {
  display: block;
  will-change: transform;
}

.work-intro__line:nth-child(-n + 2) .work-intro__line-inner {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: -0.012em;
}

/* Third line: set in caps, arrived as a hairline outline, then filled.
   The extra top margin keeps the cap height clear of the italic descenders
   above it (the g in "digital", the comma). */
.work-intro__line:nth-child(3) {
  margin-top: 0.14em;
}

.work-intro__outline {
  font-family: var(--font-ui);
  font-size: clamp(16px, 2.1vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--paper);
  transition: color 1s var(--ease) 0.5s,
    -webkit-text-stroke-color 1s var(--ease) 0.5s;
}

/* Only hide the fill where the stroke is actually supported, so the line is
   never invisible. */
@supports (-webkit-text-stroke: 1px #fff) {
  .js .work-intro__outline {
    color: transparent;
    -webkit-text-stroke: 1px rgba(241, 186, 46, 0.8);
  }

  .js .work-intro.is-in .work-intro__outline {
    color: var(--paper);
    -webkit-text-stroke-color: var(--paper);
  }
}

/* --- the count + the copy --- */
.work-intro__body {
  max-width: 42ch;
  color: var(--dim);
  font-size: clamp(15px, 1.05vw, 16px);
  line-height: 1.68;
}

.work-intro__body p {
  margin: 0;
}

.work-intro__big {
  display: inline-block;
  margin-right: 0.06em;
  font-family: var(--font-display);
  font-size: 1.9em;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

/* --- reveal choreography (JS only, so no-JS keeps the copy) --- */
.js .work-intro__line-inner {
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  transition: transform 1.05s var(--ease), opacity 0.7s var(--ease);
}

.js .work-intro__line:nth-child(2) .work-intro__line-inner {
  transition-delay: 0.1s;
}

.js .work-intro__line:nth-child(3) .work-intro__line-inner {
  transition-delay: 0.2s;
}

.js .work-intro.is-in .work-intro__line-inner {
  transform: none;
  opacity: 1;
}

.js .work-intro__top {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .work-intro__rule {
  transform: scaleX(0);
  transition: transform 1.2s var(--ease) 0.12s;
}

.js .work-intro__body {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease) 0.28s,
    transform 0.9s var(--ease) 0.28s;
}

.js .work-intro.is-in .work-intro__top,
.js .work-intro.is-in .work-intro__body {
  opacity: 1;
  transform: none;
}

.js .work-intro.is-in .work-intro__rule {
  transform: scaleX(1);
}

/* --- filters: one full-width row under the statement --- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: clamp(16px, 2vw, 24px);
  border-top: 1px solid var(--line);
  margin-top: clamp(4px, 1vw, 10px);
}

.filters__label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-right: 8px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.filter span {
  font-size: 10px;
  color: var(--dim-2);
  transition: color 0.25s var(--ease);
}

.filter:hover {
  color: var(--paper);
  border-color: rgba(242, 240, 236, 0.32);
}

.filter.is-active {
  background: var(--paper);
  border-color: var(--paper);
  color: #000;
}

.filter.is-active span {
  color: rgba(0, 0, 0, 0.62);
}

/* ---------- 07. Grid ---------- */
:root {
  --hdvg-full-height: 100svh;
  --hdvg-half-height: 62svh;
  --hdvg-left-square-height: 90svh;
  --hdvg-right-square-height: 90svh;
  --hdvg-top-height: 45svh;
  --hdvg-bottom-height: 45svh;
  --hdvg-third-height: 46svh;
}

.hdvg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: row dense;
  gap: 0;
  align-items: start;
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.hdvg-item {
  position: relative;
  overflow: hidden;
  background: #050506;
  min-height: 140px;
  cursor: pointer;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(242, 240, 236, 0.07);
}

.hdvg-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  line-height: 0;
  background: #050506;
}

/* Poster still sits under the video, so a tile is never an empty black
   rectangle while the MP4 loads — and still works with JavaScript off.
   Tiles are cropped edge to edge, never letterboxed: the mosaic's square and
   tall shapes can only be filled by cropping. --focus-x / --focus-y are where
   the subject sits in the film (tools/focus.swift), so the crop is framed on
   the subject instead of blindly on the centre. Four films are 1:1, which is
   why the vertical point matters too. */
.hdvg-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-x, 50%) var(--focus-y, 50%);
  transform: scale(1);
  transition: transform 1.4s var(--ease);
  pointer-events: none;
}

.hdvg-thumb video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus-x, 50%) var(--focus-y, 50%);
  border: 0;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.7s var(--ease), transform 1.4s var(--ease);
}

.video-wrapper.is-loaded video {
  opacity: 1;
  transform: scale(1);
}

/* Scrim so captions stay legible over bright frames */
.hdvg-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.28) 22%,
      rgba(0, 0, 0, 0) 48%
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.32), transparent 18%);
  opacity: 0.9;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

/* Play affordance */
.hdvg-item::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(10, 10, 11, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
    background 0.4s var(--ease);
  pointer-events: none;
}

/* Triangle inside the circle, drawn from the border of a rotated box */
.hdvg-play {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}

.hdvg-play svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  margin-left: 3px;
}

.hdvg-item:hover::after,
.hdvg-item:focus-visible::after,
.hdvg-item:hover .hdvg-play,
.hdvg-item:focus-visible .hdvg-play {
  opacity: 1;
  transform: scale(1);
}

.hdvg-item:hover::after,
.hdvg-item:focus-visible::after {
  background: rgba(10, 10, 11, 0.62);
  border-color: var(--accent);
}

.hdvg-item:hover .hdvg-thumb video,
.hdvg-item:focus-visible .hdvg-thumb video {
  transform: scale(1.03);
}

.hdvg-item:hover .hdvg-poster,
.hdvg-item:focus-visible .hdvg-poster {
  transform: scale(1.03);
}

.hdvg-item:hover .hdvg-thumb::after,
.hdvg-item:focus-visible .hdvg-thumb::after {
  opacity: 1;
}

/* Caption: bottom-left, revealed on hover (always visible on touch) */
.hdvg-overlay-text {
  position: absolute;
  z-index: 4;
  left: clamp(16px, 2.2vw, 30px);
  right: clamp(16px, 8vw, 90px);
  bottom: clamp(16px, 2.4vw, 32px);
  width: auto;
  text-align: left;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}

.hdvg-overlay-text strong {
  display: block;
  font-family: var(--font-ui);
  font-size: clamp(16px, 1.4vw, 21px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: #fff;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
}

.hdvg-desc {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hdvg-item:hover .hdvg-overlay-text,
.hdvg-item:focus-visible .hdvg-overlay-text,
.hdvg-item:focus-within .hdvg-overlay-text {
  opacity: 1;
  transform: none;
}

/* Loading indicator: a thin sweeping line, quieter than a spinner */
.video-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 120px;
  height: 1px;
  margin: -0.5px 0 0 -60px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
  transition: opacity 0.4s var(--ease);
}

.video-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform-origin: left;
  animation: loadSweep 1.4s var(--ease) infinite;
}

@keyframes loadSweep {
  0% {
    transform: scaleX(0) translateX(0);
  }
  50% {
    transform: scaleX(0.7) translateX(0);
  }
  100% {
    transform: scaleX(0) translateX(100%);
  }
}

.video-wrapper.is-loaded .video-loader {
  opacity: 0;
}

/* Layout pattern */
.hdvg-full {
  grid-column: 1 / -1;
  grid-row: span 1;
  min-height: var(--hdvg-full-height);
}

.hdvg-half {
  grid-column: span 1;
  grid-row: span 1;
  min-height: var(--hdvg-half-height);
}

.hdvg-left-square {
  grid-column: 1 / 2;
  grid-row: span 2;
  min-height: var(--hdvg-left-square-height);
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
}

.hdvg-right-square {
  grid-column: 2 / 3;
  grid-row: span 2;
  min-height: var(--hdvg-right-square-height);
}

.hdvg-right-top,
.hdvg-right-bottom {
  grid-column: 2 / 3;
  grid-row: auto;
  width: 100%;
  height: 100%;
}

.hdvg-right-top {
  min-height: var(--hdvg-top-height);
}

.hdvg-right-bottom {
  min-height: var(--hdvg-bottom-height);
}

.hdvg-left-top,
.hdvg-left-bottom {
  grid-column: 1 / 2;
  min-height: var(--hdvg-top-height);
}

.hdvg-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column: 1 / -1;
}

.hdvg-row-3 .hdvg-item {
  min-height: var(--hdvg-third-height);
}

/* Filtered-out tiles */
.hdvg-item.is-filtered {
  display: none;
}

.hdvg-row-3.is-filtered {
  display: none;
}

/* ---------- 08. Work CTA ---------- */
.work-cta {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(64px, 10vh, 120px) var(--gutter);
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
  overflow: hidden;
}

.work-cta::before {
  content: "";
  position: absolute;
  inset: auto 0 -60%;
  height: 120%;
  background: radial-gradient(
    40% 60% at 50% 100%,
    rgba(241, 186, 46, 0.12),
    transparent 70%
  );
  pointer-events: none;
}

.work-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(27px, 4.2vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.work-cta p {
  margin: 0;
  max-width: 44ch;
  color: var(--dim);
  font-size: 15px;
}

/* ---------- 09. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(54px, 9vh, 100px) var(--gutter) 30px;
  background: var(--ink);
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  grid-template-columns: 1fr;
}

.footer-lead h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.footer-lead a {
  display: inline-block;
  font-size: clamp(14.5px, 1.2vw, 16.5px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

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

.footer-cols {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-col h3 {
  margin: 0 0 14px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-col a,
.footer-col li {
  font-size: 14px;
  color: var(--dim);
  transition: color 0.25s var(--ease);
}

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

.footer-bottom {
  max-width: var(--max);
  padding-right: 60px;
  margin: clamp(40px, 6vh, 64px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim-2);
}

/* ---------- 10. Lightbox ---------- */
.hdvg-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(6, 6, 7, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s;
}

.hdvg-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-bar {
  width: min(1100px, 100%);
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.modal-count b {
  color: var(--paper);
  font-weight: 500;
}

.modal-role {
  color: var(--accent);
}

.modal-bar__spacer {
  flex: 1;
}

.modal-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.25s var(--ease);
}

.modal-link:hover {
  color: var(--paper);
}

.hdvg-modal-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-right: -6px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--paper);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.hdvg-modal-close:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: #000;
}

.hdvg-modal-inner {
  position: relative;
  width: min(1100px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hdvg-modal-content {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}

.hdvg-modal-content iframe,
.hdvg-modal-content video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 10, 11, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.modal-nav:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: #000;
}

.modal-prev {
  left: -22px;
}

.modal-next {
  right: -22px;
}

.modal-caption {
  width: min(1100px, 100%);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.modal-caption h3 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.2;
  color: var(--paper);
}

.modal-hint {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim-2);
  white-space: nowrap;
}

body.modal-open {
  overflow: hidden;
}

/* ---------- 11. To top ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 80;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10, 10, 11, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--paper);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s, background 0.3s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--paper);
  color: #000;
}

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

/* ---------- 12. Inner pages ---------- */
.page {
  padding: calc(var(--header-h) + clamp(48px, 9vh, 100px)) 0
    clamp(56px, 9vh, 100px);
  border-bottom: 1px solid var(--line);
}

.page__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: clamp(36px, 6vw, 80px);
  grid-template-columns: 1fr;
}

.page__head {
  align-self: start;
}

.page h1 {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 4.8vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.page h1 em {
  font-style: italic;
  color: var(--accent);
}

.page__lead {
  margin: 22px 0 0;
  max-width: 34ch;
  color: var(--dim);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.65;
}

.page__body {
  max-width: 62ch;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.75;
  color: var(--dim);
}

.page__body p {
  margin: 0 0 1.25em;
}

.page__body p:last-child {
  margin-bottom: 0;
}

.page__body strong {
  color: var(--paper);
  font-weight: 500;
}

.page__body a:not(.btn) {
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.page__body a:not(.btn):hover {
  color: var(--accent);
  border-color: var(--accent);
}

.split {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1fr;
}

.portrait {
  position: relative;
  order: -1;
}

.portrait img {
  width: 100%;
  border-radius: 50%;
  border: 1px solid var(--line);
  filter: grayscale(0.15) contrast(1.02);
}

.portrait figcaption {
  margin-top: 18px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim-2);
}

/* Contact page */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.contact-list li {
  border-bottom: 1px solid var(--line);
}

.contact-list a,
.contact-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(17px, 2vw, 25px);
  line-height: 1.2;
  color: var(--paper);
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.contact-list a:hover {
  color: var(--accent);
  padding-left: 10px;
}

.contact-list small {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim-2);
  white-space: nowrap;
}

.contact-form {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}



.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  transition: border-color 0.25s var(--ease);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--dim-2);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.contact-form .btn {
  justify-self: start;
  margin-top: 6px;
}

.form-status {
  margin: 0;
  font-size: 13px;
  color: var(--dim);
  min-height: 1.4em;
}

.form-status.is-error {
  color: #ff9b8f;
}

.form-status.is-success {
  color: #b6f2c2;
}

.hp {
  position: absolute !important;
  left: -9999px;
}

/* ---------- 13. 404 ---------- */
.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: var(--header-h) var(--gutter) 60px;
}

.notfound__code {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(72px, 14vw, 132px);
  line-height: 0.8;
  color: var(--paper);
}

.notfound h1 {
  margin: 0;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.notfound p {
  margin: 0;
  color: var(--dim);
  max-width: 40ch;
}

/* ---------- 14. Responsive ---------- */
@media (min-width: 861px) {
  .main-nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-menu {
    display: none;
  }
}

@media (min-width: 1100px) {
  .nav-cta {
    display: inline-flex;
  }

  .work-intro {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    column-gap: clamp(32px, 5vw, 84px);
    align-items: start;
  }

  .work-intro__top,
  .filters {
    grid-column: 1 / -1;
  }

  .work-intro__title {
    grid-column: 1;
  }

  /* The copy sits as a magazine sidebar, hung off a hairline. */
  .work-intro__body {
    grid-column: 2;
    align-self: end;
    max-width: 40ch;
    padding-left: clamp(22px, 3vw, 48px);
    border-left: 1px solid var(--line);
  }

  .page__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }

  .page__head {
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }

  .split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-column: 1 / -1;
    align-items: start;
  }

  .split .portrait {
    order: 0;
  }

  .portrait {
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  /* Pages that want a full-width head, then their own two-column split */
  .page__inner--single {
    grid-template-columns: 1fr;
  }

  .page__inner--single .page__head {
    position: static;
    display: grid;
    gap: 0 40px;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
  }

  .page__inner--single .page__head .eyebrow {
    grid-column: 1 / -1;
  }

  .page__inner--single .page__lead {
    margin-top: 0;
    padding-bottom: 10px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 60px;
  }

  .hero__mark {
    width: min(520px, 92vw);
  }



  .modal-prev {
    left: 6px;
  }

  .modal-next {
    right: 6px;
  }

  .modal-hint {
    display: none;
  }
}

/* One film per band on phones, and on screens squarer than 3:2.
   A single column has no mosaic rhythm to keep, and the fairest crop on a phone
   is none at all, so every tile keeps the film's own 16:9 shape — full width,
   edge to edge, nothing cut.
   The 3:2 line is not decoration: two columns on a squarer screen can only show
   a film through a narrow, tall window, which is exactly where the client logos
   sat half-cut. Past this breakpoint the mosaic would have to cut a film to
   less than two thirds of its width, so it steps aside instead.
   tools/frame.py assumes the same line: every screen that keeps the mosaic is
   wide enough for the crop it computes. */
@media (max-width: 768px), (max-aspect-ratio: 3 / 2) {
  .hdvg-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .hdvg-full,
  .hdvg-half,
  .hdvg-left-square,
  .hdvg-right-square,
  .hdvg-right-top,
  .hdvg-right-bottom,
  .hdvg-left-top,
  .hdvg-left-bottom,
  .hdvg-row-3 .hdvg-item {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .hdvg-row-3 {
    display: block;
  }

  .hdvg-row-3 .hdvg-item {
    margin-bottom: 0;
  }
}

/* Phone chrome: captions stay up, and the furniture around the wall shrinks */
@media (max-width: 768px) {
  .hdvg-overlay-text {
    opacity: 1;
    transform: none;
    right: clamp(16px, 8vw, 90px);
  }

  .hdvg-overlay-text strong {
    font-size: 16px;
  }

  .hdvg-item::after,
  .hdvg-play {
    display: none;
  }

  .video-loader {
    width: 80px;
    margin-left: -40px;
  }

  .work-cta {
    padding-inline: var(--gutter);
  }

  .contact-list a,
  .contact-list span {
    font-size: 19px;
    padding: 18px 0;
  }

  .contact-list small {
    display: none;
  }
}

/* Touch devices have no hover, so captions must not depend on it */
@media (hover: none) {
  .hdvg-overlay-text {
    opacity: 1;
    transform: none;
  }

  .hdvg-item::after,
  .hdvg-play {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .hero__logo {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__mark,
  .hero__mark-inner {
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .js .hero__mark {
    position: static;
    transform: none !important;
    opacity: 1 !important;
  }

  .hero::before {
    animation: none !important;
  }

  .hero__shine {
    display: none;
  }

  /* Without the loop the cue would sit on an empty thread. Pin the light
     where it is legible and leave it still. */
  .hero__scroll-dot {
    animation: none !important;
    transform: translateY(10px);
    opacity: 1;
  }

  .marquee__track {
    animation: none;
  }
}

/* JS-driven reveal: only hide when JS is present, so no-JS still shows content */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .js .work-intro__line-inner,
  .js .work-intro__top,
  .js .work-intro__body {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .work-intro__rule {
    transform: none;
    transition: none;
  }

  .js .work-intro__outline {
    color: var(--paper);
    -webkit-text-stroke-color: var(--paper);
    transition: none;
  }
}
