/* ============================================================
   Flappy Echo — marketing site styles
   Palette is byte-for-byte from the shipped app (GameConstants.swift
   `enum Palette`). Do not introduce stray hex; use these tokens.
   ============================================================ */
:root {
  /* App palette tokens (verbatim from Palette enum) */
  --navy:        #0a1530; /* letterbox / launch background */
  --sky-top:     #4ec0ff;
  --sky-bottom:  #7ad7ff;
  --bird-yellow: #ffd84a;
  --yellow-dark: #e0a800;
  --red:         #ff5a3c;
  --green:       #5cd64a;
  --green-dark:  #2f9c2a;
  --pipe-light:  #a8ff84;
  --ground:      #d9a96a;
  --ground-dark: #a87742;
  --ghost-light: #e8f4ff;
  --ghost-dark:  #9ec6e8;
  --white:       #ffffff;
  --outline:     #1a1a1a;
  --ui-navy:     #1a1a2e;

  /* Derived surfaces */
  --bg:          var(--navy);
  --surface:     #111d3a;
  --surface-2:   #16234a;
  --border:      #243a66;
  --text:        #e8f0ff;
  --muted:       #9bb0d6;

  --maxw: 64rem;
  --pixel: "Press Start 2P", "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--sky-top); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Pixel display font for headings / CTA. Press Start 2P is very wide and never
   breaks within a word, so allow wrapping everywhere it's used to avoid
   horizontal overflow on narrow phones. */
.pixel { font-family: var(--pixel); line-height: 1.5; letter-spacing: 0; overflow-wrap: anywhere; }

/* --- Hero ----------------------------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding: 4rem 0 3.5rem;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(78,192,255,0.18), transparent 60%),
    var(--navy);
  border-bottom: 4px solid var(--ui-navy);
}
.hero__icon {
  width: 128px; height: 128px;
  margin: 0 auto 1.5rem;
  border-radius: 22%;
  image-rendering: pixelated;
  box-shadow: 0 0 0 4px var(--ui-navy), 0 14px 40px rgba(0,0,0,0.55);
}
.hero__title {
  font-size: clamp(1.1rem, 7vw, 3rem);
  margin: 0 0 0.9rem;
  color: var(--bird-yellow);
  text-shadow: 3px 3px 0 var(--outline), 6px 6px 0 var(--yellow-dark);
  /* Press Start 2P is very wide and never breaks mid-word; allow wrapping
     so the two words can stack on narrow phones instead of clipping. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.hero__tagline {
  font-size: clamp(0.6rem, 3vw, 1rem);
  color: var(--ghost-light);
  margin: 0 0 1.75rem;
  overflow-wrap: anywhere;
}
.hero__hook {
  max-width: 40rem;
  margin: 0 auto 2.25rem;
  font-size: 1.05rem;
  color: var(--text);
}

/* CTA: non-link "Coming Soon" badge until the App Store URL exists */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  font-family: var(--pixel);
  font-size: clamp(0.5rem, 2.6vw, 0.7rem);
  line-height: 1.6;
  text-decoration: none;
  padding: 1rem 1.25rem;
  max-width: 100%;
  color: var(--outline);
  background: var(--bird-yellow);
  border: 4px solid var(--outline);
  border-radius: 6px;
  box-shadow: 0 6px 0 var(--yellow-dark);
  transition: transform .08s ease, box-shadow .08s ease;
  overflow-wrap: anywhere;
}
.cta--coming-soon { cursor: default; }
a.cta:hover, a.cta:focus-visible { transform: translateY(2px); box-shadow: 0 4px 0 var(--yellow-dark); outline: none; }
.cta__sub { display: block; margin-top: 0.85rem; font-size: 0.78rem; color: var(--muted); font-family: var(--sans); }

/* --- Section scaffolding ------------------------------------- */
section { padding: 3.5rem 0; }
.section__title {
  text-align: center;
  font-size: clamp(0.8rem, 4vw, 1.5rem);
  color: var(--bird-yellow);
  margin: 0 0 0.5rem;
  text-shadow: 2px 2px 0 var(--outline);
  overflow-wrap: anywhere;
}
.section__lede { text-align: center; color: var(--muted); margin: 0 auto 2.5rem; max-width: 38rem; }

/* --- Screenshots --------------------------------------------- */
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.shot {
  background: var(--ui-navy);
  border: 4px solid var(--outline);
  border-radius: 18px;
  padding: 0.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.shot img { border-radius: 12px; aspect-ratio: 1320 / 2868; object-fit: cover; image-rendering: pixelated; }
.shot figcaption {
  font-family: var(--pixel);
  font-size: 0.55rem;
  text-align: center;
  color: var(--ghost-light);
  padding: 0.75rem 0 0.4rem;
}

/* --- Features ------------------------------------------------- */
.features { background: var(--surface); border-top: 4px solid var(--ui-navy); border-bottom: 4px solid var(--ui-navy); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.feature {
  background: var(--surface-2);
  border: 3px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.feature h3 {
  font-family: var(--pixel);
  font-size: 0.72rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
  color: var(--pipe-light);
}
.feature p { margin: 0; color: var(--text); font-size: 0.98rem; }

/* --- Footer --------------------------------------------------- */
footer.site {
  text-align: center;
  padding: 3rem 0 3.5rem;
  background: var(--navy);
  color: var(--muted);
  font-size: 0.92rem;
}
footer.site nav { margin-bottom: 1rem; display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
footer.site a { color: var(--sky-top); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
.footer__brand { font-family: var(--pixel); font-size: 0.65rem; color: var(--bird-yellow); margin-bottom: 0.75rem; }

/* --- Responsive ---------------------------------------------- */
@media (max-width: 860px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .shots { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero__icon { width: 104px; height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta { transition: none; }
}

/* ============================================================
   Legal pages (privacy.html / support.html) re-skin.
   Body/legal TEXT is preserved word-for-word from the
   Apple-submitted versions; only presentation is themed here.
   ============================================================ */
.legal { max-width: 42rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.legal header { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; margin-bottom: 1.5rem; }
.legal h1 { font-family: var(--pixel); font-size: 1.1rem; line-height: 1.6; margin: 0 0 0.6rem; color: var(--bird-yellow); text-shadow: 2px 2px 0 var(--outline); }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: var(--pipe-light); }
.legal p, .legal li { color: var(--text); }
.legal .effective { color: var(--muted); font-size: 0.95rem; margin: 0; }
.legal ul, .legal ol { padding-left: 1.25rem; }
.legal li { margin: 0.35rem 0; }
.legal a { color: var(--sky-top); }
.legal .contact {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.legal footer { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.legal .back { display: inline-block; margin-bottom: 1.5rem; font-size: 0.92rem; }
