/* KidSpin marketing site — vanilla CSS, no framework.
 * Tokens mirror lib/config/brand.dart's KidSpinBrand.colors so the
 * site reads as the same product as the app. */

:root {
  --cream:    #FBF3E2;
  --cream-2:  #F6EAD0;
  --ink:      #1B1A17;
  --ink-2:    #3A3833;
  --muted:    #7B7568;
  --gold:     #F5B643;
  --gold-2:   #E89B1F;
  --blue:     #3E8BFF;
  --blue-2:   #2E6FE0;
  --pink:     #FF5C8A;
  --green:    #3DC07A;
  --purple:   #8E5BFF;
  --orange:   #FF8A3D;
  --red:      #E5484D;
  --surface:  #FFFFFF;
  --border:   rgba(27,26,23,0.10);
  --shadow-sm: 0 2px 6px rgba(27,26,23,0.06);
  --shadow-md: 0 6px 18px rgba(27,26,23,0.10);
  --shadow-lg: 0 16px 40px rgba(27,26,23,0.14);
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --content-max: 1120px;
  --reading-max: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.05rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; font-weight: 700; }
h4 { font-size: 1.02rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* Layout */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}
.reading {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251,243,226,0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--ink);
  letter-spacing: -0.028em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-block;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  background: var(--gold);
}
.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.96rem;
}
.nav-links a:hover { color: var(--gold-2); text-decoration: none; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--cream) !important;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-cta:hover { background: var(--gold-2); text-decoration: none; }

/* Hero */
.hero {
  padding: 56px 0 24px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}
.eyebrow {
  display: inline-block;
  background: rgba(245,182,67,0.18);
  color: var(--gold-2);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero p.lede {
  font-size: 1.18rem;
  color: var(--ink-2);
  max-width: 56ch;
}
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: var(--gold-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-store {
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.btn-store small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.75;
  display: block;
  letter-spacing: 0.05em;
}
.btn-store strong { font-size: 1.05rem; }
.btn-store:hover { background: var(--gold-2); }

/* Hero phone frame around real screenshot */
.phone-shell {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 260px;
  padding: 12px 10px 10px;
  background: linear-gradient(155deg, #1a1a1f, #2c2c33);
  border-radius: 36px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.phone-shell::before {
  content: "";
  position: absolute;
  top: 20px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 20px;
  background: #0a0a0c;
  border-radius: 999px;
  z-index: 2;
}
.phone-shell img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4) inset;
}

/* Screenshots gallery — explicit responsive grid so it never collapses
 * by accident; mobile 1-col, tablet 2-col, desktop 4-col. */
.shots {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}
@media (min-width: 640px) {
  .shots { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (min-width: 980px) {
  .shots { grid-template-columns: repeat(4, 1fr); gap: 22px; }
}
.shot {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 14px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  min-width: 0;            /* prevents grid item from blocking shrink */
  overflow: hidden;
}
.shot img {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto 12px;
  display: block;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(27,26,23,0.10), 0 0 0 1px var(--border);
}
.shot h3 {
  margin: 4px 0;
  font-size: 1rem;
}
.shot p {
  color: var(--ink-2);
  font-size: 0.9rem;
  margin: 4px 0 0;
  line-height: 1.45;
}

/* Section blocks */
section { padding: 56px 0; }
section.tight { padding: 32px 0; }
section.alt { background: var(--cream-2); }
section.ink {
  background: var(--ink);
  color: var(--cream);
}
section.ink h2, section.ink h3 { color: var(--cream); }
section.ink p { color: rgba(251,243,226,0.86); }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}
.section-head p { color: var(--muted); }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.feature {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.feature-emoji {
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--cream-2);
  margin-bottom: 14px;
}
.feature h3 {
  margin-top: 0;
  font-size: 1.18rem;
}
.feature p {
  color: var(--ink-2);
  margin: 0;
}

/* Module list */
.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.module-chip {
  background: var(--surface);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.module-chip .em { font-size: 1.3rem; }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-table th, .compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.compare-table th { background: var(--cream-2); font-weight: 700; letter-spacing: -0.02em; }
.compare-table td.win { color: var(--green); font-weight: 700; }
.compare-table td.mid { color: var(--muted); }
.compare-table td.miss { color: var(--red); }

/* FAQ */
.faq details {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 1.2rem; color: var(--gold-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  max-width: 800px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.plan.featured {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  position: relative;
}
.plan.featured::before {
  content: "Best value";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.plan-price { font-size: 2.4rem; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.035em; }
.plan ul { padding-left: 18px; }
.plan li { margin: 6px 0; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.quote {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
}
.quote-text { font-size: 1.04rem; color: var(--ink-2); }
.quote-meta { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* Blog */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.post-card .post-cat {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-2);
  font-weight: 700;
}
.post-card h3 {
  font-size: 1.18rem;
  margin: 8px 0 10px;
  flex-grow: 0;
}
.post-card p {
  color: var(--ink-2);
  margin: 0 0 14px;
  flex-grow: 1;
}
.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Article (single blog post) */
.article {
  background: var(--surface);
  margin: 32px auto;
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: var(--reading-max);
}
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.article .post-meta { margin-bottom: 24px; }
.article h2 { border-top: 1px solid var(--border); padding-top: 1em; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article blockquote {
  border-left: 4px solid var(--gold);
  margin: 1.2em 0;
  padding: 8px 18px;
  background: var(--cream-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
}

/* Notice / callout */
.callout {
  background: var(--cream-2);
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.4em 0;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 48px 0 32px;
  margin-top: 64px;
}
.site-footer a { color: var(--cream); }
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--gold);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(251,243,226,0.18);
  padding-top: 22px;
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
  color: rgba(251,243,226,0.7);
}

/* Tables in policy pages */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.table th, .table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.table th { background: var(--cream-2); }

/* Mobile menu */
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* Print styles for privacy / terms */
@media print {
  .site-header, .site-footer, .nav-cta, .cta-row { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, a { transition: none; }
}
