/* KinKudos marketing site — one stylesheet, no build step, no external requests.
   Palette mirrors apps/mobile/src/theme in the kidsrewards repo: emerald primary
   (growth/go), amber reserved for Kudos/stars, violet for rewards, coral for
   deductions. Light and dark are both first-class. */

:root {
  --green-800: #0a5c3b;
  --green-700: #0c7a4e;
  --green-600: #0f9d63;
  --green-500: #17b975;
  --amber-500: #f5a623;
  --amber-600: #de8f0a;
  --violet-500: #8f65ea;
  --coral-600: #e05252;

  --bg: #eef1ec;
  --bg-alt: #f4f9f5;
  --surface: #ffffff;
  --surface-tint: #ecfaf2;
  --border: #dde5df;
  --ink: #14251b;
  --ink-2: #4d6357;
  --ink-3: #7d8f85;
  --accent: var(--green-700);
  --accent-ink: #ffffff;
  --kudos: var(--amber-600);
  --shadow: 0 1px 2px rgb(20 37 27 / 6%), 0 8px 24px -12px rgb(20 37 27 / 18%);

  --radius: 18px;
  --radius-sm: 12px;
  --measure: 68ch;
  --gap: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f0d;
    --bg-alt: #131a17;
    --surface: #16211c;
    --surface-tint: #1a2a22;
    --border: #26332c;
    --ink: #e9f3ed;
    --ink-2: #a7bcb1;
    --ink-3: #7c9188;
    --accent: #34d17e;
    --accent-ink: #06120c;
    --kudos: #f7bb52;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -14px rgb(0 0 0 / 70%);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.15rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
p, li { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.wrap {
  width: min(100% - 2.5rem, 1080px);
  margin-inline: auto;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 66px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.15rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--accent); }

/* ------------------------------------------------------------------ hero */

.hero {
  padding: clamp(2.5rem, 1rem + 7vw, 5.5rem) 0 clamp(2rem, 1rem + 4vw, 3.5rem);
  background:
    radial-gradient(58rem 26rem at 12% -8%, var(--surface-tint), transparent 62%),
    radial-gradient(44rem 22rem at 96% 4%, color-mix(in srgb, var(--amber-500) 14%, transparent), transparent 60%);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface-tint);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.lede {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  color: var(--ink-2);
  max-width: 56ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }

.note { font-size: 0.9rem; color: var(--ink-3); margin-top: 0.9rem; }

/* --------------------------------------------------------------- section */

section { padding: clamp(2.25rem, 1.2rem + 4vw, 4rem) 0; }
section > .wrap > h2 { margin-bottom: 0.35rem; }
.section-lede { color: var(--ink-2); max-width: 60ch; margin-bottom: 2rem; }

.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

/* ----------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--ink-2); margin: 0; font-size: 0.97rem; }
.card p + p { margin-top: 0.6rem; }

.tile {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  border: 1px solid var(--border);
  margin-bottom: 0.9rem;
}

/* --------------------------------------------------------------- numbers */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--gap); }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem 1.3rem 4.1rem;
  position: relative;
  max-width: none;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.3rem;
  top: 1.25rem;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.95rem;
}
.steps h3 { margin-bottom: 0.2rem; }
.steps p { color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------------- faq */

.faq { display: grid; gap: 0.7rem; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1.15rem;
  box-shadow: var(--shadow);
}
details[open] { padding-bottom: 0.35rem; }
summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
}
details[open] > summary::after { content: "\2212"; }
details > :not(summary) { color: var(--ink-2); }
details > p:last-child { margin-bottom: 1rem; }

.faq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0;
  list-style: none;
}
.faq-nav a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-2);
}
.faq-nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------------ prose */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.25rem; font-size: 1.45rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--ink-3); font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; }

.callout {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

.updated { color: var(--ink-3); font-size: 0.9rem; }

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 2.5rem 0 3rem;
  margin-top: 2rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-left: auto; }
.site-footer a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.site-footer a:hover { color: var(--accent); }
.colophon { color: var(--ink-3); font-size: 0.88rem; margin: 1.5rem 0 0; max-width: var(--measure); }

.kudos { color: var(--kudos); font-weight: 700; }
