:root {
  --blue: #2E6DED;
  --blue-deep: #1640A3;
  --accent: #FFB800;
  --white: #ffffff;
  --max: 460px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--blue-deep);
}

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background-color: var(--blue-deep);
  background-image: radial-gradient(circle at 50% 22%, var(--blue) 0%, var(--blue-deep) 75%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,184,0,.35), transparent 62%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Single-screen stage ---------- */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(40px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: center;
}

/* ---------- Brand ---------- */
.brand { display: flex; flex-direction: column; align-items: center; }

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  margin-bottom: 18px;
}

.wordmark {
  font-size: clamp(44px, 14vw, 60px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-shadow: 0 6px 24px rgba(0,0,0,.3);
}

.tagline {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
}
.accent { color: var(--accent); }

/* ---------- Carousel ---------- */
.carousel { width: 100%; }

.track {
  position: relative;
  height: 212px;
}

.card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.card.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.card:active { background: rgba(255,255,255,.18); }

.card-more {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}

.card-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
}
.card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.card p { font-size: 15px; color: rgba(255,255,255,.85); max-width: 280px; }

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: width .3s ease, background .3s ease;
}
.dot.is-active { width: 22px; background: var(--accent); }

/* ---------- Actions ---------- */
.actions { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.hint { font-size: 15px; font-weight: 700; color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 16px 20px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--white);
  color: #111;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.btn-primary:active { transform: scale(.97); }
.apple { width: 18px; height: 20px; flex: none; }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.foot a { color: rgba(255,255,255,.7); text-decoration: none; }
.foot a:active { color: var(--white); }
.foot span { color: rgba(255,255,255,.4); }

/* ---------- Taller screens: breathe a bit more ---------- */
@media (min-height: 760px) {
  .track { height: 224px; }
}

/* ---------- Legal pages (privacy / terms) ---------- */
.legal {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(40px + env(safe-area-inset-bottom));
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.back:active { color: var(--white); }

.legal .back { margin-bottom: 22px; }

.legal-card {
  background: var(--white);
  color: #1a1a1f;
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.legal-card h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.legal-card .effective {
  font-size: 14px;
  color: #8a8a93;
  margin-bottom: 22px;
}
.legal-card h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 22px 0 8px;
}
.legal-card p {
  font-size: 15px;
  line-height: 1.65;
  color: #3a3a44;
  margin-bottom: 12px;
}
.legal-card a { color: var(--blue); font-weight: 700; }

.legal-list {
  margin: 0 0 12px;
  padding-left: 20px;
}
.legal-list li {
  font-size: 15px;
  line-height: 1.8;
  color: #3a3a44;
}

/* ---------- Feature pages (mirrors the home layout) ---------- */
.feature-page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(40px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: center;
}

.feature-head {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-head .app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  margin-bottom: 18px;
}
.feature-head .back {
  position: absolute;
  left: 0;
  top: 22px;
}

.feature-title {
  font-size: clamp(44px, 14vw, 60px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-shadow: 0 6px 24px rgba(0,0,0,.3);
}

.feature-subtitle {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}

.feature-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.feature-desc {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,.9);
  max-width: 340px;
}

.feature-points {
  list-style: none;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.feature-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 15px;
  font-weight: 700;
}
.feature-points li::before {
  content: "✓";
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1a1f;
  font-size: 14px;
  font-weight: 900;
}
