/* =====================================================
   MY SCHOOL ADMIN — DESIGN SYSTEM
   A shared CSS component library for all pages.
   ===================================================== */

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Brand Colors */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-50: #dbeafe;

  /* Accent */
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fffbeb;

  /* Semantic */
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --danger-light: #fef2f2;

  /* Neutrals */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  --border: #e2e8f0;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 100px;

  /* Radii */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
  --shadow-primary: 0 4px 14px rgba(37,99,235,0.35);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* ─── TYPOGRAPHY SCALE ─── */
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 22px; }
.text-2xl { font-size: 28px; }
.text-3xl { font-size: clamp(32px, 4.5vw, 48px); }
.text-4xl { font-size: clamp(40px, 7vw, 72px); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--primary); background: var(--primary-light); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.4); }
.btn-white { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ─── NAVIGATION ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-lg);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.nav-logo img { height: 32px; width: 32px; border-radius: 8px; }
.nav-logo span { color: var(--primary); }
.nav-menu { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-menu a { color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: color var(--transition); }
.nav-menu a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu { display: none; }

/* ─── SECTIONS ─── */
.section { padding: var(--space-4xl) var(--space-lg); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: var(--space-3xl); }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-md);
}
.section-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: var(--space-md);
  line-height: 1.15;
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── CARDS ─── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: all var(--transition-slow);
}
.card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(37,99,235,0.08);
  transform: translateY(-4px);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.card:hover::before { opacity: 1; }

/* ─── FEATURE CARDS ─── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(37,99,235,0.08);
  transform: translateY(-4px);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon.blue { background: var(--primary-light); color: var(--primary); }
.feature-icon.green { background: var(--success-light); color: var(--success); }
.feature-icon.amber { background: var(--accent-light); color: var(--accent); }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.feature-card p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

/* ─── PLATFORM CARDS ─── */
.platforms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.platform-card {
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--border);
  background: #fff;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
}
.platform-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.platform-card.admin { border-top: 4px solid var(--primary); }
.platform-card.teacher { border-top: 4px solid var(--accent); }
.platform-card.parent { border-top: 4px solid var(--success); }
.platform-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.platform-card.admin .platform-card-icon { background: var(--primary-light); }
.platform-card.teacher .platform-card-icon { background: var(--accent-light); }
.platform-card.parent .platform-card-icon { background: var(--success-light); }
.platform-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.platform-card .subtitle { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }
.platform-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; flex-grow: 1; }
.platform-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.platform-list li svg { flex-shrink: 0; }
.platform-card .btn { margin-top: auto; }

/* ─── STEPS ─── */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px; left: 15%; right: 15%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  position: relative;
  z-index: 1;
  border: 1px solid var(--border);
  transition: all var(--transition-slow);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 20px;
}
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* ─── PRICING ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all var(--transition-slow);
  position: relative;
  display: flex;
  flex-direction: column;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.popular { border-color: var(--primary); box-shadow: 0 8px 30px rgba(37,99,235,0.12); }
.price-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.price-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.price-amount { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.price-amount span { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.price-learners { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.price-features {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  font-size: 13px;
  color: var(--text-secondary);
}
.price-features li { display: flex; align-items: center; gap: 8px; }
.price-features li svg { flex-shrink: 0; color: var(--success); }
.price-card .btn { margin-top: 24px; }

/* ─── TESTIMONIALS ─── */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.testimonial-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition-slow);
}
.testimonial-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.testimonial-stars { display: flex; gap: 2px; margin-bottom: 16px; color: var(--accent); }
.testimonial-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}
.testimonial-name { font-size: 14px; font-weight: 600; }
.testimonial-role { font-size: 12px; color: var(--text-muted); }

/* ─── ABOUT ─── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-content h3 { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.about-content p { font-size: 16px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.value-item { display: flex; align-items: flex-start; gap: 12px; }
.value-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.value-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.value-item p { font-size: 13px; color: var(--text-muted); }

/* ─── HERO ─── */
.hero {
  padding: var(--space-4xl) var(--space-lg) 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--primary-light) 0%, #fff 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -15%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245,158,11,0.05) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}
.hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: var(--text);
}
.hero h1 .highlight { color: var(--primary); }
.hero-subtitle {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }

/* ─── STATS BAR ─── */
.stats-bar { background: var(--bg-dark); padding: 48px 24px; }
.stats-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-item { color: #fff; }
.stat-value { font-size: 36px; font-weight: 800; margin-bottom: 4px; }
.stat-value .accent { color: var(--accent); }
.stat-desc { font-size: 14px; color: var(--text-muted); }

/* ─── CTA SECTION ─── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  padding: var(--space-4xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.cta-section h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.cta-section p { font-size: 18px; color: rgba(255,255,255,0.8); margin-bottom: 36px; line-height: 1.7; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── FOOTER ─── */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 64px 24px 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand p { font-size: 14px; margin-top: 12px; line-height: 1.7; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 14px; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,0.6); margin-left: 16px; transition: color var(--transition); }
.footer-bottom a:hover { color: #fff; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition);
  background: var(--bg-alt);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.form-submit:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-primary); }

/* ─── PAGE HEADER ─── */
.page-header {
  background: linear-gradient(180deg, var(--primary-light) 0%, #fff 100%);
  padding: 80px 24px 60px;
  text-align: center;
}
.page-header h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 12px; }
.page-header p { font-size: 18px; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .platforms-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .mobile-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 12px;
    box-shadow: var(--shadow);
  }
  .mobile-menu.open a { display: block; padding: 10px 0; color: var(--text-secondary); font-size: 15px; font-weight: 500; }
  .hero { padding: 72px 24px 56px; }
  .hero h1 { letter-spacing: -1px; }
  .section { padding: 64px 24px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-values { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn-outline { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
}
