/* ============================================================
   FRAME V2 — hero-v1.css
   The v1 hero (copy left / rotating scene stage right), ported
   into the v2 shell. Entrance is pure CSS (compositor-driven,
   not rAF dependent). Pairs with hero-scenes.css + hero-scenes.js.
   ============================================================ */

:root {
  /* aliases for v1 token names used by hero-scenes.css */
  --line-dark: var(--line-1);
  --line-dark-2: var(--line-2);
  --accent-glow: rgba(99, 157, 205, 0.55);
}

/* ---------- layout ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 78% 18%, #14243a 0%, var(--ink-850) 42%, var(--ink-950) 100%);
}
.hero__veil { position: absolute; inset: 0; z-index: 0; }
.hero__grid-glow {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 70% 35%, #000 0%, transparent 100%);
  mask-image: radial-gradient(70% 60% at 70% 35%, #000 0%, transparent 100%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: var(--nav-h); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
.hero__eyebrow { margin-bottom: 26px; }
.hero h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.035em; line-height: .9; margin: 0; font-size: clamp(3rem, 6.2vw, 5.9rem); color: #fff; }
.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln > span { display: block; }
.hero__sub { margin: 30px 0 38px; font-size: clamp(1.22rem, 1.6vw, 1.6rem); line-height: 1.5; color: var(--frame-coldroll); max-width: 42ch; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* scroll cue */
.hero__scroll {
  position: absolute; left: clamp(20px, 5vw, 64px); bottom: 30px; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-condensed); text-transform: uppercase; letter-spacing: .2em; font-size: 13px; color: var(--frame-foundry);
}
.hero__scroll .bar { width: 1px; height: 42px; background: linear-gradient(var(--frame-conduit), transparent); position: relative; overflow: hidden; }
.hero__scroll .bar::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--frame-conduit); animation: scrolldrop 2.2s var(--ease-standard) infinite; }
@keyframes scrolldrop { 0% { transform: translateY(0); } 100% { transform: translateY(300%); } }

/* stat strip */
.hero__stats { display: flex; gap: clamp(28px, 4vw, 56px); margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line-dark); }
.hero__stats .stat__val { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 3vw, 2.9rem); letter-spacing: -.02em; line-height: 1; color: #fff; }
.hero__stats .stat__val .suf { font-size: .5em; color: var(--frame-conduit); margin-left: 4px; }
.hero__stats .stat__lab { font-family: var(--font-condensed); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--frame-foundry); margin-top: 8px; }

/* ---------- the mark (scene 0 glyph) ---------- */
.glyph { display: block; color: var(--frame-conduit); }
.glyph path { fill: currentColor; transform-box: fill-box; transform-origin: center; }
.glyph .l0 { opacity: .5; }
.glyph .l1 { opacity: .68; }
.glyph .l2 { opacity: .85; }
.glyph .l3 { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .glyph--assemble path { animation: layerSet .72s var(--ease-out) both; }
  .glyph--assemble .l3 { animation-delay: .04s; }
  .glyph--assemble .l2 { animation-delay: .15s; }
  .glyph--assemble .l1 { animation-delay: .26s; }
  .glyph--assemble .l0 { animation-delay: .37s; }
}
@keyframes layerSet {
  from { opacity: 0; transform: translateY(calc(-11px * var(--motion))); }
  60%  { opacity: 1; }
  to   { transform: none; }
}

/* ---------- visual frame + floating chips ---------- */
.hero__visual { position: relative; aspect-ratio: 1/1; max-width: 520px; margin-left: auto; perspective: 1200px; }
.hero__visual #heroGlyph { width: 80%; height: 80%; margin: 10% auto; display: block; }
.hero__chip {
  position: absolute; background: rgba(13, 17, 22, .78); backdrop-filter: blur(8px);
  border: 1px solid var(--line-dark-2); padding: 13px 16px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  white-space: nowrap; z-index: 3;
}
.hero__chip .t { font-family: var(--font-condensed); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--frame-galvanized); }
.hero__chip .v { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: #fff; letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; }
.hero__chip .v .accent { color: var(--frame-conduit); }

/* ---------- entrance (CSS, compositor-driven — not rAF dependent) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-hero] { opacity: 0; animation: heroFade .85s var(--ease-out) forwards; }
  .js .hero h1 .ln > span { opacity: 0; transform: translateY(108%); animation: heroLine .95s var(--ease-out) forwards; }
  .js .hero [data-hero="1"] { animation-delay: .15s; }
  .js .hero h1 .ln:nth-child(1) > span { animation-delay: .30s; }
  .js .hero h1 .ln:nth-child(2) > span { animation-delay: .40s; }
  .js .hero h1 .ln:nth-child(3) > span { animation-delay: .50s; }
  .js .hero [data-hero="5"] { animation-delay: .62s; }
  .js .hero [data-hero="6"] { animation-delay: .74s; }
  .js .hero [data-hero="7"] { animation-delay: .86s; }
  .js .hero__visual { opacity: 0; animation: heroPop 1.1s var(--ease-out) .35s forwards; }
  .js .hero [data-float] { opacity: 0; animation: heroFade .7s var(--ease-out) forwards; }
  .js .hero [data-float="1"] { animation-delay: 1s; }
  .js .hero [data-float="2"] { animation-delay: 1.15s; }
}
@keyframes heroFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes heroLine { from { opacity: 0; transform: translateY(108%); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroPop  { from { opacity: 0; transform: scale(.72) rotate(-6deg); } to { opacity: 1; transform: none; } }

/* watchdog: if the animation clock is frozen, force the hero visible */
.no-motion .hero [data-hero],
.no-motion .hero h1 .ln > span,
.no-motion .hero__visual,
.no-motion .hero [data-float] {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
.no-motion .glyph--assemble path { animation: none !important; transform: none; }
.no-motion .glyph .l0 { opacity: .5; } .no-motion .glyph .l1 { opacity: .68; }
.no-motion .glyph .l2 { opacity: .85; } .no-motion .glyph .l3 { opacity: 1; }
.no-motion .hero__scroll .bar::after { animation: none; }

@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
}

/* short viewports: the scroll cue collides with the CTA row — drop it */
@media (max-height: 820px) {
  .hero__scroll { display: none; }
}
