/* ═══════════════════════════════════════════════════════════
   PlaySparks — marketing site
   Design system pulled from the Figma marketing frames
   (node 103:3252 collapsed FAQ · 115:3913 expanded FAQ).

   Two layers, mirroring Theme.swift:
   1. Primitives — the raw palette, named by hue.
   2. Semantic  — role tokens that alias a primitive. Only these
                  are used below, so a colour change happens once.
   New tokens created for the marketing site (not in the app
   library) are flagged  NEW .
   ═══════════════════════════════════════════════════════════ */
:root {
  /* ── Layer 1: Primitives ───────────────────────────────── */
  --c-cream:          #FAF8F4;  /* app: Cream / Background      */
  --c-ink:            #332E3B;  /* app: Ink   / Text Primary    */
  --c-ink-deep:       #2E2A42;  /* NEW  deeper aubergine ink    */
  --c-white:          #FFFFFF;  /* app: Surface                 */
  --c-border:         #E5E7EB;  /* app: Warm Grey 2 / Border    */
  --c-grey-line:      #D1D5DC;  /* NEW  nav divider hairline    */
  --c-slate:          #9CA3AF;  /* app: Slate / Placeholder     */
  --c-chartreuse:     #D4E157;  /* app: Chartreuse              */
  --c-orange:         #FFA126;  /* app: Orange                  */
  --c-blue:           #57C3E1;  /* app: Blue                    */
  --c-tomato:         #E85029;  /* app: Tomato (accent)         */
  --c-orange-soft:    #FFC375;  /* NEW  soft orange card fill   */
  --c-chartreuse-soft:#E7F279;  /* NEW  soft chartreuse card    */
  --c-sky-soft:       #86DDF5;  /* NEW  soft sky card fill      */

  /* ── Layer 2: Semantic tokens ──────────────────────────── */
  --background:       var(--c-cream);
  --surface:          var(--c-white);
  --text-primary:     var(--c-ink);        /* nav, labels, card & FAQ titles */
  --text-heading:     var(--c-ink-deep);   /* NEW  hero H1 + body paragraphs  */
  --text-placeholder: var(--c-slate);      /* "ON DEVICE • NO ACCOUNT" etc.   */
  --text-inverse:     var(--c-white);
  --border:           var(--c-border);
  --divider:          var(--c-grey-line);  /* NEW                             */
  --button-primary:   var(--c-chartreuse); /* NEW role: the CTA pill fill     */
  --chip-selected:    var(--c-ink);
  --card-filters:     var(--c-orange-soft); /* NEW  "Easy Filters" card       */
  --card-prep:        var(--c-chartreuse-soft); /* NEW  "Prep Activity" card  */
  --card-capture:     var(--c-sky-soft);   /* NEW  "Capture the Action" card  */
  --accent:           var(--c-tomato);     /* NEW  warm accent (e.g. Feedback) */

  /* ── Type ──────────────────────────────────────────────── */
  --font-display: 'Caprasimo', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro',
               'Segoe UI', system-ui, Roboto, Helvetica, Arial, sans-serif;

  /* ── Layout ────────────────────────────────────────────── */
  --maxw: 1320px;
  --pad: 60px;
  --nav-h: 84px;      /* sticky nav height; the hero slots up underneath it */
  --radius-card: 24px;
  --radius-pill: 32px;
  --shadow-card: 0 1px 2px rgba(12,12,13,.05), 0 8px 24px rgba(12,12,13,.06);
  --shadow-note: 0 2px 2.5px rgba(0,0,0,.07);
}

/* ═══════════════════ Base ═══════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-heading);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; }

/* Small caps section eyebrow ("HOW IT WORKS", "FAQ") */
.eyebrow {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  letter-spacing: 1px;
  color: var(--text-primary);
}

/* ═══════════════════ Buttons ═══════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  color: var(--text-primary);
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--button-primary); }
.btn-secondary { background: var(--surface); border-color: var(--border); }
.btn-arrow { width: 19px; height: 19px; flex-shrink: 0; }

/* CTA that isn't live yet (kept for future; TestFlight is live) */
.btn[aria-disabled="true"] { cursor: default; opacity: .9; }
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: none; }

/* ═══════════════════ Nav ═══════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;   /* transparent at the top so shapes float past it */
  transition: background-color .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
/* opaque, blurred bar once the page is scrolled — keeps the CTA readable */
.site-header.scrolled {
  background: color-mix(in srgb, var(--background) 88%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  box-shadow: 0 1px 0 rgba(51,46,59,.06), 0 6px 20px rgba(51,46,59,.05);
}
.site-header > .container { width: 100%; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--text-primary);
}
.nav-right { display: flex; align-items: center; gap: 48px; }
.nav-links { display: flex; align-items: center; gap: 48px; }
.nav-links a {
  font-size: 16px;
  color: var(--text-primary);
  transition: opacity .15s ease;
}
.nav-links a:hover { opacity: .6; }
.nav-divider { width: 1px; height: 22px; background: var(--divider); }
.nav .btn { padding: 10px 24px; font-size: 15px; }
.nav-toggle { display: none; }

/* ═══════════════════ Hero ═══════════════════ */
/* The hero slots up under the sticky nav (negative margin) so the shape
   backdrop fills behind the transparent nav instead of stopping below it. */
.hero-region {
  position: relative;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
}
.hero { position: relative; z-index: 2; }
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 116px 0 104px;
}
.hero h1 {
  font-size: clamp(42px, 6.3vw, 84px);
  line-height: 1.02;
  color: var(--text-heading);
  max-width: 100%;
}
.hero .lede {
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-heading);
  max-width: 34ch;
  margin-top: 16px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 40px; }
.hero-note {
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--text-placeholder);
  text-transform: uppercase;
  margin-top: 36px;
}

/* Decorative background shapes — capped to the 1425-wide design frame and
   centred, so the composition holds on wide screens. */
.hero-shapes {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 1425px;
  z-index: 0;
  pointer-events: none;
}
.hero-shapes > svg { width: 100%; height: auto; display: block; overflow: visible; }
/* each shape floats around its own centre */
.hero-shapes .blob { transform-box: fill-box; transform-origin: center; will-change: transform; }

/* very calm, soft float — like the app's onboarding. Small values because
   the units are the SVG's own (1425-wide) user space. */
@keyframes floatA { 0%,100%{ transform: translate(0,0) rotate(0deg) } 50%{ transform: translate(0,-38px) rotate(4deg) } }
@keyframes floatB { 0%,100%{ transform: translate(0,0) rotate(0deg) } 50%{ transform: translate(30px,30px) rotate(-4deg) } }
@keyframes floatC { 0%,100%{ transform: translate(0,0) rotate(0deg) } 50%{ transform: translate(-32px,-26px) rotate(3.5deg) } }
.hero-shapes .b1 { animation: floatB 9s    ease-in-out infinite; }
.hero-shapes .b2 { animation: floatA 10.5s ease-in-out infinite; }
.hero-shapes .b3 { animation: floatC 11s   ease-in-out infinite; }
.hero-shapes .b4 { animation: floatA 9.5s  ease-in-out infinite; }
.hero-shapes .b5 { animation: floatB 11.5s ease-in-out infinite; }
.hero-shapes .b6 { animation: floatC 8.5s  ease-in-out infinite; }
.hero-shapes .b7 { animation: floatA 8s    ease-in-out infinite; }
.hero-shapes .b8 { animation: floatB 10s   ease-in-out infinite; }
.hero-shapes .b9 { animation: floatC 9.5s  ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .hero-shapes .blob { animation: none !important; } }

/* ═══════════════════ How it works ═══════════════════ */
.hiw { padding: 44px 0; scroll-margin-top: 100px; }
.hiw-panel {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.hiw-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}
.hiw-card {
  position: relative;
  border-radius: var(--radius-card);
  padding: 32px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  overflow: visible;   /* let card art (mascot / note bubbles) overflow the frame */
}
.hiw-card--filters { background: var(--card-filters); }
.hiw-card--prep    { background: var(--card-prep); }
/* Capture clips to the card so the note bubbles layer over the phone but
   never bleed outside the blue card. */
.hiw-card--capture { background: var(--card-capture); overflow: hidden; }
/* Card art is now the full Figma SVG export (filters, checklist+mascot,
   camera+notes). Fill the card's content width; height follows each SVG. */
.hiw-art {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.hiw-art > img { width: 100%; height: auto; display: block; }
/* Prep & Capture are inlined at runtime and reframed to their core (checklist /
   iPhone) so the mascot and note bubbles spill outside the frame, unclipped. */
.hiw-art-svg { width: 100%; height: auto; display: block; overflow: visible; }
.hiw-text { text-align: center; }
.hiw-text h3 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.hiw-text p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-heading);
}

/* ═══════════════════ FAQ ═══════════════════ */
.faq { padding: 44px 0; scroll-margin-top: 100px; }
.faq .eyebrow { display: block; margin-bottom: 32px; }
.faq-list { border-top: 0; }
.faq-item {
  border-bottom: 1px solid var(--divider);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  letter-spacing: 1px;
  color: var(--text-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-sign {
  flex-shrink: 0;
  width: 20px;
  transition: transform .25s ease;
  transform-origin: center;
  display: inline-block;
}
.faq-item[open] .faq-sign { transform: rotate(45deg); }
.faq-answer {
  padding: 0 0 24px 36px;
  max-width: 820px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-heading);
}
.faq-answer :where(strong) { color: var(--text-primary); }

/* ═══════════════════ Footer ═══════════════════ */
.site-footer { padding: 88px 0; }
.footer-inner {
  display: flex;
  align-items: center;              /* menu vertically centred against the brand block */
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
/* Grouped: title + tagline sit close; copyright is set apart below. */
.footer-brand { display: flex; flex-direction: column; gap: 8px; max-width: 344px; }
.footer-brand .display { font-size: 24px; color: var(--text-primary); }
.footer-brand p { font-size: 16px; line-height: 1.27; color: var(--text-primary); }
.footer-brand .footer-email { font-size: 15px; color: var(--text-primary); transition: opacity .15s ease; }
.footer-brand .footer-email:hover { text-decoration: underline; }
.footer-brand .copyright { font-size: 13.3px; color: var(--text-primary); margin-top: 16px; }
.footer-links { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.footer-links a { font-size: 16px; color: var(--text-primary); transition: opacity .15s ease; }
.footer-links a:hover { opacity: .6; }
/* Feedback: warm accent link to the feedback form */
.footer-links a.footer-feedback { color: var(--accent); font-weight: 700; }

/* ═══════════════════ Legal / article pages ═══════════════════ */
.page-head { padding: 96px 0 8px; }
.page-head h1 { font-size: clamp(40px, 6vw, 72px); color: var(--text-heading); line-height: 1.05; }
.page-head .meta { margin-top: 12px; color: var(--text-placeholder); font-size: 15px; letter-spacing: .3px; }
.article { max-width: 760px; padding-bottom: 96px; }
.article h2 { font-family: var(--font-display); font-size: 26px; color: var(--text-primary); margin: 44px 0 14px; letter-spacing: .4px; }
.article p, .article li { font-size: 17px; line-height: 1.7; color: var(--text-heading); }
.article p { margin-bottom: 14px; }
.article ul { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--text-primary); font-weight: 700; }
.tldr {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 26px 30px;
  margin: 10px 0 20px;
}
.tldr ul { margin: 0 0 0 20px; }
.tldr li { color: var(--text-primary); }

/* ═══════════════════ Responsive ═══════════════════ */
@media (max-width: 1024px) {
  :root { --pad: 40px; }
  .hiw-cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .hiw-panel { padding: 64px 40px; }
}
@media (max-width: 760px) {
  :root { --pad: 22px; --nav-h: 64px; }
  .nav-links { display: none; }
  .nav .nav-divider { display: none; }
  .nav .btn { padding: 9px 18px; font-size: 14px; }
  .brand { font-size: 24px; }
  .hero-inner { padding: 56px 0 72px; }
  /* On narrow screens the wide shape composition would only reach the top of
     a tall hero; switch it to a "cover" fit so shapes fill the whole section
     (sides are cropped instead of the composition being letter-boxed). */
  .hero-shapes { inset: 0; left: 0; transform: none; max-width: none; height: 100%; }
  .hero-shapes > svg { height: 100%; }
  .hero-cta { gap: 12px; }
  .hero-cta .btn { width: 100%; }
  .hiw-panel { padding: 44px 20px; border-radius: 20px; }
  .footer-inner { flex-direction: column; gap: 32px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: clamp(40px, 12vw, 52px); }
}
