/* Landing page — cinematic scroll-driven marketing page.
   Standalone stylesheet: this page never loads dashboard.css. All positioning
   is transform-based and written per-frame by /js/landing.js (RAF loop), so
   NO transitions on #gallery-panel, #gallery-wrap, or .bp-card — a transition
   would fight the per-frame writes and lag the scroll. */

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

html { background: #000; }

body {
  font-family: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #a78bfa; outline-offset: 3px; }

/* ---- Hero: two side-by-side videos, fixed behind everything ---- */
.hero {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  background: #0a0a14;
  overflow: hidden; /* the spotlight beam is deliberately oversized — clip it here */
}
.hero.hidden { visibility: hidden; }
.hero-video {
  width: 50%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.35s ease;
}
/* The side NOT being scrubbed dims so the cursor's focus is unmistakable */
.hero-video.dim { filter: brightness(0.5) saturate(0.85); }

/* Spotlight beam: one blurred shaft of light sweeps over the videos on load.
   The blur lives in the SVG filter (rastered once), so the entry animation
   touches only transform/opacity — compositor-cheap, no per-frame re-blur.
   screen blending means it can only lighten the video, never wash it gray. */
#spotlight-beam {
  position: absolute;
  top: -160px;
  left: 0;
  width: 138%;
  height: 169%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  animation: beam-in 2s ease 0.75s forwards;
}
@media (min-width: 768px) {
  #spotlight-beam { top: -80px; left: 240px; }
}
@keyframes beam-in {
  from { opacity: 0; transform: translate(-72%, -62%) scale(0.5); }
  to   { opacity: 1; transform: translate(-50%, -40%) scale(1); }
}

/* Cursor spotlight: a soft glow trailing the pointer over the hero. Position
   is written per-frame by landing.js (desktop + motion-safe only), so the
   transition here covers opacity ONLY — a transform transition would fight
   the RAF writes. */
#cursor-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.20), rgba(167, 139, 250, 0.12) 45%, transparent 72%);
  filter: blur(28px);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform, opacity;
}

/* Static film grain over everything (incl. the white outro) — the texture
   that keeps flat fills from looking like a slide deck. data: URI is allowed
   by imgSrc. */
#grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Shared overlay chrome (topbar / caption / product info) ----
   Exclusion blending keeps the same white text legible over the videos, the
   black gallery panel, and the white outro (where it inverts to black). */
.overlay {
  position: fixed;
  z-index: 20;
  mix-blend-mode: exclusion;
  color: #fff;
  pointer-events: none;
}
.overlay a { pointer-events: auto; }

.topbar {
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px;
}
.logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.nav a { position: relative; }
.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { font-weight: 700; }

.kicker {
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
}

#scroll-hint {
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}
#scroll-hint .arr {
  display: inline-block;
  animation: hint-bob 1.6s ease-in-out infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.caption {
  left: 16px;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}
.caption h1 {
  font-size: clamp(44px, 9vw, 128px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
}
/* Second line renders as outline only — solid + hollow is the type moment */
.caption .outline {
  color: transparent;
  -webkit-text-stroke: 2px #fff;
}
@supports not (-webkit-text-stroke: 2px #fff) {
  .caption .outline { color: #fff; }
}
.glyph {
  display: inline-block;
  font-size: 0.5em;
  vertical-align: middle;
}

.product-info {
  left: 16px;
  bottom: 32px;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.5;
}
.product-info p { margin-bottom: 14px; }
.pi-cta {
  display: inline-block;
  margin-right: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.pi-cta-ghost { font-weight: 500; opacity: 0.75; }

/* ---- Staggered entry ---- */
.entry {
  opacity: 0;
  animation: entry 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.entry-1 { animation-delay: 0s; }
.entry-2 { animation-delay: 0.15s; }
.entry-3 { animation-delay: 0.3s; }
.entry-4 { animation-delay: 0.45s; }
@keyframes entry {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* .caption is centered with translateY(-50%); give it its own keyframes so
   the entry animation doesn't stomp that transform. */
.caption.entry { animation-name: entry-caption; }
@keyframes entry-caption {
  from { opacity: 0; transform: translateY(calc(-50% + 14px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

/* ---- Gallery panel ---- */
#gallery-panel {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000;
  transform: translateY(100vh);
  overflow: hidden;
}
#gallery-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* One horizontal row; landing.js drifts it continuously and wraps it
   seamlessly (the card set is cloned to cover the widest viewports). */
.track {
  display: flex;
  gap: 16px;
  will-change: transform;
}
.gallery-label {
  position: absolute;
  top: max(72px, 9vh);
  left: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.6);
}

.bp-card {
  position: relative;
  flex: none;
  height: min(56vh, 500px);
  aspect-ratio: 2 / 3;
  transform-origin: center bottom;
  background: #0a0a14;
  border: 1px solid #161624;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  transform: scale(0);
  will-change: transform;
  transition: border-color 0.3s ease;
}
.bp-card:hover { border-color: rgba(139, 92, 246, 0.55); }
.bp-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% -20%, rgba(124, 58, 237, 0.28), transparent 60%);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.bp-card:hover::before { opacity: 1; }
/* Subtle hue drift across the set so twelve cards don't read as one card
   stamped twelve times */
.bp-card:nth-child(3n+2)::before {
  background: radial-gradient(120% 90% at 50% -20%, rgba(232, 121, 249, 0.20), transparent 60%);
}
.bp-card:nth-child(3n)::before {
  background: radial-gradient(120% 90% at 50% -20%, rgba(99, 102, 241, 0.30), transparent 60%);
}
.bp-idx {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(196, 181, 253, 0.45);
}
.bp-viz {
  position: absolute;
  top: 18%;
  left: 20px;
  right: 20px;
  height: 30%;
  color: #8b5cf6;
  opacity: 0.85;
}
.bp-viz svg { width: 100%; height: 100%; display: block; }
.bp-icon { width: 28px; height: 28px; color: #8b5cf6; }
.bp-icon svg { width: 100%; height: 100%; display: block; }
.bp-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.bp-card p {
  font-size: 12.5px;
  line-height: 1.45;
  color: #8a8aaa;
}

/* ---- Outro ---- */
#outro-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

/* Closing headline: the centerpiece of the white outro. Plain black (no
   exclusion) because it only ever sits on the white overlay — blending would
   turn it mush-gray mid-fade. Opacity/transform are written per-frame by
   landing.js on the outro progress, so no transitions here. */
#outro-close {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 45%;
  transform: translateY(-50%);
  z-index: 13;
  text-align: center;
  color: #000;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
#outro-close h2 {
  font-size: clamp(36px, 7.5vw, 104px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
}
#outro-close p {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

#view-btn {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 13;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.3;
  transform: scale(0);
  will-change: transform;
  pointer-events: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#view-btn.active { pointer-events: auto; }
#view-btn:hover { background: #8b5cf6; box-shadow: 0 0 60px rgba(139, 92, 246, 0.55); }

#outro-footer {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 32px;
  z-index: 20;
  mix-blend-mode: exclusion;
  color: #fff;
  display: flex;
  gap: 80px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
}
#outro-footer.active a { pointer-events: auto; }

/* ---- Scroll spacer: the only element giving the document height ---- */
#scroll-spacer {
  width: 1px;
  visibility: hidden;
}

.noscript-note {
  position: relative;
  z-index: 30;
  padding: 24px 16px;
  font-size: 14px;
  color: #fff;
}
.noscript-note a { text-decoration: underline; }

@media (max-width: 639px) {
  .nav { gap: 16px; }
  .kicker { display: none; }
  .bp-card { height: min(46vh, 400px); }
  .track { gap: 12px; }
  .product-info { bottom: 24px; right: 16px; max-width: none; }
  #view-btn { width: 96px; height: 96px; right: 20px; bottom: 20px; }
  #outro-footer {
    bottom: 24px;
    font-size: 11px;
    gap: 0;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bp-card { will-change: auto; transform: none !important; }
  .entry { animation: none; opacity: 1; }
  #scroll-hint .arr { animation: none; }
  /* Beam appears in place, no sweep; cursor glow never shows (JS skips it) */
  #spotlight-beam { animation: none; opacity: 1; transform: translate(-50%, -40%); }
}
