/* Hero — cinematic banner, nav, mobile menu */
.hero {
  --h: max(33.4vw, 66svh);
  position: relative; min-height: 100svh; padding: 0; text-align: center;
  background: var(--night); color: var(--night-ink); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; display: flex; justify-content: center; pointer-events: none; }
.hero-art { position: absolute; top: 0; left: 0; right: 0; height: var(--h); display: flex; justify-content: center; will-change: transform;
  transform: translate3d(calc(var(--mx, 0) * -18px), calc(var(--my, 0) * -10px + var(--sy, 0px)), 0); }
.hero-kb { flex: none; width: calc(var(--h) * 3); height: var(--h); transform-origin: 50.7% 39.6%; animation: kb 28s ease-in-out infinite alternate; }
.hero-stage { position: relative; width: 100%; height: 100%; }
.hero-stage img { width: 100%; height: 100%; display: block; }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.12); } }

.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(7,13,31,.65) 0, rgba(7,13,31,0) 16%),
  linear-gradient(180deg, rgba(7,13,31,0) calc(var(--h) * .52), rgba(7,13,31,.82) calc(var(--h) * .86), var(--night) calc(var(--h) + 24px)),
  radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(7,13,31,.5) 100%); }

/* Spark where the two fingers meet */
.spark { position: absolute; left: 50.7%; top: 39.6%; width: 0; height: 0; mix-blend-mode: screen; }
.spark i { position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.spark .core { width: calc(var(--h) * .035); aspect-ratio: 1; background: radial-gradient(circle, #fff 0, #fff4cf 35%, rgba(255,214,120,0) 72%); animation: pulse 2.8s ease-in-out infinite; }
.spark .halo { width: calc(var(--h) * .24); aspect-ratio: 1; background: radial-gradient(circle, rgba(255,226,150,.85) 0, rgba(226,183,90,.35) 30%, rgba(111,168,255,.14) 55%, transparent 72%); animation: pulse 2.8s ease-in-out infinite .15s; }
.spark .flare { width: calc(var(--h) * .9); height: 2px; border-radius: 0; background: linear-gradient(90deg, transparent, rgba(255,236,190,.9), transparent); filter: blur(.6px); animation: flare 2.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .75; scale: .85; } 50% { opacity: 1; scale: 1.25; } }
@keyframes flare { 0%, 100% { opacity: .35; scale: .7 1; } 50% { opacity: .9; scale: 1.1 1; } }

/* Copy */
.hero-copy { position: relative; z-index: 2; padding-top: calc(var(--h) * .5); padding-bottom: 96px; }
.hero .eyebrow { color: var(--gold-bright); text-shadow: 0 1px 12px rgba(7,13,31,.95), 0 0 4px rgba(7,13,31,.9); }
.hero .eyebrow::before, .hero .eyebrow::after { background: var(--gold-bright); }
.hero h1 { font-size: clamp(42px, 5.6vw, 82px); max-width: 21ch; margin: 18px auto 0; color: #fbf6ea; text-shadow: 0 2px 30px rgba(7,13,31,.7); }
.hero h1 em { color: var(--gold-bright); }
.hero .lede { color: rgba(232,227,216,.86); max-width: 640px; margin-top: 18px; text-shadow: 0 1px 14px rgba(7,13,31,.8); }
.hero .cta { margin-top: 28px; }
.hero .btn { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--night); }
.hero .btn:hover { background: transparent; color: var(--gold-bright); }
.hero .btn.ghost { background: rgba(7,13,31,.35); border-color: rgba(232,227,216,.55); color: var(--night-ink); backdrop-filter: blur(4px); }
.hero .btn.ghost:hover { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
.hero .ca { margin-top: 30px; background: rgba(7,13,31,.6); border-color: rgba(226,183,90,.55); backdrop-filter: blur(8px); color: var(--night-ink); }
.hero .ca label { border-color: rgba(226,183,90,.55); color: var(--gold-bright); }
.hero .ca code { color: var(--night-ink); }
.hero .ca button { color: var(--gold-bright); border-color: rgba(226,183,90,.55); }
.hero .ca button:hover { background: var(--gold-bright); color: var(--night); }

/* Intro */
[data-in] { animation: rise 1s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.3s + var(--i, 0) * .14s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.hero-media { animation: fadein 1.8s ease both; }
@keyframes fadein { from { opacity: 0; } }

/* Scroll cue */
.scroll-cue { position: absolute; left: 50%; bottom: 20px; z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--night-soft); }
.scroll-cue i { width: 1px; height: 28px; background: linear-gradient(var(--gold-bright), transparent); transform-origin: top; animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Nav over the hero */
nav .wrap { max-width: 1280px; }
nav .brand span { color: #fbf6ea; transition: color .3s; }
nav .brand img { border-color: rgba(251,246,234,.8); }
nav .nav-links { display: flex; gap: 32px; }
nav .nav-links li:not(:last-child) { display: list-item; }
nav .nav-links a { color: rgba(251,246,234,.82); }
nav .nav-links a:hover { color: var(--gold-bright); }
nav .nav-links .btn { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--night); }
nav .nav-links .btn:hover { background: transparent; color: var(--gold-bright); }
nav.scrolled .brand span { color: var(--ink); }
nav.scrolled .brand img { border-color: var(--ink); }
nav.scrolled .nav-links a { color: var(--ink-soft); }
nav.scrolled .nav-links a:hover { color: var(--ink); }
nav.scrolled .nav-links .btn { background: var(--ink); border-color: var(--ink); color: var(--paper); }
nav.scrolled .nav-links .btn:hover { background: transparent; color: var(--ink); }

.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; position: relative; }
.nav-toggle i { position: absolute; left: 10px; right: 10px; height: 1.5px; background: #fbf6ea; transition: transform .35s, top .35s, background .3s; }
.nav-toggle i:first-child { top: 18px; } .nav-toggle i:last-child { top: 26px; }
nav.scrolled .nav-toggle i { background: var(--ink); }

.menu { position: fixed; inset: 0; z-index: 9; background: radial-gradient(ellipse at 70% 20%, var(--night-2), var(--night) 70%); color: var(--night-ink);
  display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 96px 16px 48px 28px;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.menu ul { list-style: none; }
.menu li { overflow: hidden; border-bottom: 1px solid rgba(232,227,216,.12); }
.menu li a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; text-decoration: none; font-family: var(--serif); font-size: 42px; line-height: 1.1;
  transform: translateY(100%); transition: transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(.1s + var(--n, 0) * .07s); }
.menu li a small { font-size: 16px; font-style: italic; color: var(--gold-bright); min-width: 28px; }
.menu li:nth-child(2) a { --n: 1; } .menu li:nth-child(3) a { --n: 2; } .menu li:nth-child(4) a { --n: 3; }
.menu .btn { align-self: flex-start; background: var(--gold-bright); border-color: var(--gold-bright); color: var(--night); opacity: 0; transition: opacity .5s .5s; }
body.menu-open { overflow: hidden; }
body.menu-open .menu { opacity: 1; visibility: visible; }
body.menu-open .menu li a { transform: none; }
body.menu-open .menu .btn { opacity: 1; }
body.menu-open nav { background: transparent; border-color: transparent; backdrop-filter: none; }
body.menu-open nav .brand span { color: #fbf6ea; }
body.menu-open nav .brand img { border-color: rgba(251,246,234,.8); }
body.menu-open .nav-toggle i { background: #fbf6ea; }
body.menu-open .nav-toggle i:first-child { top: 22px; transform: rotate(45deg); }
body.menu-open .nav-toggle i:last-child { top: 22px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  nav .nav-links { display: none; }
  .nav-toggle { display: block; }
  .hero { --h: 340px; }
  .hero-copy { padding-top: 250px; padding-bottom: 56px; }
  .scroll-cue { display: none; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 42px; margin-top: 18px; }
  .hero .eyebrow { font-size: 10px; letter-spacing: .22em; gap: 10px; }
  .hero .eyebrow::before, .hero .eyebrow::after { width: 18px; }
  .hero .lede { font-size: 16px; }
  .hero .cta .btn { flex: 1 1 140px; justify-content: center; padding: 14px 16px; }
}
@media (min-width: 861px) and (max-height: 760px) { .scroll-cue { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-kb, .spark i, .scroll-cue i, [data-in], .hero-media, .menu li a { animation: none !important; transition: none !important; }
  .hero-art { transform: none; }
}
.static .hero-kb { animation: none !important; transform: scale(1.06); }
.static .hero [data-in], .static .hero-media { animation: none !important; opacity: 1 !important; transform: none; }
.static .hero-art { transform: none; }

/* Horizon edge into the cream page, matching the Denominator section */
.hero { padding-bottom: 72px; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 4; pointer-events: none;
  background: linear-gradient(#f3ece0, #f3ece0) bottom / 100% 3px no-repeat,
    radial-gradient(62% 100% at 50% 0%, transparent 95.5%, rgba(111, 168, 255, .3) 98.4%, rgba(226, 183, 90, .9) 99.4%, #f3ece0 100%);
}
@media (max-width: 700px) {
  .hero { padding-bottom: 40px; }
  .hero::after { height: 44px; background: linear-gradient(#f3ece0, #f3ece0) bottom / 100% 3px no-repeat,
    radial-gradient(62% 100% at 50% 0%, transparent 93%, rgba(111, 168, 255, .3) 97.5%, rgba(226, 183, 90, .9) 99%, #f3ece0 100%); }
}
