/* ============================================================
   LC-A HERO (B5) — homepage only
   ------------------------------------------------------------
   Extracted verbatim from index.html:113-166 plus the one
   GSAP-gated initial state at :380. Nothing here is re-typed.

   Loaded only by the LC-A Hero widget (get_style_depends), so
   pages without a hero never fetch it.

   ONE background media, N rotating text phrases. The media does
   not change per phrase — see DEVIATIONS at the foot of this
   file for the only two additions.
   ============================================================ */

/* ---- HERO ---- */
.hero{position:relative;height:100svh;min-height:660px;display:flex;align-items:flex-end;overflow:hidden}
.hero__media{position:absolute;inset:0;z-index:0;overflow:hidden;background:#0a0a0c}
.hero__media video{width:100%;height:100%;object-fit:cover;object-position:center;transform:scale(1.06);will-change:transform}
.hero__scrim{position:absolute;inset:0;z-index:1;background:var(--scrim)}
.hero__motif{position:absolute;inset:0;z-index:2;pointer-events:none;color:var(--motif);mix-blend-mode:screen;opacity:.85}
html[data-mode="day"] .hero__motif{mix-blend-mode:multiply}
.hero__motif path{fill:none;stroke:currentColor;stroke-width:1;vector-effect:non-scaling-stroke}
.hero__inner{position:relative;z-index:3;width:100%;padding:0 clamp(20px,4vw,56px) clamp(40px,7vh,80px);
  perspective:1000px;perspective-origin:50% 50%}
/* DEVIATION — the two HARDCODED NEAR-WHITES are scoped to .hero.

   MEASURED in the Elementor editor, not predicted: the editor canvas loads the
   stylesheet of EVERY registered widget, not just the ones on the page. So
   editing the studio page loads contact.css, studio.css and hero.css together,
   in that order, and hero.css is last. Its unscoped .titlecard colour then beat
   studio's own .titlecard, which deliberately declares NO colour because the
   studio statement sits on the PAGE background — and the studio canvas rendered
   its h1 near-white on cream. The front end was fine, because there hero.css is
   not loaded at all; the bug lived only where the content is edited, which is
   the worst place for it.

   These two colours are the only hero-specific thing in these rules — the
   structural halves are shared with studio and stay unscoped — so scoping the
   colour is enough, and it also protects orbit, which reuses #titlecard.

   Same failure class as .phead h1 beating a named title style: an extracted
   rule reaching wider than the page it was lifted from. */
.titlecard{transform-style:preserve-3d;will-change:transform}
.hero .titlecard{color:#f6f5f2}
.eyebrow{font-size:11px;letter-spacing:var(--track-wide);text-transform:uppercase;
  margin-bottom:24px;display:flex;align-items:center;gap:16px}
.hero .eyebrow{color:rgba(246,245,242,.86);transition:none}  /* GSAP owns its opacity: core.css lists .eyebrow in the mode-fade union, whose opacity transition left the entrance stuck at 0.44-0.60 (measured 2026-11-16). See the CLAUDE.md hazard. */
.eyebrow .tick{width:40px;height:1px;background:currentColor;opacity:.7}
/* ROTATING HERO TITLE. The three phrases are stacked absolutely at one origin so each keeps its own
   line count (3 / 2 / 3) and its own masks — the entrance is literally the load-in animation pointed
   at a different subtree. Because every phrase is out of flow the h1 box is PURELY min-height, so it
   cannot jump between titles; 3 lines is the tallest phrase and therefore the reservation.
   ⚠️ --hero-lines must equal the largest .phrase line count. Add a 4-line phrase and raise it. */
.wordmark{--hero-fs:clamp(2.7rem,9vw,9rem);--hero-lh:.9;--hero-lines:3;--hero-desc:.26;
  position:relative;line-height:var(--hero-lh);
  min-height:calc(var(--hero-fs) * var(--hero-lh) * var(--hero-lines))}
/* VISIBILITY IS GATED ON THE CLASS, NOT ON THE TRANSFORM. Under prefers-reduced-motion the rule
   further down forces transform:none!important, and on a failed CDN .gsap-ready never lands — in
   either case a transform-based hide would leave all three phrases stacked and visible at once.
   Keyed to .is-active, both paths degrade to phrase 1 alone, static.
   Top-aligned: the 2-line phrase drops its slack into the larger gap above .lede rather than
   loosening the 24px eyebrow pairing directly above. Switch top:0 -> bottom:0 to invert that. */
.wordmark .phrase{position:absolute;top:0;left:0;width:100%;visibility:hidden}
.wordmark .phrase.is-active{visibility:visible}
/* DESCENDER CLEARANCE. line-height .9 makes the line box shorter than the type, so overflow:hidden
   was slicing the tails off g/p/y ("Exploring"). overflow clips to the PADDING box, so padding-bottom
   enlarges the visible window downward while the negative margin gives the space straight back to
   layout — the 3-line reservation above is unchanged, and so is where every line sits.
   ⚠️ This is why the off-stage offset is 135% and not 115%: a line must clear a mask that is now
   (--hero-lh + --hero-desc) tall against its own --hero-lh height, i.e. >= 100*(.9+.26)/.9 = 128.9%.
   Raise --hero-desc and that floor rises with it — keep the 135 in the CSS and the JS in step. */
.wordmark .word{display:block;overflow:hidden;
  padding-bottom:calc(var(--hero-fs) * var(--hero-desc));
  margin-bottom:calc(var(--hero-fs) * var(--hero-desc) * -1)}
/* white-space:nowrap is what turns the height reservation into a GUARANTEE: the phrases are out of
   flow, so a wrapped line cannot push .hero__foot down — it would silently overlap it instead.
   Trades that for visible horizontal clipping at very narrow widths (~<=320px). */
.wordmark .word>span{display:block;font-family:var(--font-disp);font-stretch:100%;font-weight:600;
  letter-spacing:.04em;font-size:var(--hero-fs);color:#f8f7f4;white-space:nowrap;text-transform:uppercase}
.hero__foot{margin-top:32px;display:flex;gap:40px;flex-wrap:wrap;align-items:flex-end;justify-content:space-between}
.lede{max-width:40ch;font-size:clamp(.95rem,1.45vw,1.12rem);color:rgba(246,245,242,.92);line-height:1.6;font-weight:300}
.lede strong{font-weight:500}
.scroll-cue{font-size:10px;letter-spacing:var(--track-wide);text-transform:uppercase;color:rgba(246,245,242,.78);
  display:flex;align-items:center;gap:13px}
.scroll-cue .bar{position:relative;width:1px;height:52px;background:rgba(246,245,242,.32);overflow:hidden}
.scroll-cue .bar::after{content:"";position:absolute;left:0;right:0;top:0;height:50%;background:#f6f5f2;
  animation:cue 2.25s var(--ease-zha) infinite}
@keyframes cue{0%{transform:translateY(-110%)}55%{transform:translateY(110%)}100%{transform:translateY(110%)}}

/* ---- C5 · GSAP-gated initial state, hero portion ----
   The off-stage offset. 135% is DERIVED, not chosen: a line must clear a mask
   that is (--hero-lh + --hero-desc) tall against its own --hero-lh height,
   i.e. >= 100*(.9+.26)/.9 = 128.9%. The JS constant OFF must stay in step with
   this number, which is why neither it nor --hero-desc is exposed as a control. */
.gsap-ready .wordmark .word>span{transform:translateY(135%)}
@media(prefers-reduced-motion:reduce){
  .gsap-ready .wordmark .word>span{opacity:1!important;transform:none!important}
}

/* ---- Background media: image support ----
   DEVIATION 1. The static site's hero is a <video>, so .hero__media video is the
   only rule it has. The widget also accepts an image, which needs the identical
   box treatment; the declarations are copied from the video rule above, not
   invented. Kept as a separate rule so the extracted line stays untouched. */
.hero__media img{width:100%;height:100%;object-fit:cover;object-position:center;transform:scale(1.06);will-change:transform}


/* ---- Background media: embedded video (YouTube / Vimeo) ----
   DEVIATION 3. The static site has no embed case; this is additive and does not
   touch the <video> or <img> rules above.

   .hero__embed is the wrapper the entrance and parallax tweens target for this
   case, so it carries the same scale(1.06) resting transform the <video> rule
   carries — otherwise the entrance would tween from 1.14 to 1 and the film
   would sit a hair smaller than the self-hosted path.

   COVER MATHS. An iframe cannot object-fit. To fill an arbitrary viewport it
   has to be sized past the edges and centred: at least as wide as the stage,
   and at least 16:9 tall for that width. 177.78svh = 16/9, 56.25vw = 9/16.
   Whichever constraint binds, the other overflows and is clipped by the
   wrapper's overflow:hidden — the same visual result as object-fit:cover.

   Two honest limits, both reported:
   1. The maths assumes a 16:9 SOURCE. If the uploaded video is not 16:9 the
      player letterboxes internally and those bars get scaled up with it.
   2. .hero uses min-height:660px, so on a viewport shorter than 660px the svh
      terms under-measure the stage and the iframe can fall short at the bottom.
      Rare (a landscape phone), and it degrades to a visible edge, not a break.

   pointer-events:none keeps the embed from swallowing the cursor — the hero's
   pointermove drives the title tilt and the motif drift. */
.hero__embed{position:absolute;inset:0;z-index:0;overflow:hidden;
  transform:scale(1.06);will-change:transform;background:#0a0a0c}
/* max-width/max-height:none is load-bearing. Elementor's custom-frontend.css
   sets .elementor iframe{max-width:100%;width:100%}. Our width wins on source
   order but the CLAMP does not, so without this the cover width is pulled back
   to the container and the maths above silently does nothing — measured 620px
   instead of 1600.02px at a 620x900 viewport. */
.hero__embed iframe{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:max(100vw,177.78svh);height:max(100svh,56.25vw);
  max-width:none;max-height:none;border:0;pointer-events:none}

/* POSTER. An embed cannot expose a poster attribute, so the still is a layer
   above the iframe that fades out once the player has had time to start.
   It also covers the provider's own loading flash. */
.hero__embed-poster{position:absolute;inset:0;z-index:1;background-size:cover;
  background-position:center;background-repeat:no-repeat;
  transition:opacity .8s var(--ease-soft)}
.hero__embed.is-playing .hero__embed-poster{opacity:0}
@media(prefers-reduced-motion:reduce){
  .hero__embed-poster{transition:none}
}

/* ---- Empty background ----
   DEVIATION 2. With no media chosen, .hero__media is an empty box. It already
   carries background:#0a0a0c from the extracted rule above, so the hero still
   reads as a dark stage and the white title stays legible rather than landing
   on nothing. No extra rule needed — noted here so the behaviour is deliberate
   rather than accidental. */

/* ============================================================
   DEVIATIONS from the static source — the complete list.
   1. .hero__media img added, mirroring .hero__media video, for image backgrounds.
   2. No rule; the empty-media case is covered by the extracted background:#0a0a0c.
   3. .hero__embed / .hero__embed iframe / .hero__embed-poster added for the
      YouTube and Vimeo case. Additive: the <video> and <img> rules are
      untouched, so the self-hosted path is unchanged.
   --hero-lines is overridden per instance by an inline style on .wordmark,
   computed from the tallest phrase. The CSS default of 3 is unchanged.
   Nothing else differs from the source bytes.
   ============================================================ */
