/* ═══════════════════════════════════════════════════
   PROMPT — Welcome / first-visit intro overlay (welcome.css)
   Loaded by index.html only. Full-screen 3-slide intro that,
   on finish, dissolves into /markets with a sidebar reveal.

   Per-page file (NOT a ratchet "component file"), so color values
   + @keyframes live here intentionally. The vibe is the APP —
   glass, gold scan-grid, cinematic motion. Every surface earns its
   "wow": ambient aurora + particles + parallax behind self-building
   SVG graphics, finishing in a shockwave reveal into the app.
   ═══════════════════════════════════════════════════ */

/* ── First-visit lock: hide app chrome behind the overlay ── */
html.welcome-active,
html.welcome-active body { overflow: hidden; }

html.welcome-active .sidebar {
  transform: translateX(-104%);
  opacity: 0;
  pointer-events: none;
}
html.welcome-active .main-area { pointer-events: none; }

/* ════════════════ OVERLAY ════════════════ */
.welcome-overlay {
  --mx: 0; --my: 0; /* cursor parallax, set by JS (range ~-1..1) */
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vh, 56px) clamp(20px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% -8%, rgba(255,180,0,0.16), transparent 60%),
    radial-gradient(ellipse 70% 60% at 110% 115%, rgba(255,180,0,0.10), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
html.welcome-active .welcome-overlay { display: flex; animation: wOverlayIn 0.6s ease both; }

/* ── Ambient background layers ── */
.welcome-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* Slowly churning aurora of gold light */
.w-aurora {
  position: absolute; inset: -25%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,180,0,0.18), transparent 45%),
    radial-gradient(circle at 75% 65%, rgba(255,196,80,0.14), transparent 45%),
    radial-gradient(circle at 55% 90%, rgba(255,180,0,0.10), transparent 50%);
  filter: blur(36px);
  opacity: 0.8;
  transform: translate(calc(var(--mx) * 14px), calc(var(--my) * 14px));
  animation: wAurora 22s ease-in-out infinite;
  will-change: transform;
}

/* Drifting blurred orbs (parallax container) */
.w-orbs {
  position: absolute; inset: -10%;
  transform: translate(calc(var(--mx) * 26px), calc(var(--my) * 26px));
  transition: transform 0.25s ease-out;
  will-change: transform;
}
.w-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.55;
  background: radial-gradient(circle, rgba(255,180,0,0.42), transparent 68%);
  animation: wOrbDrift 14s ease-in-out infinite;
}
.w-orb-1 { width: 360px; height: 360px; top: -40px; left: 4%; }
.w-orb-2 { width: 300px; height: 300px; bottom: -40px; right: 6%; animation-delay: -6s; animation-duration: 18s; }
.w-orb-3 { width: 220px; height: 220px; top: 40%; left: 46%; opacity: 0.32; animation-delay: -3s; animation-duration: 20s; }

.w-grid {
  position: absolute; inset: -30px;
  opacity: 0.5;
  transform: translate(calc(var(--mx) * -12px), calc(var(--my) * -12px));
  transition: transform 0.25s ease-out;
}

/* Rising gold particles */
.w-particles { position: absolute; inset: 0; overflow: hidden; }
.w-particles i {
  position: absolute; bottom: -14px;
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,193,40,0.95);
  box-shadow: 0 0 8px rgba(255,180,0,0.85);
  opacity: 0;
  animation: wRise linear infinite;
}
.w-particles i:nth-child(1)  { left: 5%;  animation-duration: 12s; animation-delay: -1s;  }
.w-particles i:nth-child(2)  { left: 13%; animation-duration: 15s; animation-delay: -7s;  width: 3px; height: 3px; }
.w-particles i:nth-child(3)  { left: 21%; animation-duration: 10s; animation-delay: -3s;  }
.w-particles i:nth-child(4)  { left: 29%; animation-duration: 17s; animation-delay: -11s; width: 5px; height: 5px; }
.w-particles i:nth-child(5)  { left: 37%; animation-duration: 13s; animation-delay: -5s;  }
.w-particles i:nth-child(6)  { left: 44%; animation-duration: 9s;  animation-delay: -2s;  width: 3px; height: 3px; }
.w-particles i:nth-child(7)  { left: 52%; animation-duration: 16s; animation-delay: -9s;  }
.w-particles i:nth-child(8)  { left: 59%; animation-duration: 11s; animation-delay: -6s;  width: 5px; height: 5px; }
.w-particles i:nth-child(9)  { left: 66%; animation-duration: 14s; animation-delay: -1.5s;}
.w-particles i:nth-child(10) { left: 72%; animation-duration: 10s; animation-delay: -8s;  width: 3px; height: 3px; }
.w-particles i:nth-child(11) { left: 79%; animation-duration: 18s; animation-delay: -4s;  }
.w-particles i:nth-child(12) { left: 85%; animation-duration: 12s; animation-delay: -10s; width: 5px; height: 5px; }
.w-particles i:nth-child(13) { left: 90%; animation-duration: 15s; animation-delay: -2.5s;}
.w-particles i:nth-child(14) { left: 95%; animation-duration: 11s; animation-delay: -7.5s;width: 3px; height: 3px; }
.w-particles i:nth-child(15) { left: 33%; animation-duration: 19s; animation-delay: -13s; }
.w-particles i:nth-child(16) { left: 63%; animation-duration: 13s; animation-delay: -4.5s;width: 5px; height: 5px; }

/* ── Skip ── */
.welcome-skip {
  position: absolute;
  top: clamp(16px, 3vh, 28px);
  right: clamp(16px, 3vw, 32px);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-2);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.welcome-skip:hover { color: var(--text); border-color: var(--line-3); }

/* ════════════════ STAGE / SLIDES ════════════════ */
.welcome-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1040px;
  overflow: hidden;
}
.welcome-track {
  display: flex;
  width: 100%;
  transition: transform 0.66s var(--ease-emphasis);
  will-change: transform;
}
.welcome-slide {
  flex: 0 0 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: 4px;
  /* Cross-dim inactive slides so the slide reads as one smooth focus-pull. */
  opacity: 0.16;
  transition: opacity 0.55s var(--ease-emphasis);
}
.welcome-slide.is-active { opacity: 1; }

/* Copy column */
.welcome-copy { min-width: 0; }
.welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-strong);
  margin-bottom: 18px;
}
.welcome-eyebrow .w-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-amber);
  box-shadow: 0 0 0 0 rgba(255,180,0,0.5);
  animation: wLive 1.8s ease-out infinite;
}
.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
}
/* The highlighted word: gold with a shimmer sweep while its slide is active. */
.welcome-title em {
  font-style: normal;
  color: var(--brand-amber);
  position: relative;
}
.welcome-slide.is-active .welcome-title em {
  background: linear-gradient(100deg, var(--brand-amber) 28%, #FFE9A8 50%, var(--brand-amber) 72%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: wTextShine 2.6s linear 0.4s infinite;
}
.welcome-lead {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 46ch;
  margin-bottom: 22px;
}

/* Feature points */
.welcome-points { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.welcome-points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.welcome-points li strong { color: var(--text); font-weight: 650; }
.welcome-points .w-pt-ic {
  flex: 0 0 24px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--brand-amber-bg);
  color: var(--brand-strong);
  margin-top: 1px;
}
.welcome-points .w-pt-ic svg { width: 13px; height: 13px; }

/* Flow chips (slide 3) */
.welcome-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.welcome-flow .w-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.welcome-flow .w-step .w-step-n {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--brand-strong);
  background: var(--brand-amber-bg);
  border-radius: var(--radius-full);
  padding: 1px 6px;
}
.welcome-flow .w-arrow { color: var(--text-muted); opacity: 0.6; }
.welcome-flow .w-step.is-reward { border-color: rgba(255,180,0,0.45); background: var(--brand-amber-bg); }

/* ── Art column — frameless, ambient, self-building graphic ── */
.welcome-art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 60% 30%, rgba(255,180,0,0.10), transparent 64%);
  animation: wArtFloat 7s ease-in-out infinite;
}
.welcome-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Feather the graphic toward its edges so it melts into the background. */
  -webkit-mask: radial-gradient(circle at 58% 48%, #000 60%, transparent 90%);
  mask: radial-gradient(circle at 58% 48%, #000 60%, transparent 90%);
}
.welcome-art .w-tag {
  position: absolute;
  left: 50%; bottom: 6px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
  z-index: 2;
}

/* SVG animatable defaults — fill-box so transforms pivot on each shape. */
.w-bar, .w-fnode, .w-coin, .w-coin-glow, .w-dot, .w-fdot, .w-node-core { transform-box: fill-box; }
.w-bar { transform-origin: bottom; }
.w-fnode, .w-coin, .w-coin-glow, .w-dot, .w-fdot, .w-node-core { transform-origin: center; }

/* Resting (inactive) states so re-entry replays cleanly */
.w-line-main, .w-area { opacity: 0; }
.w-dot, .w-fdot { transform: scale(0); }
.w-bar { transform: scaleY(0); }
.w-fnode { transform: scale(0); }
.w-travel { opacity: 0; }

/* ── SLIDE 1 — convergence chart builds, node pings ── */
.welcome-slide.is-active .w-area      { animation: wFadeIn 0.7s ease 0.5s both; }
.welcome-slide.is-active .w-line-dash { animation: wDashFlow 1.4s linear infinite, wFadeIn 0.6s ease both; }
.welcome-slide.is-active .w-line-main { stroke-dasharray: 620; animation: wDraw 1.2s var(--ease-emphasis) 0.15s forwards; }
.welcome-slide.is-active .w-dot-1     { animation: wPop 0.4s var(--ease-emphasis) 0.9s both; }
.welcome-slide.is-active .w-dot-2     { animation: wPop 0.4s var(--ease-emphasis) 1.05s both; }
.welcome-slide.is-active .w-node-core { animation: wPop 0.5s var(--ease-emphasis) 1.2s both, wCorePulse 2s ease-in-out 1.7s infinite; }
.welcome-slide.is-active .w-ping-ring   { animation: wPing 2.2s ease-out 1.3s infinite; }
.welcome-slide.is-active .w-ping-ring-2 { animation: wPing 2.2s ease-out 2.4s infinite; }
.w-ping-ring { opacity: 0; transform-box: fill-box; transform-origin: center; }

/* ── SLIDE 2 — ring fills, number counts (JS), bars grow ── */
.welcome-slide.is-active .w-ring-fill { animation: wRingFill 1.3s var(--ease-emphasis) 0.2s forwards; }
.welcome-slide.is-active .w-bar-1 { animation: wBarGrow 0.6s var(--ease-emphasis) 0.45s both; }
.welcome-slide.is-active .w-bar-2 { animation: wBarGrow 0.6s var(--ease-emphasis) 0.55s both; }
.welcome-slide.is-active .w-bar-3 { animation: wBarGrow 0.6s var(--ease-emphasis) 0.65s both; }
.welcome-slide.is-active .w-bar-4 { animation: wBarGrow 0.6s var(--ease-emphasis) 0.75s both; }
.w-score-num { animation: wNumPop 0.5s var(--ease-emphasis) both; }
.welcome-slide.is-active .w-score-num { animation: wNumPop 0.6s var(--ease-emphasis) 0.2s both; }

/* ── SLIDE 3 — links flow, nodes pop, pulse travels to reward ── */
.welcome-slide.is-active .w-link   { animation: wDashFlow 0.9s linear infinite, wFadeIn 0.6s ease 0.5s both; }
.welcome-slide.is-active .w-fnode-1 { animation: wPop 0.5s var(--ease-emphasis) 0.15s both; }
.welcome-slide.is-active .w-fnode-2 { animation: wPop 0.5s var(--ease-emphasis) 0.28s both; }
.welcome-slide.is-active .w-fnode-3 { animation: wPop 0.5s var(--ease-emphasis) 0.41s both; }
.welcome-slide.is-active .w-coin    { animation: wPop 0.6s var(--ease-emphasis) 0.6s both, wCoinPulse 2.4s ease-in-out 1.2s infinite; }
.welcome-slide.is-active .w-coin-glow { animation: wGlowPulse 2.4s ease-in-out 1.2s infinite; }
.welcome-slide.is-active .w-fdot-1 { animation: wPop 0.4s var(--ease-emphasis) 0.5s both; }
.welcome-slide.is-active .w-fdot-2 { animation: wPop 0.4s var(--ease-emphasis) 0.6s both; }
.welcome-slide.is-active .w-fdot-3 { animation: wPop 0.4s var(--ease-emphasis) 0.7s both; }
.welcome-slide.is-active .w-travel { animation: wTravelFade 2.6s linear 0.6s infinite; }

/* Per-slide enter animation for copy children */
.welcome-slide.is-active .welcome-eyebrow { animation: wFadeUp 0.5s var(--ease-emphasis) both; animation-delay: 0.05s; }
.welcome-slide.is-active .welcome-title   { animation: wFadeUp 0.55s var(--ease-emphasis) both; animation-delay: 0.12s; }
.welcome-slide.is-active .welcome-lead    { animation: wFadeUp 0.55s var(--ease-emphasis) both; animation-delay: 0.2s; }
.welcome-slide.is-active .welcome-points li,
.welcome-slide.is-active .welcome-flow .w-step { animation: wFadeUp 0.5s var(--ease-emphasis) both; }
.welcome-slide.is-active .welcome-points li:nth-child(1) { animation-delay: 0.28s; }
.welcome-slide.is-active .welcome-points li:nth-child(2) { animation-delay: 0.37s; }
.welcome-slide.is-active .welcome-points li:nth-child(3) { animation-delay: 0.46s; }
.welcome-slide.is-active .welcome-flow .w-step:nth-child(1) { animation-delay: 0.30s; }
.welcome-slide.is-active .welcome-flow .w-step:nth-child(3) { animation-delay: 0.40s; }
.welcome-slide.is-active .welcome-flow .w-step:nth-child(5) { animation-delay: 0.50s; }
.welcome-slide.is-active .welcome-flow .w-step:nth-child(7) { animation-delay: 0.60s; }

/* ════════════════ FOOTER (dots + nav) ════════════════ */
.welcome-footer {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(26px, 5vh, 48px);
}
.welcome-dots { display: inline-flex; align-items: center; gap: 9px; }
.welcome-pip {
  width: 8px; height: 8px;
  min-height: 0; /* opt out of the global mobile 44px touch-target rule (components.css) */
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  border: none;
  padding: 0;
  background: var(--line-3);
  cursor: pointer;
  transition: width var(--t-panel) var(--ease-emphasis), background var(--t-base);
}
.welcome-pip.is-active { width: 26px; background: var(--brand-amber); box-shadow: 0 0 10px rgba(255,180,0,0.5); }

.welcome-actions { display: inline-flex; align-items: center; gap: 10px; }
.welcome-back {
  border: none;
  background: none;
  padding: 8px 12px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: color var(--t-fast), opacity var(--t-base), transform var(--t-base);
}
.welcome-back:hover { color: var(--text); }
.welcome-back.is-hidden { opacity: 0; pointer-events: none; transform: translateX(6px); }
.welcome-next { color: var(--text-on-brand); animation: wCtaGlow 2.6s ease-in-out infinite; }
.welcome-next.rf-btn-tiny-solid:hover { background: var(--brand-hover); transform: translateY(-1px); }

/* ════════════════ REVEAL ════════════════ */
.welcome-overlay.is-exiting {
  animation: wOverlayOut 0.7s var(--ease-emphasis) forwards;
  pointer-events: none;
}
.welcome-overlay.is-exiting .welcome-stage { animation: wStageOut 0.65s var(--ease-emphasis) forwards; }
.welcome-overlay.is-gone { display: none !important; }

/* Gold burst + shockwave rings that fire as the overlay dissolves */
.welcome-flash {
  position: fixed;
  inset: 0;
  z-index: 9100;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.welcome-flash::before {
  content: "";
  width: 42vmax; height: 42vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,180,0,0.6), rgba(255,180,0,0.12) 40%, transparent 68%);
  transform: scale(0.2);
}
.welcome-flash .w-shock {
  position: absolute;
  width: 30vmax; height: 30vmax;
  border-radius: 50%;
  border: 2px solid rgba(255,180,0,0.55);
  transform: scale(0);
  opacity: 0;
}
.welcome-flash.is-firing { animation: wFlash 1s var(--ease-emphasis) forwards; }
.welcome-flash.is-firing::before { animation: wFlashCore 1s var(--ease-emphasis) forwards; }
.welcome-flash.is-firing .w-shock-1 { animation: wShock 0.9s var(--ease-emphasis) 0.05s forwards; }
.welcome-flash.is-firing .w-shock-2 { animation: wShock 0.95s var(--ease-emphasis) 0.2s forwards; }

/* App assembling in behind the dissolving overlay */
.app-shell.app-revealing .sidebar {
  transition: transform 0.9s var(--ease-emphasis), opacity 0.55s ease;
  transform: none;
  opacity: 1;
}
.app-shell.app-revealing .sidebar > * { animation: wNavIn 0.5s var(--ease-emphasis) both; }
.app-shell.app-revealing .sidebar > *:nth-child(1) { animation-delay: 0.30s; }
.app-shell.app-revealing .sidebar > *:nth-child(2) { animation-delay: 0.37s; }
.app-shell.app-revealing .sidebar > *:nth-child(3) { animation-delay: 0.44s; }
.app-shell.app-revealing .sidebar > *:nth-child(4) { animation-delay: 0.51s; }
.app-shell.app-revealing .sidebar > *:nth-child(5) { animation-delay: 0.58s; }
.app-shell.app-revealing .sidebar > *:nth-child(6) { animation-delay: 0.63s; }
.app-shell.app-revealing .sidebar > *:nth-child(7) { animation-delay: 0.68s; }
.app-shell.app-revealing .sidebar > *:nth-child(8) { animation-delay: 0.73s; }
.app-shell.app-revealing .main-area { animation: wContentIn 0.9s var(--ease-emphasis) 0.18s both; }

/* ════════════════ KEYFRAMES ════════════════ */
@keyframes wOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wLive { 0% { box-shadow: 0 0 0 0 rgba(255,180,0,0.5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255,180,0,0); } }
@keyframes wOrbDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, 30px); } }
@keyframes wAurora {
  0%, 100% { transform: translate(calc(var(--mx) * 14px), calc(var(--my) * 14px)) rotate(0deg) scale(1); }
  50%      { transform: translate(calc(var(--mx) * 14px), calc(var(--my) * 14px)) rotate(8deg) scale(1.08); }
}
@keyframes wRise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  12%  { opacity: 0.9; }
  85%  { opacity: 0.7; }
  100% { transform: translateY(-102vh) translateX(24px); opacity: 0; }
}
@keyframes wArtFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes wFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wTextShine { from { background-position: 200% 0; } to { background-position: -120% 0; } }

/* SVG build animations */
@keyframes wDraw { from { stroke-dashoffset: 620; opacity: 1; } to { stroke-dashoffset: 0; opacity: 0.62; } }
@keyframes wDashFlow { to { stroke-dashoffset: -22; } }
@keyframes wPop { 0% { transform: scale(0); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes wPing { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes wCorePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes wRingFill { from { stroke-dashoffset: 490; } to { stroke-dashoffset: 150; } }
@keyframes wBarGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes wNumPop { 0% { opacity: 0; transform: scale(0.7); } 100% { opacity: 1; transform: scale(1); } }
@keyframes wCoinPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes wGlowPulse { 0%, 100% { opacity: 0.16; transform: scale(1); } 50% { opacity: 0.32; transform: scale(1.15); } }
@keyframes wTravelFade { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* Reveal */
@keyframes wOverlayOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes wStageOut { from { opacity: 1; transform: scale(1); filter: blur(0); } to { opacity: 0; transform: scale(1.09); filter: blur(3px); } }
@keyframes wFlash { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes wFlashCore { 0% { transform: scale(0.2); } 100% { transform: scale(1.3); } }
@keyframes wShock { 0% { transform: scale(0); opacity: 0.7; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes wNavIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes wContentIn { from { opacity: 0; transform: translateY(12px) scale(0.99); filter: blur(4px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes wCtaGlow {
  0%, 100% { box-shadow: 0 4px 14px rgba(255,180,0,0.30); }
  50%      { box-shadow: 0 6px 26px rgba(255,180,0,0.55), 0 0 0 4px rgba(255,180,0,0.10); }
}

/* ════════════════ RESPONSIVE ════════════════ */
/* Tablet + phone: stack to a single centered column, art on top. */
@media (max-width: 820px) {
  .welcome-overlay { padding: clamp(22px, 4vh, 40px) 22px; }
  .welcome-stage { max-width: 440px; }
  .welcome-slide {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
    justify-items: center;
  }
  .welcome-copy { display: flex; flex-direction: column; align-items: center; }
  .welcome-art { aspect-ratio: 1 / 1; width: 150px; height: 150px; max-height: none; order: -1; }
  .welcome-art .w-tag { display: none; } /* orphaned under a small graphic */
  .welcome-eyebrow { margin-bottom: 12px; }
  .welcome-title { font-size: clamp(27px, 7.2vw, 38px); margin-bottom: 12px; }
  .welcome-lead { font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; max-width: 40ch; }
  .welcome-points { gap: 9px; align-items: flex-start; text-align: left; }
  .welcome-points li { font-size: 12.5px; }
  .welcome-flow { justify-content: center; }
  .welcome-footer { margin-top: 20px; }
  .welcome-skip { top: 14px; right: 14px; }
}

/* Short viewports (most phones in portrait): trim to guarantee it fits the
   screen without clipping — the overlay is overflow:hidden, so content MUST fit.
   Drop the supporting feature list; the headline + lead carry each slide. */
@media (max-width: 820px) and (max-height: 760px) {
  .welcome-slide { gap: 14px; }
  .welcome-art { width: 120px; height: 120px; }
  .welcome-points { display: none; }
  .welcome-lead { margin-bottom: 13px; }
  .welcome-footer { margin-top: 16px; }
}

/* Very narrow phones */
@media (max-width: 380px) {
  .welcome-title { font-size: clamp(24px, 7.6vw, 30px); }
  .welcome-lead { font-size: 13px; }
  .welcome-flow { gap: 6px; }
  .welcome-flow .w-step { padding: 6px 10px; font-size: 11.5px; }
}

/* Respect reduced-motion: keep the reveal + builds subtle, drop perpetual motion */
@media (prefers-reduced-motion: reduce) {
  .w-aurora, .w-orb, .w-particles i, .welcome-art,
  .welcome-eyebrow .w-live, .w-ping-ring, .w-travel, .welcome-next,
  .welcome-slide.is-active .welcome-title em { animation: none; }
  .welcome-track { transition: none; }
  .w-line-main, .w-area, .w-dot, .w-fdot, .w-bar, .w-fnode, .w-ping-ring { opacity: 1; transform: none; }
  .w-line-main { stroke-dasharray: none; }
}
