/* Gumdroplet — mobile-first candy stylesheet.
   Palette lifted straight from the game (Theme.swift):
   strawberry #FF4A6B · orange #FF992E · lemon #FFD13D
   lime #7DD65C · blueberry #45B3FF · grape #B373FF
   night sky #291A52 → #542475 → #852E73 */

:root {
  --strawberry: #FF4A6B;
  --orange:     #FF992E;
  --lemon:      #FFD13D;
  --lime:       #7DD65C;
  --blueberry:  #45B3FF;
  --grape:      #B373FF;
  --sky-top:    #291A52;
  --sky-mid:    #542475;
  --sky-bottom: #852E73;
  --ink:        #FFFFFF;
  --ink-soft:   rgba(255, 255, 255, 0.78);
  --ink-faint:  rgba(255, 255, 255, 0.55);
  --card:       rgba(255, 255, 255, 0.08);
  --card-line:  rgba(255, 255, 255, 0.14);
  --radius:     22px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold",
               "Nunito", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  /* gradient spans the whole document — background-attachment: fixed is
     unreliable on iOS Safari and in full-page captures */
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-bottom) 80%, var(--sky-top) 100%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

a { color: var(--blueberry); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header / hero ---------- */

.hero {
  text-align: center;
  padding: 56px 20px 40px;
  position: relative;
}

.hero .app-icon {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  margin-bottom: 22px;
}

.wordmark {
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  margin-bottom: 10px;
}

/* per-letter candy colors, like the title screen */
.wordmark span { display: inline-block; }
.wordmark span:nth-child(6n+1) { color: var(--strawberry); }
.wordmark span:nth-child(6n+2) { color: var(--orange); }
.wordmark span:nth-child(6n+3) { color: var(--lemon); }
.wordmark span:nth-child(6n+4) { color: var(--lime); }
.wordmark span:nth-child(6n+5) { color: var(--blueberry); }
.wordmark span:nth-child(6n+6) { color: var(--grape); }

@media (prefers-reduced-motion: no-preference) {
  .wordmark span {
    animation: jelly 3.2s ease-in-out infinite;
  }
  .wordmark span:nth-child(2n)  { animation-delay: 0.25s; }
  .wordmark span:nth-child(3n)  { animation-delay: 0.5s; }
  .wordmark span:nth-child(5n)  { animation-delay: 0.75s; }
  @keyframes jelly {
    0%, 78%, 100% { transform: translateY(0) scale(1, 1); }
    84% { transform: translateY(-9px) scale(0.96, 1.06); }
    92% { transform: translateY(0) scale(1.08, 0.9); }
    96% { transform: translateY(0) scale(0.97, 1.03); }
  }
}

.tagline {
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 auto 28px;
}

.store-badge {
  display: inline-block;
  transition: transform 0.15s ease;
}
.store-badge:hover { transform: scale(1.04); text-decoration: none; }
.store-badge img { display: block; }

.hero .free-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* floating background gummies */
.bg-gummy {
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
  filter: blur(1px);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .bg-gummy { animation: drift 14s ease-in-out infinite alternate; }
  @keyframes drift {
    from { transform: translateY(0); }
    to   { transform: translateY(-26px); }
  }
}

/* ---------- sections ---------- */

section { padding: 44px 0; }

h2 {
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 38em;
  margin: 0 auto 34px;
}

/* phone-framed video */
.phone {
  width: min(320px, 78vw);
  margin: 0 auto;
  border-radius: 42px;
  padding: 10px;
  background: #14102b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255,255,255,0.08);
}
.phone video, .phone img {
  display: block;
  width: 100%;
  border-radius: 34px;
}

/* feature grid */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 640px)  { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .features { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.feature-card img, .feature-card video {
  width: 100%;
  display: block;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
}
.feature-card .caption {
  padding: 16px 18px 20px;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.feature-card h3 .dot {
  display: inline-block;
  width: 0.7em; height: 0.7em;
  border-radius: 50%;
  margin-right: 8px;
}
.feature-card p { font-size: 0.92rem; color: var(--ink-soft); }

/* calm / accessibility strip */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}
.pill {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.pill b { color: var(--ink); }

/* ---------- inner pages (privacy / terms / support) ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}
.page-header {
  text-align: center;
  padding: 40px 20px 8px;
}
.page-header .home-link {
  display: inline-block;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.page h1 {
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  font-weight: 900;
  text-align: center;
  margin: 18px 0 6px;
}
.page .updated {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-bottom: 34px;
}
.page h2 {
  text-align: left;
  font-size: 1.25rem;
  margin: 34px 0 10px;
}
.page p, .page li { color: var(--ink-soft); font-size: 1rem; }
.page ul { padding-left: 22px; margin: 10px 0; }
.page li { margin-bottom: 8px; }
.page strong { color: var(--ink); }

.faq details {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.faq summary {
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}
.faq details p { margin-top: 10px; }

.contact-card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-top: 30px;
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 40px 20px 56px;
  color: var(--ink-faint);
  font-size: 0.88rem;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: 14px;
}
footer nav a { color: var(--ink-soft); font-weight: 700; }
