/* ──────────────────────────────────────────────────────────────
   Nikki Maistry — portfolio
   Brutalist editorial on a gray canvas. Flat surfaces, no shadows,
   depth from canvas → white → black. One blue: royal.
   ────────────────────────────────────────────────────────────── */

:root {
  /* neutrals */
  --black:    #000000;
  --graphite: #2f2f2f;
  --slate:    #444444;
  --smoke:    #979797;
  --ash:      #c6c6c6;
  --canvas:   #e5e5e5;
  --mist:     #f3f3f3;
  --white:    #ffffff;

  /* royal blue — the only chromatic colour */
  --royal:       #4169e1;
  --royal-press: #3358d1;   /* hover / pressed step of the same hue */

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-display-xl: clamp(4rem, 1.6rem + 9.4vw, 8.125rem);
  --text-display: clamp(3rem, 1.6rem + 4.6vw, 5rem);
  --text-heading: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);

  --page: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 8vw, 6rem);

  --r-btn: 8px;
  --r-card: 32px;
  --r-large: 64px;
  --r-pill: 48px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);       /* expo‑out: quick start, long soft settle */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 300ms;
  --t-med: 600ms;
  --t-slow: 950ms;

  --z-rail: 1;
  --z-head: 2;
  --z-skip: 3;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
small { font-size: inherit; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--royal); color: var(--white); }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }

/* ── type roles ── */
.display-xl, .display, .card-title, .year {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.display-xl { font-size: var(--text-display-xl); }
.display    { font-size: var(--text-display); max-width: 14ch; }

.heading {
  font-size: var(--text-heading);
  font-weight: 450;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: -0.03em;
  color: var(--slate);
}

.mask { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.mask > .line { display: block; }

/* Vector headlines: each line is an SVG of real Barlow Condensed glyph
   outlines (one <path> per letter), so main.js can trace them like a pen.
   viewBox height = cap height + padding = 0.82em; the 0.08em margin keeps
   the same 0.9 line pitch the live text had. Solid by default. */
.type-svg {
  display: block;
  width: auto;
  height: 0.82em;
  max-width: calc(100% + 0.06em);
  margin-left: -0.06em;      /* cancels the 0.06em stroke padding in the viewBox */
  margin-bottom: 0.08em;
  overflow: visible;
}
.type-svg .glyph {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* ── buttons ──
   Fill rises from the bottom on hover; press nudges down 1px. */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--r-btn);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.011em;
  text-decoration: none;
  transition: color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), translate var(--t-fast) var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform var(--t-med) var(--ease-out);
}
.btn:active { translate: 0 1px; }

.btn-dark { background: var(--black); color: var(--white); }
.btn-dark::before { background: var(--royal); }

.btn-ghost { border: 1.5px solid var(--slate); color: var(--slate); border-radius: 4px; }
.btn-ghost::before { background: var(--black); }

@media (hover: hover) {
  .btn:hover::before { transform: translateY(0); }
  .btn-ghost:hover { color: var(--white); border-color: var(--black); }
}

/* ── tags ── */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 64px;
  background: var(--royal);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
  width: fit-content;
  transition: background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}

/* ── text links: underline draws in from the left, leaves to the right ── */
.text-link {
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 100% 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size var(--t-med) var(--ease-out);
}
@media (hover: hover) {
  .text-link:hover { background-size: 100% 1px; background-position: 0% 100%; }
}

/* ── skip link ── */
.skip {
  position: absolute; z-index: var(--z-skip);
  left: var(--gutter); top: -100%;
  padding: 0.6rem 1rem; border-radius: var(--r-btn);
  background: var(--black); color: var(--white);
  font-weight: 500; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ── header ── */
.site-head {
  position: relative; z-index: var(--z-head);
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
  min-height: 8rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.wordmark {
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
@media (hover: hover) { .wordmark:hover { color: var(--royal); } }

/* Nav pill: a black indicator glides under the hovered / current link
   (positioned by main.js). Without JS, links get a plain hover fill. */
.nav-pill {
  position: relative;
  display: flex; gap: 0.25rem;
  padding: 0.375rem;
  background: var(--white);
  border-radius: var(--r-pill);
}
.nav-indicator {
  position: absolute;
  top: 0.375rem; bottom: 0.375rem; left: 0;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--black);
  opacity: 0;
  pointer-events: none;
}
.nav-pill a {
  position: relative;
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-pill);
  color: var(--slate);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out);
}
.nav-pill a.is-lit { color: var(--white); }
@media (hover: hover) {
  .nav-pill:not(.has-indicator) a:hover { background: var(--mist); color: var(--black); }
}
.head-cta { justify-self: end; }

/* ── hero ── */
.hero {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--gutter);
  align-items: end;
  padding-top: clamp(1rem, 4vh, 3rem);
}
.hero-copy {
  display: grid;
  gap: 1.5rem;
  align-content: center;
  padding-bottom: clamp(3rem, 9vh, 6rem);
  align-self: center;
}
.hero-copy .display-xl { margin-top: -0.25rem; }
.hero-sub {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 450;
  letter-spacing: -0.011em;
  color: var(--slate);
  max-width: 30ch;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

.cutout {
  position: relative;
  align-self: end;
  justify-self: center;
  width: min(100%, 31rem);
}
.disc {
  position: absolute;
  left: 4%; top: 4%;
  width: 92%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--royal);
}
.cutout-inner { position: relative; display: block; }
.cutout-inner img { width: 100%; }

/* ── top‑arc sections ── */
.arc { position: relative; z-index: 1; border-radius: var(--r-large) var(--r-large) 0 0; }
.arc-dark { background: var(--black); color: var(--white); }
.arc-dark .mono { color: var(--smoke); }

/* ── about ── */
.about { padding: var(--section) 0; }
.about .wrap { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.about-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.prose { display: grid; gap: 1.1em; font-size: 1.125rem; line-height: 1.5; color: var(--ash); max-width: 60ch; }
.facts { display: grid; gap: 0.5rem; }
.facts div {
  display: grid; gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--graphite);
  border-radius: 24px;
  transition: background-color var(--t-med) var(--ease-out);
}
.facts dd { font-weight: 500; line-height: 1.35; }
@media (hover: hover) {
  .facts div:hover { background: var(--royal); }
  .facts div:hover .mono { color: var(--white); }
}
.facts .mono { transition: color var(--t-med) var(--ease-out); }

/* ── selected work ── */
.work { padding: var(--section) 0; }
.work .wrap { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 1rem;   /* taller row gap leaves room for parallax drift */
}
.card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 1rem;
  padding: 1.75rem;
  min-height: 21rem;
  background: var(--white);
  border-radius: var(--r-card);
  transition: translate var(--t-slow) var(--ease-out), background-color var(--t-med) var(--ease-out), color var(--t-med) var(--ease-out);
}
.span-2 { grid-column: span 2; }
.card-title { font-size: clamp(3rem, 2rem + 2vw, 4rem); transition: color var(--t-med) var(--ease-out); }
.span-2 .card-title { font-size: clamp(3rem, 1.6rem + 4vw, 5rem); }
.card-body { color: var(--slate); max-width: 44ch; align-self: start; }
.card .tag { align-self: end; }

.card-dark { background: var(--black); color: var(--white); }
.card-dark .mono { color: var(--smoke); }
.card-dark .card-body { color: var(--ash); }

.card-blue { background: var(--royal); color: var(--white); }
.card-blue .mono { color: var(--white); }
.card-blue .card-body { color: var(--white); }
.card-blue .tag { background: var(--white); color: var(--royal); }

@media (hover: hover) {
  .card:hover { translate: 0 -6px; }
  .card-plain:hover .card-title { color: var(--royal); }
  .card-plain:hover .tag { background: var(--black); }
  .card-dark:hover .tag { background: var(--white); color: var(--black); }
}
/* Hover lift uses the `translate` property; GSAP reveals use `transform`.
   They are separate properties, so the two never fight. */

/* ── credits ── */
.credits { padding: 0 0 var(--section); }
.credits-card {
  background: var(--white);
  border-radius: var(--r-large);
  padding: clamp(2rem, 6vw, 5rem);
}
.credits-intro { display: grid; gap: 1rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.credits-intro p { color: var(--slate); max-width: 46ch; }

.credits-grid {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.year-rail {
  position: sticky; top: 40vh; z-index: var(--z-rail);
  overflow: hidden;            /* masks the year as it rolls over */
  padding-block: 0.1em;
}
.year {
  display: block;
  font-size: clamp(3rem, 2.2rem + 1.2vw, 3.5rem);
  color: var(--royal);
  white-space: nowrap;
}

.roll { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.era { display: grid; }
.era h3 {
  font-size: 1.25rem;
  font-weight: 450;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 2rem 0 0.75rem;
}
.era h3:first-child { padding-top: 0; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0.85rem 1.25rem;
  border-radius: 16px;
  line-height: 1.35;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.row:nth-of-type(odd) { background: var(--mist); }
.row .role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: -0.03em;
  line-height: 1.6;
  color: var(--slate);
  padding-top: 0.15rem;
  transition: color var(--t-fast) var(--ease-out);
}
.row .title { font-weight: 500; }
.row .title small { display: block; font-weight: 400; color: var(--slate); font-size: 0.875rem; margin-top: 0.15rem; transition: color var(--t-fast) var(--ease-out); }
/* Hover-in snaps on fast; hover-out fades away slowly, so sweeping the
   cursor down the list leaves a soft trail instead of flicker. */
.row, .row .role, .row .title small, .row-logo {
  transition-duration: var(--t-slow);
}
@media (hover: hover) {
  .row:hover, .row:hover .role, .row:hover .title small, .row:hover .row-logo { transition-duration: 160ms; }
  .row:hover { background: var(--royal); color: var(--white); }
  .row:hover .role, .row:hover .title small { color: var(--white); }
}

/* ── contact ── */
.contact { padding: var(--section) 0 clamp(3rem, 6vw, 5rem); }
.contact .wrap { display: grid; gap: 2rem; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 1rem; }
.mail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.5rem 1.25rem;
  border-radius: var(--r-pill);
  background: var(--royal);
  color: var(--white);
  font-size: clamp(1.125rem, 0.8rem + 1.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--t-med) var(--ease-out), translate var(--t-fast) var(--ease-out);
}
.mail::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--white);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform var(--t-med) var(--ease-out);
}
.mail:active { translate: 0 1px; }
@media (hover: hover) {
  .mail:hover { color: var(--royal); }
  .mail:hover::before { transform: translateY(0); }
}
.contact .text-link { color: var(--white); }
.contact-note { margin-top: 1rem; }

/* ── footer ── */
.site-foot { background: var(--black); color: var(--smoke); border-top: 1px solid var(--graphite); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.5rem 0; font-size: 0.875rem; }
.site-foot a { color: var(--white); }

/* ──────────────────────────────────────────────────────────────
   Icons
   ────────────────────────────────────────────────────────────── */
.icon { width: 1.125em; height: 1.125em; flex: none; }
.icon-sm { width: 1em; height: 1em; }
.with-icon { display: inline-flex; align-items: center; gap: 0.5em; }
.btn { gap: 0.55rem; }
.btn .icon { transition: transform var(--t-med) var(--ease-out); }
@media (hover: hover) {
  .btn-dark:hover .icon { transform: translateY(-1px) rotate(-8deg); }
  .btn-ghost:hover .icon { transform: translateY(2px); }
  .text-link.with-icon:hover .icon { transform: translateY(-1px); }
}
.text-link.with-icon { background-position: 100% 100%; }
.text-link .icon { transition: transform var(--t-med) var(--ease-out); }

.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;
}

/* facts get an icon in the corner */
.facts div { position: relative; }
.fact-icon {
  position: absolute; top: 1.25rem; right: 1.5rem;
  width: 1.25rem; height: 1.25rem;
  color: var(--smoke);
  transition: color var(--t-med) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
@media (hover: hover) {
  .facts div:hover .fact-icon { color: var(--white); transform: rotate(-10deg) scale(1.1); }
}

/* ──────────────────────────────────────────────────────────────
   Scroll band: two rows that slide in opposite directions with scroll
   ────────────────────────────────────────────────────────────── */
.band {
  position: relative;
  padding: clamp(3rem, 7vw, 5rem) 0 0;
  overflow: hidden;
  display: grid;
  gap: 0.25rem;
}
.band-row { overflow: visible; white-space: nowrap; }
.band-track {
  display: inline-flex; align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-inline: 1rem;
  will-change: transform;
}
.band-item {
  display: inline-flex; align-items: center; gap: 0.25em;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.01em;
  font-size: clamp(3rem, 1.4rem + 6vw, 7rem);
}
.band-row--brands .band-item { color: var(--black); }
.band-row--roles .band-item {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--slate);
}
.band-logo { width: 0.8em; height: 0.8em; }
.band-sep {
  width: clamp(1.5rem, 1rem + 1.6vw, 2.75rem);
  height: clamp(1.5rem, 1rem + 1.6vw, 2.75rem);
  color: var(--royal);
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round;
}

/* ──────────────────────────────────────────────────────────────
   Brand cards
   ────────────────────────────────────────────────────────────── */
.card { position: relative; overflow: hidden; }
.card > :not(.nf-stage):not(.brand-mark) { position: relative; z-index: 1; }

/* Airtel: official red, logo spins in */
.card-airtel { background: #E40000; color: var(--white); }
.card-airtel .mono, .card-airtel .card-body { color: var(--white); }
.card-airtel .tag { background: var(--white); color: #E40000; }
.brand-mark {
  position: absolute;
  right: -8%; bottom: -10%;
  width: 62%; height: auto; aspect-ratio: 1;
  color: rgba(255, 255, 255, 0.16);
  pointer-events: none;
  transition: transform 1.2s var(--ease-out), color var(--t-med) var(--ease-out);
}
@media (hover: hover) {
  .card-airtel:hover .brand-mark { transform: rotate(-24deg) scale(1.06); color: rgba(255, 255, 255, 0.26); }
  .card-airtel:hover .tag { background: var(--black); color: var(--white); }
}

/* Netflix: black + Netflix red, ribbon burst that collapses into the N */
.card-netflix { background: #000; color: var(--white); }
.card-netflix .mono { color: #b3b3b3; }
.card-netflix .card-body { color: #e5e5e5; max-width: 40ch; }
.card-netflix .card-title { max-width: 9ch; }
.tag-netflix { background: #E50914; color: var(--white); }
.nf-stage {
  position: absolute;
  top: 50%; right: clamp(1rem, 5%, 3rem);
  width: clamp(8rem, 30%, 15rem);
  aspect-ratio: 3 / 4;
  translate: 0 -50%;
  display: grid; place-items: center;
  pointer-events: none;
}
.nf-ribbons {
  position: absolute; inset: 0;
  display: flex; justify-content: center; gap: 2px;
}
.nf-ribbons span {
  flex: 1;
  border-radius: 2px;
  transform: scaleY(0);
}
.nf-logo {
  position: relative;
  width: 78%; height: 78%;
  color: #E50914;
  filter: drop-shadow(0 0 0 rgba(229, 9, 20, 0));
}
@media (hover: hover) {
  .card-netflix:hover .tag-netflix { background: var(--white); color: #E50914; }
}

/* credit rows with a real logo: brand colour on the logo and on hover */
.row-logo {
  display: inline-block;
  width: 1em; height: 1em;
  margin-right: 0.45em;
  vertical-align: -0.12em;
  color: var(--brand, currentColor);
  transition: color var(--t-fast) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.row-logo--wide { width: 2.6em; }
@media (hover: hover) {
  .row-brand:hover { background: var(--brand); }
  .row-brand:hover .row-logo { color: var(--white); transform: scale(1.12); }
}

/* ──────────────────────────────────────────────────────────────
   Back to top
   ────────────────────────────────────────────────────────────── */

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: var(--z-head);
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  translate: 0 16px;
  transition: opacity var(--t-med) var(--ease-out), translate var(--t-med) var(--ease-out), visibility 0s linear var(--t-med), background-color var(--t-med) var(--ease-out);
}
.to-top.is-shown {
  opacity: 1; visibility: visible; translate: 0 0;
  transition: opacity var(--t-med) var(--ease-out), translate var(--t-med) var(--ease-out), visibility 0s, background-color var(--t-med) var(--ease-out);
}
.to-top .icon { width: 1.25rem; height: 1.25rem; transition: transform var(--t-med) var(--ease-out); }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.ring-track, .ring-fill { fill: none; stroke-width: 2.5; }
.ring-track { stroke: var(--graphite); }
.ring-fill { stroke: var(--royal); stroke-dasharray: 1; stroke-dashoffset: var(--progress-offset, 1); stroke-linecap: round; }
@media (hover: hover) {
  .to-top:hover { background: var(--royal); }
  .to-top:hover .ring-fill { stroke: var(--white); }
  .to-top:hover .icon { transform: translateY(-3px); }
}

/* ──────────────────────────────────────────────────────────────
   Load‑sequence start states. Only applied when the inline script
   in <head> confirms motion will run; main.js removes the class.
   ────────────────────────────────────────────────────────────── */
.js-motion .hero .glyph { fill-opacity: 0; }
.js-motion .site-head > *,
.js-motion .hero-copy > :not(h1),
.js-motion .cutout-inner,
.js-motion .disc { opacity: 0; }

/* ──────────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────────── */
@media (max-width: 64rem) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-blue.span-2, .card-dark.span-2 { grid-column: 1 / -1; }
}

@media (max-width: 52rem) {
  .site-head {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    min-height: 0;
    padding: 1.25rem 0 0.5rem;
    row-gap: 1rem;
  }
  .nav-pill { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .nav-pill a { padding: 0.55rem 0.8rem; }
  .head-cta { min-height: 40px; padding: 0 1rem; font-size: 0.9375rem; }

  .hero { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .hero-copy { padding-bottom: 1rem; }
  .cutout { width: min(88%, 24rem); }

  .about-body { grid-template-columns: minmax(0, 1fr); }

  .credits-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .year-rail {
    top: 0;
    background: var(--white);
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
  }
  .row { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; padding: 0.75rem 1rem; }
}

@media (max-width: 40rem) {
  :root { --r-large: 40px; --r-card: 24px; }
  .card-netflix { padding-top: 9.5rem; }
  .nf-stage { top: 1.25rem; right: 1.25rem; translate: none; width: 6rem; }
  .card-netflix .card-title { max-width: none; }
  .to-top { width: 48px; height: 48px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .card { min-height: 0; padding: 1.5rem; }
  .credits-card { padding: 1.75rem 1.25rem; }
}

@media (max-width: 22rem) {
  .nav-pill a { padding: 0.5rem 0.55rem; font-size: 0.875rem; }
}

/* Reduced motion: keep colour changes, drop movement. */
@media (prefers-reduced-motion: reduce) {
  .nf-ribbons span { display: none; }
  .brand-mark, .fact-icon, .row-logo, .btn .icon, .to-top .icon { transition: none; }
  .to-top { translate: none; }
  .btn::before, .mail::before { transition: none; }
  .card, .btn, .mail { transition-property: background-color, color, border-color; }
  .card:hover { translate: none; }
}
