/* TaleLark.ai coming-soon and legal pages. Colors follow the kidstory frontend Tailwind "primary" (orange) palette. */
:root {
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;
  --primary-200: #fed7aa;
  --primary-500: #f97316;
  --primary-600: #ea580c;
  --primary-700: #c2410c;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: linear-gradient(to bottom, #ffffff, var(--primary-50));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Buttons */
.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s, box-shadow 0.3s;
  white-space: nowrap;
}
.btn-sm { padding: 0.5rem 1rem; }
.btn-primary { background: var(--primary-500); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }

/* Header */
.site-header { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 0.875rem; padding-bottom: 0.875rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand span { font-size: 1.5rem; font-weight: 700; color: var(--primary-500); }

/* Hero */
.hero { padding: 3.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--primary-100); color: var(--primary-700);
  font-weight: 600; font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.375rem 0.875rem; border-radius: 9999px; margin-bottom: 1.5rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-500); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.hero h1 { font-size: 2.25rem; line-height: 1.2; font-weight: 800; color: var(--gray-900); margin-bottom: 1.5rem; }
.lead { font-size: 1.375rem; line-height: 1.5; color: var(--gray-600); margin-bottom: 1rem; }
.lead strong { color: var(--gray-800); }
.sub { font-size: 1.0625rem; line-height: 1.6; color: var(--gray-600); margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.demo-card { position: relative; background: #f2f0eb; border: 1px solid var(--gray-200); border-radius: 0.75rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); overflow: hidden; }
.demo-card video { display: block; width: 100%; height: auto; }
.demo-toggle {
  position: absolute; right: 0.75rem; bottom: 0.75rem; width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(17, 24, 39, 0.6); color: #fff; font-size: 0.75rem; line-height: 1;
}
.demo-toggle:hover { background: rgba(17, 24, 39, 0.85); }
.demo-toggle:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }

/* Features */
.features { background: #fff; padding: 4rem 0; }
.features h2 { font-size: 1.875rem; font-weight: 700; text-align: center; margin-bottom: 3rem; }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.feature { background: var(--primary-50); border-radius: 0.5rem; padding: 1.75rem 1.5rem; text-align: center; }
.feature-num {
  width: 4rem; height: 4rem; border-radius: 50%; margin: 0 auto 1rem;
  background: var(--primary-100); color: var(--primary-600);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700;
}
.feature h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.feature p { color: var(--gray-600); line-height: 1.6; }

/* Sample words */
.samples { padding: 4rem 0; }
.samples h2 { font-size: 1.875rem; font-weight: 700; text-align: center; margin-bottom: 1rem; }
.section-lead { text-align: center; color: var(--gray-600); line-height: 1.6; max-width: 640px; margin: 0 auto 2rem; }
.word-chips { list-style: none; margin: 0 auto 2.5rem; padding: 0; max-width: 860px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.word-chips li {
  background: #fff; border: 1px solid var(--gray-200); color: var(--gray-700);
  border-radius: 9999px; padding: 0.375rem 0.875rem; font-weight: 600; font-size: 0.9375rem;
}
.word-chips li.on { background: var(--primary-100); border-color: var(--primary-200); color: var(--primary-700); }
.clip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.clip {
  margin: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: 0.75rem; overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
}
.clip video { display: block; width: 100%; height: auto; background: #f2f0eb; }
.clip figcaption { padding: 0.625rem 0.75rem; text-align: center; font-weight: 600; color: var(--gray-800); }
.cta-block {
  margin-top: 3.5rem; background: #fff; border: 1px solid var(--primary-200); border-radius: 1rem;
  padding: 2.5rem 1.5rem; text-align: center;
}
.cta-block h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.cta-block p { color: var(--gray-600); line-height: 1.6; max-width: 520px; margin: 0 auto 1.5rem; }
.link { color: var(--primary-600); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Footer */
.site-footer { background: var(--gray-800); color: #fff; padding: 2rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: 1rem; }
.footer-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.muted { color: var(--gray-400); line-height: 1.6; }
.footer-meta { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.footer-links a { color: var(--gray-300); text-decoration: none; font-size: 0.9375rem; line-height: 1.6; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* Legal pages (Privacy Policy, Terms of Service) */
.legal-container { max-width: 820px; }
.legal-hero { padding: 3rem 0 2.5rem; background: linear-gradient(to bottom, #fff, var(--primary-50)); }
.legal-hero h1 { margin-bottom: 1rem; }
.legal-meta { font-size: 0.9375rem; font-weight: 500; color: var(--gray-600); margin-bottom: 1.25rem; }
.legal-hero .sub { margin-bottom: 0; }
.legal-body { background: #fff; padding: 3rem 0 4rem; }
.legal-summary {
  background: var(--primary-50); border-left: 4px solid var(--primary-500);
  border-radius: 0.5rem; padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.legal-summary h2 { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.75rem; }
.legal-summary ul { margin: 0; padding-left: 1.25rem; }
.legal-summary li { color: var(--gray-700); line-height: 1.6; margin-bottom: 0.375rem; }
.legal-summary li:last-child { margin-bottom: 0; }
.legal-toc { border: 1px solid var(--gray-200); border-radius: 0.75rem; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
.legal-toc h2 {
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--primary-700); margin-bottom: 0.75rem;
}
.legal-toc ol { margin: 0; padding-left: 1.5rem; }
.legal-toc li { color: var(--gray-400); line-height: 1.5; margin-bottom: 0.375rem; break-inside: avoid; }
.legal-toc a { color: var(--gray-700); text-decoration: none; }
.legal-toc a:hover { color: var(--primary-600); text-decoration: underline; }
.legal { overflow-wrap: break-word; }
.legal h2 { font-size: 1.375rem; line-height: 1.3; font-weight: 700; color: var(--gray-900); margin: 2.75rem 0 1rem; scroll-margin-top: 1.5rem; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.0625rem; font-weight: 600; color: var(--gray-900); margin: 1.5rem 0 0.5rem; }
.legal p { color: var(--gray-700); line-height: 1.7; margin-bottom: 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal li { color: var(--gray-700); line-height: 1.7; margin-bottom: 0.5rem; }
.legal li::marker { color: var(--primary-500); }
.legal strong { color: var(--gray-900); font-weight: 600; }
.legal a, .legal-summary a { color: var(--primary-600); font-weight: 600; text-decoration: none; }
.legal a:hover, .legal-summary a:hover { text-decoration: underline; }
.legal .caps { text-transform: uppercase; font-size: 0.9375rem; }
.legal-contact { background: var(--primary-50); border-radius: 0.75rem; padding: 1.25rem 1.5rem; }
.legal-contact p:last-child { margin-bottom: 0; }

@media (min-width: 640px) {
  .brand img { width: 64px; height: 64px; }
  .brand span { font-size: 1.875rem; }
}
@media (min-width: 768px) {
  .hero { padding: 5rem 0 6rem; }
  .hero-grid { grid-template-columns: 5fr 7fr; gap: 3rem; }
  .hero h1 { font-size: 3rem; }
  .lead { font-size: 1.625rem; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .samples { padding: 5rem 0; }
  .clip-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .cta-block { padding: 3rem; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .footer-meta { align-items: flex-end; margin-left: auto; }
  .legal-hero { padding: 4rem 0 3rem; }
  .legal-hero h1 { font-size: 2.75rem; }
  .legal-body { padding: 4rem 0 5rem; }
  .legal-toc ol { columns: 2; column-gap: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  html { scroll-behavior: auto; }
}
