/* ============================================
   AI Educate Kids — Main Stylesheet
   Design: Warm Modern Editorial
   ============================================ */

/* --- Google Fonts loaded in HTML head --- */

:root {
  --primary: #0D9488;
  --primary-dark: #0F766E;
  --primary-light: #CCFBF1;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --dark: #0F172A;
  --dark-mid: #1E293B;
  --gray-700: #334155;
  --gray-500: #64748B;
  --gray-400: #94A3B8;
  --gray-200: #E2E8F0;
  --gray-100: #F1F5F9;
  --light: #F8FAFC;
  --white: #FFFFFF;
  --red: #EF4444;
  --green: #10B981;
  --blue: #3B82F6;
  --purple: #8B5CF6;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow: 0 4px 16px rgba(15,23,42,0.08), 0 1px 3px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.12), 0 4px 12px rgba(15,23,42,0.06);
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  color: var(--gray-700);
  background: var(--light);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--dark);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1rem; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--dark);
  text-decoration: none;
}
.logo img { width: 36px; height: 36px; border-radius: 8px; }
.logo span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--dark);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; width: 100%; }
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -150px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease-out;
}
.hero-badge svg { width: 20px; height: 20px; }

.hero h1 {
  margin-bottom: 20px;
  animation: fadeInDown 0.6s ease-out 0.1s both;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 36px;
  animation: fadeInDown 0.6s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInDown 0.6s ease-out 0.3s both;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(13,148,136,0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13,148,136,0.35);
}
.btn-outline {
  background: var(--white);
  color: var(--dark);
  border: 2px solid var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}
.card-icon.teal { background: var(--primary-light); color: var(--primary); }
.card-icon.amber { background: var(--accent-light); color: var(--accent); }
.card-icon.blue { background: #DBEAFE; color: var(--blue); }
.card-icon.purple { background: #EDE9FE; color: var(--purple); }
.card-icon.green { background: #D1FAE5; color: var(--green); }
.card-icon.red { background: #FEE2E2; color: var(--red); }

.card h3 { margin-bottom: 10px; }
.card p { color: var(--gray-500); font-size: 0.95rem; margin-bottom: 16px; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}
.card-link:hover { gap: 10px; }
.card-link svg { width: 16px; height: 16px; transition: transform var(--transition); }
.card-link:hover svg { transform: translateX(4px); }

/* --- Grid layouts --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}
.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}
.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
  margin-top: 12px;
}
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-alt { background: var(--white); }

/* --- Feature Cards (homepage) --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }

/* --- Page Header --- */
.page-header {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(13,148,136,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.page-header h1 { margin-bottom: 16px; }
.page-header p { color: var(--gray-500); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 16px;
  justify-content: center;
}
.breadcrumbs a { color: var(--gray-500); }
.breadcrumbs a:hover { color: var(--primary); }

/* --- Age Tier Cards (Guides) --- */
.tier-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.tier-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.tier-header {
  padding: 28px 32px 20px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.tier-header h3 { color: var(--white); margin-bottom: 4px; font-size: 1.3rem; }
.tier-header .age-range { font-size: 0.9rem; opacity: 0.9; font-weight: 500; }
.tier-header::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.tier-k2 .tier-header { background: linear-gradient(135deg, #10B981, #059669); }
.tier-35 .tier-header { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.tier-68 .tier-header { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.tier-912 .tier-header { background: linear-gradient(135deg, #F59E0B, #D97706); }

.tier-body { padding: 24px 32px 32px; }
.tier-body h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-400); margin-bottom: 12px; }
.tier-body ul { list-style: none; margin-bottom: 20px; }
.tier-body li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  font-size: 0.95rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.tier-body li:last-child { border-bottom: none; }
.tier-body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* --- Prompt Library --- */
.prompt-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  justify-content: center;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.prompt-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  position: relative;
}
.prompt-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.prompt-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-age { background: var(--primary-light); color: var(--primary-dark); }
.tag-subject { background: var(--accent-light); color: #92400E; }

.prompt-card h4 { margin-bottom: 8px; font-size: 1.05rem; }
.prompt-card .prompt-text {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--dark-mid);
  margin-bottom: 12px;
  border-left: 3px solid var(--primary);
  line-height: 1.6;
}
.prompt-card .prompt-tip {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-style: italic;
}

.copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.copy-btn.copied { border-color: var(--green); color: var(--green); }

/* --- Safety Page --- */
.safety-item {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-200);
}
.safety-item:last-child { border-bottom: none; }
.safety-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.safety-content h3 { margin-bottom: 8px; }
.safety-content p { color: var(--gray-500); }

@media (max-width: 640px) {
  .safety-item { flex-direction: column; gap: 16px; }
}

/* --- Lesson Plans --- */
.lesson-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.lesson-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.lesson-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 28px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.85rem;
  color: var(--gray-500);
}
.lesson-meta span { display: flex; align-items: center; gap: 6px; }

.lesson-body { padding: 28px; }
.lesson-body h3 { margin-bottom: 12px; }
.lesson-body p { color: var(--gray-500); margin-bottom: 16px; }

.lesson-objectives {
  list-style: none;
  margin-bottom: 20px;
}
.lesson-objectives li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-size: 0.9rem;
  color: var(--gray-700);
}
.lesson-objectives li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* --- FAQ --- */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--white);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--primary-light); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--dark);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  gap: 16px;
}
.faq-question:hover { color: var(--primary); }
.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--gray-400);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--gray-500);
  line-height: 1.7;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 40px 0;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(13,148,136,0.2) 0%, transparent 60%);
  border-radius: 50%;
}
.cta-section h2 { color: var(--white); margin-bottom: 16px; position: relative; z-index: 1; }
.cta-section p { color: var(--gray-400); max-width: 500px; margin: 0 auto 32px; position: relative; z-index: 1; }

/* --- Footer --- */
.site-footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p { font-size: 0.9rem; margin-top: 12px; line-height: 1.6; }
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--gray-400); font-size: 0.9rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

/* --- Contact Form --- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--dark);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* --- Prose content pages (privacy, terms, about) --- */
.prose h2 { margin: 40px 0 16px; font-size: 1.5rem; }
.prose h3 { margin: 28px 0 12px; font-size: 1.2rem; }
.prose p { margin-bottom: 16px; color: var(--gray-700); }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose li { margin-bottom: 8px; color: var(--gray-700); }
.prose strong { color: var(--dark); }

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
}
.stat { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}

/* --- Animations --- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Misc --- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
