/* ============ HERO (v2) ============
   Full-bleed motion video, Foldcraft-style left-aligned text, Forma-style glass nav.
   Palette: near-black ink world, off-white text, champagne gold #C9A96A as the
   single restrained accent (no orange). Vanilla CSS, transform/opacity only.

   Sources: research/21st-sources/ (liquid-glass-button, text-reveal) had not
   landed yet at build time, so no source was copied. Instead the glass recipe
   below is MOTION-SPEC 0.4 verbatim (itself the Forma/liquid-glass recipe:
   layered translucent gradient fill + masked luminous gradient edge +
   top light wedge + inset streaks, over backdrop blur/saturate/brightness),
   and the headline reveal follows the text-reveal pattern: overflow-hidden
   line masks, inner lines translateY(110%) -> 0, cubic-bezier(.22,1,.36,1),
   stagger per MOTION-SPEC section 2. The depth haze borrows the aurora /
   glow-horizon idea as a counter-parallax layer (data-speed -0.08), no filter
   blur on a full-screen layer. Floating elements are scene-native: two mini
   floating islets (generated art on pure black, screen-blended into the
   scene), plus one drift layer of CSS cloud wisps, an SVG bird flock and
   drifting motes. Transform/opacity motion only. */

:root{
  --bg:#060607;
  --ink:#0b0b0c;
  --paper:#f4f1ea;
  --paper-dim:rgba(244,241,234,.74);
  --paper-faint:rgba(244,241,234,.55);
  --gold:#c9a96a;
  --gold-soft:rgba(201,169,106,.55);
  --font-d:"Fraunces",Georgia,serif;
  --font-b:"Manrope",system-ui,-apple-system,sans-serif;
  --ease-out:cubic-bezier(.22,1,.36,1);
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:var(--font-b);
  background:var(--bg);
  color:var(--paper);
  line-height:1.6;
  overflow-x:hidden;
}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
::selection{background:var(--gold);color:var(--ink)}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:6px}

/* ---------- reveals (motion.js adds .in, honouring data-reveal-delay) ----------
   Contract per MOTION-SPEC 0.2/0.5: 700ms, cubic-bezier(0.22,1,0.36,1), 28px rise. */
.js [data-reveal]{
  opacity:0;transform:translateY(28px);
  transition:opacity .7s ease,transform .7s var(--ease-out);
}
.js [data-reveal].in{opacity:1;transform:none}

/* headline line masks: the mask clips, the inner line travels (text-reveal pattern) */
.line{display:block;overflow:hidden;padding:.07em .1em .15em 0;margin:-.07em 0 -.15em}
.line-in{display:block;will-change:transform}
.js .line-in[data-reveal]{
  opacity:1;transform:translateY(110%);
  transition:transform .7s var(--ease-out);
}
.js .line-in[data-reveal].in{transform:translateY(0)}

/* ---------- true glass: MOTION-SPEC 0.4 recipe, verbatim values ----------
   Layered translucent gradient fill + masked luminous gradient edge (::before)
   + soft top light wedge (::after) + inset streak shadows, over backdrop blur,
   so the glass refracts the bright video scene behind it. */
.glass{
  position:relative;isolation:isolate;
  background:linear-gradient(155deg,
    rgba(255,255,255,.16) 0%,rgba(255,255,255,.06) 38%,
    rgba(255,255,255,.03) 62%,rgba(255,255,255,.09) 100%);
  -webkit-backdrop-filter:blur(18px) saturate(160%) brightness(1.08);
  backdrop-filter:blur(18px) saturate(160%) brightness(1.08);
  border:1px solid transparent;
  background-clip:padding-box;
  box-shadow:
    inset 0 1px 0 0 rgba(255,255,255,.35),
    inset 0 -1px 0 0 rgba(255,255,255,.06),
    0 24px 48px -16px rgba(0,0,0,.45);
  border-radius:24px;
}
/* luminous gradient edge: a masked border layer, not a flat border colour */
.glass::before{
  content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;
  background:linear-gradient(160deg,
    rgba(255,255,255,.65),rgba(255,255,255,.12) 30%,
    rgba(255,255,255,.04) 55%,rgba(255,255,255,.45) 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  pointer-events:none;
}
/* top light streak: a soft white wedge clipped to the top 42% */
.glass::after{
  content:"";position:absolute;inset:0;border-radius:inherit;
  background:rgba(255,255,255,.13);
  -webkit-mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,0) 55%);
  mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,0) 55%);
  pointer-events:none;
}
/* no backdrop-filter support: raise fill alpha to .82 of the section colour */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .glass{background:rgba(6,6,7,.82)}
}

/* ---------- header: Forma-style pill glass nav ---------- */
.site-header{
  position:fixed;top:0;left:0;right:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:18px clamp(20px,4vw,52px);
}
.js .site-header[data-reveal]{transform:translateY(-14px)}
.js .site-header[data-reveal].in{transform:none}
.brand{
  font-family:'Allura',cursive;font-weight:400;font-size:clamp(2rem,9vw,2.25rem);line-height:1;
  letter-spacing:0;
  color:var(--paper);white-space:nowrap;
  text-shadow:0 2px 16px rgba(0,0,0,.65);
}
.pill-nav{
  position:absolute;left:50%;transform:translateX(-50%);
  display:flex;align-items:center;gap:4px;
  padding:7px;border-radius:999px;
  /* nav pill runs the glass recipe at small scale (MOTION-SPEC 1) */
  -webkit-backdrop-filter:blur(14px) saturate(150%) brightness(1.08);
  backdrop-filter:blur(14px) saturate(150%) brightness(1.08);
  transition:transform .3s ease;
}
/* scrolled state (MOTION-SPEC 1): the pill tightens by scale only, never layout */
.site-header.scrolled .pill-nav{transform:translateX(-50%) scale(.97)}
.pill-nav a{
  padding:8px 16px;border-radius:999px;
  font-size:.88rem;font-weight:600;color:var(--paper-dim);
  transition:color .2s ease,background .2s ease;
}
.pill-nav a:hover{color:#fff;background:rgba(255,255,255,.08)}
.pill-nav a[aria-current="page"]{color:var(--paper);background:rgba(255,255,255,.1)}
.header-cta{
  padding:10px 22px;border-radius:999px;
  background:var(--paper);color:var(--ink);
  font-size:.88rem;font-weight:800;white-space:nowrap;
  box-shadow:0 10px 26px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.8);
  transition:transform .25s ease,box-shadow .25s ease;
}
.header-cta:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(0,0,0,.4),0 6px 18px rgba(201,169,106,.18)}
.burger{
  display:none;flex-direction:column;justify-content:center;gap:6px;
  width:44px;height:44px;padding:11px;border-radius:50%;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter:blur(18px) saturate(160%);
  backdrop-filter:blur(18px) saturate(160%);
  cursor:pointer;
}
.burger span{display:block;width:100%;height:2px;border-radius:2px;background:var(--paper);transition:transform .3s var(--ease-out),opacity .2s ease}
.burger.open span:first-child{transform:translateY(4px) rotate(45deg)}
.burger.open span:last-child{transform:translateY(-4px) rotate(-45deg)}
.mobile-panel{
  position:absolute;top:calc(100% + 8px);right:clamp(20px,4vw,52px);
  width:min(320px,calc(100vw - 40px));
  display:flex;flex-direction:column;gap:2px;
  padding:12px;border-radius:20px;
  opacity:0;visibility:hidden;transform:translateY(-8px) scale(.98);
  transition:opacity .3s ease,transform .35s var(--ease-out),visibility 0s linear .35s;
}
.mobile-panel.open{opacity:1;visibility:visible;transform:none;transition:opacity .3s ease,transform .35s var(--ease-out)}
.mobile-panel a{padding:11px 14px;border-radius:14px;font-weight:600;color:var(--paper-dim);transition:color .2s ease,background .2s ease}
.mobile-panel a:hover{color:#fff;background:rgba(255,255,255,.08)}
.mobile-panel .mobile-panel-cta{margin-top:8px;text-align:center;background:var(--paper);color:var(--ink);font-weight:800}
.mobile-panel .mobile-panel-cta:hover{background:#fff;color:var(--ink)}

/* ---------- hero shell ---------- */
.hero{
  position:relative;
  min-height:100svh;
  display:flex;align-items:center;
  overflow:hidden;
  background:var(--bg);
  isolation:isolate;
}
/* video wrapper: 112% height at top -6%, so the 0.18 parallax lag never
   exposes an edge (MOTION-SPEC 2, layer 1). The transform lives on this
   wrapper, never on the <video> itself. The poster still is the wrapper
   background, so first paint is complete before any video bytes arrive. */
.hero-media{
  position:absolute;left:0;right:0;top:-6%;height:112%;z-index:0;overflow:hidden;
  background:#0a0e1a url("assets/hero-poster.jpg") center/cover no-repeat;
  will-change:transform;
}
.hero-video{
  width:100%;height:100%;
  object-fit:cover;object-position:center;
}
/* legibility grade: darkest on the left where the text sits, open on the right */
.hero-shade{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    linear-gradient(90deg,rgba(6,6,7,.9) 0%,rgba(6,6,7,.66) 42%,rgba(6,6,7,.2) 72%,rgba(6,6,7,.38) 100%),
    linear-gradient(180deg,rgba(6,6,7,.55) 0%,transparent 28%,transparent 60%,rgba(6,6,7,.8) 100%);
}
/* depth haze (spec layer 2): soft radial light from the video's own palette
   at 120% size, counter-parallax at data-speed -0.08 against the video's
   +0.18, so the two layers shear apart and sell depth. Removed on mobile. */
.hero-glow{
  position:absolute;inset:-10%;z-index:1;pointer-events:none;opacity:.55;
  background:
    radial-gradient(560px 380px at 80% 26%,rgba(201,169,106,.16),transparent 65%),
    radial-gradient(720px 480px at 92% 82%,rgba(190,205,235,.1),transparent 65%);
  will-change:transform;
}

/* bottom veil (spec layer 8): gradient into the page background, swelling
   via data-scroll-scale with its origin pinned to the bottom edge */
.hero-veil{
  position:absolute;left:0;right:0;bottom:0;height:26%;z-index:2;pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(6,6,7,.88));
  transform-origin:50% 100%;
  will-change:transform;
}

/* light streak: one thin diagonal ray across the visual field, static */
.hero-streak{
  position:absolute;z-index:1;top:20%;right:-6%;width:56%;height:1px;
  background:linear-gradient(90deg,transparent,rgba(201,169,106,.45) 38%,rgba(255,255,255,.6) 55%,transparent);
  transform:rotate(-14deg);
  opacity:.32;pointer-events:none;
}

/* ---------- floating elements: scene-native art ----------
   Entrance is an opacity-only keyframe; all positional motion is the
   engine's composed transform (data-speed / data-float / data-scroll-*).
   Ambient moving layers stay at the MOTION-SPEC cap of 5: video wrapper,
   depth haze, islet A, islet B, and the single drift layer below. */
.hero-el{
  position:absolute;z-index:2;pointer-events:none;
  --el-o:1;opacity:var(--el-o);
  animation:elIn 1.4s ease .5s both;
  will-change:transform;
}
@keyframes elIn{from{opacity:0}to{opacity:var(--el-o)}}

/* Mini floating islets: generated art on pure black. The blend lives on the
   OUTER element so the islet group screen-blends with the scene beneath it
   in the hero's stacking context and the black simply drops out. */
.hero-islet{mix-blend-mode:screen}
.hero-islet img{width:100%;height:auto}
/* A: the larger islet, right side of the visual field, counter-parallax */
.hero-islet-a{
  top:20%;right:5.5%;
  width:clamp(180px,17.5vw,238px);
}
/* B: a smaller, farther islet in the mid-left sky; lags behind (positive
   speed) so it reads as deeper background */
.hero-islet-b{
  --el-o:.88;
  top:9%;left:35%;
  width:clamp(128px,12vw,170px);
}

/* Drift layer: one engine item carrying the foreground cloud wisps, the
   bird flock and the light motes together, so they cost a single layer.
   It drifts sideways on scroll (data-scroll-x) with a whisper of float. */
.hero-drift{inset:0}
.wisp{
  position:absolute;border-radius:50%;pointer-events:none;
  background:radial-gradient(ellipse at center,rgba(206,221,248,.32),rgba(166,186,228,.15) 48%,transparent 72%);
  filter:blur(38px);
}
.wisp-1{left:-9%;bottom:5%;width:54vw;height:21vh}
.wisp-2{left:31%;bottom:-5%;width:47vw;height:19vh;opacity:.8}
.wisp-3{right:-11%;bottom:17%;width:39vw;height:16vh;opacity:.65}
/* distant bird flock: small dark gull silhouettes in the upper-right sky */
.hero-birds{
  position:absolute;top:13%;right:9%;
  width:min(300px,34vw);height:auto;opacity:.5;
}
/* light motes: tiny light grains bridging the text and visual halves */
.hero-motes{
  position:absolute;left:43%;bottom:19%;width:132px;height:84px;opacity:.85;
  background:
    radial-gradient(3px 3px at 18% 62%,rgba(244,241,234,.95) 50%,transparent 52%),
    radial-gradient(2px 2px at 46% 26%,rgba(201,169,106,.9) 50%,transparent 52%),
    radial-gradient(2.5px 2.5px at 68% 74%,rgba(244,241,234,.7) 50%,transparent 52%),
    radial-gradient(1.8px 1.8px at 86% 38%,rgba(201,169,106,.75) 50%,transparent 52%),
    radial-gradient(1.5px 1.5px at 34% 88%,rgba(244,241,234,.55) 50%,transparent 52%);
}

.hero-inner{
  position:relative;z-index:3;width:100%;
  max-width:1320px;margin:0 auto;
  padding:148px clamp(20px,5vw,64px) 110px;
}
.hero-text{max-width:730px}
.eyebrow{
  display:flex;align-items:center;gap:11px;
  font-size:.76rem;font-weight:800;letter-spacing:.26em;text-transform:uppercase;
  color:var(--paper-dim);margin-bottom:28px;
}
.eyebrow-dot{
  flex:none;width:7px;height:7px;border-radius:50%;
  background:var(--gold);box-shadow:0 0 12px 2px var(--gold-soft);
}
.hero-title{
  font-family:var(--font-d);font-weight:600;
  font-size:clamp(3.25rem,6.6vw + 1.1rem,6rem);
  line-height:1.03;letter-spacing:-.015em;
  color:var(--paper);
  text-shadow:0 4px 36px rgba(0,0,0,.45);
}
.hero-title em{
  font-style:italic;font-weight:500;
  color:var(--gold);
}
.hero-sub{
  margin-top:30px;max-width:472px;
  font-size:1.07rem;line-height:1.68;color:var(--paper-dim);
  text-shadow:0 2px 14px rgba(0,0,0,.5);
}
.hero-actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:40px}
.btn-primary{
  display:inline-flex;align-items:center;
  padding:16px 32px;border-radius:999px;
  background:var(--paper);color:var(--ink);
  font-size:.98rem;font-weight:800;
  box-shadow:0 14px 34px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.85);
  transition:transform .25s ease,box-shadow .25s ease;
}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(0,0,0,.46),0 8px 22px rgba(201,169,106,.2)}
.btn-glass{
  display:inline-flex;align-items:center;
  padding:16px 30px;border-radius:999px;
  font-size:.98rem;font-weight:700;color:var(--paper);
  transition:transform .25s ease,background .25s ease;
}
.btn-glass:hover{transform:translateY(-2px);background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(255,255,255,.09) 45%,rgba(255,255,255,.05))}

/* ---------- scroll cue ----------
   The wrap carries the engine's data-scroll-y drift; the cue itself keeps
   its reveal + keyframes, so no element ever has two transform owners. */
.scroll-cue-wrap{
  position:absolute;z-index:3;left:0;right:0;bottom:26px;
  display:flex;justify-content:center;pointer-events:none;
  will-change:transform;
}
.scroll-cue{
  width:26px;pointer-events:auto;
  display:flex;flex-direction:column;align-items:center;gap:7px;
}
.scroll-cue-line{
  width:1px;height:42px;
  background:linear-gradient(180deg,transparent,var(--paper-faint));
  animation:cuePulse 2.2s ease-in-out infinite;
}
.scroll-cue-chevron{
  width:10px;height:10px;
  border-right:1.5px solid var(--paper-dim);
  border-bottom:1.5px solid var(--paper-dim);
  transform:rotate(45deg);
  animation:cueDrop 2.2s ease-in-out infinite;
}
@keyframes cueDrop{0%,100%{transform:rotate(45deg) translate(0,0);opacity:.55}50%{transform:rotate(45deg) translate(4px,4px);opacity:1}}
@keyframes cuePulse{0%,100%{opacity:.45}50%{opacity:1}}

/* ---------- responsive ---------- */
@media (max-width:960px){
  .pill-nav,.header-cta{display:none}
  .burger{display:flex}
}
/* mobile motion contract (MOTION-SPEC 0.6 + hero mobile adjustments):
   same effects, smaller magnitudes; magnitudes themselves are set on the
   data attributes by the hero controller script before the engine scans.
   The haze layer is dropped entirely on mobile (layer count + GPU fill). */
@media (max-width:768px){
  /* keep the island (left third of the frame) in view on narrow crops */
  .hero-video{object-position:32% 50%}
  .glass{
    -webkit-backdrop-filter:blur(12px) saturate(150%);
    backdrop-filter:blur(12px) saturate(150%);
  }
  .hero-glow{display:none}
  .js [data-reveal]{transition-duration:.6s}
  .js [data-reveal]:not(.line-in){transform:translateY(20px)}
  .js [data-reveal]:not(.line-in).in{transform:none}
}
/* composition space (MOTION-SPEC 2): the motes hide below 400px */
@media (max-width:400px){
  .hero-motes{display:none}
}
@media (max-width:640px){
  .site-header{padding:14px 20px}
  .hero-inner{padding:126px 20px 104px}
  .hero-title{font-size:clamp(2.65rem,11.5vw,3.4rem);line-height:1.06}
  .eyebrow{font-size:.68rem;letter-spacing:.2em;margin-bottom:22px}
  .hero-sub{font-size:1rem;margin-top:24px}
  .hero-actions{margin-top:32px}
  .btn-primary,.btn-glass{padding:15px 26px;font-size:.94rem}
  .hero-islet-a{
    --el-o:.92;
    top:auto;bottom:8%;right:-4%;
    width:37vw;
  }
  /* one islet max on mobile: the far islet and the third wisp drop out */
  .hero-islet-b{display:none}
  .wisp-3{display:none}
  .wisp-1{width:80vw}
  .wisp-2{width:70vw}
  .hero-birds{top:11%;right:5%;width:168px;opacity:.45}
  .hero-motes{left:auto;right:30%;bottom:26%;opacity:.6}
  .hero-streak{top:16%;width:80%;opacity:.22}
  .hero-shade{
    background:
      linear-gradient(90deg,rgba(6,6,7,.88) 0%,rgba(6,6,7,.6) 60%,rgba(6,6,7,.35) 100%),
      linear-gradient(180deg,rgba(6,6,7,.55) 0%,transparent 30%,transparent 55%,rgba(6,6,7,.85) 100%);
  }
  .scroll-cue-wrap{bottom:18px}
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .hero-el{animation:none}
  .scroll-cue-line,.scroll-cue-chevron{animation:none}
  .js [data-reveal],.js .line-in[data-reveal]{
    opacity:1 !important;transform:none !important;transition:none !important;
  }
  .mobile-panel{transition:none}
}
