/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4338CA;
  --primary-light: #EEF2FF;
  --accent: #0EA5E9;
  --accent-light: #E0F2FE;
  --green: #059669;
  --green-light: #ECFDF5;
  --amber: #D97706;
  --amber-light: #FFFBEB;
  --red: #DC2626;
  --red-light: #FEF2F2;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* ========== Navigation ========== */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* ========== Dropdown ========== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-btn:hover,
.nav-dropdown.active .nav-dropdown-btn {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-dropdown-btn.has-active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}

.nav-dropdown.active .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 0;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.nav-dropdown-menu a:last-child { border-bottom: none; }

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, #4338CA 0%, #0EA5E9 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner { max-width: 760px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 580px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  border: none;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }

.btn-white { background: var(--white); color: var(--primary); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }

.btn-primary { background: var(--primary); color: var(--white); }

/* ========== Page Hero (inner pages) ========== */
.page-hero {
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--white);
}

.page-hero-inner { max-width: 700px; margin: 0 auto; }

.page-hero .tag {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.25rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.05rem;
  opacity: 0.92;
}

.page-hero .visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--white);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}

.page-hero .visit-btn:hover {
  background: rgba(255,255,255,0.3);
  text-decoration: none;
}

/* ========== Main Content ========== */
.main { max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem; }

/* ========== Section ========== */
.section { margin-bottom: 3.5rem; }
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ========== Platform Cards (home) ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; flex-grow: 1; }

.card-footer {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
}

.badge-blue { background: var(--accent-light); color: #0369A1; }
.badge-green { background: var(--green-light); color: #065F46; }
.badge-purple { background: var(--primary-light); color: var(--primary); }
.badge-amber { background: var(--amber-light); color: #92400E; }

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ========== Info Box ========== */
.info-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.info-box p, .info-box li { font-size: 0.95rem; color: var(--text); line-height: 1.75; }
.info-box ul { padding-left: 1.5rem; }
.info-box li { margin-bottom: 0.5rem; }

/* ========== Opportunity / Challenge Grid ========== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.opps-box, .challenges-box {
  border-radius: var(--radius);
  padding: 1.75rem;
}

.opps-box {
  background: var(--green-light);
  border: 1px solid #A7F3D0;
}

.challenges-box {
  background: var(--amber-light);
  border: 1px solid #FDE68A;
}

.opps-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #065F46;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.challenges-box h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.opps-box ul, .challenges-box ul {
  list-style: none;
  padding: 0;
}

.opps-box li, .challenges-box li {
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.opps-box li:last-child, .challenges-box li:last-child { border-bottom: none; }

.opps-box li::before { content: "✓"; color: var(--green); font-weight: 700; flex-shrink: 0; }
.challenges-box li::before { content: "!"; color: var(--amber); font-weight: 700; flex-shrink: 0; }

/* ========== Screenshots ========== */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.screenshot-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.screenshot-frame img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.screenshot-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.6rem;
  background: var(--white);
}

/* ========== Who is it for ========== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.audience-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.audience-card .emoji { font-size: 2rem; margin-bottom: 0.5rem; }
.audience-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.35rem; }
.audience-card p { font-size: 0.82rem; color: var(--text-muted); }

/* ========== Reviews ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-stars { color: #F59E0B; font-size: 1rem; letter-spacing: 1px; }

.review-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
  flex-grow: 1;
  font-style: italic;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.review-author { font-size: 0.82rem; font-weight: 600; }
.review-source { font-size: 0.75rem; color: var(--text-muted); }

.review-coming {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ========== Steps ========== */
.steps { display: flex; flex-direction: column; gap: 1rem; }

.step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem; }
.step p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* ========== Stats Row (home) ========== */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.stat-card {
  flex: 0 0 180px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card .stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ========== Intro section ========== */
.intro-banner {
  background: var(--primary-light);
  border: 1px solid #C7D2FE;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.intro-banner .intro-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.intro-banner h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.intro-banner p { font-size: 0.93rem; color: var(--text); line-height: 1.7; }

/* ========== Footer ========== */
footer {
  background: var(--text);
  color: #94A3B8;
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
}

footer a { color: #CBD5E1; }
footer .footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
footer .footer-links a { font-size: 0.875rem; font-weight: 500; transition: color 0.15s; }
footer .footer-links a:hover { color: var(--white); text-decoration: none; }
footer p { font-size: 0.8rem; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-links a { padding: 0.35rem 0.5rem; font-size: 0.8rem; }
  .hero { padding: 3.5rem 1rem 3rem; }
  .two-col { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr 1fr; }
  .main { padding: 2rem 1rem; }
}

@media (max-width: 600px) {
  /* Nav — wrap links instead of hiding them */
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.6rem 1rem;
    gap: 0.4rem;
  }
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.2rem;
  }
  .nav-links a {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
  }

  /* Hero split layout (Schoolhouse, UpChieve) — stack vertically */
  .nav-inner > div[style*="flex:1"] { min-width: 100% !important; text-align: center !important; }

  /* Page hero */
  .page-hero { padding: 2.5rem 1rem 2rem; }
  .page-hero h1 { font-size: 1.75rem; }

  /* Home hero */
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero h1 { font-size: 1.75rem; }

  /* Stats */
  .stat-card { flex: 0 0 140px; }

  /* Steps */
  .step { flex-direction: column; gap: 0.75rem; }

  /* Footer links */
  footer .footer-links { gap: 0.75rem; }
  footer .footer-links a { font-size: 0.78rem; }

  /* Table — shrink to fit on mobile */
  table { font-size: 0.65rem; width: 100%; }
  table th, table td { padding: 0.4rem 0.4rem !important; }

  /* Intro banner */
  .intro-banner { flex-direction: column; }

  /* Chat window */
  .chat-window { height: 360px; }
}
