/* Helios product demo — Stripe-Sessions-style floating UI parallax */

deck-stage {
  background: var(--color-bg);
}

deck-stage section {
  /* Each section is a 1920×1080 stage. */
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.scene-root {
  position: absolute;
  inset: 0;
  perspective: 2400px;
  perspective-origin: 50% 45%;
}

/* ─────────── Ambient backdrop washes ─────────── */
.scene-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.wash-magenta {
  background:
    radial-gradient(60% 50% at 22% 30%, rgba(255, 76, 170, 0.10), transparent 65%),
    radial-gradient(60% 60% at 80% 75%, rgba(168, 85, 247, 0.07), transparent 70%);
}
.wash-warm {
  background:
    radial-gradient(70% 60% at 50% 60%, rgba(255, 220, 200, 0.40), transparent 70%);
}
.wash-ink {
  background:
    radial-gradient(60% 60% at 75% 30%, rgba(168, 85, 247, 0.10), transparent 65%),
    radial-gradient(50% 60% at 20% 75%, rgba(255, 76, 170, 0.08), transparent 70%),
    #1A1815;
}
.wash-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(26,24,21,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26,24,21,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* ─────────── Floating frame ───────────
   Wraps a 1280×820 Helios screen and tilts it in 3D space. */
.float-frame {
  position: absolute;
  transform-style: preserve-3d;
  border-radius: 22px;
  background: var(--color-bg);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.85) inset,
    0 30px 60px -20px rgba(26, 24, 21, 0.28),
    0 12px 30px -10px rgba(26, 24, 21, 0.18),
    0 0 0 1px rgba(26, 24, 21, 0.06);
  overflow: hidden;
  will-change: transform;
}
.float-frame .scaler {
  width: 1280px;
  height: 820px;
  transform-origin: 0 0;
}
/* Subtle "screen sheen" — diagonal soft highlight across the framed surface */
.float-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.28) 0%,
    rgba(255,255,255,0) 28%,
    rgba(255,255,255,0) 72%,
    rgba(255,255,255,0.10) 100%);
  mix-blend-mode: screen;
}
/* Top edge subtle window-chrome highlight */
.float-frame::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  z-index: 2;
}

/* ─────────── Drift loops — different phases per element ─────────── */
@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(var(--rx, 8deg)) rotateY(var(--ry, -18deg)) rotateZ(var(--rz, 0deg)); }
  50%      { transform: translate3d(0, -14px, 0) rotateX(calc(var(--rx, 8deg) - 1deg)) rotateY(calc(var(--ry, -18deg) + 1.5deg)) rotateZ(var(--rz, 0deg)); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(var(--rx, -6deg)) rotateY(var(--ry, 16deg)) rotateZ(var(--rz, 1deg)); }
  50%      { transform: translate3d(8px, -10px, 0) rotateX(calc(var(--rx, -6deg) + 1deg)) rotateY(calc(var(--ry, 16deg) - 1.5deg)) rotateZ(var(--rz, 1deg)); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(var(--rx, 4deg)) rotateY(var(--ry, -8deg)) rotateZ(var(--rz, -1deg)); }
  50%      { transform: translate3d(-6px, 8px, 0) rotateX(calc(var(--rx, 4deg) - 0.5deg)) rotateY(calc(var(--ry, -8deg) + 1deg)) rotateZ(var(--rz, -1deg)); }
}

/* ─────────── Entrance animations on slide-active ─────────── */
@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 32px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes drop-in {
  from { opacity: 0; transform: translate3d(0, -24px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float-in {
  from { opacity: 0; transform: translate3d(0, 60px, -120px) rotateX(20deg); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) rotateX(0); }
}

/* When a slide becomes active, run entry animations. */
section[data-deck-active] .anim-rise   { animation: rise-in 900ms var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)) both; }
section[data-deck-active] .anim-drop   { animation: drop-in 800ms var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)) both; }
section[data-deck-active] .anim-fade   { animation: fade-in 1100ms ease-out both; }
section[data-deck-active] .anim-float  { animation: float-in 1200ms var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)) both; }

/* Inactive slides freeze at zero state — important so animations RE-RUN on re-entry. */
section:not([data-deck-active]) .anim-rise,
section:not([data-deck-active]) .anim-drop,
section:not([data-deck-active]) .anim-fade,
section:not([data-deck-active]) .anim-float { opacity: 0; }

/* Stagger helpers */
.stagger-1 { animation-delay: 80ms !important; }
.stagger-2 { animation-delay: 180ms !important; }
.stagger-3 { animation-delay: 320ms !important; }
.stagger-4 { animation-delay: 480ms !important; }
.stagger-5 { animation-delay: 640ms !important; }
.stagger-6 { animation-delay: 800ms !important; }

/* ─────────── Type ─────────── */
.hero-display {
  font-family: var(--font-serif);
  font-weight: 200;
  font-size: 144px;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin: 0;
  text-wrap: balance;
}
.hero-display em {
  font-style: italic;
  font-weight: 300;
  color: var(--color-helios);
}
.hero-display .accent {
  color: var(--color-helios);
}
.hero-sub {
  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 32px;
  color: var(--color-text-secondary);
  letter-spacing: -0.005em;
  max-width: 56ch;
  margin: 0;
  text-wrap: pretty;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--color-text-muted);
  font-feature-settings: "tnum" 1, "zero" 1;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: var(--color-helios);
  vertical-align: 2px;
  margin-right: 8px;
  box-shadow: 0 0 0 4px rgba(255, 76, 170, 0.18);
  animation: pulseDot 2.4s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ─────────── Brand mark ─────────── */
/* Holds the real <HeliosLogo> svg. The wordmark path uses currentColor
   so we recolor by setting `color` on .brand-corner. */
.brand-corner {
  position: absolute;
  display: flex;
  align-items: center;
  z-index: 10;
  color: var(--color-text);
}
.brand-corner.tl { top: 56px; left: 64px; }
.brand-corner.bl { bottom: 56px; left: 64px; }
.brand-corner.dim { color: var(--color-text-secondary); }

/* Slide label — top right */
.slide-label {
  position: absolute;
  top: 56px;
  right: 64px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  z-index: 10;
  display: flex;
  gap: 14px;
  align-items: center;
}
.slide-label .num { color: var(--color-text); font-weight: 500; }
.slide-label .bar { width: 28px; height: 1px; background: var(--color-border-strong); }

/* ─────────── Connector tile (small floating chiclet) ─────────── */
.tile {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 14px 22px 14px 16px;
  box-shadow:
    0 24px 40px -16px rgba(26,24,21,0.22),
    0 8px 16px -8px rgba(26,24,21,0.12),
    0 0 0 1px rgba(26,24,21,0.04);
  font-family: var(--font-sans);
  transform-style: preserve-3d;
  will-change: transform;
}
.tile .glyph {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--color-text);
  font-size: 18px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.tile .name {
  font-size: 17px; font-weight: 600; color: var(--color-text);
  letter-spacing: -0.005em;
  display: block;
}
.tile .meta {
  font-size: 12px; color: var(--color-text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0;
  display: block;
}
.tile .status-dot {
  width: 8px; height: 8px; border-radius: 9999px;
  margin-left: 10px;
  flex-shrink: 0;
}
.tile .status-dot.ok    { background: var(--color-success-solid); box-shadow: 0 0 0 4px var(--color-success-bg); }
.tile .status-dot.warn  { background: var(--color-warning-solid); box-shadow: 0 0 0 4px var(--color-warning-bg); }
.tile .status-dot.err   { background: var(--color-error-solid);   box-shadow: 0 0 0 4px var(--color-error-bg); }
.tile .status-dot.idle  { background: var(--color-text-muted);    box-shadow: 0 0 0 4px var(--color-surface-muted); }

/* ─────────── Buttons ─────────── */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--color-helios);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
  padding: 16px 26px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  box-shadow:
    0 16px 40px -10px rgba(255, 76, 170, 0.45),
    0 4px 12px -4px rgba(214, 61, 142, 0.40),
    inset 0 1px 0 rgba(255,255,255,0.30);
  transition: transform 150ms ease-out, box-shadow 200ms ease-out;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow:
    0 22px 50px -10px rgba(255, 76, 170, 0.55),
    0 6px 14px -4px rgba(214, 61, 142, 0.50),
    inset 0 1px 0 rgba(255,255,255,0.30); }
.cta-btn .arrow {
  width: 22px; height: 22px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
}

.ghost-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.005em;
  padding: 14px 22px;
  border-radius: 14px;
  cursor: pointer;
}

/* ─────────── Pop-out chart card (depth element) ─────────── */
.pop-card {
  position: absolute;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow:
    0 30px 60px -20px rgba(26,24,21,0.30),
    0 12px 24px -8px rgba(26,24,21,0.16),
    0 0 0 1px rgba(26,24,21,0.04);
  transform-style: preserve-3d;
  will-change: transform;
}

/* Magenta glow halo behind the composer send button on slide 3 */
.send-halo {
  position: absolute;
  pointer-events: none;
  width: 360px; height: 360px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(255, 76, 170, 0.40), rgba(255, 76, 170, 0) 60%);
  filter: blur(8px);
  z-index: 0;
}

/* Chip in scene 4 — tool pill floating */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-secondary);
  box-shadow:
    0 14px 28px -10px rgba(26,24,21,0.20),
    0 4px 10px -4px rgba(26,24,21,0.10);
}
.chip .pulse {
  width: 6px; height: 6px; border-radius: 9999px;
  background: var(--color-ink);
  animation: pulseDot 1.6s infinite;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .float-frame, .tile, .pop-card { animation: none !important; }
  .anim-rise, .anim-drop, .anim-fade, .anim-float { animation-duration: 1ms !important; }
}
