/* ============================================================
   V8 THEME — sans (Geist) face + Lusion-style hero & scroll motion.
   Loaded on every page alongside style.css; `body.hv1-page` flips
   the site to the sans display face. Pairs with the type-scale
   tokens defined in style.css :root.

   - Staggered on-load intro (reveal-head curtain wipe)
   - Lusion homepage hero (top lede + centered montage stage)
   - Native scroll-driven reveals (rise / wipe / media push-in)
   ============================================================ */

/* ---------- shared intro timeline (runs once on load) ---------- */
/* generic siblings rise + fade, staggered by --d */
.hv-intro {
  opacity: 0;
  transform: translateY(26px);
}
body.is-loaded .hv-intro {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

/* heading does a top-down curtain wipe (the meghanlogan signature) */
.reveal-head {
  clip-path: inset(0 0 100% 0);
  transform: translateY(0.14em);
  will-change: clip-path, transform;
}
body.is-loaded .reveal-head {
  clip-path: inset(0 0 -8% 0);
  transform: none;
  transition:
    clip-path 1.05s cubic-bezier(0.2, 0.75, 0.18, 1),
    transform 1.05s cubic-bezier(0.2, 0.75, 0.18, 1);
  transition-delay: var(--d, 0.08s);
}

/* never trap content behind a missing animation */
@media (prefers-reduced-motion: reduce) {
  .hv-intro,
  body.is-loaded .hv-intro {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .reveal-head,
  body.is-loaded .reveal-head {
    clip-path: none !important;
    transform: none !important;
    transition: none !important;
  }
}
@media (scripting: none) {
  .hv-intro { opacity: 1; transform: none; }
  .reveal-head { clip-path: none; transform: none; }
}

/* ============================================================
   V1 — Lusion layout on a dark ground (distinct from the page)
   ============================================================ */
/* dark header act: top-anchored sans lede, then a big centered stage
   that fills the rest of the screen and crops the montage to its middle */
.hv1 {
  display: flex;
  flex-direction: column;
  background: #14120e;
  padding-top: clamp(92px, 11.5vh, 138px);
  padding-bottom: clamp(44px, 6vh, 84px);
  gap: clamp(24px, 4vh, 48px);
}
/* eyebrow + lede sit in a top band, the wide media beneath — Lusion rhythm */
.hv1 .k { color: rgba(246, 244, 238, 0.55); }

/* personal intro, kept understated/top-set the way Lusion sizes it — the
   big statement headline lives in the .hv1-intro section before the work */
.hv1__lede {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--fs-title-1);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: #f6f4ee;
  max-width: 24ch;
}
.hv1__lede .it {
  font-style: normal;
  color: #5fc088;
}
.hv1__sub {
  margin-top: clamp(12px, 1.8vh, 20px);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: rgba(246, 244, 238, 0.62);
  max-width: 52ch;
}

/* statement + clients = one section (intro copy → selected clients).
   Tight internally; a clean break separates the featured work below. */
.hv1-intro {
  padding-top: clamp(52px, 7.5vh, 100px);
  padding-bottom: clamp(48px, 7vh, 84px);
  text-align: center;
}
.hv1-intro__head {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-title-3);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-inline: auto;
}
.hv1-intro__head .it { font-style: normal; color: #1e5c40; }
.hv1-intro__body {
  margin: clamp(24px, 4vh, 40px) auto 0;
  max-width: 56ch;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink2);
}
/* the montage sits on the grid: same width as .wrap and the same 16:9.2
   frame as the work cards, so it reads as one of the images */
.hv1__stage {
  position: relative;
  width: min(1280px, 100% - 2 * var(--gut));
  margin-inline: auto;
  aspect-ratio: 16 / 9.2;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c0b08;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.hv1__stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* crops to the centre of the montage */
  transform-origin: center;
  will-change: transform;
}
/* preserve the intro lift on the stage despite no transform on it */
.hv1__stage.hv-intro { transform: translateY(26px); }
body.is-loaded .hv1__stage.hv-intro { transform: none; }

/* corner crosshairs + scroll cue, like Lusion's viewport furniture */
.hv1__plus {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  opacity: 0.7;
  pointer-events: none;
}
.hv1__plus::before,
.hv1__plus::after {
  content: "";
  position: absolute;
  background: rgba(246, 244, 238, 0.85);
}
.hv1__plus::before { top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); }
.hv1__plus::after  { left: 50%; top: 0; height: 100%; width: 1px; transform: translateX(-50%); }
.hv1__plus--tl { top: 16px; left: 16px; }
.hv1__plus--tr { top: 16px; right: 16px; }
.hv1__plus--bl { bottom: 16px; left: 16px; }
.hv1__plus--br { bottom: 16px; right: 16px; }

.hv1__cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 244, 238, 0.82);
  transition: opacity 0.3s ease;
}
.hv1__cue span { display: inline-block; animation: nudge 2.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .hv1__cue span { animation: none; } }
/* cue fades on its own as you scroll off the hero — pure CSS, no scroll
   hijacking. Native scroll-driven; no-op where unsupported. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hv1__cue {
      animation: hv1-cue-fade linear both;
      animation-timeline: scroll(root);
      animation-range: 0 38vh;
    }
  }
}
@keyframes hv1-cue-fade {
  to { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* clients live under the statement section, on the paper ground (dark logos),
   kept tight to the headline above so they read as one section */
.hv1-clients {
  margin-top: clamp(26px, 3.4vh, 44px);
}
.hv1-clients__label {
  text-align: center;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(22px, 3.5vh, 36px);
}
.hv1-clients .ticker--logos { border-block: none; margin-top: 0; }
.hv1-clients .ticker--logos .ticker__set img {
  filter: brightness(0);
  opacity: 0.4;
}
.hv1-clients .ticker--logos .ticker__set img:hover { opacity: 0.8; }

/* V1 — flip the whole page to the sans face for a consistent grotesque
   feel: redefining --serif catches the nav, wordmark, project titles,
   section heads and stats in one move. Eyebrow labels stay mono. */
body.hv1-page { --serif: var(--sans); }

/* the wordmark wants a touch more weight to still read as a mark */
.hv1-page .hd__mark { font-weight: 600; letter-spacing: -0.01em; }

/* large sans display needs more weight than the serif's 400, and the
   featured project titles drop to ~58px */
.hv1-page .entry__name {
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 600;
  letter-spacing: -0.022em;
}
.hv1-page .caps h2,
.hv1-page .about__state,
.hv1-page .foot__state {
  font-weight: 600;
  letter-spacing: -0.022em;
}
.hv1-page .stat__n { font-weight: 600; letter-spacing: -0.02em; }

/* case-study + about display headings also need sans weight/tracking so
   they don't read thin at large sizes (mhd__name runs up to 200px) */
.hv1-page .display,
.hv1-page .mhd__name,
.hv1-page .next__name {
  font-weight: 600;
  letter-spacing: -0.03em;
}
.hv1-page .case-hd h1,
.hv1-page .chap h2 {
  font-weight: 600;
  letter-spacing: -0.025em;
}
.hv1-page .mhd__say p { font-weight: 500; letter-spacing: -0.015em; }

/* accents read as normal upright weight in a sans context */
.hv1-page .it { font-style: normal; }

/* ============================================================
   SCROLL MOTION — Lusion / Meghan Logan flavour
   Native scroll-driven reveals (no scroll-jacking). Headings wipe up
   from a mask; supporting blocks rise + settle; media frames push in.
   Each element is keyed to its OWN viewport entry, so the parts of a
   project entry cascade naturally as you scroll. Only this stylesheet
   (V1 + V2 previews) is affected; falls back to the .r one-shot reveal
   where animation-timeline isn't supported, and off under reduced-motion.
   ============================================================ */
@supports (animation-timeline: view()) {
  /* Desktop-only: the view() ranges are tuned to the 2-column entry layout.
     Below 961px the layout stacks and tall/narrow subjects make the ranges
     unreliable — which could pin an image at opacity:0 with no fallback
     (.entry__media has no .r reveal). Mobile/tablet use the JS .r reveal. */
  @media (min-width: 961px) and (prefers-reduced-motion: no-preference) {
    /* hand motion to the scroll timeline; clear the JS one-shot baseline */
    .r { opacity: 1; transform: none; transition: none; }

    /* standalone display headings: mask wipe + rise (the Meghan Logan move) */
    .hv1-intro__head,
    .about__state,
    .foot__state {
      animation: v-wipe linear both;
      animation-timeline: view();
      animation-range: entry 6% cover 34%;
    }

    /* supporting blocks: a soft rise + fade (the Lusion settle).
       .entry__top/sum/media/foot each key to their own position → cascade */
    .sec__hd,
    .entry__top,
    .entry__sum,
    .entry__foot,
    .cap,
    .stat,
    .about__body,
    .hv1-clients,
    .foot__mail,
    .foot__row {
      animation: v-rise linear both;
      animation-timeline: view();
      animation-range: entry 6% cover 30%;
    }

    /* media frames: rise with a touch of scale, like a slow push-in */
    .entry__media,
    .about__photo {
      animation: v-media linear both;
      animation-timeline: view();
      animation-range: entry 2% cover 40%;
    }
  }
}
@keyframes v-wipe {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(0.3em); }
  38%  { opacity: 1; }
  to   { opacity: 1; clip-path: inset(0 0 -12% 0); transform: none; }
}
@keyframes v-rise {
  from { opacity: 0; transform: translateY(46px); }
  to   { opacity: 1; transform: none; }
}
/* NB: media reveal animates transform only — never opacity. A scroll-timeline
   range that fails to resolve must never be able to hide a project image, so
   the worst case is a slight offset, not an invisible frame. */
@keyframes v-media {
  from { transform: translateY(64px) scale(1.045); }
  to   { transform: none; }
}
