:root {
  color-scheme: light;
  --bg: #f6f8ff;
  --bg-alt: rgba(255, 255, 255, 0.82);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #5b6476;
  --line: rgba(15, 23, 42, 0.08);
  --accent: #5b5cff;
  --accent-2: #27b6a8;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.10);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08111f;
  --bg-alt: rgba(11, 18, 31, 0.84);
  --surface: rgba(17, 24, 39, 0.76);
  --surface-strong: #101827;
  --text: #f8fafc;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #818cf8;
  --accent-2: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top left, rgba(91, 92, 255, 0.20), transparent 26%),
    radial-gradient(circle at top right, rgba(39, 182, 168, 0.16), transparent 22%),
    var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(255,255,255,0.02)), var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

a:hover { color: var(--accent); }

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.topbar,
.footer,
.hero,
.section,
.waitlist-card,
.calculator-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 24px;
  position: sticky;
  top: 16px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand span span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 10px 30px rgba(91, 92, 255, 0.25);
  flex: 0 0 auto;
}

.brand-mark svg { width: 24px; height: 24px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: center;
}

.nav-cta {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(91, 92, 255, 0.10);
  color: var(--accent);
  border: 1px solid rgba(91, 92, 255, 0.18);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.hero {
  margin-top: 22px;
  padding: 34px;
  border-radius: 32px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.hero-phone {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
}

.hero-phone .phone-frame {
  max-width: 320px;
  width: 100%;
  transform: rotate(-2.5deg);
}

.phone-frame {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 30px 60px -20px rgba(15, 23, 42, 0.35),
    0 18px 35px -15px rgba(91, 92, 255, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

html[data-theme="dark"] .phone-frame {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 18px 35px -15px rgba(129, 140, 248, 0.25);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.phone-frame:hover {
  transform: translateY(-4px) scale(1.01);
}

.hero-phone .phone-frame:hover {
  transform: rotate(-1deg) translateY(-4px) scale(1.02);
}

.gallery .section-heading { margin-bottom: 24px; }

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.gallery-strip figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-snap-align: start;
}

.gallery-strip figure .phone-frame {
  max-width: 100%;
}

.gallery-strip figcaption {
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  margin: 14px 0 18px;
  max-width: 12ch;
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover { transform: translateY(-1px); }

.button.primary {
  background: linear-gradient(135deg, var(--accent), #6fb1ff);
  color: white;
  box-shadow: 0 14px 30px rgba(91, 92, 255, 0.28);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
}

.button.app-store {
  background: #000;
  color: #fff;
  padding: 0 22px;
  min-height: 54px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  gap: 12px;
}

html[data-theme="dark"] .button.app-store {
  background: #fff;
  color: #000;
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.08);
}

.button.app-store:hover {
  transform: translateY(-1px);
}

.app-store-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.app-store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  text-align: left;
}

.app-store-text small {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  font-weight: 500;
}

.app-store-text strong {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metrics article,
.feature-card,
.steps article,
.result-card,
details {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-alt);
}

.metrics article {
  padding: 16px;
}

.metrics strong,
.result-card strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.metrics span,
.metrics p,
.feature-card p,
.steps p,
.faq-list p,
.footer p,
.calculator p,
.waitlist-card p,
.muted {
  color: var(--muted);
}

.footer,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section {
  margin-top: 22px;
  border-radius: 30px;
  padding: 28px;
}

.section-heading {
  margin-bottom: 18px;
  align-items: end;
}

.section-heading h2,
.waitlist-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 10px 0 10px;
}

.section-heading p,
.waitlist-card p {
  max-width: 62ch;
  margin-bottom: 0;
}

.section-heading.narrow { display: block; }
.section-heading.narrow p { margin-top: 12px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 18px;
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(91, 92, 255, 0.10);
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.workflow .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps article {
  padding: 20px;
}

.steps span {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 800;
}

.steps h3,
.feature-card h3 {
  margin: 12px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.calculator-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  padding: 20px;
  border-radius: 28px;
}

.calculator-form {
  display: grid;
  gap: 16px;
}

.calculator-form label {
  display: grid;
  gap: 10px;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.calculator-results {
  display: grid;
  gap: 12px;
}

.result-card {
  padding: 18px;
}

.result-card.accent {
  background: linear-gradient(135deg, rgba(91, 92, 255, 0.14), rgba(39, 182, 168, 0.08));
  border-color: rgba(91, 92, 255, 0.20);
}

.result-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.result-card strong {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.04em;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  padding: 18px 20px;
}

summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

details p {
  margin-top: 12px;
  margin-bottom: 0;
}

.waitlist-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  padding: 22px;
  border-radius: 28px;
  align-items: center;
}

.footer {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 24px;
}

.footer strong { display: block; margin-bottom: 4px; }

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted { font-size: 0.95rem; }

.footer p { margin-bottom: 0; }

.feature-card,
.steps article,
details,
.result-card,
.metrics article,
.theme-toggle,
.button {
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.feature-card:hover,
.steps article:hover,
details:hover,
.result-card:hover,
.metrics article:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.theme-toggle:focus-visible,
.nav-links a:focus-visible,
.brand:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(91, 92, 255, 0.45);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .hero,
  .calculator-card,
  .waitlist-card,
  .card-grid,
  .workflow .steps {
    grid-template-columns: 1fr 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .hero { padding: 26px; }
}

@media (max-width: 760px) {
  .topbar,
  .section-heading,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 14px;
  }

  .hero,
  .section,
  .calculator-card,
  .waitlist-card,
  .footer {
    padding: 22px;
    border-radius: 24px;
  }

  .hero,
  .calculator-card,
  .waitlist-card,
  .card-grid,
  .workflow .steps {
    grid-template-columns: 1fr;
  }

  h1 { max-width: none; }

  .hero-phone .phone-frame { max-width: 280px; transform: rotate(0); }
  .gallery-strip { grid-template-columns: repeat(6, 78%); }
  .download-actions { justify-content: flex-start; }
}
