/* GlowJar website.
   Palette and type follow the apps (packages/ui/src/tokens.ts, docs/product/visual-design-system.md):
   parent = navy + gold, kids = purple + pink + teal, Fraunces for display, DM Sans for text.
   One memorable thing per page: on the home page it's the jar you can fill. Everything else stays quiet. */

@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces_600SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces_400Regular_Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/DMSans_400Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/DMSans_500Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/DMSans_700Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Parent app */
  --navy-deep: #080e1f;
  --navy: #0f1b3d;
  --navy-card: #162650;
  --navy-border: #1e3366;
  --text: #f5f5f0;
  --text-2: #a9b6d3;
  --text-3: #7d8cb0;
  --gold: #f5a623;
  --gold-bright: #ffd700;
  --gold-dim: rgba(245, 166, 35, 0.08);
  --gold-border: rgba(245, 166, 35, 0.25);
  --gold-glow: rgba(245, 166, 35, 0.35);
  /* Kids app */
  --purple: #2d1b69;
  --purple-card: #3d2680;
  --purple-border: #4e35a0;
  --lavender: #b8a9e0;
  --pink: #e84393;
  --teal: #00cec9;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radius by hierarchy: controls < rows < panels */
  --r-control: 999px;
  --r-row: 14px;
  --r-panel: 28px;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-bright); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }

/* ── Header ───────────────────────────────────────────── */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; background: none; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 760px) { .nav .nav-hide { display: none; } .nav { gap: 18px; } }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-control);
  border: 1px solid var(--gold-border);
  background: transparent;
  color: var(--gold);
  font-weight: 700; font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.pill--solid { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.pill--solid:hover { background: var(--gold-bright); color: var(--navy); }
.pill--teal { border-color: rgba(0, 206, 201, 0.45); color: var(--teal); }
.pill--teal:hover { background: rgba(0, 206, 201, 0.1); color: var(--teal); }

/* ── Hero: the jar ────────────────────────────────────── */
.hero {
  background:
    radial-gradient(48% 60% at 74% 52%, rgba(245, 166, 35, 0.13), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: calc(76px + clamp(24px, 5vw, 56px)) 0 clamp(72px, 10vw, 128px);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(44px, 6vw, 80px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 28px; }
.hero .lede { font-size: clamp(18px, 1.7vw, 21px); color: #cbd3e6; max-width: 31em; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.soon { color: var(--text-3); font-size: 15px; }

.jar-demo { display: grid; grid-template-columns: auto minmax(210px, 1fr); gap: 8px 24px; align-items: center; }
.jar-demo__stage { text-align: center; }
.jar-canvas { width: 240px; height: auto; aspect-ratio: 300 / 380; display: block; margin: 0 auto; }
.jar-count { margin: 4px 0 0; color: var(--text-2); font-size: 16px; }
.jar-count strong { font-family: var(--font-display); font-weight: 600; font-size: 34px; color: var(--gold); margin-right: 4px; font-variant-numeric: tabular-nums; }

.quests { min-width: 0; }
.quests__title { font-family: var(--font-display); font-size: 22px; margin: 0 0 12px; }
.quests__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quest {
  width: 100%;
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px;
  border-radius: var(--r-row);
  background: rgba(22, 38, 80, 0.7);
  border: 1px solid var(--navy-border);
  text-align: left; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.quest:hover { border-color: var(--gold-border); }
.quest__check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-3); position: relative; transition: background 0.2s, border-color 0.2s; }
.quest__name { font-weight: 500; font-size: 15.5px; }
.quest__sparks { font-weight: 700; font-size: 14px; color: var(--gold); background: var(--gold-dim); border: 1px solid var(--gold-border); border-radius: var(--r-control); padding: 2px 10px; }
.quest.is-done { background: rgba(245, 166, 35, 0.07); border-color: var(--gold-border); cursor: default; }
.quest.is-done .quest__name { color: var(--text-2); text-decoration: line-through; text-decoration-color: rgba(169, 182, 211, 0.5); }
.quest.is-done .quest__check { background: var(--gold); border-color: var(--gold); }
.quest.is-done .quest__check::after { content: ""; position: absolute; left: 6px; top: 3px; width: 6px; height: 10px; border: solid var(--navy); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.quests__hint { color: var(--text-3); font-size: 14px; margin: 12px 0 0; }
.quests__reset { margin-top: 10px; background: none; border: 0; padding: 0; color: var(--gold); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .jar-demo { max-width: 560px; }
}
@media (max-width: 560px) {
  .jar-demo { grid-template-columns: 1fr; }
  .jar-canvas { width: 220px; }
}

/* ── Bands ────────────────────────────────────────────── */
.band { padding: clamp(72px, 10vw, 128px) 0; }
.band__title { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 18px; max-width: 16em; }
.band__intro { color: var(--text-2); font-size: 19px; max-width: 36em; margin-bottom: 0; }

/* How it works: a path the spark travels along. */
.path { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; counter-reset: step; position: relative; }
.path::before { content: ""; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px; background: linear-gradient(90deg, rgba(245, 166, 35, 0.15), var(--gold) 60%, var(--gold-bright)); }
.path li { position: relative; counter-increment: step; }
.path li::before {
  content: counter(step);
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy-deep); border: 2px solid var(--gold);
  color: var(--gold); font-family: var(--font-display); font-weight: 600; font-size: 19px;
  margin-bottom: 20px;
}
.path li:last-child::before { background: var(--gold); color: var(--navy); box-shadow: 0 0 28px var(--gold-glow); }
.path h3 { font-family: var(--font-body); font-weight: 700; font-size: 18px; margin-bottom: 6px; letter-spacing: 0; }
.path p { color: var(--text-2); font-size: 15.5px; margin: 0; }
.tagline { margin: 72px 0 0; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(26px, 3.4vw, 40px); color: var(--gold); line-height: 1.25; }
@media (max-width: 900px) {
  .path { grid-template-columns: 1fr; gap: 26px; }
  .path::before { left: 21px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; background: linear-gradient(180deg, rgba(245, 166, 35, 0.15), var(--gold)); }
  .path li { padding-left: 66px; min-height: 44px; }
  .path li::before { position: absolute; left: 0; top: 0; margin: 0; }
}

/* Two apps, each in its own palette. */
.band--apps { background: var(--navy); }
.apps { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.app { border-radius: var(--r-panel); overflow: hidden; display: flex; flex-direction: column; }
.app--parent { background: linear-gradient(170deg, var(--navy-card), #0d1838); border: 1px solid var(--navy-border); }
.app--kids { background: linear-gradient(170deg, #432a8f, var(--purple)); border: 1px solid var(--purple-border); }
.app__text { padding: clamp(26px, 4vw, 44px) clamp(26px, 4vw, 44px) 0; }
.app h3 { font-size: clamp(32px, 3.6vw, 44px); margin-bottom: 6px; }
.app__sub { color: var(--text-2); font-weight: 500; margin-bottom: 22px; }
.app--kids .app__sub { color: var(--lavender); }
.app ul { margin: 0 0 32px; padding: 0; list-style: none; display: grid; gap: 10px; }
.app li { padding-left: 24px; position: relative; color: #dbe1ef; }
.app li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.app--kids li { color: #ece6fc; }
.app--kids li:nth-child(odd)::before { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.app--kids li:nth-child(even)::before { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.app__shots { margin-top: auto; display: flex; justify-content: center; align-items: flex-start; gap: 16px; padding: 0 24px; height: 380px; overflow: hidden; }
.phone { margin: 0; width: 230px; flex: 0 1 230px; border-radius: 34px 34px 0 0; padding: 8px 8px 0; background: #04060d; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.phone img { border-radius: 27px 27px 0 0; width: 100%; height: auto; }
.app--kids .phone:nth-child(2) { margin-top: 40px; }
@media (max-width: 900px) { .apps { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .app__shots { height: 320px; padding: 0 16px; } .phone { width: 190px; } }

/* Power-Up Zone, in the kids palette. */
.band--calm { background: linear-gradient(180deg, var(--navy-deep), #1a1048 30%, #1a1048 70%, var(--navy-deep)); }
.calm { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.exercises { margin: 36px 0 0; display: grid; gap: 0; }
.exercises div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid rgba(78, 53, 160, 0.6); }
.exercises div:last-child { border-bottom: 1px solid rgba(78, 53, 160, 0.6); }
.exercises dt { font-weight: 700; }
.exercises dd { margin: 0; color: var(--lavender); }
@media (max-width: 560px) { .exercises div { grid-template-columns: 1fr; gap: 2px; } }

.breath { display: grid; justify-items: center; gap: 22px; }
.breath__square {
  width: min(260px, 70vw); aspect-ratio: 1;
  border: 2px solid rgba(0, 206, 201, 0.4);
  border-radius: 22px;
  position: relative;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(0, 206, 201, 0.12), transparent 70%);
}
.breath__secs { font-family: var(--font-display); font-size: 64px; color: var(--text); font-variant-numeric: tabular-nums; }
.breath__dot {
  position: absolute; left: -9px; top: calc(100% - 9px);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 18px var(--teal), 0 0 4px #fff;
}
.breath.is-running .breath__dot { animation: box-path 16s linear infinite; }
@keyframes box-path {
  0% { left: -9px; top: calc(100% - 9px); }
  25% { left: -9px; top: -9px; }
  50% { left: calc(100% - 9px); top: -9px; }
  75% { left: calc(100% - 9px); top: calc(100% - 9px); }
  100% { left: -9px; top: calc(100% - 9px); }
}
.breath__label { margin: 0; font-family: var(--font-display); font-size: 26px; min-height: 1.3em; text-align: center; }
@media (max-width: 900px) { .calm { grid-template-columns: 1fr; } }

/* Parents: a definition list, two columns, no boxes. */
.details { margin: 48px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
.details div { padding: 22px 0; border-top: 1px solid var(--navy-border); }
.details dt { font-family: var(--font-display); font-size: 22px; margin-bottom: 6px; }
.details dd { margin: 0; color: var(--text-2); }
@media (max-width: 760px) { .details { grid-template-columns: 1fr; } }

/* Promise */
.band--promise { background: var(--navy); }
.promise { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 18px; }
.checks li { padding-left: 34px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 0.38em; width: 14px; height: 8px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
@media (max-width: 860px) { .promise { grid-template-columns: 1fr; } }

/* FAQ */
.faq { margin-top: 40px; max-width: 780px; }
.faq details { border-top: 1px solid var(--navy-border); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--navy-border); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 24px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin: 12px 0 0; max-width: 40em; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--navy-border); padding: 36px 0 44px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer--home { padding-top: clamp(56px, 8vw, 96px); }
.site-footer--home .wrap { display: block; }
.footer-cta { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; padding-bottom: 48px; margin-bottom: 28px; border-bottom: 1px solid var(--navy-border); }
.footer-cta__line { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 4vw, 48px); color: var(--text); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; }

/* ── Document pages (privacy, support) ────────────────── */
.doc { padding: calc(76px + clamp(40px, 6vw, 80px)) 0 96px; background: linear-gradient(180deg, var(--navy) 0, var(--navy-deep) 520px); }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(40px, 5.6vw, 62px); margin-bottom: 16px; }
.doc .lede { color: var(--text-2); font-size: 19px; max-width: 40em; }
.doc h2 { font-size: 30px; margin: 52px 0 14px; scroll-margin-top: 24px; }
.doc h3 { font-family: var(--font-body); font-weight: 700; font-size: 18px; margin: 28px 0 8px; letter-spacing: 0; }
.doc p, .doc li { color: #ccd4e6; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--navy-border); }
.doc th { color: var(--text); font-weight: 700; }
.doc td { color: #ccd4e6; }
.table-scroll { overflow-x: auto; }
.callout { background: var(--gold-dim); border: 1px solid var(--gold-border); border-radius: 20px; padding: 22px 24px; margin: 28px 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout h2 { font-size: 22px; margin: 0 0 10px; }
.draft-banner { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.4); color: #ffd2d2; border-radius: 14px; padding: 14px 18px; font-size: 15px; margin: 22px 0; }
.meta { color: var(--text-3); font-size: 14px; }
.toc { columns: 2; column-gap: 32px; padding-left: 20px; }
@media (max-width: 560px) { .toc { columns: 1; } }
.contact-card { background: var(--navy-card); border: 1px solid var(--navy-border); border-radius: 20px; padding: 24px; margin: 28px 0 12px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.contact-card p { margin: 0; }

/* Draft placeholders that must be filled before launch. */
mark.todo { background: rgba(239, 68, 68, 0.18); color: #ffd2d2; border: 1px dashed rgba(239, 68, 68, 0.6); border-radius: 4px; padding: 0 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
