/* Kiko: Speak English for Kids — marketing site
   Palette mirrors src/constants/colors.ts so the site and the app match. */

:root {
  --brand: #ff8a1f;
  --brand-dark: #e0660a;
  --brand-light: #ffd3a3;

  --sky: #43b8f5;
  --sky-dark: #1f8fd1;
  --sky-light: #d7f1ff;

  --star: #ffc21a;
  --coin: #f7b32b;
  --success: #2ebf6b;
  --purple: #8c5cf6;
  --pink: #ff5fa2;
  --heart: #ff4d6d;

  --ink: #2b2350;
  --ink-soft: #655f8a;
  --ink-faint: #a19cbd;

  --cream: #fff6e9;
  --paper: #ffffff;
  --line: #efe7da;

  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 34px;
  --shadow: 0 10px 30px rgba(43, 35, 80, 0.08);
  --shadow-lg: 0 24px 60px rgba(43, 35, 80, 0.14);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.center { text-align: center; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 246, 233, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.95rem;
}

.nav a:hover { color: var(--brand-dark); text-decoration: none; }

@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
  .site-header .wrap { height: 64px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 5px 0 var(--brand-dark), 0 14px 26px rgba(224, 102, 10, 0.26);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

.btn:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--brand-dark), 0 18px 32px rgba(224, 102, 10, 0.3);
}

.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brand-dark); }

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--line), 0 12px 24px rgba(43, 35, 80, 0.08);
}

.btn-ghost:hover { color: var(--ink); box-shadow: 0 7px 0 var(--line), 0 16px 28px rgba(43, 35, 80, 0.1); }
.btn-ghost:active { box-shadow: 0 2px 0 var(--line); }

.btn-sm { padding: 10px 20px; font-size: 0.95rem; box-shadow: 0 4px 0 var(--brand-dark); }

/* Google Play badge, drawn rather than imported so nothing hotlinks Google. */
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px 12px 20px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease;
}

.play-badge:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }
.play-badge .play-badge-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.play-badge small { font-size: 0.68rem; opacity: 0.8; letter-spacing: 0.06em; text-transform: uppercase; }
.play-badge strong { font-family: 'Fredoka', sans-serif; font-size: 1.15rem; font-weight: 600; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 92px) 0 clamp(60px, 8vw, 110px);
  background:
    radial-gradient(1000px 520px at 12% -8%, #ffe6c7 0%, rgba(255, 230, 199, 0) 62%),
    radial-gradient(880px 480px at 92% 6%, var(--sky-light) 0%, rgba(215, 241, 255, 0) 60%);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .pill-row { justify-content: center; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--brand-dark);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--brand); }

.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); max-width: 30em; }
@media (max-width: 900px) { .lead { margin-inline: auto; } }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 22px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-soft);
}

/* ---------- Phone mockup ---------- */

.phone-stage { display: flex; justify-content: center; position: relative; }

.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #3a3168, #221c45);
  box-shadow: var(--shadow-lg);
}

.phone-screen {
  height: 100%;
  border-radius: 36px;
  background: linear-gradient(180deg, var(--sky-light), var(--cream) 48%);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.phone-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
}

.phone-topbar .spacer { margin-left: auto; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--paper);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  box-shadow: 0 2px 0 var(--line);
}

.word-card {
  background: var(--paper);
  border-radius: 28px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 6px 0 var(--line);
}

.word-card .emoji { font-size: 4.2rem; line-height: 1; display: block; }

.word-card .word {
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  margin-top: 8px;
  color: var(--ink);
}

.word-card .hint { font-size: 0.82rem; color: var(--ink-faint); font-weight: 800; margin: 0; }

.mic-row { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.mic {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 2.4rem;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 0 var(--brand-dark), 0 0 0 0 rgba(255, 138, 31, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 6px 0 var(--brand-dark), 0 0 0 0 rgba(255, 138, 31, 0.45); }
  70%  { box-shadow: 0 6px 0 var(--brand-dark), 0 0 0 26px rgba(255, 138, 31, 0); }
  100% { box-shadow: 0 6px 0 var(--brand-dark), 0 0 0 0 rgba(255, 138, 31, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .mic, .float { animation: none; }
}

.mic-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.float {
  position: absolute;
  background: var(--paper);
  border-radius: 18px;
  padding: 10px 16px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  animation: bob 4s ease-in-out infinite;
}

.float-1 { top: 12%; left: -4%; color: var(--success); }
.float-2 { bottom: 16%; right: -2%; color: var(--brand-dark); animation-delay: 1.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@media (max-width: 480px) { .float { display: none; } }

/* ---------- Sections ---------- */

section { padding: clamp(56px, 8vw, 96px) 0; }

.section-head { max-width: 40em; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head p { font-size: 1.05rem; }

.on-paper { background: var(--paper); }

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.on-paper .card { background: var(--cream); }

.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 0.97rem; }

.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  margin-bottom: 16px;
  background: var(--brand-light);
}

.b-sky { background: var(--sky-light); }
.b-star { background: #fff0c2; }
.b-green { background: #d7f7e4; }
.b-purple { background: #ebe2ff; }
.b-pink { background: #ffe1ee; }

/* Steps */

.steps { counter-reset: step; }

.step { position: relative; padding-top: 14px; }

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: 0 4px 0 var(--brand-dark);
}

/* Worlds */

.worlds {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 900px;
}

.worlds li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: 0 3px 0 var(--line);
}

.on-paper .worlds li { background: var(--cream); }

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}

.on-paper .stat { background: var(--cream); }

.stat .num {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
}

.stat .label { font-size: 0.92rem; font-weight: 800; color: var(--ink-soft); margin-top: 6px; }

/* Parents panel */

.parents {
  background: linear-gradient(140deg, #2f2760, #221c45);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-lg);
}

.parents h2 { color: #fff; }
.parents p { color: rgba(255, 255, 255, 0.76); }

.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.checklist .tick {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.parents-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (max-width: 820px) { .parents-grid { grid-template-columns: 1fr; } }

/* FAQ */

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 14px; }

details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 24px;
  box-shadow: var(--shadow);
}

.on-paper details { background: var(--cream); }

summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 30px 18px 0;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.06rem;
  position: relative;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--brand);
  line-height: 1;
}

details[open] summary::after { content: '–'; }
details p { margin: 0 0 18px; }

/* Final CTA */

.cta-band {
  background: linear-gradient(140deg, var(--brand), #ff6a3d);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.9); max-width: 34em; margin-inline: auto; }
.cta-band .btn-ghost { margin-top: 24px; color: var(--brand-dark); }
.cta-band .mascot { width: 110px; margin-bottom: 8px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
}

.footer-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.footer-grid .brand { margin-bottom: 8px; }
.footer-about { max-width: 26em; }
.footer-about p { font-size: 0.93rem; margin: 0; }

.footer-links { margin-left: auto; display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links h4 { font-size: 0.95rem; margin-bottom: 10px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--ink-soft); font-size: 0.93rem; font-weight: 700; }

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.87rem;
  color: var(--ink-faint);
  font-weight: 700;
}

/* ---------- Legal pages ---------- */

.legal-hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px);
  background: radial-gradient(900px 420px at 20% -20%, #ffe6c7 0%, rgba(255, 230, 199, 0) 60%);
}

.legal {
  max-width: 780px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow);
}

.legal h2 { font-size: 1.5rem; margin-top: 40px; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 1.1rem; margin-top: 24px; }
.legal ul { padding-left: 22px; color: var(--ink-soft); }
.legal li { margin-bottom: 8px; }
.legal .meta { font-weight: 800; color: var(--ink-faint); font-size: 0.9rem; }

.legal-toc {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 36px;
}

.legal-toc h3 { margin-top: 0; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.legal-toc li { color: var(--ink-soft); font-weight: 700; font-size: 0.93rem; }
@media (max-width: 560px) { .legal-toc ol { columns: 1; } }

.highlight {
  background: #d7f7e4;
  border-left: 5px solid var(--success);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 24px 0;
}

.highlight p { margin: 0; color: #14663a; font-weight: 700; }

.legal table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--ink); }
.legal td { color: var(--ink-soft); }

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--paper);
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
