/* Nexus landing — cinematic layer. Loads AFTER styles.css; index.html only.
   Tokens come from styles.css (DESIGN.md is law). */

.landing { overflow-x: hidden; }

.container.wide { max-width: 1280px; }

/* ---------- Cinematic hero ---------- */

.cine-hero { min-height: 100svh; }

.cine-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.cine-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}
.cine-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 11, 15, 0.55) 0%, rgba(10, 11, 15, 0.25) 40%, rgba(10, 11, 15, 0.88) 100%),
    radial-gradient(70% 60% at 32% 48%, rgba(10, 11, 15, 0.55), transparent 100%);
}
.cine-veil.heavy { background: rgba(10, 11, 15, 0.82); }

.cine-inner { padding-top: 13vh; padding-bottom: 48px; text-align: center; }
.cine-hero h1 { max-width: 16ch; margin-left: auto; margin-right: auto; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6); }
.cine-hero .sub { margin-left: auto; margin-right: auto; }
.cine-hero .scanbar { margin-left: auto; margin-right: auto; }
.cine-hero .cta-row { justify-content: center; }

/* the product IS the hero: real deck in a 3D glass frame, straightens on scroll */
.hero-app { width: min(1120px, 90vw); margin: 60px auto 0; perspective: 1400px; }
.hero-app-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(110, 86, 247, 0.38);
  box-shadow:
    0 50px 160px rgba(0, 0, 0, 0.7),
    0 0 110px rgba(110, 86, 247, 0.18),
    0 0 44px rgba(61, 212, 208, 0.08);
  transform: rotateX(16deg) scale(0.97);
  transform-origin: top center;
  will-change: transform;
}
.hero-app-frame img { display: block; width: 100%; }

.scroll-cue {
  position: absolute;
  left: 50%;
  top: calc(100svh - 70px);
  bottom: auto;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, transparent, var(--live));
  animation: cue-drop 2.2s var(--ease-out) infinite;
}
@keyframes cue-drop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

/* ---------- Orbit showcase (scroll-scrubbed 360°) ---------- */

.showcase {
  position: relative;
  height: 780vh; /* scrub runway: orbit act + five feature scenes */
  background: var(--canvas);
}

/* the tour: ONE persistent rotating slab; the app's sections crossfade inside it */
.tour {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  perspective: 1400px;
}
.tour-slab {
  margin: 0;
  position: relative;
  width: min(72vw, 1150px);
  aspect-ratio: 8 / 5;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(110, 86, 247, 0.35);
  background: var(--panel);
  box-shadow:
    0 30px 110px rgba(0, 0, 0, 0.68),
    0 0 90px rgba(110, 86, 247, 0.15);
  will-change: transform;
}
.tour-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.tour-layer.on { opacity: 1; }
.tour-layer.contain { object-fit: contain; padding: 6%; }
/* static mode: hide the ambient film too */
html:not(.js) .stage-video, .showcase.static .stage-video,
html:not(.js) .stage-veil, .showcase.static .stage-veil { display: none; }
.tour-box {
  position: absolute;
  left: 5vw;
  bottom: 13vh;
  max-width: 330px;
  padding: 14px 18px 14px 32px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text);
  background: rgba(20, 22, 29, 0.78);
  border: 1px solid rgba(110, 86, 247, 0.4);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 30px rgba(110, 86, 247, 0.22), 0 10px 44px rgba(0, 0, 0, 0.5);
  opacity: 0;
}
.tour-box i {
  position: absolute;
  left: 13px;
  top: 19px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 12px var(--live), 0 0 26px rgba(61, 212, 208, 0.5);
  animation: pulse 2.4s var(--ease-standard) infinite;
}
.tour-box strong {
  display: block;
  color: var(--live);
  letter-spacing: 0.14em;
  margin-bottom: 5px;
}
.tour-box-alt { left: auto; right: 5vw; border-color: rgba(61, 212, 208, 0.4); box-shadow: 0 0 30px rgba(61, 212, 208, 0.18), 0 10px 44px rgba(0, 0, 0, 0.5); }
.showcase-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.showcase-stage { position: absolute; inset: 0; }

/* ambient stage: the space film, dimmed — the slab is the only scroll-driven object */
.stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.stage-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 65% at 50% 50%, transparent 30%, rgba(10, 11, 15, 0.75) 100%),
    linear-gradient(180deg, rgba(10, 11, 15, 0.5), transparent 20%, transparent 80%, rgba(10, 11, 15, 0.6));
}

.orbit-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
/* with JS driving the tour, the flat fallback stays out of the frame */
.js .showcase:not(.static) .orbit-fallback { display: none; }

.showcase-head {
  position: absolute;
  top: 6vh;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}
.showcase-head h2 { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7); }
.showcase-head .kicker { margin-bottom: 6px; }

/* glowing callout bubbles */
.orbit-callout {
  position: absolute;
  max-width: 300px;
  padding: 12px 16px 12px 30px;
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.5;
  background: rgba(20, 22, 29, 0.72);
  border: 1px solid rgba(110, 86, 247, 0.35);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 28px rgba(110, 86, 247, 0.22),
    0 8px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 18px rgba(110, 86, 247, 0.06);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
}
.orbit-callout i {
  position: absolute;
  left: 12px;
  top: 17px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 12px var(--live), 0 0 26px rgba(61, 212, 208, 0.5);
  animation: pulse 2.4s var(--ease-standard) infinite;
}
.co-1 { left: 6vw; top: 24vh; }
.co-2 { right: 6vw; top: 30vh; border-color: rgba(61, 212, 208, 0.4); box-shadow: 0 0 28px rgba(61, 212, 208, 0.18), 0 8px 40px rgba(0, 0, 0, 0.5); }
.co-3 { left: 8vw; bottom: 22vh; }
.co-4 { right: 8vw; bottom: 16vh; border-color: rgba(61, 212, 208, 0.4); box-shadow: 0 0 28px rgba(61, 212, 208, 0.18), 0 8px 40px rgba(0, 0, 0, 0.5); }

.orbit-progress {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  transform: translateX(-50%);
  width: 180px;
  height: 2px;
  background: rgba(35, 39, 51, 0.9);
  border-radius: 1px;
  overflow: hidden;
}
.orbit-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--live));
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Glow instrument cards ---------- */

.glow-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }

.glow-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(160deg, rgba(110, 86, 247, 0.45), rgba(35, 39, 51, 0.8) 40%, rgba(61, 212, 208, 0.3)) border-box;
  border: 1px solid transparent;
  transition: transform var(--dur-ui) var(--ease-standard), box-shadow var(--dur-ui) var(--ease-standard);
}
.glow-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 44px rgba(110, 86, 247, 0.16),
    0 18px 50px rgba(0, 0, 0, 0.45);
}
/* cursor-following inner glow (set --mx/--my from JS) */
.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%),
    rgba(110, 86, 247, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity var(--dur-ui) var(--ease-standard);
  pointer-events: none;
}
.glow-card:hover::before { opacity: 1; }

.glow-card figure {
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  aspect-ratio: 21 / 10;
  overflow: hidden;
}
.glow-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transform: scale(1.01);
  transition: transform 600ms var(--ease-out);
}
.glow-card:hover figure img { transform: scale(1.06); }

.glow-card h3 { position: relative; z-index: 1; padding: 20px 22px 0; }
.glow-card p { position: relative; z-index: 1; padding: 0 22px 22px; }
.glow-card h3 + p { padding-top: 8px; }

.glow-card .tool-tags { color: var(--live); font-size: 0.75rem; padding-bottom: 26px; }

/* text-only card keeps its padding rhythm */
.glow-card:not(:has(figure)) h3 { padding-top: 26px; }

.price-card.glow-card, .compare .glow-card { padding: 24px; }
.price-card.glow-card h3, .compare .glow-card h3,
.price-card.glow-card p, .compare .glow-card p { padding: 0; }

/* ---------- Boot preloader (injected by JS, once per session) ---------- */

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--canvas);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.boot-overlay.off { opacity: 0; transform: translateY(-2.5%); pointer-events: none; }
.boot-box { width: min(320px, 80vw); color: var(--muted); }
.boot-box .boot-line { color: var(--text); margin-bottom: 14px; letter-spacing: 0.04em; }
.boot-box .boot-line span { color: var(--live); }
.boot-box .scanbar { width: 100%; margin-bottom: 14px; }
.boot-box .boot-status { min-height: 1.4em; font-size: 0.8125rem; }

/* ---------- Hero constellation canvas ---------- */

.hero-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  mix-blend-mode: screen;
}

/* ---------- Reduced motion & responsive degrade ---------- */

@media (max-width: 1024px) {
  .glow-grid { grid-template-columns: repeat(2, 1fr); }
}

/* phones keep the full scrub — just tighter sizing */
@media (max-width: 900px) {
  .showcase { height: 620vh; }
  .showcase-head h2 { font-size: 1.35rem; }
  .tour-slab { width: 94vw; }
  .tour-box {
    left: 4vw;
    right: 4vw;
    bottom: 6vh;
    max-width: none;
    font-size: 0.78rem;
  }
  .tour-box-alt { left: 4vw; right: 4vw; }
  .orbit-callout { max-width: 78vw; font-size: 0.75rem; }
  .co-1 { left: 4vw; top: 19vh; }
  .co-2 { right: 4vw; top: auto; bottom: 18vh; }
  .hero-app { margin-top: 40px; }
}

/* static degrade: no JS or reduced motion — everything stacked and readable */
html:not(.js) .showcase, .showcase.static { height: auto; }
html:not(.js) .showcase-sticky, .showcase.static .showcase-sticky { position: relative; height: auto; padding: 72px 0 40px; }
html:not(.js) .showcase-stage, .showcase.static .showcase-stage { position: relative; inset: auto; display: flex; flex-direction: column; }
html:not(.js) .showcase-head, .showcase.static .showcase-head { order: -1; position: relative; top: auto; margin-bottom: 4px; }
html:not(.js) .orbit-canvas, .showcase.static .orbit-canvas,
html:not(.js) .orbit-progress, .showcase.static .orbit-progress { display: none; }
html:not(.js) .orbit-fallback, .showcase.static .orbit-fallback {
  position: relative;
  z-index: 0;
  height: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  width: min(94vw, 780px);
  margin: 18px auto 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(110, 86, 247, 0.08);
}
html:not(.js) .orbit-callout, .showcase.static .orbit-callout {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: none;
  max-width: min(94vw, 780px);
  margin: 16px auto 0;
}
/* static mode: the tour needs scroll to mean anything — the features grid below
   carries the same content, so just hide it */
html:not(.js) .tour, .showcase.static .tour { display: none; }

@media (max-width: 560px) {
  .glow-grid { grid-template-columns: 1fr; }
  .cine-inner { padding-top: 14vh; }
}

/* autoplay was blocked (battery saver etc.) — swap to the poster, no play glyph */
.cine-bg.no-video { background: url("assets/hero-poster.jpg") center / cover no-repeat; }

@media (prefers-reduced-motion: reduce) {
  .cine-video { display: none; }
  .cine-bg { background: url("assets/hero-poster.jpg") center / cover no-repeat; }
  .scroll-cue span { animation: none; opacity: 0.5; }
  .orbit-callout { opacity: 1; transform: none; }
  .orbit-callout i { animation: none; }
  .glow-card, .glow-card figure img { transition: none; }
}
