/* Home · scoped under .page--home (spec §11.2–11.3; behaviour in js/pages/home.js) */

.page--home {
  --home-bg: #D2D2D2;   /* sampled by tools/images.mjs */
  /* phase 3 theme */
  --h-ink: #0B0B0F;
  --h-muted: rgba(11, 11, 15, .55);
  --h-dark: #0E0E12;
  --h-text: #EDEBE6;
  --h-dim: #34343B;
  --h-dmuted: #8C8A85;
  --h-surface: rgba(22, 22, 27, .92);
  --h-accent: #8EA2F0;      /* small accent text on dark */
  --h-radius: 24px;         /* curtain top corners */
  background: var(--home-bg);
  padding-bottom: 0;        /* the footer carries the dock clearance (§1.7) */
}

@media (max-width: 760px) {
  .page--home { --h-radius: 18px; }
}

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

/* Phase 3 §1.1: the hero is sticky inside .home-curtain, so [ WHAT I DO ] (the next child of the
   wrapper) slides up over it. The wrapper must not clip (sticky needs a non-clipping ancestor). */
.page--home .home-curtain {
  position: relative;
  z-index: 1;
}

.page--home .home-hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--home-bg);
}

.page--home .home-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/* Dark sections (§1.2–1.4): the curtain rises with rounded top corners */
.page--home .h-dark {
  position: relative;
  z-index: 1;
  background: var(--h-dark);
  color: var(--h-text);
}

.page--home .h-curtain-top { border-radius: var(--h-radius) var(--h-radius) 0 0; }

/* ---------- Morphing name header (phase 1.1 §3; behaviour in js/pages/home.js) ----------
   The headline is rendered once, at its fitted size, inside the fixed header. Its position and
   size come only from a GSAP transform (translate + scale, origin 0 0): the big state maps it
   onto .home-hero__name-slot, the compact state is the small name in the header bar.
   Nothing on .page/main/body/html may get a transform, filter, contain, perspective,
   will-change or backdrop-filter, or this position: fixed would break. */

.page--home { --home-header-h: 76px; }

.page--home .home-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 700;
  height: var(--home-header-h);
  padding: 0 var(--gutter);
  pointer-events: none;
}

/* Phase 3.1 §1: no bar. Over a dark section (class set by a ScrollTrigger per dark section in
   home.js) only the name's colour changes. */
.page--home .home-header .home-name,
.page--home .home-header .home-name__br { transition: color .3s; }

.page--home .home-header.is-on-dark .home-name { color: var(--h-text); }
.page--home .home-header.is-on-dark .home-name__br { color: var(--h-accent); }
.page--home .home-header.is-on-dark .home-name:focus-visible { outline-color: var(--h-text); }

.page--home .home-name {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: max-content;
  transform-origin: 0 0;
  color: #0B0B0F;
  text-decoration: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.page--home .home-name:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.page--home .home-name__text {
  margin: 0;
  font-weight: 300;
  font-size: 120px;           /* replaced by fit() in home.js */
  line-height: .9;
  letter-spacing: .01em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* D9: no weight 200 is loaded, so the brackets are stretched instead */
.page--home .home-name__br {
  display: inline-block;
  color: var(--blue);
  transform: scaleY(1.15);
}

/* Phase 3.1 §1: the Resume pill sits in the hero (it scrolls away with it; never fixed). */
.page--home { --resume-top: 28px; --resume-h: 44px; }

.page--home .home-hero__resume {
  position: absolute;
  top: var(--resume-top);
  right: var(--gutter);
  z-index: 4;
}

/* In-flow placeholder with the fitted headline's size (set by home.js). Its top keeps the
   stretched bracket ink (≈ 0.23em above the box) ≥ 24px below the Resume pill's bottom.
   `em` is the fitted font size. */
.page--home .home-hero__name-slot {
  position: relative;
  display: block;
  margin: max(11vh, calc(var(--resume-top) + var(--resume-h) + 24px + 0.24em)) auto 0;
  font-size: 120px;           /* replaced by fit() in home.js */
}

/* Reduced motion (§3.5): no scrub. The header scrolls with the page with the name over the slot;
   once the slot leaves the viewport .is-compact pins the compact header (no animation). */
@media (prefers-reduced-motion: reduce) {
  .page--home .home-header { position: absolute; }
  .page--home .home-header.is-compact { position: fixed; }
}

.page--home .home-hero__photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  translate: -50% 0;
  display: block;
  transform-origin: 50% 100%;
}

.page--home .home-hero__photo img {
  display: block;
  /* D12: --photo-max keeps the head clear of the headline (set by home.js) */
  height: min(78svh, 57.6vw, var(--photo-max, 100svh));
  width: auto;
  max-width: none;
  object-fit: cover;
  /* top fade per spec; the side fades hide the photo's left/right edges, whose vignette is
     lighter than the sampled --home-bg at mid height (no hard image edge anywhere) */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%), linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%), linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-composite: intersect;
}

/* Corners: vertically centred on the dock, left and right of it */
.page--home .home-hero__corners {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--dock-offset) + var(--dock-h) / 2);
  translate: 0 50%;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.page--home .home-hero__role,
.page--home .home-hero__place {
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  text-transform: uppercase;
}

.page--home .home-hero__place {
  letter-spacing: .04em;
  text-align: right;
}

/* Between phone and wide desktop the corners would collide with the centred dock,
   so they sit just above it, still left and right. */
@media (max-width: 1180px) {
  .page--home .home-hero__corners {
    bottom: calc(var(--dock-offset) + var(--dock-h) + 16px);
    translate: none;
    align-items: flex-end;
  }
}

/* Info pills below the name (phase 1.1 §4): mobile only, see the ≤760px block */
.page--home .home-hero__chips { display: none; }

.page--home .home-chip {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  border: 1px solid #0B0B0F;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #0B0B0F;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.page--home .home-chip .dot { color: var(--blue); }

.page--home .home-chip__globe {
  display: block;
  flex: none;
  width: 12px;
  height: 12px;
}

/* ---------- Mobile (spec §11.3) ---------- */

@media (max-width: 760px) {
  .page--home { --home-header-h: 60px; }

  .page--home { --resume-h: 36px; }
  .page--home .home-hero__resume { padding: 9px 15px; font-size: 12px; }

  /* §4: the bottom corners were covered by the photo and the dock; they become pills under the name */
  .page--home .home-hero__corners { display: none; }

  .page--home .home-hero__chips {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px var(--gutter) 0;
  }

  .page--home .home-hero__photo img { height: min(70svh, var(--photo-max, 100svh)); }

  .page--home .home-hero__corners {
    bottom: calc(var(--dock-offset) + var(--dock-h) + 16px);
    translate: none;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .page--home .home-hero__place { text-align: center; }
}

/* ---------- Pre-hide until the intro sets them (motion mode only) ---------- */

html.motion .page--home :is(.home-name__text, .home-hero__photo, .home-hero__resume, .home-hero__role, .home-hero__place, .home-chip) {
  visibility: hidden;
}

/* ======================================================================
   Phase 3 · Home sections (js/home/*.js)
   ====================================================================== */

.page--home .h-eyebrow {
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .16em;
  white-space: nowrap;
}

.page--home .h-ico { display: inline-block; flex: none; width: .8em; height: .8em; }

.page--home .h-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- §1.2 [ WHAT I DO ] (js/home/what.js) ---------- */

.page--home .h-what {
  min-height: 100svh;
  overflow: hidden;            /* the shots travel beyond the section edges */
}

.page--home .h-what__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
  min-height: 100svh;
  padding: calc(var(--home-header-h) + 12vh) var(--gutter) 18vh;
  align-content: center;
}

.page--home .h-what__eyebrow {
  grid-column: 1;
  padding-top: .9em;
  color: var(--h-dmuted);
}

.page--home .h-what__copy { grid-column: 2 / 13; }

.page--home .h-what__statement {
  max-width: 18ch;
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--h-text);
}

.page--home .h-what__sub {
  margin-top: 28px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--h-dmuted);
}

.page--home .h-what__shots {
  position: absolute;
  inset: 0;
  z-index: 2;                  /* in front of the text */
  pointer-events: none;
}

/* phase 3.1 §3: bigger hero shots, alternating sides 4vw from the edge */
.page--home .h-shot {
  position: absolute;
  top: 50%;
  width: clamp(340px, 30vw, 600px);
  display: block;   /* the travel is measured from the shot's top edge (+60vh: fully below the viewport) */
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.page--home .h-shot--left { left: 4vw; }
.page--home .h-shot--right { right: 4vw; }

.page--home .h-shot__frame {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  background: #1a1a20;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .5);
  rotate: var(--rot);
  transition: scale .6s var(--ease-out);
}

.page--home .h-shot:hover .h-shot__frame,
.page--home .h-shot:focus-visible .h-shot__frame { scale: 1.04; }

.page--home .h-shot:focus-visible { outline: none; }
.page--home .h-shot:focus-visible .h-shot__frame { outline: 2px solid var(--h-text); outline-offset: 4px; }

.page--home .h-shot picture,
.page--home .h-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;   /* the site's hero, never a centre crop */
}

/* Below 1024 (and reduced motion): no pin; the shots sit under the text and drift */
@media (max-width: 1023.98px) {
  .page--home .h-what__inner {
    display: block;
    min-height: 0;
    padding: calc(var(--home-header-h) + 14vh) var(--gutter) 8vh;
  }

  .page--home .h-what__eyebrow { padding: 0 0 20px; }

  .page--home .h-what__shots {
    position: relative;
    inset: auto;
    height: calc(62vw * 10 / 16 * 3.6);
    margin: 0 0 12vh;
  }

  .page--home .h-shot { width: 62vw; top: 0; translate: none; }
  .page--home .h-shot:nth-child(1) { left: 4vw; top: 0; }
  .page--home .h-shot:nth-child(2) { left: auto; right: 4vw; top: 36%; }
  .page--home .h-shot:nth-child(3) { left: 4vw; top: 72%; }
  .page--home .h-shot:nth-child(n + 4) { display: none; }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .page--home .h-what__inner { min-height: 0; padding-bottom: 8vh; }

  .page--home .h-what__shots {
    position: relative;
    inset: auto;
    display: flex;
    justify-content: center;
    gap: 2vw;
    padding: 0 var(--gutter) 14vh;
  }

  .page--home .h-shot { position: relative; top: auto; left: auto; right: auto; translate: none; width: 17vw; }
}

/* ---------- Shared: pills on dark, media frames, cursor ---------- */

.page--home .h-pill--ghost {
  background: transparent;
  color: var(--h-text);
  box-shadow: inset 0 0 0 1px rgba(237, 235, 230, .4);
  transition: scale .1s var(--ease-out), box-shadow .4s var(--ease-out), background-color .4s var(--ease-out);
}

.page--home .h-pill--ghost:hover { box-shadow: inset 0 0 0 1px var(--h-text); background: rgba(237, 235, 230, .06); }
.page--home .h-pill--ghost:focus-visible { outline-color: var(--h-text); }

.page--home .pmedia {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1b1b21;
}

.page--home .pmedia__poster,
.page--home .pmedia__poster img,
.page--home .pmedia__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* phase 3.1 §2: any crop keeps the TOP of the site (its hero), never the centre */
.page--home .pmedia__poster img,
.page--home .pmedia__video { object-position: 50% 0%; }

.page--home .pmedia__video { opacity: 0; transition: opacity .4s var(--ease-out); }
.page--home .pmedia__video.is-on { opacity: 1; }

/* custom VIEW cursor (js/projects/cursor.js), same look as the Projects ring */
.page--home .pj-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 740;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}

.page--home .pj-cursor.is-visible { opacity: 1; }

.page--home .pj-cursor__disc {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: var(--h-text);
  color: var(--h-dark);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* phase 3.1 §4: "VIEW CASE →" pill following the pointer over a featured media box */
.page--home .h-viewcase {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 740;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -22px 0 0 -64px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--h-text);
  color: var(--h-ink);
  font: 600 12px/1.4 var(--font-sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  scale: .8;
  transition: opacity .2s, scale .3s var(--ease-out);
}

.page--home .h-viewcase.is-visible { opacity: 1; scale: 1; }
.page--home .fcard.is-over-media,
.page--home .fcard.is-over-media .fcard__link::after { cursor: none; }

/* ---------- §1.3 FEATURED. (js/home/featured.js) ---------- */

.page--home .h-featured { padding-top: 14vh; }

.page--home .h-feat__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 var(--gutter) 6vh;
}

.page--home .h-feat__word {
  font-weight: 600;
  font-size: clamp(4.5rem, 13vw, 13rem);
  line-height: .85;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--h-text);
}

.page--home .h-feat__eyebrow {
  padding-bottom: .6em;          /* sits on the word's baseline */
  color: var(--h-dmuted);
}

.page--home .fcard {
  position: sticky;
  top: 0;
  height: 100svh;
  background: var(--h-dark);
}

.page--home .fcard__inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4vw;
  height: 100%;
  /* the bottom row (tags, next) clears the dock */
  padding: 8vh var(--gutter) calc(var(--dock-h) + var(--dock-offset) + 28px);
  background: var(--h-dark);
  transform-origin: 50% 50%;
}

.page--home .fcard__media {
  position: relative;
  align-self: center;
  width: min(46vw, 78svh, 100svh - 8vh - var(--dock-h) - var(--dock-offset) - 28px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #1b1b21;
}

/* ---- §4 media box: animated colour background + browser device (js/home/device.js) ---- */
.page--home .fdev {
  position: absolute;
  inset: 0;
  container-type: size;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--c) 18%, #0E0E12);
}

.page--home .fdev__bg { position: absolute; inset: 0; overflow: hidden; }

.page--home .fdev__blob {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  /* soft by construction (gradient to transparent): no CSS blur filter, which cost a GPU blur pass
     per blob per frame on the drifting layers */
  background: radial-gradient(circle at 50% 50%, var(--c) 0%, color-mix(in srgb, var(--c) 82%, #0E0E12) 22%, color-mix(in srgb, var(--c) 50%, #0E0E12) 42%, color-mix(in srgb, var(--c) 20%, transparent) 58%, transparent 70%);
  will-change: transform;
}

.page--home .fdev__streak {
  position: absolute;
  inset: -20%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .07) 50%, transparent 58%);
}

.page--home .fdev__grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .06;
  mix-blend-mode: overlay;
}

.page--home .fdev__device {
  position: relative;
  /* 84% of the box, or by height when the window would pass 88% of it */
  width: min(84cqw, calc((88cqh - 28px) * var(--a)));
  will-change: transform, opacity;
}

.page--home .fdev__win {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: #1A1A1F;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}

.page--home .fdev__bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  background: #1A1A1F;
}

.page--home .fdev__dots { display: flex; gap: 5px; }
.page--home .fdev__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(237, 235, 230, .22); }

.page--home .fdev__url {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  max-width: 55%;
  padding: 2px 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: rgba(237, 235, 230, .7);
  font: 400 11px/1.5 var(--font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* the body has exactly the recording's aspect: no crop, no bars */
.page--home .fdev__body { aspect-ratio: var(--a); background: #0E0E12; }

.page--home .fdev__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
}

.page--home .fcard__brand {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.page--home .fcard__brand-name {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 6vw;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  pointer-events: none;
}

.page--home .fcard__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 1vh 0;
}

.page--home .fcard__num {
  font-weight: 300;
  font-size: 3rem;
  line-height: 1;
  color: var(--h-text);
}

.page--home .fcard__title {
  max-width: 22ch;
  margin-top: 24px;
  font-weight: 400;
  font-size: clamp(1.6rem, 2.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--h-text);
}

.page--home .fcard__link {
  color: inherit;
  text-decoration: none;
}

/* the whole card is the link */
.page--home .fcard__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

.page--home .fcard__link:focus-visible { outline: none; }
.page--home .fcard__link:focus-visible::after { outline: 2px solid var(--h-text); outline-offset: -8px; border-radius: 12px; }

.page--home .fcard__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.page--home .fcard__tags {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--h-dmuted);
}

.page--home .fcard__next {
  position: relative;
  z-index: 4;                   /* above the card link */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--h-text);
  font: 500 13px/1.4 var(--font-sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.page--home .fcard__next .h-ico { transition: translate .4s var(--ease-out); }
.page--home .fcard__next:hover .h-ico { translate: 0 3px; }
.page--home .fcard__next:focus-visible { outline: 2px solid var(--h-text); outline-offset: 4px; border-radius: 4px; }

.page--home .fcard__shade {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.page--home .h-feat__all {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 12vh var(--gutter) 16vh;
  background: var(--h-dark);
}

/* Below 1024: a plain list (§1.3 mobile) */
@media (max-width: 1023.98px) {
  .page--home .h-featured { padding-top: 12vh; }

  .page--home .h-feat__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .page--home .h-feat__eyebrow { order: -1; padding: 0; }
  .page--home .h-feat__word { font-size: min(13vw * 1.24, 7rem); white-space: nowrap; }   /* "FEATURED." on one line */

  .page--home .h-feat__stack {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 0 var(--gutter);
  }

  .page--home .fcard { position: relative; height: auto; }

  .page--home .fcard__inner {
    display: block;
    height: auto;
    padding: 0;
  }

  .page--home .fcard__media {
    width: 100%;
    aspect-ratio: 1;
  }

  .page--home .fdev__device { width: min(88cqw, calc((88cqh - 28px) * var(--a))); }

  .page--home .fcard__brand-name { font-size: 11vw; }
  .page--home .fcard__num { display: none; }
  .page--home .fcard__info { padding: 0; }

  .page--home .fcard__title {
    max-width: none;
    margin-top: 18px;
    font-size: 22px;
    line-height: 1.3;
  }

  .page--home .fcard__bottom { margin-top: 10px; }
  .page--home .fcard__next { display: none; }
  .page--home .h-feat__all { padding: 64px var(--gutter) 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .page--home .fcard__brand,
  .page--home .fcard__brand-name { opacity: 0; }
  .page--home .pmedia__video,
  .page--home .h-shot__frame { transition: none; }
}

/* ---------- §1.4 RESULTS SPEAK LOUDER (js/home/results.js), phase 3.1 §5 ---------- */

/* No About overlap any more: the stack and the lettering scroll away together after the hold. */
.page--home { --h-overlap: 0px; }

.page--home .h-res__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Motion (all sizes): a tall section, sticky stage, cards piled over the lettering.
   Height = 100svh + cards × 80svh (the pin) + 40svh (the last card holds). */
@media (prefers-reduced-motion: no-preference) {
  .page--home .h-results { height: calc(100svh + var(--n, 5) * 80svh + 40svh); }
  .page--home .h-res__stage { position: sticky; top: 0; height: 100svh; }
}

.page--home .h-res__eyebrow {
  position: relative;
  margin-bottom: 3vh;
  color: var(--h-dmuted);
}

.page--home .h-res__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.02em;
  text-align: center;
  text-transform: uppercase;
  color: var(--h-text);
}

.page--home .h-res__mask {
  display: block;
  overflow: hidden;
  padding: .03em .02em 0;      /* keeps the cap tops inside the mask */
}

.page--home .h-res__line {
  display: block;
  font-size: clamp(4rem, 22vw, 22rem);   /* replaced per line by fitLines() (90vw / 92vw) */
  white-space: nowrap;
  will-change: transform;
}

.page--home .h-res__cards {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.page--home .rcard {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  width: min(720px, 88vw);
  /* near-square; never taller than what fits between the pile (14vh + 4 × 26px) and the dock */
  min-height: min(720px, 80svh, calc(100svh - 14vh - (var(--n, 5) - 1) * 26px - var(--dock-h) - var(--dock-offset) - 16px));
  padding: 56px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  background:
    radial-gradient(120% 90% at 85% 100%, rgba(42, 66, 148, .35), transparent 60%),
    linear-gradient(180deg, #17171C 0%, #1C1C23 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  pointer-events: auto;
  will-change: transform;
}

/* subtle grain over the gradient */
.page--home .rcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.page--home .rcard__num {
  position: relative;
  font-weight: 600;
  font-size: 96px;
  line-height: 1;
  color: var(--h-text);
}

.page--home .rcard__body {
  position: relative;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  line-height: 1.35;
  color: var(--h-text);
}

.page--home .rcard__foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}

.page--home .rcard__tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 6px;
  background: #23232A;
}

.page--home .rcard__tile--icon { background: var(--blue); color: #fff; }
.page--home .rcard__img { width: 100%; height: 100%; object-fit: cover; }
.page--home .rcard__icon { display: grid; place-items: center; }
.page--home .rcard__who { min-width: 0; }

.page--home .rcard__title {
  font-weight: 500;
  font-size: 26px;
  line-height: 1.25;
  color: var(--h-text);
}

.page--home .rcard__sub {
  margin-top: 4px;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  color: var(--h-dmuted);
}

/* dims a covered card (opacity set by results.js) */
.page--home .rcard__dim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .page--home .rcard {
    gap: 22px;
    min-height: 0;
    padding: 28px;
  }

  .page--home .rcard__num { font-size: 56px; }
  .page--home .rcard__tile { width: 56px; height: 56px; }
  .page--home .rcard__icon svg { width: 24px; height: 24px; }
  .page--home .rcard__title { font-size: 18px; }
  .page--home .rcard__sub { font-size: 14px; }
}

/* Reduced motion: the lettering scrolls normally and the cards are a list */
@media (prefers-reduced-motion: reduce) {
  .page--home .h-res__stage { padding: 14vh var(--gutter) 18vh; }

  .page--home .h-res__cards {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 56px;
  }

  .page--home .rcard { position: relative; top: auto; left: auto; min-height: 0; will-change: auto; }
  .page--home .h-res__line { will-change: auto; }
}

/* ---------- §1.5 About (js/home/about.js) ---------- */

/* Light curtain: overlaps the Results stage by --h-overlap (desktop motion) or at least the
   corner radius, so the rounded corners always show the dark section behind them. */
.page--home .h-about {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * max(var(--h-overlap), var(--h-radius)));
  padding: 18vh var(--gutter) 16vh;
  background: var(--home-bg);
  color: var(--h-ink);
}

.page--home .h-about .h-eyebrow { color: rgba(11, 11, 15, .7); }   /* 12px on --home-bg: .55 is 3.8:1, .7 passes 4.5:1 */

.page--home .h-about__intro {
  max-width: 20ch;
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
}

.page--home .h-about__block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6vw;
  align-items: center;
  margin-top: 18vh;
}

.page--home .h-about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 36ch;
}

.page--home .h-about__block--start .h-about__text { justify-self: start; }

.page--home .h-about__p {
  font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  line-height: 1.45;
}

.page--home .h-img {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #c4c4c4;
}

.page--home .h-img--square { width: min(100%, 560px); aspect-ratio: 1; }

.page--home .h-img__pic,
.page--home .h-img img {
  display: block;
  width: 100%;
  height: 100%;
}

.page--home .h-img img {
  object-fit: cover;
  object-position: 50% 20%;
  scale: 1.18;                 /* room for the ±8% parallax */
}

/* Photo strip: stacked rotated cards, fanned out on scroll by about.js */
.page--home .h-strip {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(10.5vw * 5 / 4 + 80px);
}

.page--home .h-strip__card {
  position: absolute;
  top: 40px;
  left: calc(50% - 5.25vw);
  width: 10.5vw;
  aspect-ratio: 4 / 5;
}

.page--home .h-strip__inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 6px;
  background: #ddd;
  box-shadow: 0 14px 34px rgba(11, 11, 15, .18);
}

.page--home .h-strip__inner picture,
.page--home .h-strip__inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page--home .h-about__best {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20vh;
}

.page--home .h-about__skills {
  max-width: 34ch;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}

.page--home .h-about__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14vh;
  padding-top: 32px;
  border-top: 1px solid rgba(11, 11, 15, .12);
}

.page--home .h-about__status {
  max-width: 40ch;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .page--home .h-about { padding: 14vh var(--gutter) 12vh; }
  .page--home .h-about__block { grid-template-columns: 1fr; gap: 28px; margin-top: 12vh; }
  .page--home .h-about__block--me .h-about__text { order: 0; }
  .page--home .h-img--square { width: 100%; }

  .page--home .h-strip {
    display: flex;
    gap: 12px;
    height: auto;
    margin: 0 calc(-1 * var(--gutter));
    padding: 8px var(--gutter) 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .page--home .h-strip::-webkit-scrollbar { display: none; }

  .page--home .h-strip__card {
    position: relative;
    top: auto;
    left: auto;
    flex: none;
    width: 58vw;
    scroll-snap-align: center;
  }

  .page--home .h-about__best { margin-top: 12vh; }
  .page--home .h-about__end { flex-direction: column; align-items: flex-start; }
}

/* ---------- §1.6 CTA collage (js/home/cta.js) ---------- */

.page--home .h-pill--ink {
  background: transparent;
  color: var(--h-ink);
  box-shadow: inset 0 0 0 1.5px var(--h-ink);
  transition: scale .1s var(--ease-out), background-color .4s var(--ease-out), color .4s var(--ease-out);
}

.page--home .h-pill--ink:hover { background: var(--h-ink); color: #fff; }

.page--home .h-cta {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 120svh;
  overflow: hidden;
  background: var(--home-bg);
}

.page--home .h-cta__collage {
  position: absolute;
  top: -30%;
  left: -5vw;
  right: -5vw;
  display: flex;
  justify-content: center;
  gap: 2.4vw;
  pointer-events: none;
}

.page--home .h-cta__col {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2.4vw;
  width: 18vw;
  rotate: var(--rot);
}

.page--home .h-cta__shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1600;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  background: #c8c8c8;
  box-shadow: 0 24px 50px rgba(11, 11, 15, .22);
}

.page--home .h-cta__fade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 42% at 50% 50%, var(--home-bg) 0%, color-mix(in srgb, var(--home-bg) 92%, transparent) 40%, color-mix(in srgb, var(--home-bg) 55%, transparent) 70%, transparent 100%);
  pointer-events: none;
}

.page--home .h-cta__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 0 var(--gutter);
  text-align: center;
}

.page--home .h-cta__title {
  max-width: 14ch;
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  color: var(--h-ink);
}

.page--home .h-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 760px) {
  .page--home .h-cta { height: 110svh; }
  .page--home .h-cta__collage { gap: 3.5vw; top: -6%; }
  .page--home .h-cta__col { width: 30vw; gap: 3.5vw; }
  .page--home .h-cta__col:nth-child(n + 4) { display: none; }
  .page--home .h-cta__fade { background: radial-gradient(ellipse 70% 34% at 50% 50%, var(--home-bg) 0%, color-mix(in srgb, var(--home-bg) 90%, transparent) 50%, transparent 100%); }
}

/* ---------- §1.7 Footer (js/home/footer.js) ---------- */

/* Curtain reveal: sticky at the bottom behind the page (every section above is z ≥ 1). */
.page--home .h-footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  background: var(--blue);
  color: #fff;
}

.page--home .h-footer.is-tall { position: relative; }

.page--home .h-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 8vh;
  padding: 12vh var(--gutter) calc(var(--dock-h) + var(--dock-offset) + 28px + env(safe-area-inset-bottom));
}

.page--home .h-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
}

.page--home .h-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.page--home .h-footer__title {
  margin-bottom: 12px;
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -.03em;
}

.page--home .h-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}

.page--home .h-footer__email {
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 2.2rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.page--home .h-footer__phone,
.page--home .h-footer__wa {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
}

.page--home .h-footer__wa { display: inline-flex; align-items: center; gap: 6px; }

/* underline-grow links */
.page--home .h-ulink {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .45s var(--ease-out);
}

.page--home .h-ulink:hover,
.page--home .h-ulink:focus-visible { background-size: 100% 1px; }

.page--home .h-footer :focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }

/* copy button: the label rolls to "Copied!" */
.page--home .h-copy {
  display: inline-flex;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: 500 11px/1.4 var(--font-sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .3s, background-color .3s;
}

.page--home .h-copy:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.page--home .h-copy__roll {
  display: grid;
  height: 1.4em;
  overflow: hidden;
}

.page--home .h-copy__a,
.page--home .h-copy__b {
  grid-area: 1 / 1;
  transition: translate .45s var(--ease-out);
}

.page--home .h-copy__b { translate: 0 100%; }
.page--home .h-copy.is-copied .h-copy__a { translate: 0 -100%; }
.page--home .h-copy.is-copied .h-copy__b { translate: 0 0; }

.page--home .h-footer__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.page--home .h-footer__cols {
  display: flex;
  gap: clamp(32px, 6vw, 96px);
}

.page--home .h-footer__h {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);   /* 4.5:1+ on --blue */
}

.page--home .h-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
}

.page--home .h-footer__tagline {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: clamp(3rem, 10vw, 10rem);
  line-height: .85;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.page--home .h-footer__mask { display: block; overflow: hidden; padding-top: .04em; }
.page--home .h-footer__line { display: block; }

.page--home .h-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  font-weight: 400;
  font-size: 14px;
}

.page--home .h-footer__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.page--home .h-footer__back .h-ico { transition: translate .4s var(--ease-out); }
.page--home .h-footer__back:hover .h-ico { translate: 0 -3px; }

/* short desktop viewports (1280×720): compact enough to stay a sticky curtain reveal */
@media (min-width: 761px) and (max-height: 820px) {
  .page--home .h-footer__inner { gap: 5vh; padding-top: 9vh; }
  .page--home .h-footer__title { font-size: clamp(2.4rem, min(5vw, 8vh), 5rem); }
  .page--home .h-footer__tagline { font-size: clamp(3rem, min(10vw, 15vh), 10rem); }
}

@media (max-width: 760px) {
  .page--home .h-footer { position: relative; }
  .page--home .h-footer__inner { gap: 56px; padding-top: 72px; }
  .page--home .h-footer__top { flex-direction: column; }
  .page--home .h-footer__email { font-size: min(1.3rem, 5vw); }
  .page--home .h-footer__tagline { font-size: 13vw; white-space: nowrap; }   /* 18vw cannot hold "EVERY LINE" on one line */
  .page--home .h-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .page--home .h-copy__a,
  .page--home .h-copy__b,
  .page--home .h-ulink { transition: none; }
}

/* ---------- §1.8 Compositor layers for everything GSAP moves on scroll (motion mode only) ----------
   Without them every scrubbed frame re-rasters rotated screenshots, shadows and video frames. */
@media (prefers-reduced-motion: no-preference) {
  .page--home :is(.home-hero__photo, .h-shot, .fcard__inner, .h-res__line, .h-strip__card, .h-cta__col, .h-img img) { will-change: transform; }
  .page--home :is(.home-hero__shade, .fcard__brand, .fcard__brand-name, .fcard__shade) { will-change: opacity; }
}
