/* ===========================================================
   WeKids landing — styles
   Brand palette (from SOCIAL_MEDIA_PLAYBOOK.md §3):
     primary green #3FA34D · deep green #1E5631 · soft sage #E8F1E4
     warm cream #FBF8F1 · charcoal #2B2B2B · accent peach #F2C49B
   Calm, warm, lots of negative space. The opposite of a loud kids' app.
   =========================================================== */

:root {
  --green: #3FA34D;
  --green-deep: #1E5631;
  --sage: #E8F1E4;
  --cream: #FBF8F1;
  --charcoal: #2B2B2B;
  --peach: #F2C49B;
  --white: #FFFFFF;

  --green-dark-hover: #348741;
  --charcoal-soft: #54574f;

  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 760px;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow: 0 14px 40px rgba(30, 86, 49, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-head); color: var(--green-deep); line-height: 1.15; letter-spacing: -0.01em; }

a { color: var(--green-deep); }

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

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-deep);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

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

/* ───────────────────────── Header ───────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(30, 86, 49, 0.07);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--green-deep);
}
.brand-sprout { font-size: 1.3rem; }
.header-cta {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.header-cta:hover { background: var(--green-dark-hover); transform: translateY(-1px); }

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  background:
    radial-gradient(1200px 520px at 50% -10%, var(--sage) 0%, rgba(232, 241, 228, 0) 70%),
    var(--cream);
  padding: 72px 0 84px;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 18px;
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  margin-bottom: 22px;
}
.sprout-dot { white-space: nowrap; }

.hero-promise {
  max-width: 600px;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: var(--charcoal-soft);
  margin-bottom: 38px;
}
.hero-promise strong { color: var(--green-deep); }

/* ───────────────────────── Waitlist form ───────────────────────── */
.waitlist { width: 100%; max-width: 520px; }

.waitlist-form {
  display: flex;
  gap: 10px;
  width: 100%;
}
.field { flex: 1 1 auto; text-align: left; }
.field-label {
  /* visually hidden but available to assistive tech & clickable focus */
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.field-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--charcoal);
  background: var(--white);
  border: 2px solid rgba(30, 86, 49, 0.18);
  border-radius: var(--radius-pill);
  padding: 15px 22px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field-input::placeholder { color: #9aa295; }
.field-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(63, 163, 77, 0.18);
}
.field-input[aria-invalid="true"] {
  border-color: #c0432e;
  box-shadow: 0 0 0 4px rgba(192, 67, 46, 0.14);
}

.btn-primary {
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  background: var(--green);
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px 26px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.btn-primary:hover { background: var(--green-dark-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: progress; transform: none; }

.form-status {
  margin-top: 16px;
  font-size: 0.98rem;
  font-weight: 600;
  min-height: 1.4em;
}
.form-status.is-error { color: #b23a23; }
.form-status.is-success { color: var(--green-deep); }

.waitlist-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--charcoal-soft);
}

/* Success state: hide the form, show confirmation */
.waitlist.is-done .waitlist-form,
.waitlist.is-done .waitlist-note { display: none; }
.waitlist.is-done .form-status {
  font-size: 1.15rem;
  background: var(--sage);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 0;
}

/* ───────────────────────── Content sections ───────────────────────── */
.section { padding: 64px 0; }
.section--sage { background: var(--sage); }
.section--cream { background: var(--white); }

.block { max-width: 620px; }
.kicker {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 12px;
}
.section h2 {
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  margin-bottom: 16px;
}
.section h2 em { font-style: italic; color: var(--green); }
.lead {
  font-size: clamp(1.02rem, 2.4vw, 1.16rem);
  color: var(--charcoal-soft);
}
.lead strong { color: var(--green-deep); }

.done-pill {
  display: inline-block;
  background: var(--white);
  color: var(--green-deep);
  font-weight: 700;
  font-size: 0.92em;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(63, 163, 77, 0.3);
  white-space: nowrap;
}
.section--sage .done-pill { background: var(--cream); }

/* ── Statement (anti-algorithm) ── */
.section--statement {
  background: var(--green-deep);
  text-align: center;
}
.statement {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.35;
  color: var(--cream);
  max-width: 680px;
  margin: 0 auto;
}
.statement-secondary {
  margin: 22px auto 0;
  max-width: 560px;
  font-size: clamp(0.98rem, 2.4vw, 1.1rem);
  color: var(--peach);
}

/* ── App links ── */
.section--apps { text-align: center; background: var(--cream); }
.apps-title {
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin-bottom: 10px;
}
.apps-platforms {
  font-size: 1.05rem;
  color: var(--charcoal-soft);
  margin-bottom: 28px;
}
.btn-secondary-cta {
  display: inline-block;
  text-decoration: none;
  padding: 15px 30px;
}

/* ───────────────────────── Footer ───────────────────────── */
.site-footer {
  background: var(--green-deep);
  color: var(--cream);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-brand { font-size: 0.98rem; }
.footer-brand strong { color: var(--white); }
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: var(--sage);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-tagline {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--peach);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 560px) {
  .hero { padding: 52px 0 64px; }
  .waitlist-form { flex-direction: column; }
  .btn-primary { width: 100%; padding: 15px 26px; }
  .header-cta { display: none; }
  .section { padding: 48px 0; }
}

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