/* ============================
   EduScope — mobile-first styles
   ============================ */

:root {
  --bg: #f9f8f7;
  --surface: #ffffff;
  --surface-2: #f1f4f4;
  --border: #e3e2df;
  --text: #25252c;
  --text-dim: #55565f;
  --text-faint: #8a8b93;
  --accent: #328187;
  --accent-dark: #1f5c61;
  --accent-light: #5fc0ba;
  --gradient: linear-gradient(135deg, #5fc0ba 0%, #328187 55%, #115362 100%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px -20px rgba(17, 83, 98, 0.25);
  --header-h: 72px;
  --container: 1200px;
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.18;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: #16161b;
}

p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  min-height: 44px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(50,129,135,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(50,129,135,0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(50,129,135,0.06); }
.btn-light { background: #fff; color: var(--accent-dark); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(0,0,0,0.25); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(249,248,247,0.75);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(249,248,247,0.95);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: clamp(1rem, 3.6vw, 1.2rem); font-family: 'Poppins', sans-serif; min-width: 0; color: #16161b; }
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; }
.logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: 28px; }
.nav-desktop a { font-size: 0.95rem; color: var(--text-dim); font-weight: 600; transition: color .2s; }
.nav-desktop a:hover { color: var(--accent-dark); }

.nav-cta { display: none; }

.menu-toggle {
  width: 44px; height: 44px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
}
.menu-toggle span {
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  bottom: 0;
  background: rgba(249,248,247,0.98);
  backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  z-index: 99;
  overflow-y: auto;
  padding: 32px 24px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.mobile-nav a {
  display: block;
  padding: 14px 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #16161b;
  border-bottom: 1px solid var(--border);
}

body.nav-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 48px) 0 56px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -25%; right: -15%;
  width: 700px; height: 700px;
  max-width: 180vw;
  background: radial-gradient(circle, rgba(50,129,135,0.18) 0%, rgba(95,192,186,0.1) 45%, transparent 72%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 40px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(50,129,135,0.15);
}

.hero h1 {
  font-size: clamp(1.9rem, 6.5vw, 3.1rem);
  max-width: 18ch;
}
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  max-width: 52ch;
  margin: 18px 0 28px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  max-width: 320px;
}

.hero-points { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.hero-points li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 600; color: var(--text); }
.hero-points span {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(50,129,135,0.12);
  color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* Hero mock dashboard visual */
.hero-visual { display: flex; justify-content: center; }
.mock-window {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mock-topbar { display: flex; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-red { background: #f2635c; } .dot-yellow { background: #f2c33c; } .dot-green { background: #3cd67a; }
.mock-body { display: flex; }
.mock-sidebar { width: 56px; background: var(--surface-2); padding: 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.mock-pill { height: 10px; border-radius: 6px; background: var(--border); }
.mock-pill-active { background: var(--gradient); }
.mock-main { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.mock-card { background: var(--surface-2); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.mock-line { height: 8px; border-radius: 4px; background: var(--border); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-stat { background: var(--surface-2); border-radius: 10px; padding: 10px 8px; text-align: center; font-size: 0.68rem; color: var(--text-faint); font-weight: 600; }
.mock-stat span { display: block; font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 800; color: var(--accent-dark); }
.mock-chart { display: flex; align-items: flex-end; gap: 6px; height: 64px; background: var(--surface-2); border-radius: 10px; padding: 10px; }
.mock-chart span { flex: 1; background: var(--gradient); border-radius: 3px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); }
.section-sub { font-size: 1.03rem; }

.overview { padding-top: 8px; }
.overview-inner { text-align: center; max-width: 700px; margin: 0 auto; }
.overview-inner h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }

.grid { display: grid; gap: 18px; }

/* ---------- Feature cards ---------- */
.features-grid { grid-template-columns: 1fr; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(50,129,135,0.35); box-shadow: var(--shadow); }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(50,129,135,0.1);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.1rem; }
.card ul { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.card ul li {
  font-size: 0.9rem;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--gradient);
  padding: 56px 0;
  text-align: center;
}
.cta-inner h2 { color: #fff; font-size: clamp(1.5rem, 5vw, 2.1rem); }
.cta-inner p { color: rgba(255,255,255,0.9); max-width: 46ch; margin: 0 auto 28px; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 36px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.contact-info li { display: flex; flex-direction: column; gap: 2px; font-size: 0.95rem; }
.contact-info strong { color: var(--text-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-info a { color: var(--accent-dark); font-weight: 700; }
.contact-info a:hover { color: var(--accent); }

.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(50,129,135,0.15);
}
.form-note { min-height: 1.2em; font-size: 0.88rem; color: var(--accent-dark); margin: 0; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 36px; }
.footer-brand p { font-size: 0.9rem; margin-top: 12px; max-width: 32ch; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 0.92rem; color: var(--text-dim); padding: 5px 0; font-weight: 600; }
.footer-col a:hover { color: var(--accent-dark); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; text-align: center; }
.footer-bottom p { margin: 0; font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 18px; height: 18px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============================
   Breakpoints
   ============================ */

@media (min-width: 480px) {
  .hero-actions { flex-direction: row; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .cta-actions { flex-direction: row; justify-content: center; }
}

@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}

@media (min-width: 900px) {
  .nav-desktop { display: block; }
  .nav-cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none; }

  .features-grid { grid-template-columns: repeat(4, 1fr); }

  .hero-inner { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
}
