/* ──────────────────────────────────────────────────────────────
   QUESTLY — LANDING PAGE STYLES
   Sprint 002 / Gate B

   Palette is taken from the two Questly sites already in public
   (questly-privacy.netlify.app and questlycredits.netlify.app) so
   all three read as one product. Those values differ very slightly
   from the Flutter app's AppColors (app navy is #0D121C, app gold
   is #D6A735); the web values win here, for consistency with what
   is already deployed.

   Typeface is the system stack, matching the existing sites. The
   app's Plus Jakarta Sans / Literata are deliberately NOT loaded:
   a webfont would mean a third-party request (or ~600KB of
   self-hosted TTF) for a single page, and the existing Questly
   sites already set the precedent.
   ────────────────────────────────────────────────────────────── */

:root {
  --navy: #0b1120;
  --navy2: #0f1729;
  --card: #131c2e;
  --card2: #16203400;
  --border: #1e293b;
  --border-soft: #19233a;
  --gold: #e0b23c;
  --gold2: #f4d06f;
  --gold-dim: #b98a1f;
  --text: #e8edf5;
  --text-secondary: #a8b3c7;
  --text-muted: #6b7896;

  --maxw: 1120px;
  --gutter: 20px;
  --radius: 18px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold2);
}

a:hover {
  color: var(--gold);
}

/* Visible focus for keyboard users, on every interactive element. */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold2);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #16120a;
  padding: 12px 20px;
  font-weight: 700;
  z-index: 100;
  border-radius: 0 0 10px 0;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── SECTION RHYTHM ────────────────────────────────────────── */

section {
  padding: 84px 0;
}

section + section {
  border-top: 1px solid var(--border-soft);
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* ── HERO ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 96px 0 88px;
  text-align: center;
  overflow: hidden;
  border-top: none;
}

/* A warm glow behind the headline. Purely decorative, hidden from
   assistive tech by virtue of being a background. */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 50% auto;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(224, 178, 60, 0.16) 0%,
    rgba(224, 178, 60, 0.05) 38%,
    transparent 68%
  );
  pointer-events: none;
}

.hero > .wrap {
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 34px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.brand span {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero h1 {
  font-size: clamp(2.45rem, 6.4vw, 4.1rem);
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, var(--gold2) 180%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 22px;
}

.hero .sub {
  font-size: clamp(1.05rem, 2.1vw, 1.26rem);
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto 38px;
}

/* ── CTA ───────────────────────────────────────────────────── */

.cta {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold2) 0%, var(--gold) 100%);
  color: #17130a;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 17px 38px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(224, 178, 60, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta:hover {
  color: #17130a;
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(224, 178, 60, 0.3);
}

.cta:active {
  transform: translateY(0);
}

/* Two stores, two buttons. Deliberately NOT the official Apple and
   Google badge images: both carry strict usage rules on size, clear
   space and modification, and an approximation drawn by hand breaks
   them. Plain branded text links are permitted by both and match the
   page. Swap in the real badge assets if marketing would rather. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.cta-secondary {
  background: transparent;
  color: var(--gold2);
  border: 1px solid var(--gold-dim);
  box-shadow: none;
}

.cta-secondary:hover {
  color: #17130a;
  background: linear-gradient(180deg, var(--gold2) 0%, var(--gold) 100%);
  border-color: transparent;
  box-shadow: 0 14px 38px rgba(224, 178, 60, 0.26);
}

.availability {
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ── SCREENSHOTS ───────────────────────────────────────────── */

.shots {
  padding-top: 8px;
}

.shots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  align-items: start;
}

figure {
  margin: 0;
  text-align: center;
}

.shot {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--navy2);
  padding: 8px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

/* Floor for the frame before an image is present, and a safe
   container ratio for a portrait iPhone capture. object-fit is
   `contain`, never `cover` — the UI is never cropped. */
.shot::after {
  content: "";
  display: block;
  aspect-ratio: 9 / 19.5;
}

.shot img {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  border-radius: 21px;
}

figcaption {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ── BENEFIT BLOCKS ────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
}

.feature h2 {
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 14px;
}

.feature p {
  color: var(--text-secondary);
}

.feature p + p {
  margin-top: 14px;
}

/* ── WIDE FEATURE (Collections / Recaps) ───────────────────── */

.band {
  text-align: center;
}

.band h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 18px;
}

.band p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto;
}

/* ── FAQ ───────────────────────────────────────────────────── */

.faq h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 44px;
}

.faq-list {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}

.qa {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 26px 28px;
}

.qa h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

.qa p {
  color: var(--text-secondary);
}

/* ── FINAL CTA ─────────────────────────────────────────────── */

.closing {
  text-align: center;
  background: linear-gradient(180deg, var(--navy) 0%, #140f02 320%);
}

.closing h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.closing p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 34px;
}

/* ── FOOTER ────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border-soft);
  padding: 38px 0 52px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

footer nav {
  display: inline;
}

footer .sep {
  color: var(--text-muted);
  padding: 0 10px;
}

/* ── 404 ───────────────────────────────────────────────────── */

.notfound {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px var(--gutter);
}

.notfound h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 14px;
}

.notfound p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .features {
    grid-template-columns: 1fr;
  }
  .shots-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    max-width: 330px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  section {
    padding: 62px 0;
  }
  .hero {
    padding: 64px 0 60px;
  }
  .feature {
    padding: 28px 24px;
  }
  .qa {
    padding: 22px 22px;
  }
  .cta-row {
    flex-direction: column;
  }
  .cta {
    display: block;
    width: 100%;
    padding: 17px 24px;
  }
}
