/* ------------------------------------------------------------------ */
/*  Gem of Luck web tokens — every value from the app's DESIGN.md.     */
/*  Custom component layer only; Tailwind utilities come from the      */
/*  Play CDN script in each page's <head>.                             */
/* ------------------------------------------------------------------ */
:root {
  --stage: #241543;
  --plate: #4B2E91;
  --plate-raised: #6A46C9;
  --plate-deep: #2E1B5E;
  --gold: #FFC53D;
  --gold-deep: #E8A020;
  --gem: #2ED9C3;
  --gem-deep: #17B8A6;
  --violet-accent: #B084FF;
  --success: #4CE05B;
  --danger: #FF4D6D;
  --text-primary: #FFFFFF;
  --text-secondary: #C9B8F2;
  --ink: #2A1650;
  --edge: #5E3FB0;

  --grad-plate: linear-gradient(180deg, #5434A4 0%, #3F2483 100%);
  --grad-gold: linear-gradient(180deg, #FFD34D 0%, #E8A020 100%);
  --grad-gem: linear-gradient(180deg, #2ED9C3 0%, #17B8A6 100%);
  --grad-stage: linear-gradient(180deg, #2E1B5E 0%, #241543 100%);

  --header-h: 64px;
}

@media (min-width: 768px) {
  :root { --header-h: 72px; }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  font-family: "Nunito", sans-serif;
  color: var(--text-primary);
  background-color: var(--stage);
  background-image: var(--grad-stage);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.text-balance { text-wrap: balance; }

/* The plate — every content block sits on one. */
.plate {
  background-image: var(--grad-plate);
  border: 1px solid var(--edge);
  border-radius: 16px;
}
.plate-hero { border-radius: 20px; }
.plate-well {
  background: var(--plate-deep);
  border: 1px solid var(--edge);
  border-radius: 16px;
}

/* Section header: pictograph + ALL-CAPS Baloo label, left-aligned. */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.section-header .fa-solid { font-size: 1rem; }

/* Pills. */
.pill-gold, .pill-gem, .pill-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  min-height: 48px;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  color: var(--ink);
  transition: transform 100ms ease-out;
}
.pill-gold {
  background-image: var(--grad-gold);
  border-bottom: 2px solid var(--gold-deep);
}
.pill-gem {
  background-image: var(--grad-gem);
  border-bottom: 2px solid var(--gem-deep);
}
.pill-ghost {
  color: var(--text-primary);
  background: var(--plate-deep);
  border: 1px solid var(--edge);
}
.pill-gold:hover, .pill-gem:hover, .pill-ghost:hover,
.pill-gold:active, .pill-gem:active, .pill-ghost:active { transform: scale(0.97); }

/* Small price/label pill (visual 32px, sits in a larger hit box when interactive). */
.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  color: var(--ink);
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

/* Icon plate. */
.icon-plate {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--plate-raised);
}

/* Google Play badge — dark pill, recognizable treatment. */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 999px;
  background: #000;
  padding: 0 1rem;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 100ms ease-out;
}
.store-badge:hover { transform: scale(0.97); }
.store-badge .play-tri {
  background: linear-gradient(135deg, #00d3ff 0%, #28f39c 33%, #ffd34d 66%, #ff4d6d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* App-style progress bar. */
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--plate-deep);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--violet-accent);
}

/* Phone frame for hero screenshots. */
.phone-frame {
  position: relative;
  margin-inline: auto;
  background: var(--plate-deep);
  border: 3px solid var(--edge);
  border-radius: 36px;
  padding: 10px;
  width: min(248px, 78vw);
}

/* FAQ accordion rows — touch-friendly by construction. */
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .faq-chev { transition: transform 200ms ease-out; color: var(--gold); }
.faq[open] .faq-chev { transform: rotate(180deg); }

/* Decorative hexagon facets (the onboarding background motif). */
.hex {
  position: absolute;
  background: var(--plate-deep);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  pointer-events: none;
}

/* Legal documents: readable measure, secondary-text meta. */
.legal-body { color: var(--text-secondary); line-height: 1.625; max-width: 70ch; }
.legal-body strong { color: var(--text-primary); font-weight: 700; }
.legal-body ul { list-style: disc; padding-left: 1.5rem; margin: 1rem 0; }
.legal-body li { margin-top: 0.375rem; }
.legal-body h2 {
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.legal-body h3 {
  font-family: "Baloo 2", cursive;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.legal-body p { margin: 0.75rem 0; }
.legal-body a, .tap-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-block;
  padding: 11px 2px;
  margin: -11px 0;
}
.legal-body a:hover, .tap-link:hover { color: var(--gold-deep); }

/* Ambient: prestige gem bob — the app's only continuous animation, carried over. */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.bob { animation: bob 3s ease-in-out infinite; }

/* Orchestrated hero entrance. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.4); }
  70% { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}
.rise-in { animation: rise-in 400ms ease-out both; }
.pop-in { animation: pop-in 400ms ease-out both; }
.d-1 { animation-delay: 80ms; }
.d-2 { animation-delay: 160ms; }
.d-3 { animation-delay: 240ms; }
.d-4 { animation-delay: 340ms; }
.d-5 { animation-delay: 460ms; }
.d-6 { animation-delay: 600ms; }
.d-7 { animation-delay: 720ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bob, .rise-in, .pop-in { animation: none; }
  .pill-gold:hover, .pill-gem:hover, .pill-ghost:hover, .store-badge:hover { transform: none; }
  [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
