/* =========================================================
   Jeshua Pabrique — Video Editing Portfolio
   Design system: dark, editorial, monochrome.
   Anton (compressed display) · Inter (UI) · JetBrains Mono (labels)

   DISPLAY FONT — currently Anton (free, closest match to Champion
   Gothic's compressed caps). To use real Champion Gothic instead:
   see the commented @font-face block just below :root, drop your
   licensed .woff2 files into assets/fonts/, then set --display to
   "Champion Gothic". Everything else adapts automatically.
   ========================================================= */

:root {
  --bg:        #0a0a0a;
  --bg-soft:   #111111;
  --fg:        #f5f5f5;
  --muted:     rgba(245, 245, 245, 0.55);
  --faint:     rgba(245, 245, 245, 0.35);
  --line:      rgba(245, 245, 245, 0.12);
  --line-soft: rgba(245, 245, 245, 0.06);
  --accent:    #b7ff3a;          /* single restrained accent */

  --display: "Anton", "Arial Narrow", sans-serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1280px;

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

/* ---------------------------------------------------------
   OPTIONAL: real Champion Gothic (licensed — Hoefler&Co /
   typography.com). If you own it, self-host the web fonts:
   1. Put the .woff2 files in assets/fonts/
   2. Uncomment this block and fix the file names / weights
   3. In :root above, set:  --display: "Champion Gothic", sans-serif;
   ---------------------------------------------------------
@font-face {
  font-family: "Champion Gothic";
  src: url("../assets/fonts/ChampionGothic-Heavyweight.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
--------------------------------------------------------- */

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;   /* fallback for older browsers */
  overflow-x: clip;     /* clip prevents h-scroll WITHOUT breaking position: sticky */
}

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

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* ---------- Film grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Shared micro-label ---------- */
.section__tag,
.eyebrow,
.nav__links a,
.clock__label,
.card__cat,
.work__hint,
.filter,
.footer {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section__tag {
  color: var(--faint);
  margin-bottom: 2rem;
}

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem var(--pad);
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__logo {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.nav__logo-sub {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.32em;
  color: var(--faint);
  margin-top: 3px;
}

.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  color: var(--muted);
  transition: color 0.3s var(--ease);
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1px;
  background: var(--fg);
  transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { width: 100%; }

.nav__clock { display: flex; align-items: center; gap: 0.7rem; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.clock__label { color: var(--faint); font-size: 0.55rem; }
.clock__time { font-family: var(--mono); font-size: 0.8rem; color: var(--fg); }
.clock__slash { color: var(--faint); font-family: var(--mono); }

/* Mobile menu toggle — a down arrow (shown only under 900px, see responsive) */
.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  color: var(--muted);
  line-height: 1;
  transition: color 0.3s var(--ease);
}
.nav__toggle:hover { color: var(--fg); }
.nav__arrow {
  display: block;
  font-size: 1.05rem;
  transition: transform 0.4s var(--ease);
}
/* flips to point up while the menu is open */
.nav.is-open .nav__arrow { transform: rotate(180deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem var(--pad) 4rem;
  position: relative;
  overflow: hidden;
}
/* interactive WebGL wave background */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
/* readability veil: darken behind the centred text, let the waves breathe
   toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 92% 78% at 50% 44%,
              rgba(10, 10, 10, 0.80),
              rgba(10, 10, 10, 0.30) 82%,
              rgba(10, 10, 10, 0.55) 100%);
}
/* fade the wave background down into the page colour so the hero blends
   seamlessly into the next section instead of a hard cut-off edge */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
              rgba(10, 10, 10, 0) 0%,
              rgba(10, 10, 10, 0.85) 65%,
              var(--bg) 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: var(--maxw); width: 100%; margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.hero__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}
.hero__title em { color: var(--muted); }

.hero__lead {
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--muted);
  line-height: 1.65;
}

.hero__meta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.hero__meta .sep { color: var(--line); }

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
.hero__scroll .arrow { animation: bob 2s var(--ease) infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* =========================================================
   SECTION SHELL
   ========================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 10rem) var(--pad);
  border-top: 1px solid var(--line-soft);
}

.section__title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 20ch;
}
.section__title--lg {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* =========================================================
   APPROACH
   ========================================================= */
.statement {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 4rem;
}
.statement .muted { color: var(--muted); }

.approach__body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1000px;
  margin-left: auto;
}
.approach__body p { color: var(--muted); font-size: 0.98rem; }

/* =========================================================
   PRINCIPLES
   ========================================================= */
.principles__head { margin-bottom: 4rem; }
.principles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.principle {
  background: var(--bg);
  padding: 2.5rem;
  transition: background 0.4s var(--ease);
}
.principle:hover { background: var(--bg-soft); }
.principle__num {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
}
.principle h4 {
  font-family: var(--display);
  font-weight: 300;
  font-size: 2rem;
  margin: 1.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.principle p { color: var(--muted); font-size: 0.92rem; }

/* =========================================================
   WORK
   ========================================================= */
.work__head { margin-bottom: 3rem; }
.work__intro { color: var(--muted); max-width: 44ch; margin-top: 1.5rem; }

.work__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-soft);
}
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.filter:hover { color: var(--fg); border-color: var(--muted); }
.filter.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.work__hint { color: var(--faint); }

/* ---------- Pinned card stack ----------
   BASE (no JS / small screens / reduced motion): a plain vertical list of
   16:9 cards — always readable. JS adds .is-pinned to upgrade it into the
   sticky scroll-driven deck where projects overlap and swap in place. */
.stack { position: relative; }
.stack__deck {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.card { transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.card.is-hidden { display: none; }

/* ENHANCED: pinned deck. Every card is absolutely stacked in the same spot;
   JS slides each one up over the last as you scroll. */
.stack.is-pinned .stack__viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stack.is-pinned .stack__deck {
  position: relative;
  display: block;
  /* full-size 16:9, capped by height so it always fits the pinned viewport */
  width: min(92vw, 1180px, 128svh);
  aspect-ratio: 16 / 9;
}
.stack.is-pinned .card {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: translateZ(0);      /* own compositor layer = smoother transforms */
  backface-visibility: hidden;
  transition: none;              /* JS drives the transform every frame */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

/* dim layer for buried cards — JS animates its opacity (composited, cheap) */
.card__scrim {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  background: #070707;
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  will-change: opacity;
}
.stack.is-pinned .card__scrim { display: block; }
.stack.is-pinned .card__media {
  aspect-ratio: auto;
  height: 100%;
  border-radius: 8px;
}
/* title/category ride on top of the full-bleed still */
.stack.is-pinned .card__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  align-items: flex-end;
  padding: 2rem;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.35) 45%, transparent);
}
.stack.is-pinned .card__title { font-size: 1.4rem; }

.card__media {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  /* generative placeholder gradient — swap for real footage via data-video */
  background:
    radial-gradient(120% 120% at 20% 0%, hsl(var(--h, 0) 45% 22%), transparent 60%),
    linear-gradient(160deg, hsl(var(--h, 0) 40% 16%), #0c0c0c 80%);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  transition: border-color 0.4s var(--ease);
}

.card:hover .card__media { border-color: var(--muted); }

/* grayscale still — shown until the hover clip fades in over it */
.card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.9);
  transform: scale(1.001);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.card:hover .card__img { transform: scale(1.06); filter: grayscale(1) contrast(1.05) brightness(1); }

.card__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.card.is-playing .card__video { opacity: 1; }

.card__index {
  position: absolute;
  top: 0.9rem; left: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  z-index: 2;
  mix-blend-mode: difference;
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.25rem 0;
}
.card__title { font-size: 0.95rem; color: var(--fg); }
.card__cat { color: var(--faint); white-space: nowrap; }

.work__count {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* =========================================================
   REEL — scroll-driven grow
   BASE (no JS / reduced motion): a normal full-width 16:9 frame.
   JS adds .is-growing to pin it and scale it 0 -> 1 with scroll.
   ========================================================= */
.reelgrow { position: relative; }
.reelgrow.is-growing .reelgrow__viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.reelgrow.is-growing .reel__frame {
  margin-top: 0;
  width: min(94vw, 1400px, 160svh);
  transform-origin: center center;
  will-change: transform;
  transform: translateZ(0) scale(0);   /* JS drives this */
}

.reel__frame {
  position: relative;
  margin-top: 3rem;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 50% 0%, #1a1a1a, transparent 60%),
    linear-gradient(160deg, #141414, #0a0a0a);
}

/* "tap for sound" — shown only when the browser blocked unmuted autoplay */
.reel__unmute {
  position: absolute;
  right: 1rem;
  bottom: 4.5rem;
  z-index: 4;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--fg);
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(8px);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.reel__unmute:hover { background: var(--fg); color: var(--bg); transform: scale(1.04); }
.reel__unmute[hidden] { display: none; }
.reel__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(10, 10, 10, 0.25);
  border: none;
  cursor: pointer;
  color: var(--fg);
  transition: background 0.4s var(--ease);
}
.reel__play:hover { background: rgba(10, 10, 10, 0.1); }
.reel__play-icon {
  width: 74px; height: 74px;
  display: grid; place-items: center;
  border: 1px solid var(--fg);
  border-radius: 50%;
  font-size: 1.1rem;
  padding-left: 4px;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}
.reel__play:hover .reel__play-icon { transform: scale(1.08); background: var(--fg); color: var(--bg); }
.reel__play-text {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.reel__play.is-hidden { display: none; }

/* =========================================================
   SERVICES
   ========================================================= */
.services__head { margin-bottom: 3.5rem; }
.services__list { list-style: none; }
.service {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
  transition: padding-left 0.4s var(--ease);
}
.service:hover { padding-left: 1rem; }
.service:last-child { border-bottom: 1px solid var(--line-soft); }
.service__num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  padding-top: 0.4rem;
}
.service h4 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.service p { color: var(--muted); max-width: 60ch; font-size: 0.95rem; }

/* =========================================================
   PROCESS — sticky title + scrolling stack of cards
   ========================================================= */
.process__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.process__aside {
  position: sticky;
  top: 110px;
  align-self: start;
}
.process__title {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: 0;
  margin: 1.5rem 0 2rem;
}
.process__intro { color: var(--muted); max-width: 34ch; font-size: 0.98rem; }

.process__cards { display: flex; flex-direction: column; gap: 1.25rem; }
.pcard {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 2rem 2rem 2.25rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.5s var(--ease);
}
.pcard:hover { border-color: var(--line); background: #151515; transform: translateY(-3px); }
.pcard__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.pcard__title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}
.pcard__num {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--faint);
  font-weight: 400;
}
.pcard__desc {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 42ch;
  margin-top: auto;    /* push description to the bottom of the card */
  padding-top: 3rem;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact { text-align: center; }
.contact__title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 1rem 0 2rem;
}
.contact__title em { color: var(--muted); }
.contact__lead { color: var(--muted); max-width: 42ch; margin: 0 auto 3rem; }
.contact__mail {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.15rem, 3vw, 1.9rem);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.contact__mail:hover { border-color: var(--fg); }
.contact__socials {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contact__socials a { color: var(--muted); transition: color 0.3s var(--ease); }
.contact__socials a:hover { color: var(--fg); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
}
.footer__status { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer__top { transition: color 0.3s var(--ease); }
.footer__top:hover { color: var(--fg); }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
/* Only hide when JS is confirmed active (html.js). Without JS the content
   stays fully visible — the animation is a progressive enhancement. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-anim { opacity: 1 !important; transform: none !important; transition: none; }
  .preloader { display: none !important; }
  .cursor { display: none !important; }
  * { animation: none !important; scroll-behavior: auto; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  /* ---- MOBILE NAV: centred name + title, arrow toggle, dropdown below ---- */
  .nav {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem var(--pad);
  }
  .nav__clock { display: none; }

  .nav__brand {
    order: 1;
    align-items: center;      /* centre the name + work title */
    text-align: center;
  }
  .nav__toggle {
    order: 2;
    display: flex;            /* the ↓ arrow replaces the hamburger */
  }

  /* the menu drops down underneath the brand instead of covering the screen */
  .nav__links {
    order: 3;
    position: static;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: none;
    transform: none;
    z-index: auto;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s var(--ease), opacity 0.3s var(--ease);
  }
  .nav.is-open .nav__links { max-height: 60vh; opacity: 1; }
  .nav__links a {
    color: var(--fg);
    text-align: center;
    padding: 0.9rem 0;
    border-top: 1px solid var(--line-soft);
  }
  .nav__links a::after { display: none; }   /* no underline slide in the dropdown */

  .approach__body { grid-template-columns: 1fr; gap: 1.5rem; }
  .principles__grid { grid-template-columns: 1fr; }
  .process__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .process__aside { position: static; top: auto; }
  .process__title { margin-top: 1rem; }
}

@media (max-width: 560px) {
  .service { grid-template-columns: 1fr; gap: 0.5rem; }
  .service__num { padding-top: 0; }
  .pcard { min-height: 0; padding: 1.75rem; }
  .pcard__desc { padding-top: 2rem; }
  .hero__meta { font-size: 0.68rem; }

  /* a 16:9 card is only ~200px tall on a phone — keep the overlay in scale */
  .stack.is-pinned .card__meta { padding: 1rem; }
  .stack.is-pinned .card__title { font-size: 1rem; }
  .stack.is-pinned .card__cat { font-size: 0.55rem; }
}

/* =========================================================
   POLISH LAYER — preloader, cursor, hero intro, marquee,
   scroll-spy, card hover, scrollbar
   ========================================================= */

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;               /* only shown once JS confirms (html.js) */
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--pad);
  background: var(--bg);
}
html.js .preloader { display: flex; }
.preloader__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--faint);
}
.preloader__name {
  font-family: var(--display);
  font-size: clamp(1.5rem, 6vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-top: auto;
}
.preloader__count {
  font-family: var(--mono);
  font-size: clamp(4rem, 22vw, 15rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--fg);
  align-self: flex-end;
  display: flex;
  align-items: flex-start;
}
.preloader__count i { font-size: 0.28em; font-style: normal; color: var(--faint); margin-top: 0.4em; }

/* lock scroll while the loader is up */
body.is-loading { overflow: hidden; height: 100vh; }
/* wipe up on ready */
body.is-ready .preloader {
  transform: translateY(-101%);
  transition: transform 1s var(--ease);
  pointer-events: none;
}

/* ---------- Hero intro (driven by body.is-ready, not the observer) ---------- */
.js .hero-anim {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease) var(--d, 0s),
              transform 1s var(--ease) var(--d, 0s);
}
body.is-ready .hero-anim { opacity: 1; transform: none; }

/* ---------- Custom cursor (fine pointer only) ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  display: none;
  place-items: center;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.32s var(--ease), height 0.32s var(--ease), background 0.32s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  html.cursor-on .cursor { display: grid; }
  html.cursor-on, html.cursor-on a, html.cursor-on button, html.cursor-on .card { cursor: none; }
}
.cursor.is-active { width: 74px; height: 74px; background: var(--fg); border-color: var(--fg); }
.cursor__label {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.cursor.is-active .cursor__label { opacity: 1; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: clamp(1.25rem, 3vw, 2.25rem) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: inline-flex; animation: marquee 34s linear infinite; will-change: transform; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4.5vw, 3.25rem);
  letter-spacing: -0.01em;
  color: var(--muted);
  padding-right: 0;
}
.marquee__group i {
  font-style: normal;
  color: var(--accent);
  font-size: 0.55em;
  vertical-align: middle;
  margin: 0 1.1rem;
  opacity: 0.9;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll-spy nav ---------- */
.nav__links a.is-current { color: var(--fg); }
.nav__links a.is-current::after { width: 100%; }

/* ---------- Card hover upgrades ---------- */
.card { transition: opacity 0.45s var(--ease), transform 0.5s var(--ease); }
.card:hover { transform: translateY(-5px); }
.card__media::after {
  content: "View";
  position: absolute;
  top: 0.9rem; right: 1rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  z-index: 3;
}
.card:hover .card__media::after { opacity: 1; transform: none; }
.card__video { transition: opacity 0.5s var(--ease), transform 0.7s var(--ease); }
.card:hover .card__video { transform: scale(1.05); }

/* staggered reveal for the work grid */
.stack__deck .card:nth-child(2) { transition-delay: 0.05s; }
.stack__deck .card:nth-child(3) { transition-delay: 0.10s; }
.stack__deck .card:nth-child(4) { transition-delay: 0.15s; }

/* ---------- Custom scrollbar ---------- */
html { scrollbar-width: thin; scrollbar-color: #2c2c2c var(--bg); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #2c2c2c;
  border-radius: 10px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }

/* =========================================================
   DISPLAY TYPE — compressed gothic (Anton / Champion Gothic)
   Set in uppercase with near-zero tracking, the way condensed
   grotesques are meant to be used.
   ========================================================= */
.nav__logo,
.hero__title,
.statement,
.section__title--lg,
.principle h4,
.service h4,
.contact__title,
.marquee__group,
.preloader__name,
.reel__play-text {
  text-transform: uppercase;
  font-weight: 400;               /* Anton ships a single weight */
  letter-spacing: 0.005em;        /* condensed caps want ~0 tracking */
}

/* the big poster lines get tight leading */
.hero__title { letter-spacing: 0; line-height: 0.92; }
.statement { letter-spacing: 0; line-height: 0.92; }
.section__title--lg { letter-spacing: 0; line-height: 0.92; }
.contact__title { letter-spacing: 0; line-height: 0.9; }

/* Anton has no italic — kill synthesized obliques, keep the tonal shift */
.hero__title em,
.contact__title em { font-style: normal; }

/* nav wordmark: a touch of air so the compressed caps read as a logo */
.nav__logo { letter-spacing: 0.02em; font-size: 1.5rem; }

/* =========================================================
   CENTERED SECTIONS — hero, approach, craft head, work head,
   showreel head (contact was already centered).
   ========================================================= */
.hero__inner { text-align: center; }
.hero__lead { margin-left: auto; margin-right: auto; }
.hero__meta { justify-content: center; }

.approach { text-align: center; border-top: none; }
/* centre the 3-column block as a group; keep the paragraphs left-aligned
   inside their columns so multi-line body text stays readable */
.approach__body { margin-left: auto; margin-right: auto; text-align: left; }

.principles__head { text-align: center; }
.principles__head .section__title { margin-left: auto; margin-right: auto; }

.work__head { text-align: center; }
.work__intro { margin-left: auto; margin-right: auto; }

.reel { text-align: center; }

/* =========================================================
   SCROLL EFFECTS — progress bar, JS marquee, richer reveals
   ========================================================= */

/* thin accent line at the very top that fills as you scroll */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* when JS drives the marquee (velocity + skew), disable the CSS loop */
.marquee--js .marquee__track { animation: none; }
.marquee__track { transform-origin: center; }

/* work cards scale in as they reveal, for a gallery feel */
.js .card.reveal { transform: translateY(30px) scale(0.965); }
.card.reveal.is-in { transform: none; }

/* staggered reveals within groups */
.approach__body p.reveal:nth-child(2) { transition-delay: 0.12s; }
.approach__body p.reveal:nth-child(3) { transition-delay: 0.24s; }
.services__list .service.reveal:nth-child(2) { transition-delay: 0.06s; }
.services__list .service.reveal:nth-child(3) { transition-delay: 0.12s; }
.services__list .service.reveal:nth-child(4) { transition-delay: 0.18s; }
.services__list .service.reveal:nth-child(5) { transition-delay: 0.24s; }
.principles__grid .principle.reveal:nth-child(2) { transition-delay: 0.1s; }
.principles__grid .principle.reveal:nth-child(3) { transition-delay: 0.2s; }
.process__cards .pcard.reveal:nth-child(even) { transition-delay: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  .card.reveal { transform: none !important; }
  .marquee__track { transform: none !important; }
  .hero__inner { transform: none !important; opacity: 1 !important; }
}
