/* =========================================================
   Alternate Reality — Cinematic Hero
   Brand: heavy condensed type, charcoal bg, yellow/green/coral
          accent palette, soft color orbs, outline-stroke ghosts
   ========================================================= */

:root {
  /* charcoal (matches deck), never pure black */
  --bg: #161616;
  --bg-elev: #1c1c1c;
  --bg-deeper: #0e0e0e;

  /* paper-white ink */
  --ink-1: #f7f5f1;
  --ink-2: rgba(247, 245, 241, 0.74);
  --ink-3: rgba(247, 245, 241, 0.50);
  --ink-4: rgba(247, 245, 241, 0.24);
  --ink-5: rgba(247, 245, 241, 0.12);
  --line:        rgba(247, 245, 241, 0.10);
  --line-strong: rgba(247, 245, 241, 0.22);

  /* brand accents (lifted from the deck) */
  --y-yellow:    #FBBF15;
  --y-yellow-2:  #FFD341;
  --y-green:     #7BD445;
  --y-green-2:   #A6E36C;
  --y-coral:     #F76262;
  --y-coral-2:   #FF8585;
  --y-blue:      #3B6FD1;
  --y-violet:    #6A6BD9;
  --y-pink:      #E89BB6;
  --y-orange:    #FF8A3D;

  /* legacy alias, used by some older selectors */
  --accent:      var(--y-yellow);

  --glass-bg:           rgba(22, 22, 22, 0.32);
  --glass-bg-strong:    rgba(28, 28, 28, 0.55);
  --glass-stroke:       rgba(247, 245, 241, 0.16);
  --glass-stroke-bright: rgba(247, 245, 241, 0.32);

  --font-sans: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo Black", "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --font-condensed: "Archivo Narrow", "Montserrat", system-ui, sans-serif;

  --safe-x: clamp(20px, 3.2vw, 56px);
  --safe-y: clamp(18px, 2.4vw, 36px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: transparent;
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  width: 100%;
  scroll-behavior: smooth;
}
html { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; background: var(--bg); }
body { min-height: 100vh; overflow-x: hidden !important; overflow-y: visible !important; height: auto !important; background: transparent; }

::selection { background: var(--y-yellow); color: #000; }

button, a { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { text-decoration: none; }

/* =========================================================
   Stage layering
   ========================================================= */
.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
}

/* Sticky background that follows you down the page */
.stage-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
}

/* ---------- VIDEO ---------- */
.video-layer {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Poster shows immediately while Vimeo iframe is being deferred */
  background: #161616 url('/assets/hero-poster.jpg') center/cover no-repeat;
}
.video-layer video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  min-width: 100%; min-height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1.04);
  filter: saturate(0.92) contrast(1.04);
  transition: opacity 1.2s ease;
  opacity: 0;
}
.video-layer video.is-ready { opacity: 1; }

.video-layer .vimeo-frame {
  position: absolute;
  top: 50%; left: 50%;
  width: 300vw;
  height: 300vh;
  max-width: none;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  filter: saturate(1.0) contrast(1.05);
  opacity: 0;
  transition: opacity 1.4s ease;
}
@media (min-aspect-ratio: 16/9) {
  .video-layer .vimeo-frame {
    width: 100vw;
    height: calc(100vw * 9 / 16);
    min-height: 100vh;
  }
}
@media (max-aspect-ratio: 16/9) {
  .video-layer .vimeo-frame {
    height: 100vh;
    width: calc(100vh * 16 / 9);
    min-width: 100vw;
  }
}
.video-layer .vimeo-frame.is-ready { opacity: 1; }

/* gentler darkening — let the video & orbs read */
.video-tint {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 20% 100%, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 45%, transparent 75%),
    radial-gradient(80% 60% at 80% 0%, rgba(0,0,0,0.30) 0%, transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.18) 0%, transparent 22%, transparent 60%, rgba(0,0,0,0.32) 100%);
}

/* Soft brand-color orbs — sit OVER the video, UNDER the content */
.brand-orbs {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0.72;
}
.brand-orbs .orb {
  position: absolute;
  width: 60vmin;
  height: 60vmin;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.brand-orbs .orb.o1 { background: var(--y-blue);   top: -15%; left: -10%; animation: orb-drift-a 22s ease-in-out infinite alternate; }
.brand-orbs .orb.o2 { background: var(--y-violet); top: 30%;  right: -20%; animation: orb-drift-b 28s ease-in-out infinite alternate; }
.brand-orbs .orb.o3 { background: var(--y-pink);   bottom: -25%; left: 25%; animation: orb-drift-c 30s ease-in-out infinite alternate; }
.brand-orbs .orb.o4 { background: var(--y-orange); bottom: -10%; right: 5%; animation: orb-drift-d 26s ease-in-out infinite alternate; opacity: 0.35; width: 40vmin; height: 40vmin; }
@keyframes orb-drift-a { from { transform: translate(0,0); }    to { transform: translate(8%, 12%); } }
@keyframes orb-drift-b { from { transform: translate(0,0); }    to { transform: translate(-12%, 6%); } }
@keyframes orb-drift-c { from { transform: translate(0,0); }    to { transform: translate(10%, -10%); } }
@keyframes orb-drift-d { from { transform: translate(0,0); }    to { transform: translate(-6%, -8%); } }

/* film grain — kept very subtle */
.grain {
  position: absolute; inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  animation: grain-shift 1.6s steps(6) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: var(--safe-y);
  left: var(--safe-x);
  right: var(--safe-x);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(255,255,255,0.04),
    0 30px 60px -20px rgba(0,0,0,0.5);
  animation: nav-in 0.9s 0.2s cubic-bezier(.22,.61,.36,1) backwards;
}
@keyframes nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav .brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-1);
  padding-right: 16px;
  border-right: 1px solid var(--line);
}
.nav .brand .ar-logo { width: 28px; height: 28px; object-fit: contain; }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 4px;
}
.nav-links a {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover {
  color: var(--ink-1);
  background: rgba(255,255,255,0.06);
}
.nav-links a .dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--y-yellow);
  margin-right: 8px;
  transform: translateY(-1px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-links a:hover .dot { opacity: 1; }

.nav-spacer { flex: 1; }

.nav-meta {
  display: flex; align-items: center; gap: 10px;
  padding-right: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.nav-meta .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--y-green);
  box-shadow: 0 0 0 0 var(--y-green);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(123, 212, 69, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(123, 212, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 212, 69, 0); }
}

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--y-yellow);
  color: #161616;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.25s cubic-bezier(.22,.61,.36,1), background 0.2s ease;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--y-yellow-2); }
.nav-cta .arrow {
  display: inline-block;
  width: 14px;
  transition: transform 0.25s ease;
}
.nav-cta:hover .arrow { transform: translateX(3px); }

/* =========================================================
   HERO CONTENT — bottom-left + spinning logo card right
   ========================================================= */
.hero {
  position: absolute;
  left: var(--safe-x);
  right: var(--safe-x);
  bottom: calc(var(--safe-y) + 32px);
  top: calc(var(--safe-y) + 80px);
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  pointer-events: none;
  overflow: hidden;
  min-height: 0;
}
.hero-content { min-height: 0; overflow: hidden; }
.hero > * { pointer-events: auto; }
.hero-content { max-width: min(900px, 68vw); }

/* eyebrow pill */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 7px 12px 7px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.30);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
  margin-bottom: clamp(16px, 2.4vh, 28px);
  animation: rise 0.9s 0.3s cubic-bezier(.22,.61,.36,1) backwards;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--y-green);
  box-shadow: 0 0 8px var(--y-green);
}
.eyebrow .div {
  width: 1px; height: 10px;
  background: var(--line-strong);
  margin: 0 2px;
}
.eyebrow .num {
  color: var(--ink-3);
  font-size: 10px;
}

/* HEADLINE — heavy condensed display, all caps,
   accent words colored (no italics anywhere) */
.h-hero {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(42px, 7.4vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink-1);
  text-wrap: balance;
}
.h-hero em {
  font-style: normal;
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  color: var(--y-yellow);
}
.h-hero em.green  { color: var(--y-green); }
.h-hero em.coral  { color: var(--y-coral); }
.h-hero em.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(247,245,241,0.45);
}

.h-hero .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: baseline;
  margin-right: 0.18em;
}
.h-hero .word > span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: word-rise 0.95s cubic-bezier(.22,.9,.32,1) forwards;
}
@keyframes word-rise {
  to { transform: translateY(0); opacity: 1; }
}

.hero-sub {
  margin-top: clamp(16px, 2.4vh, 28px);
  max-width: 56ch;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.6;
  color: var(--ink-2);
  animation: rise 0.9s 1s cubic-bezier(.22,.61,.36,1) backwards;
}

.hero-ctas {
  margin-top: clamp(20px, 3.2vh, 36px);
  display: flex; align-items: center;
  gap: 14px;
  animation: rise 0.9s 1.15s cubic-bezier(.22,.61,.36,1) backwards;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.25s cubic-bezier(.22,.61,.36,1), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.btn-primary {
  background: var(--y-yellow);
  color: #161616;
  box-shadow: 0 14px 40px -12px rgba(251,191,21,0.35);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--y-yellow-2); }
.btn-ghost {
  background: rgba(22, 22, 22, 0.22);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--ink-1);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.btn-ghost:hover { border-color: var(--glass-stroke-bright); background: var(--glass-bg-strong); }
.btn .arrow { width: 14px; transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn .play {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--y-green);
  display: inline-flex; align-items: center; justify-content: center;
  color: #161616; font-size: 9px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- right-side spinning logo card ---------- */
.spin-card {
  position: relative;
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  animation: rise 0.9s 1.3s cubic-bezier(.22,.61,.36,1) backwards;
}
.spin-card .ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  animation: spin-slow 22s linear infinite;
}
.spin-card .ring text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: var(--ink-1);
}
.spin-card .ring .ring-bg {
  fill: none;
  stroke: rgba(247,245,241,0.18);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.spin-card .core {
  position: relative;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(22,22,22,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 30px 60px -20px rgba(0,0,0,0.7);
  display: grid; place-items: center;
}
.spin-card .core .ar-logo { width: 64px; height: 64px; object-fit: contain; display: block; }
.spin-card .tick {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--y-green);
  box-shadow: 0 0 10px var(--y-green);
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

/* =========================================================
   EDGE ORNAMENTS
   ========================================================= */
.ornaments {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
}

.reticle {
  position: fixed;
  width: 22px; height: 22px;
  border: 1px solid var(--ink-3);
  opacity: 0.6;
}
.reticle.tl { top: var(--safe-y); left: var(--safe-x); border-right: 0; border-bottom: 0; }
.reticle.tr { top: var(--safe-y); right: var(--safe-x); border-left: 0; border-bottom: 0; }
.reticle.bl { bottom: var(--safe-y); left: var(--safe-x); border-right: 0; border-top: 0; }
.reticle.br { bottom: var(--safe-y); right: var(--safe-x); border-left: 0; border-top: 0; }

/* side rail (left) */
.rail {
  position: fixed;
  left: calc(var(--safe-x) - 6px);
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  display: flex; gap: 28px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.rail .item { display: inline-flex; align-items: center; gap: 8px; }
.rail .item .num {
  color: var(--ink-1);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}
.rail .item.is-current { color: var(--ink-1); }
.rail .item.is-current .num { background: var(--y-yellow); color: #161616; border-color: transparent; }

/* timecode (top right) */
.timecode {
  position: fixed;
  right: var(--safe-x);
  top: calc(var(--safe-y) + 64px);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  text-align: right;
  line-height: 1.6;
}
.timecode .label {
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.timecode .value {
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}

/* compact audio toggle — bottom right of hero */
.audio-pill {
  position: fixed;
  right: var(--safe-x);
  bottom: var(--safe-y);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(22, 22, 22, 0.32);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.audio-pill:hover {
  border-color: var(--glass-stroke-bright);
  background: rgba(28,28,28,0.48);
  transform: translateY(-1px);
}
.audio-pill .audio-bars {
  display: inline-flex; gap: 2px; align-items: end;
  height: 12px;
}
.audio-pill .audio-bars span {
  display: inline-block;
  width: 2px; height: 4px;
  background: var(--y-green);
  border-radius: 1px;
  animation: bars 1.1s ease-in-out infinite;
}
.audio-pill .audio-bars span:nth-child(2) { animation-delay: 0.15s; height: 9px; }
.audio-pill .audio-bars span:nth-child(3) { animation-delay: 0.30s; height: 5px; }
.audio-pill .audio-bars span:nth-child(4) { animation-delay: 0.45s; height: 10px; }
.audio-pill.is-muted .audio-bars span {
  animation-play-state: paused;
  background: var(--ink-3);
  opacity: 0.55;
}
@keyframes bars {
  0%, 100% { transform: scaleY(0.5); }
  50%      { transform: scaleY(1.4); }
}

/* baseline grid */
.grid-overlay {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  mask-image: linear-gradient(180deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* cursor spotlight */
.spotlight {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(360px 360px at var(--mx, 50%) var(--my, 50%), rgba(251,191,21,0.10), transparent 60%);
  mix-blend-mode: screen;
  transition: opacity 0.4s ease;
}

/* ============ small-screen & short-screen overrides ============ */
@media (max-height: 760px) {
  .h-hero { font-size: clamp(34px, 6.4vw, 88px); line-height: 0.95; }
  .hero-sub { font-size: 13.5px; max-width: 52ch; margin-top: 14px; }
  .eyebrow { margin-bottom: 14px; }
  .hero-ctas { margin-top: 18px; }
  .spin-card { width: 180px; height: 180px; }
  .spin-card .core { width: 100px; height: 100px; }
  .spin-card .core .ar-logo { width: 50px; height: 50px; }
  .timecode { display: none; }
}

@media (max-height: 620px) {
  .h-hero { font-size: clamp(28px, 5vw, 60px); line-height: 0.98; }
  .hero-sub { font-size: 12.5px; }
  .rail { display: none; }
  .hero { top: calc(var(--safe-y) + 64px); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .spin-card { display: none; }
  .rail { display: none; }
  .timecode { display: none; }
  .hero { bottom: calc(var(--safe-y) + 32px); }
  .h-hero { font-size: clamp(48px, 13vw, 80px); }
}
