/* =========================================================
   Vigality — WELCOME / ONBOARDING (Dark Aurora, softer)
   ========================================================= */

* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100dvh;
  overflow: hidden;
  color: #f0f0f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
}

/* Aurora background — slightly lighter than home */
body {
  background:
    radial-gradient(ellipse 90% 70% at 20% 10%, rgba(120, 160, 230, .22), transparent 55%),
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(190, 140, 220, .16), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 110%, rgba(150, 180, 235, .18), transparent 55%),
    linear-gradient(180deg, #12121a 0%, #14141e 50%, #0e0e16 100%);
  background-attachment: fixed;
  position: relative;
}

/* Subtle noise/grain overlay for texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .3;
  background-image:
    radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px, 18px 18px;
  background-position: 0 0, 9px 9px;
  mask-image: linear-gradient(180deg, black 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, transparent 75%);
}

/* Drifting aurora blobs */
.fog {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.fog i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .7;
  animation: fogDrift 22s ease-in-out infinite alternate;
}
.fog i:nth-child(1) {
  width: 50vw; height: 50vw;
  left: -15vw; top: -18vw;
  background: radial-gradient(circle, rgba(130, 170, 245, .3), transparent 65%);
}
.fog i:nth-child(2) {
  width: 42vw; height: 42vw;
  right: -12vw; bottom: -12vw;
  background: radial-gradient(circle, rgba(210, 150, 230, .22), transparent 65%);
  animation-delay: -7s;
}
.fog i:nth-child(3) {
  width: 30vw; height: 30vw;
  left: 55%; top: 40%;
  background: radial-gradient(circle, rgba(160, 220, 200, .15), transparent 68%);
  animation-delay: -12s;
}
@keyframes fogDrift {
  to { transform: translate3d(6vw, 4vh, 0) scale(1.15); }
}

button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

/* ==============================================================
   STAGE — vertical scroll of slides
   ============================================================== */
.stage {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: flex;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: env(safe-area-inset-top);
  touch-action: pan-x;
}
.stage::-webkit-scrollbar { width: 0; height: 0; }
.stage { scrollbar-width: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px clamp(24px, 6vw, 60px) 180px;
}

.slide-inner {
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 22px;
  align-content: start;
}

/* ==============================================================
   SLIDE 1 — Splash with wordmark
   ============================================================== */
.slide--splash { padding-top: 40px; }
.splash-inner {
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 28px;
  place-items: center;
  text-align: center;
}

/* VIGALITY WORDMARK */
.wordmark-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: wmFade 1s var(--ease-out) both;
  animation-delay: .1s;
}
.brand-hero-mark {
  width: clamp(68px, 13vw, 112px);
  height: clamp(68px, 13vw, 112px);
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.44));
}
.wm-text {
  font-size: clamp(56px, 12vw, 96px);
  font-weight: 720;
  letter-spacing: -0.055em;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #c8c8d2 55%, #8a8a94 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 30px rgba(200,220,255,.15));
}
.wm-plus {
  width: clamp(52px, 11vw, 84px);
  height: clamp(52px, 11vw, 84px);
  display: none;
  place-items: center;
  animation: plusFloat 4.5s ease-in-out infinite;
}
.wm-plus svg { width: 100%; height: 100%; display: block; }

@keyframes wmFade {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes plusFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-4px) rotate(6deg); }
}

.splash-title {
  margin: 8px 0 0;
  font-size: clamp(30px, 6.5vw, 44px);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #f4f4f8;
  display: grid;
  gap: 2px;
}
.tw-line {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: twIn .9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
.tw-brand {
  font-weight: 780;
  color: #ffffff;
}
.tw-brand em {
  font-style: normal;
  color: #a0a0aa;
  margin-left: -2px;
}
@keyframes twIn { to { opacity: 1; transform: none; } }

.splash-sub {
  margin: 6px 0 0;
  color: #a8a8b2;
  font-size: clamp(14px, 3.4vw, 17px);
  max-width: 420px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(10px);
  animation: twIn .9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}

/* ==============================================================
   INFO SLIDES (2–5) — light type on dark aurora
   ============================================================== */
.slide-title {
  margin: 0;
  font-size: clamp(52px, 13vw, 92px);
  font-weight: 780;
  line-height: .95;
  letter-spacing: -0.055em;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #a8a8b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 12px 40px rgba(200,220,255,.1));
}
.slide-lead {
  margin: 0;
  color: #b0b0ba;
  font-size: clamp(15px, 3.6vw, 19px);
  line-height: 1.5;
  max-width: 560px;
  font-weight: 500;
}

/* ==============================================================
   MOCK CARDS — glassy on dark
   ============================================================== */
.mock-card {
  position: relative;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(38, 38, 52, .82) 0%, rgba(22, 22, 34, .75) 100%);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow:
    0 24px 50px -14px rgba(0,0,0,.55),
    0 4px 12px -4px rgba(0,0,0,.35),
    0 0 32px rgba(140,180,255,.06),
    inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mock-grid {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

/* Exercises mock */
.mock-exercises {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(120px, auto);
}
.mock-exercises .mock-lg { grid-column: 1 / -1; }

.mc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mc-ico {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 6px rgba(0,0,0,.25);
  color: var(--tint, #ffce7a);
}
.mc-ico svg { width: 20px; height: 20px; }
.mc-head strong { display: block; font-size: 15px; font-weight: 700; color: #f4f4f8; }
.mc-head small { display: block; margin-top: 2px; color: #8a8a94; font-size: 11px; }

.mc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mc-metrics > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.mc-metrics em {
  display: block;
  font-style: normal;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff, #b8b8c2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mc-metrics small { display: block; margin-top: 2px; color: #8a8a94; font-size: 11px; }

.mc-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
  margin-bottom: 10px;
}
.mc-bars i {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #ffffff, rgba(255,255,255,.35));
  box-shadow: 0 0 10px rgba(255,255,255,.1);
}
.mock-sm p { margin: 0; color: #b0b0ba; font-size: 12px; }
.mock-sm p strong { color: #ffffff; font-weight: 700; }

.mock-tinted {
  display: grid;
  place-content: center;
  text-align: center;
  gap: 4px;
  background: linear-gradient(160deg, rgba(255,180,100,.24) 0%, rgba(220,140,70,.14) 100%) !important;
  border: 1px solid rgba(255,180,100,.18) !important;
  box-shadow:
    0 20px 40px -12px rgba(0,0,0,.4),
    0 0 32px rgba(255,180,100,.12),
    inset 0 1px 0 rgba(255,255,255,.08) !important;
}
.mock-tinted strong { font-size: 22px; letter-spacing: -0.03em; color: #ffce8f; }
.mock-tinted small { color: #d0a878; font-size: 11px; }
.mc-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #ffce8f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

/* Chat mock */
.mock-chat {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.chat-bubble {
  padding: 14px 16px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 88%;
}
.chat-user {
  justify-self: end;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 55%),
    linear-gradient(180deg, #f0f0f5, #b8b8c2);
  color: #0a0a0c;
  border-bottom-right-radius: 8px;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.4);
}
.chat-ai {
  justify-self: start;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(160deg, rgba(38, 38, 52, .82), rgba(22, 22, 34, .75));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow:
    0 12px 28px -8px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.08);
  color: #f4f4f8;
  border-bottom-left-radius: 8px;
  backdrop-filter: blur(14px);
}
.chat-ai p { margin: 0 0 8px; }
.chat-ai p:last-child { margin-bottom: 0; }
.chat-ai strong { font-weight: 700; color: #ffffff; }
.chat-avatar {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.4), transparent 55%),
    linear-gradient(160deg, #f0f0f5, #9a9aa4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 8px rgba(0,0,0,.35);
  color: #0a0a0c;
  font-weight: 800;
  font-size: 13px;
}
.chat-mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
  margin-top: 6px;
}
.chat-mini-bars i {
  flex: 1;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #ffffff, rgba(255,255,255,.4));
}

/* Progress mock */
.mock-progress {
  margin-top: 8px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(38, 38, 52, .82) 0%, rgba(22, 22, 34, .72) 100%);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow:
    0 24px 48px -12px rgba(0,0,0,.55),
    0 0 40px rgba(140,180,255,.08),
    inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
}
.mp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.mp-head small { color: #8a8a94; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.mp-head strong { display: block; margin-top: 4px; font-size: 14px; color: #f4f4f8; }
.mp-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 55%),
    linear-gradient(180deg, #f0f0f5, #a8a8b2);
  color: #0a0a0c;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 16px -4px rgba(0,0,0,.35);
}
.mp-chart { width: 100%; height: 120px; display: block; }
.mp-chart path[fill^="url"] { opacity: .5; }
.mp-chart path[stroke^="url"] { stroke: url(#mpLineDark) !important; }
.mp-foot {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  color: #8a8a94;
  font-size: 11px;
}
.mp-foot i {
  display: inline-block;
  width: 14px; height: 3px;
  margin-right: 6px;
  border-radius: 999px;
  background: #ffffff;
  vertical-align: middle;
}
.mp-foot i.mp-mute { background: #6a6a72; }

/* Privacy mock */
.mock-privacy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.mp-card {
  padding: 22px 20px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(160deg, rgba(38, 38, 52, .8) 0%, rgba(22, 22, 34, .7) 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 20px 40px -12px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  gap: 8px;
  backdrop-filter: blur(18px);
}
.mp-card strong { font-size: 16px; color: #f4f4f8; font-weight: 700; }
.mp-card small { color: #8a8a94; font-size: 11px; }
.mp-ico {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.15), rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 10px rgba(0,0,0,.25);
}
.mp-ico svg { width: 22px; height: 22px; stroke: currentColor; }
.mp-ico-cool { color: #8fb0ff; }
.mp-ico-warm { color: #ffb47a; }

/* ==============================================================
   BOTTOM: dots + CTA
   ============================================================== */
.stage-foot {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 20;
  padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
  display: grid;
  gap: 14px;
  justify-items: center;
  pointer-events: none;
}
.stage-foot > * { pointer-events: auto; }

.dots {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  padding: 0;
  transition: background .3s, transform .3s var(--ease-spring), width .3s;
}
.dot.is-active {
  background: #ffffff;
  width: 22px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255,255,255,.35);
}

/* CTA — pearl button (matches app CTAs) */
.cta {
  position: relative;
  width: min(100%, 520px);
  height: 60px;
  border-radius: 999px;
  color: #0a0a0c;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.55), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #b8b8c2 100%);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow:
    0 14px 34px rgba(0,0,0,.35),
    0 0 40px rgba(200,220,255,.15),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -2px 4px rgba(0,0,0,.1);
  overflow: hidden;
  transition:
    transform .18s var(--ease-out),
    box-shadow .3s,
    border-radius .5s var(--ease-out),
    width .5s var(--ease-out),
    height .5s var(--ease-out);
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 44px rgba(0,0,0,.4),
    0 0 54px rgba(200,220,255,.25),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -2px 4px rgba(0,0,0,.1);
}
.cta:active {
  transform: scale(.97);
  box-shadow:
    0 6px 16px rgba(0,0,0,.4),
    inset 0 2px 4px rgba(0,0,0,.15);
}
.cta-label { position: relative; z-index: 1; }

/* Morph state — button expands to fill screen (with dark tint for transition) */
.cta.is-morphing {
  transform: scale(1);
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: linear-gradient(180deg, #14141e 0%, #0e0e16 100%);
  color: transparent;
  border: 0;
  transition:
    width .55s var(--ease-out),
    height .55s var(--ease-out),
    border-radius .55s var(--ease-out),
    background .5s .1s ease-out;
  position: fixed;
  left: 0; top: 0;
  z-index: 999;
}
.cta.is-morphing .cta-label { opacity: 0; transition: opacity .15s; }

body.is-leaving { transition: opacity .4s .3s; opacity: 0; }

@media (max-width: 560px) {
  .mock-exercises { grid-template-columns: 1fr 1fr; }
  .mp-card { padding: 18px 14px; }
  .mp-ico { width: 40px; height: 40px; }
  .stage-foot { padding-inline: 16px; }
  .cta { height: 58px; font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .fog i, .wordmark-hero, .wm-plus { animation: none !important; }
}
.welcome-legal-links{position:fixed;z-index:30;top:calc(12px + env(safe-area-inset-top));right:16px;display:flex;gap:10px}.welcome-legal-links a{color:rgba(235,235,244,.58);font-size:8px;text-decoration:none}.welcome-legal-links a:hover{color:#fff}@media(max-width:520px){.welcome-legal-links{right:10px;gap:7px}.welcome-legal-links a{font-size:7px}}
