/* ==========================================================================
   MesadaUp Landing Page - Design System & Themes (v2.0)
   Themes: Light (Default Parents), Dark (Executive Parents), Fun (Gamified Kids World)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Outfit:wght@500;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Common Brand Colors */
  --brand-primary: #3B82F6;
  --brand-primary-hover: #2563EB;
  --brand-secondary: #F59E0B;
  --brand-green: #10B981;
  --brand-pink: #FF85A2;
  --brand-yellow: #FFE45E;
  --brand-purple: #8B5CF6;
  --brand-cyan: #06B6D4;

  /* Font Families */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-fun: 'Fredoka', cursive, sans-serif;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;
}

/* ☀️ 1. LIGHT MODE (PAIS - PADRÃO DIURNO) */
[data-theme="light"] {
  --bg-main: #FDFBF7;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F3F4F6;
  --border-color: #E5E7EB;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --text-inverse: #FFFFFF;
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --accent-glow: rgba(59, 130, 246, 0.15);
  --badge-bg: #EFF6FF;
  --badge-text: #1D4ED8;
  --hero-gradient: linear-gradient(180deg, #F0F9FF 0%, #FDFBF7 100%);
  --button-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  --fun-hero-display: none;
  --normal-hero-display: block;
}

/* 🌙 2. DARK MODE (PAIS - PAINEL EXECUTIVO) */
[data-theme="dark"] {
  --bg-main: #0B0F19;
  --bg-surface: #1E293B;
  --bg-surface-subtle: #151D2A;
  --border-color: #334155;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-inverse: #0F172A;
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.1);
  --accent-glow: rgba(245, 158, 11, 0.2);
  --badge-bg: rgba(59, 130, 246, 0.2);
  --badge-text: #93C5FD;
  --hero-gradient: radial-gradient(circle at top, #1E293B 0%, #0B0F19 100%);
  --button-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  --fun-hero-display: none;
  --normal-hero-display: block;
}

/* 🚀 3. FUN MODE (MODO CRIANÇA/FAMÍLIA - TOTALMENTE TRANSFORMADO) */
[data-theme="fun"] {
  --font-heading: 'Fredoka', cursive, sans-serif;
  --bg-main: #FFFDF0;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #FEF9C3;
  --border-color: #1E1B4B;
  --text-main: #1E1B4B;
  --text-muted: #4338CA;
  --text-inverse: #FFFFFF;
  --card-shadow: 6px 6px 0px #1E1B4B;
  --accent-glow: rgba(255, 228, 94, 0.8);
  --badge-bg: #FFE45E;
  --badge-text: #1E1B4B;
  --hero-gradient: radial-gradient(circle at top left, #FFD6E8 0%, #FFFDF0 50%, #C7D2FE 100%);
  --button-shadow: 4px 4px 0 #1E1B4B;
  --fun-hero-display: block;
  --normal-hero-display: none;
}

/* --- RESET & GLOBAL STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: var(--transition-smooth);
  overflow-x: hidden;
}

[data-theme="fun"] body {
  font-family: var(--font-fun);
  background-image: radial-gradient(#FF85A2 1.5px, transparent 1.5px), radial-gradient(#4CC9F0 1.5px, #FFFDF0 1.5px);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- HEADER & NAVIGATION --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(253, 251, 247, 0.9);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

[data-theme="dark"] .site-header {
  background: rgba(11, 15, 25, 0.9);
}

[data-theme="fun"] .site-header {
  background: #FFE45E;
  border-bottom: 4px solid #1E1B4B;
  box-shadow: 0 4px 0 #1E1B4B;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
}

.brand-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.brand-logo img:hover {
  transform: scale(1.05) rotate(-2deg);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--brand-primary);
}

[data-theme="fun"] .nav-links a:hover {
  color: #FF85A2;
  text-decoration: underline;
}

/* --- THEME SWITCHER COMPONENT --- */
.theme-switcher-pill {
  display: flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--border-radius-full);
  gap: 4px;
}

[data-theme="fun"] .theme-switcher-pill {
  border: 3px solid #1E1B4B;
  box-shadow: 3px 3px 0 #1E1B4B;
  background: #FFFFFF;
}

.theme-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--border-radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.theme-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-theme="fun"] .theme-btn.active {
  background: #FF85A2;
  color: #FFFFFF;
  font-weight: 800;
  border: 2px solid #1E1B4B;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--border-radius-full);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #FFFFFF;
  box-shadow: var(--button-shadow);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px);
}

.btn-fun {
  background: var(--brand-yellow);
  color: #1E1B4B;
  border: 3px solid #1E1B4B;
  box-shadow: 4px 4px 0 #1E1B4B;
}

.btn-fun:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #1E1B4B;
  background: #FACC15;
}

/* --- HERO SECTION --- */
.hero-section {
  background: var(--hero-gradient);
  padding: 4rem 1.5rem 6rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 6px 16px;
  border-radius: var(--border-radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  width: fit-content;
}

[data-theme="fun"] .badge-pill {
  border: 2px solid #1E1B4B;
  box-shadow: 3px 3px 0 #1E1B4B;
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  color: var(--text-main);
  font-weight: 800;
}

[data-theme="fun"] .hero-title {
  font-size: 3.5rem;
  color: #1E1B4B;
  text-shadow: 2px 2px 0 #FFE45E;
}

.hero-subhead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* PIPO MASCOT FLOATING BOX */
.pipo-hero-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--card-shadow);
  max-width: 480px;
  position: relative;
}

[data-theme="fun"] .pipo-hero-box {
  border: 3px solid #1E1B4B;
  box-shadow: 6px 6px 0 #1E1B4B;
  background: #FFFFFF;
  animation: float 3s ease-in-out infinite;
}

.pipo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.pipo-speech {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ALIGNMENT FIXED: CHECKMARK BADGES BELOW PIPO */
.hero-checkmarks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.checkmark-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 6px 14px;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--border-color);
}

[data-theme="fun"] .checkmark-badge {
  border: 2px solid #1E1B4B;
  box-shadow: 2px 2px 0 #1E1B4B;
  background: #FFF;
  color: #1E1B4B;
}

/* --- INTERACTIVE PHONE FRAME MOCKUP --- */
.phone-mockup-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 330px;
  height: 660px;
  background: #0F172A;
  border-radius: 44px;
  border: 10px solid #1E293B;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  padding: 12px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

[data-theme="fun"] .phone-frame {
  border-color: #1E1B4B;
  box-shadow: 8px 8px 0 #1E1B4B;
}

.phone-screen {
  background: var(--bg-main);
  height: 100%;
  border-radius: 32px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
}

.phone-toggle-bar {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 4px;
  border-radius: var(--border-radius-full);
}

.phone-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  color: var(--text-muted);
}

.phone-toggle-btn.active {
  background: var(--brand-primary);
  color: white;
}

/* --- SECTION GENERAL STYLES --- */
.section-padding {
  padding: 5rem 1.5rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* --- 6 CARDS PLAYGROUND GRID --- */
.playground-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.card-interactive {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

[data-theme="fun"] .card-interactive {
  border: 3px solid #1E1B4B;
  box-shadow: 6px 6px 0 #1E1B4B;
}

.card-interactive:hover {
  transform: translateY(-5px);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-md);
  background: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

/* --- WHY EARLY EDUCATION MATTERS SECTION --- */
.education-importance-box {
  max-width: 1200px;
  margin: 4rem auto 0 auto;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #BFDBFE;
  border-radius: var(--border-radius-lg);
  padding: 3rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

[data-theme="dark"] .education-importance-box {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-color: #334155;
}

[data-theme="fun"] .education-importance-box {
  background: #FFE45E;
  border: 3px solid #1E1B4B;
  box-shadow: 8px 8px 0 #1E1B4B;
}

/* --- PARENT INSIGHTS SECTION --- */
.insights-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.insight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

[data-theme="fun"] .insight-card {
  border: 3px solid #1E1B4B;
  box-shadow: 6px 6px 0 #1E1B4B;
}

/* --- AGE RANGE SLIDER SECTION --- */
.age-slider-box {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
}

[data-theme="fun"] .age-slider-box {
  border: 3px solid #1E1B4B;
  box-shadow: 6px 6px 0 #1E1B4B;
}

.range-input {
  width: 100%;
  height: 12px;
  background: var(--bg-surface-subtle);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  accent-color: var(--brand-primary);
  margin: 1.5rem 0;
}

/* --- PRICING SECTION (FREE VS PREMIUM) --- */
.pricing-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.pricing-card.featured {
  border: 2px solid var(--brand-primary);
}

[data-theme="fun"] .pricing-card.featured {
  border: 3px solid #1E1B4B;
  background: #FFFBEB;
  box-shadow: 8px 8px 0 #1E1B4B;
}

.price-tag {
  font-size: 2.75rem;
  font-weight: 900;
  font-family: var(--font-heading);
  margin: 1rem 0;
}

.price-tag span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- ANIMATIONS --- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .pipo-hero-box {
    margin: 0 auto;
  }

  .hero-checkmarks-grid {
    justify-content: center;
  }

  .education-importance-box {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
