/* FamilyFit hybrid by McPherson Media, LLC
   Device carousel proof + editorial kinetic stage (no sticky conversion chrome)
   Motion tokens from MOTION-BRIEF.md */

/* ——— Motion tokens ——— */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-ui: 220ms;
  --dur-enter: 480ms;
  --dur-hero: 560ms;
  --stagger: 60ms;
  --reveal-y: 16px;
  --io-threshold: 0.18;

  --primary: #5a57d5;
  --success: #41c7be;
  --error: #f42c58;
  --grad-a: #9333ea;
  --grad-b: #4f46e5;
  --grad: linear-gradient(135deg, #9333ea 0%, #4f46e5 100%);
  --light: #f2f2f7;
  --dark: #0f0f28;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 1.25rem;
  --radius-sm: 0.875rem;
  --shell: min(1120px, calc(100% - 2rem));
  --header-offset: 4.5rem; /* sticky pill + top spacing; hero pulls under it */
}

@media (min-width: 900px) {
  :root { --reveal-y: 20px; }
}

/* ——— Dark (default kinetic arena) ——— */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070714;
  --bg-elevated: #12122e;
  --bg-card: #16163a;
  --ink: #f5f5ff;
  --ink-soft: rgba(245, 245, 255, 0.78);
  --muted: #a8a8c8;
  --line: rgba(90, 87, 213, 0.28);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --shadow-pill: 0 10px 32px rgba(0, 0, 0, 0.4);
  --pill-bg: rgba(15, 15, 40, 0.78);
  --pill-border: rgba(90, 87, 213, 0.32);
  --glow: rgba(65, 199, 190, 0.22);
  --glow-2: rgba(90, 87, 213, 0.28);
  --chip-bg: rgba(90, 87, 213, 0.18);
  --logo-filter: none;
  --hero-copy-max: 38rem;
  --hero-band-a: #050510;
  --hero-band-b: #0a0a22;
  --hero-band-c: #12123a;
  --hero-glow-purple: rgba(90, 87, 213, 0.5);
  --hero-glow-violet: rgba(147, 51, 234, 0.28);
  --hero-glow-teal: rgba(65, 199, 190, 0.2);
  --hero-star: rgba(236, 236, 255, 0.82);
  --hero-star-teal: rgba(65, 199, 190, 0.72);
  --hero-star-violet: rgba(216, 204, 255, 0.75);
  --hero-stars-opacity: 0.62;
  --hero-bling: #fff;
}

/* ——— Light (premium product stage) ——— */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --ink: #0f0f28;
  --ink-soft: rgba(15, 15, 40, 0.78);
  --muted: rgba(15, 15, 40, 0.58);
  --line: rgba(90, 87, 213, 0.16);
  --shadow: 0 14px 40px rgba(15, 15, 40, 0.1);
  --shadow-pill: 0 8px 28px rgba(15, 15, 40, 0.12);
  --pill-bg: rgba(255, 255, 255, 0.88);
  --pill-border: rgba(255, 255, 255, 0.7);
  --glow: rgba(90, 87, 213, 0.14);
  --glow-2: rgba(65, 199, 190, 0.12);
  --chip-bg: rgba(90, 87, 213, 0.1);
  --logo-filter: none;
  --hero-band-a: #f7f5fb;
  --hero-band-b: #efeef8;
  --hero-band-c: #e6e4f4;
  --hero-glow-purple: rgba(90, 87, 213, 0.18);
  --hero-glow-violet: rgba(147, 51, 234, 0.1);
  --hero-glow-teal: rgba(65, 199, 190, 0.1);
  --hero-star: rgba(69, 66, 184, 0.7);
  --hero-star-teal: rgba(20, 120, 114, 0.62);
  --hero-star-violet: rgba(90, 87, 213, 0.68);
  --hero-stars-opacity: 0.58;
  --hero-bling: #0f0f28;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-offset) + 0.35rem);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transition: background-color var(--dur-ui) var(--ease-soft), color var(--dur-ui) var(--ease-soft);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.shell { width: var(--shell); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ——— Sticky pill nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 0.25rem 0.75rem 0; /* minimal — collapse to hero */
  pointer-events: none;
}

.pill-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: calc(var(--shell) + 1.5rem);
  margin: 0.75rem auto 0;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  background: var(--pill-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  box-shadow: var(--shadow-pill);
  transition: background-color var(--dur-ui) var(--ease-soft), border-color var(--dur-ui) var(--ease-soft), box-shadow var(--dur-ui) var(--ease-soft);
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
  flex: 0 0 auto;
}
.logo-img {
  display: block;
  width: 8.7rem;
  height: auto;
  max-width: 8.7rem;
}
.logo-img--color { display: none; }
.logo-img--white { display: block; }
[data-theme="light"] .logo-img--color { display: block; }
[data-theme="light"] .logo-img--white { display: none; }

.nav {
  display: none;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.nav a {
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: var(--chip-bg);
  outline: none;
}

.header-actions { display: flex; align-items: center; gap: 0.35rem; }

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  transition: background var(--dur-ui) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.theme-toggle:hover { transform: scale(1.04); }
.theme-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.theme-icon { display: grid; place-items: center; transition: opacity 180ms var(--ease-soft), transform 180ms var(--ease-soft); }
.theme-icon--moon { position: absolute; opacity: 0; transform: rotate(-90deg) scale(0.7); }
[data-theme="dark"] .theme-icon--sun { opacity: 0; transform: rotate(90deg) scale(0.7); }
[data-theme="dark"] .theme-icon--moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-icon--sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-icon--moon { opacity: 0; transform: rotate(90deg) scale(0.7); }

.nav-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform-origin: center;
  transition: transform var(--dur-fast) var(--ease-soft), opacity var(--dur-fast) var(--ease-soft);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  pointer-events: auto;
  margin: 0.5rem 0.75rem 0;
  padding: 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: var(--shadow);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.mobile-nav a:hover { background: var(--chip-bg); }

@media (min-width: 860px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  overflow: hidden;
  /* Pull the stage under the sticky pill so body bg does not seam at the header */
  margin-top: calc(var(--header-offset) * -1);
  padding: var(--header-offset) 0 1.5rem;
  min-height: 100svh;
}

/* Product stage — navy field, brand glows, diagonal neon (echoes hero-phones.png) */
.hero-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
}
.hero-field-bands {
  position: absolute;
  inset: -10% 0 -14%;
  background:
    radial-gradient(ellipse 90% 80% at 78% 46%, var(--hero-glow-purple) 0%, transparent 58%),
    radial-gradient(ellipse 50% 55% at 12% 70%, var(--hero-glow-teal) 0%, transparent 64%),
    linear-gradient(180deg,
      var(--hero-band-a) 0%,
      var(--hero-band-b) 36%,
      var(--hero-band-c) 70%,
      var(--bg) 100%);
}
.hero-field-aurora {
  position: absolute;
  inset: -18% -8% -10%;
  background:
    radial-gradient(ellipse 42% 48% at 72% 42%, var(--hero-glow-violet) 0%, transparent 70%),
    radial-gradient(ellipse 36% 40% at 88% 68%, var(--hero-glow-teal) 0%, transparent 68%);
  filter: blur(28px);
  opacity: 0.9;
}
.hero-field-streaks {
  position: absolute;
  inset: -25% -15%;
  background:
    linear-gradient(118deg, transparent 36%, rgba(90, 87, 213, 0.0) 42%, rgba(147, 51, 234, 0.45) 48%, rgba(65, 199, 190, 0.32) 53%, transparent 62%),
    linear-gradient(124deg, transparent 58%, rgba(79, 70, 229, 0.28) 66%, rgba(65, 199, 190, 0.18) 70%, transparent 78%),
    linear-gradient(112deg, transparent 8%, rgba(65, 199, 190, 0.16) 18%, rgba(147, 51, 234, 0.12) 24%, transparent 34%);
  filter: blur(16px);
  opacity: 0.55;
  transform: rotate(-4deg);
}
.hero-field-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  opacity: var(--hero-stars-opacity);
  pointer-events: none;
}
.hero-field-stars .shoot-fly {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 0 0;
}
.hero-field-stars .shoot-tail {
  fill: url(#ff-star-tail);
  transform-box: fill-box;
  transform-origin: right center;
  opacity: 0;
}
.hero-field-stars .shoot-bling {
  mix-blend-mode: plus-lighter;
}
[data-theme="light"] .hero-field-stars .shoot-bling {
  mix-blend-mode: multiply;
}
.hero-field-stars .bling-halo,
.hero-field-stars .bling-ring,
.hero-field-stars .bling-core,
.hero-field-stars .shoot-plus,
.hero-field-stars .shoot-head {
  transform-box: fill-box;
  transform-origin: center;
}
.hero-field-stars .bling-halo,
.hero-field-stars .bling-ring,
.hero-field-stars .bling-core {
  opacity: 0;
}
.hero-field-stars .shoot-plus {
  fill: none;
  stroke: var(--hero-star);
  stroke-width: 0.85;
  stroke-linecap: round;
  opacity: 0.85;
  transform: scale(0.42);
}
.hero-field-stars .shoot-head {
  fill: var(--hero-star);
  opacity: 1;
  transform: scale(0.42);
}
.hero-field-stars .shoot--violet .shoot-plus { stroke: var(--hero-star-violet); }
.hero-field-stars .shoot--violet .shoot-head { fill: var(--hero-star-violet); }
.hero-field-stars .shoot--teal .shoot-plus { stroke: var(--hero-star-teal); }
.hero-field-stars .shoot--teal .shoot-head { fill: var(--hero-star-teal); }

.hero-field-stars .shoot.is-travel .shoot-fly {
  animation: star-travel 0.85s cubic-bezier(0.22, 0.72, 0.28, 1) forwards;
}
.hero-field-stars .shoot.is-travel .shoot-tail {
  animation: star-tail-in 0.85s cubic-bezier(0.22, 0.72, 0.28, 1) forwards;
}
.hero-field-stars .shoot.is-hold .shoot-fly {
  opacity: 1;
  transform: translate(0, 0);
}
.hero-field-stars .shoot.is-hold .shoot-tail {
  opacity: 0.85;
  transform: scaleX(1);
}
.hero-field-stars .shoot.is-shine .shoot-fly {
  animation: star-spin-fade 1.15s linear both;
}
.hero-field-stars .shoot.is-shine .shoot-tail {
  animation: star-tail-out 1.15s linear both;
}
.hero-field-stars .shoot.is-shine .bling-halo {
  animation: bling-halo 1.15s linear both;
}
.hero-field-stars .shoot.is-shine .bling-ring {
  animation: bling-ring 1.15s linear both;
}
.hero-field-stars .shoot.is-shine .bling-core {
  animation: bling-core 1.15s linear both;
}
.hero-field-stars .shoot.is-shine .shoot-plus,
.hero-field-stars .shoot.is-shine .shoot-head {
  animation: shoot-spark 1.15s linear both;
}

@keyframes star-travel {
  from { opacity: 0; transform: translate(-150px, 0); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes star-tail-in {
  from { opacity: 0; transform: scaleX(0.12); }
  to { opacity: 0.9; transform: scaleX(1.15); }
}
@keyframes star-spin-fade {
  0%, 42% { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(0, 0); }
}
@keyframes star-tail-out {
  0% { opacity: 0.75; transform: scaleX(1); }
  42% { opacity: 0.45; transform: scaleX(0.7); }
  100% { opacity: 0; transform: scaleX(0.12); }
}
@keyframes bling-halo {
  0% { opacity: 0; transform: scale(0.18); }
  18% { opacity: 0.95; transform: scale(1.05); }
  48% { opacity: 0.5; transform: scale(1.38); }
  100% { opacity: 0; transform: scale(1.7); }
}
@keyframes bling-ring {
  0% { opacity: 0; transform: scale(0.28); }
  18% { opacity: 0.95; transform: scale(0.72); }
  48% { opacity: 0.4; transform: scale(1.7); }
  100% { opacity: 0; transform: scale(2.35); }
}
@keyframes bling-core {
  0% { opacity: 0; transform: scale(0.15); }
  18% { opacity: 1; transform: scale(1.28); }
  48% { opacity: 0.7; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(0.25); }
}
@keyframes shoot-spark {
  0% { opacity: 1; transform: scale(0.42) rotate(0deg); }
  28% { opacity: 1; transform: scale(0.7) rotate(100deg); }
  58% { opacity: 0.88; transform: scale(0.92) rotate(210deg); }
  100% { opacity: 0; transform: scale(1.08) rotate(360deg); }
}
.hero-field-grain {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.hero-field-veil {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 28%;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 3.6rem;
  transform: translateX(-50%);
  color: var(--muted);
  opacity: 0.72;
  transition: opacity var(--dur-ui) var(--ease-soft), visibility var(--dur-ui) var(--ease-soft);
}
.hero-scroll:hover,
.hero-scroll:focus-visible {
  opacity: 1;
  color: var(--ink);
}
.hero-scroll:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 0.6rem;
}
.hero-scroll.is-away {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hero-scroll-glyph { display: block; }
.hero-scroll-wheel,
.hero-scroll-chevron {
  transform-box: fill-box;
  transform-origin: center;
}
.hero-scroll-wheel {
  animation: scroll-wheel 1.7s var(--ease-soft) infinite;
}
.hero-scroll-chevron {
  animation: scroll-chevron 1.7s var(--ease-soft) infinite;
}
@keyframes scroll-wheel {
  0%, 18% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(5px); opacity: 0; }
  56%, 100% { transform: translateY(0); opacity: 0; }
}
@keyframes scroll-chevron {
  0%, 35% { opacity: 0.35; transform: translateY(0); }
  62% { opacity: 1; transform: translateY(2px); }
  100% { opacity: 0.35; transform: translateY(0); }
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1.15rem;
  align-items: start; /* top-align copy + device — no vertical center void */
  padding-top: 2rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: var(--hero-copy-max);
  margin-top: 0;
  padding-top: 0;
  align-self: start;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.3rem;
}

h1 {
  font-size: clamp(1.7rem, 4.6vw, 3.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 0.55rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 0.85rem; /* tight to badges */
  max-width: 36rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.store-badge {
  display: block;
  min-height: 44px;
  transition: transform 100ms var(--ease-soft);
}
.store-badge:hover { transform: scale(1.03); }
.store-badge:active { transform: scale(0.98); }
.store-badge img { height: 48px; width: auto; }

/* Hero primary CTA — badges impossible to miss */
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.1rem;
  margin-bottom: 0.15rem;
  max-width: 100%;
}
.cta-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.store-row--hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.store-row--hero .store-badge img {
  height: 62px;
  width: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
[data-theme="light"] .store-row--hero .store-badge img {
  filter: drop-shadow(0 4px 12px rgba(15, 15, 40, 0.18));
}
@media (min-width: 480px) {
  .store-row--hero .store-badge img { height: 68px; }
}
 /* safety: conversion not in nav */

/* Hero entrance — badges early (H4 80ms); device after.
   Gated on html.hero-ready to avoid FOUC of pre-enter state; badges still
   early relative to device once ready (~700ms budget). */
.hero-enter {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
}
html.hero-ready .hero-enter {
  animation: hero-in var(--dur-enter) var(--ease-out) forwards;
}
html.hero-ready [data-enter="h1"] { animation-duration: 400ms; animation-delay: 0ms; }
html.hero-ready [data-enter="h2"] { animation-duration: 480ms; animation-delay: 60ms; }
html.hero-ready [data-enter="h3"] { animation-duration: 480ms; animation-delay: 120ms; }
html.hero-ready [data-enter="h4"] {
  animation-duration: 400ms;
  animation-delay: 80ms;
  transform: translate3d(0, 8px, 0);
}
html.hero-ready [data-enter="h5"] {
  animation-duration: var(--dur-hero);
  animation-delay: 220ms; /* after badges — never compete with CTA */
  transform: translate3d(0, 20px, 0) scale(0.98);
}
html.hero-ready [data-enter="h7"] { animation-duration: 400ms; animation-delay: 220ms; }
html.reduce-motion .hero-enter {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes hero-in {
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  order: -1; /* phones above copy on small screens */
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% 4% 8%;
  background: radial-gradient(ellipse at 55% 48%, var(--hero-glow-purple), var(--hero-glow-teal) 52%, transparent 72%);
  filter: blur(42px);
  z-index: -1;
  pointer-events: none;
}
.hero-phones {
  width: 100%;
  max-width: 36rem;
  height: auto;
  display: block;
  /* Two solid ovals — keep device screens opaque so field stars stay behind them */
  -webkit-mask-image:
    radial-gradient(ellipse 44% 80% at 30% 54%, #000 74%, transparent 92%),
    radial-gradient(ellipse 44% 80% at 73% 44%, #000 74%, transparent 92%);
  mask-image:
    radial-gradient(ellipse 44% 80% at 30% 54%, #000 74%, transparent 92%),
    radial-gradient(ellipse 44% 80% at 73% 44%, #000 74%, transparent 92%);
  -webkit-mask-composite: source-over;
  mask-composite: add;
}

/* ——— Device stage / carousel ——— */
.device-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.device-controls {
  /* Sit with the phone (below bezel), never in the header/theme-toggle row */
  display: flex;
  gap: 0.5rem;
  z-index: 2;
  justify-content: center;
  margin: 0.35rem 0 0.15rem;
  order: 2;
}
.device-stage > .phone-shell { order: 1; }
.device-stage > .device-caption { order: 3; }
.device-stage > .carousel-dots { order: 4; }
.device-stage > .static-stack { order: 5; }
.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
}
.carousel-btn:hover { transform: scale(1.05); }
.carousel-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.phone-shell { position: relative; z-index: 1; width: min(280px, 72vw); }

.phone-bezel {
  position: relative;
  border-radius: 2.1rem;
  overflow: hidden;
  background: #111;
  border: 3px solid #1a1a28;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 28px 60px rgba(0, 0, 0, 0.45);
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  margin: 0;
  opacity: 0.55;
  transition: opacity 200ms var(--ease-soft);
}
.carousel-slide.is-active { opacity: 1; }
.carousel-slide img { width: 100%; height: auto; display: block; }

/* Celebrate burst — clipped to bezel, one-shot ≤1.6s */
.celebrate-burst {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
.celebrate-burst.is-firing {
  animation: burst-shot 1.6s var(--ease-out) forwards;
}
.celebrate-burst::before,
.celebrate-burst::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 199, 190, 0.45), transparent 70%);
}
.celebrate-burst::after {
  inset: 8%;
  background: radial-gradient(circle, rgba(90, 87, 213, 0.28), transparent 65%);
}
@keyframes burst-shot {
  0% { opacity: 0; transform: scale(0.7); }
  25% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.35); }
}

.device-caption {
  text-align: center;
  max-width: 22rem;
  transition: opacity 180ms var(--ease-soft);
}
.device-caption.is-swapping { opacity: 0.35; }
.caption-loop {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 0.3rem;
}
.device-caption h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.device-caption p:last-child { color: var(--muted); font-size: 0.92rem; }

.carousel-dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}
.dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: var(--muted);
  opacity: 0.45;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  opacity: 1;
  transition: color 200ms var(--ease-soft);
}
.dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.45;
  transition: width 200ms var(--ease-soft), background 200ms var(--ease-soft), opacity 200ms var(--ease-soft);
}
.dot.is-active::before {
  width: 22px;
  background: var(--primary);
  opacity: 1;
}
.dot:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.static-stack { display: none; width: 100%; max-width: 28rem; }
.static-stack .stack-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.phone-frame-mini {
  border-radius: 0.7rem;
  overflow: hidden;
  border: 2px solid #1a1a28;
}
.stack-card h3 { font-size: 0.95rem; margin: 0.15rem 0 0.25rem; }
.stack-card p { font-size: 0.85rem; color: var(--muted); }

@media (min-width: 900px) {
  .hero { padding: var(--header-offset) 0 2rem; }
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1.15fr);
    gap: 2rem;
    align-items: stretch;
    padding-top: 2.5rem;
  }
  .hero-visual { order: 0; }
  .hero-copy {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-self: stretch;
    min-height: 0;
  }
  .hero-sub { margin-top: 0; }
  .hero-cta { margin-top: 0.85rem; }
  .hero-phones { max-width: none; }
}

/* ——— App screens carousel (below hero) ——— */
.screens-section {
  padding-top: 2.25rem;
}
.screens-layout {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}
.screens-copy .eyebrow { margin-bottom: 0.45rem; }
.screens-copy h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.screens-copy .device-caption {
  text-align: left;
  max-width: none;
}
.screens-layout .device-stage {
  align-items: center;
}

@media (min-width: 900px) {
  .screens-layout {
    grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: center;
  }
  .screens-layout .phone-shell { width: 300px; }
  .screens-layout .device-controls,
  .screens-layout .carousel-dots {
    justify-content: center;
  }
}

/* ——— Sections ——— */
.section { padding: 3.25rem 0; }
.loop-section { padding-bottom: 5.5rem; }

.section-head { margin-bottom: 1.5rem; max-width: 36rem; }
.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.section-sub { color: var(--muted); }

.loop-section .shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.loop-section .section-head {
  max-width: 42rem;
  margin-inline: auto;
}

/* Loop chips */
.loop-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  overflow: visible;
}
.chip {
  position: relative;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.88rem;
  transition:
    background-color var(--dur-ui) var(--ease-soft),
    color var(--dur-ui) var(--ease-soft),
    border-color var(--dur-ui) var(--ease-soft),
    transform var(--dur-ui) var(--ease-soft),
    box-shadow var(--dur-ui) var(--ease-soft);
}
.chip.is-on:not(.chip--celebrate) {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  transform: scale(1.06);
}
.chip--celebrate {
  isolation: isolate;
  z-index: 1;
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}
.chip--celebrate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: inherit;
  box-shadow: inherit;
  pointer-events: none;
}
.chip--celebrate .chip-label {
  position: relative;
  z-index: 2;
}
html:not(.reduce-motion) .loop-chips .chip--celebrate:not(.is-on) {
  background: var(--chip-bg);
  color: inherit;
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
.chip--celebrate.is-on {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(90, 87, 213, 0.32);
}
.chip-arrow {
  color: var(--muted);
  font-weight: 700;
  transition: color var(--dur-ui) var(--ease-soft), transform var(--dur-ui) var(--ease-soft);
}
.chip-arrow.is-on {
  color: var(--ink);
  transform: translateX(2px);
}

.loop-confetti {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
}
.loop-confetti i {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 7px;
  border-radius: 1px;
  opacity: 0;
  background: var(--bit);
}
.loop-confetti i:nth-child(1) { --x: -34px; --y: -38px; --r: -28deg; --bit: #41c7be; --d: 0ms; }
.loop-confetti i:nth-child(2) { --x: -12px; --y: -46px; --r: 18deg; --bit: #5a57d5; --d: 20ms; width: 4px; height: 9px; }
.loop-confetti i:nth-child(3) { --x: 16px; --y: -42px; --r: 42deg; --bit: #f79506; --d: 35ms; }
.loop-confetti i:nth-child(4) { --x: 36px; --y: -30px; --r: 70deg; --bit: #f42c58; --d: 10ms; width: 6px; height: 6px; border-radius: 50%; }
.loop-confetti i:nth-child(5) { --x: 44px; --y: -8px; --r: 110deg; --bit: #9333ea; --d: 45ms; }
.loop-confetti i:nth-child(6) { --x: 38px; --y: 16px; --r: 150deg; --bit: #41c7be; --d: 25ms; width: 4px; height: 8px; }
.loop-confetti i:nth-child(7) { --x: 14px; --y: 28px; --r: 188deg; --bit: #5a57d5; --d: 55ms; }
.loop-confetti i:nth-child(8) { --x: -18px; --y: 26px; --r: -160deg; --bit: #f79506; --d: 15ms; width: 6px; height: 5px; }
.loop-confetti i:nth-child(9) { --x: -42px; --y: 10px; --r: -120deg; --bit: #f42c58; --d: 40ms; }
.loop-confetti i:nth-child(10) { --x: -46px; --y: -14px; --r: -80deg; --bit: #9333ea; --d: 8ms; width: 4px; height: 4px; border-radius: 50%; }
.loop-confetti i:nth-child(11) { --x: 6px; --y: -28px; --r: 8deg; --bit: #fff; --d: 30ms; width: 3px; height: 8px; }
.loop-confetti i:nth-child(12) { --x: -22px; --y: -22px; --r: -40deg; --bit: #41c7be; --d: 50ms; }
.loop-confetti i:nth-child(13) { --x: 28px; --y: 6px; --r: 130deg; --bit: #f79506; --d: 18ms; width: 5px; height: 5px; border-radius: 50%; }
.loop-confetti i:nth-child(14) { --x: -8px; --y: 18px; --r: -200deg; --bit: #5a57d5; --d: 60ms; }
.loop-confetti.is-pop i {
  animation: loop-confetti-bit 0.95s var(--ease-out) both;
  animation-delay: var(--d);
}
@keyframes loop-confetti-bit {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.35) rotate(0deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1) rotate(var(--r)); }
}

/* How it works */
.steps {
  display: grid;
  gap: 0.85rem;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  transition: background-color var(--dur-ui) var(--ease-soft), border-color var(--dur-ui) var(--ease-soft);
}
.step-num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--success);
  margin-bottom: 0.35rem;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.step-card p { color: var(--muted); font-size: 0.95rem; }

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

/* Why */
.why-list { display: grid; gap: 0.65rem; }
.why-list li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
  font-weight: 500;
  padding-left: 2.4rem;
  position: relative;
}
.why-list li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}

/* Features */
.feature-grid {
  display: grid;
  gap: 0.85rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: background-color var(--dur-ui) var(--ease-soft), border-color var(--dur-ui) var(--ease-soft);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--muted); font-size: 0.95rem; }
.feature-note { margin-top: 0.5rem; font-size: 0.82rem !important; color: var(--primary) !important; }

@media (min-width: 760px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card--wide { grid-column: 1 / -1; }
}

/* Unlimited — section head matches siblings; card holds prices + unlocks */
.early-bird .section-head { max-width: 40rem; }

.early-card {
  display: grid;
  gap: 1.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem 1.4rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: background-color var(--dur-ui) var(--ease-soft), border-color var(--dur-ui) var(--ease-soft);
}
.early-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--grad);
}

.price-board {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.9rem;
}
.price-options {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.55rem 0.65rem;
}
.price-option {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 6.25rem;
  padding: 1rem 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-align: center;
}
.price-amount {
  font-size: clamp(2rem, 5vw, 2.65rem);
}
.price-period {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--muted);
}
.price-or {
  margin: 0;
  align-self: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: lowercase;
}
.early-lock {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
  text-align: center;
}
.store-row--unlimited {
  justify-content: center;
}
.store-row--unlimited .store-badge img {
  height: 44px;
}

.unlock-board { min-width: 0; }
.unlock-lead {
  margin: 0 0 0.7rem;
  font-weight: 700;
  color: var(--ink);
}
.unlock-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.unlock-list li {
  position: relative;
  margin: 0;
  padding: 0.72rem 0.9rem 0.72rem 2.45rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 550;
  font-size: 0.95rem;
  line-height: 1.35;
}
.unlock-list li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--success);
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 18%, transparent);
}
.unlock-list li::after {
  content: "";
  position: absolute;
  left: 1.14rem;
  top: 50%;
  width: 0.28rem;
  height: 0.48rem;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-62%) rotate(40deg);
}

@media (min-width: 760px) {
  .early-card {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 1.75rem;
    align-items: stretch;
    padding: 1.65rem 1.55rem 1.7rem;
  }
  .price-board {
    border-left: 1px solid var(--line);
    padding-left: 1.75rem;
  }
  .early-lock { text-align: center; }
  .store-row--unlimited { justify-content: center; }
}

/* FAQ */
.faq-list { display: grid; gap: 0.5rem; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.2rem 1rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.85rem 0;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { color: var(--muted); padding-bottom: 0.9rem; font-size: 0.95rem; }

/* Instagram feed */
.instagram-section .section-head { max-width: 40rem; }
.instagram-handle {
  color: var(--primary);
  font-weight: 600;
}
.instagram-handle:hover { text-decoration: underline; }
.instagram-handle:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.instagram-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 0.65rem 0.55rem;
  box-shadow: var(--shadow);
  color-scheme: inherit;
  overflow: hidden;
  transition: background-color var(--dur-ui) var(--ease-soft), border-color var(--dur-ui) var(--ease-soft);
}
.instagram-panel [class*="elfsight-app-"] { min-height: 12rem; }

/* Final CTA */
.final-cta { padding-bottom: 2.5rem; }
.cta-panel {
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem 1.4rem;
  box-shadow: var(--shadow);
}
.cta-panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.5rem; }
.cta-panel p { color: var(--muted); margin-bottom: 1.15rem; }
.cta-panel .store-row { justify-content: center; }

/* Footer — multi-row SiteFooter pattern; fully visible (no sticky rail) */
.site-footer {
  padding: 3rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.footer-tagline {
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}
.footer-social,
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  justify-content: center;
  font-weight: 600;
  font-size: 0.88rem;
}
.footer-social a,
.footer-legal a {
  color: var(--ink-soft);
  padding: 0.2rem 0.15rem;
  border-radius: 0.35rem;
  transition: color var(--dur-fast) var(--ease-soft);
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-social svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}
.footer-social a:hover,
.footer-legal a:hover,
.footer-support a:hover {
  color: var(--ink);
}
.footer-social a:focus-visible,
.footer-legal a:focus-visible,
.footer-support a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.footer-copy {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-support {
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-support a {
  color: var(--primary);
  font-weight: 600;
}

/* ——— Scroll reveals ——— */
.reveal {
  opacity: 0;
  transform: translate3d(0, var(--reveal-y), 0);
  transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-enter) var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.page-hidden .celebrate-burst,
.page-hidden .loop-confetti i,
.page-hidden .shoot-fly,
.page-hidden .shoot-tail,
.page-hidden .bling-halo,
.page-hidden .bling-ring,
.page-hidden .bling-core,
.page-hidden .shoot-plus,
.page-hidden .shoot-head,
.page-hidden .hero-scroll-wheel,
.page-hidden .hero-scroll-chevron {
  animation-play-state: paused !important;
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .hero-enter,
  .reveal,
  .reveal.is-in {
    opacity: 1 !important;
    transform: none !important;
  }
  .celebrate-burst { display: none !important; }
  .static-stack { display: grid !important; }
  .hero-field-grain { opacity: 0.22; }
}

html.reduce-motion .hero-enter,
html.reduce-motion .reveal {
  opacity: 1;
  transform: none;
  animation: none;
}
html.reduce-motion .celebrate-burst { display: none; }
html.reduce-motion .loop-confetti { display: none; }
html.reduce-motion .static-stack { display: grid; }
html.reduce-motion .hero-field-grain { opacity: 0.22; }

/* Theme polish: editorial fields handled by .hero-field; surfaces stay brand-true */
[data-theme="light"] .hero-field-streaks {
  opacity: 0.28;
  filter: blur(22px);
}
[data-theme="light"] .hero-field-aurora {
  opacity: 0.7;
  filter: blur(36px);
}
[data-theme="light"] .hero-field-grain {
  opacity: 0.12;
  mix-blend-mode: multiply;
}
[data-theme="light"] .phone-bezel {
  border-color: #d8d8e4;
  box-shadow: 0 24px 50px rgba(15, 15, 40, 0.16);
}
[data-theme="light"] .cta-panel {
  background: linear-gradient(180deg, #fff, #f7f4ef);
}
[data-theme="light"] .site-footer {
  background: #f7f4ef;
}
[data-theme="dark"] .site-footer {
  background: #0a0a1c;
}

@media (min-width: 1100px) {
  .hero-layout { gap: 2.5rem; }
  .screens-layout { gap: 3.5rem; }
}
