:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  --navy: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --white: #ffffff;
  --green: #059669;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 50px rgba(37, 99, 235, 0.12);
  --header-h: 80px;
  --container: 1120px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: var(--white);
  border-color: var(--line);
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
}

.btn-lg {
  min-height: 48px;
  padding: 0.8rem 1.35rem;
}

.btn-light {
  background: var(--white);
  color: var(--primary);
}

.btn-light-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.navbar.scrolled {
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: var(--navy);
}

.logo-img {
  display: block;
  height: 56px;
  width: auto;
  object-fit: contain;
}

.dash-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 40;
}

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -10% -20% auto;
  height: 70%;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.12), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.1), transparent 42%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: center;
}

.dash {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
}

.dash-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-dots i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  margin-right: 4px;
}

.dash-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.stat-card,
.panel {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 0.85rem;
}

.stat-card {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--white);
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary); }
.stat-icon.purple { background: var(--purple); }
.stat-icon.green { background: var(--green); }

.stat-label,
.stat-value {
  margin: 0;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.stat-value {
  font-weight: 700;
  color: var(--navy);
}

.dash-body {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.panel h3 {
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chip {
  font-size: 0.7rem;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.bars li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
  margin-bottom: 0.45rem;
}

.bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: 99px;
}

.dash-side {
  display: grid;
  gap: 0.7rem;
}

.exam-list li,
.note-list li {
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
}

.exam-list li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.exam-date {
  background: var(--purple-soft);
  color: var(--purple);
  border-radius: 8px;
  padding: 0.15rem 0.4rem;
  font-weight: 600;
  font-size: 0.7rem;
  white-space: nowrap;
}

.hero-visual {
  position: relative;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.float-card i {
  color: var(--primary);
}

.float-card-a {
  top: -12px;
  right: 12px;
}

.float-card-b {
  bottom: 18px;
  left: -12px;
}

/* Strengths */
.strengths {
  padding: 1rem 0 3rem;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.strength-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.strength-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.strength-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 0.8rem;
}

/* Sections */
.section,
.hero,
.cta,
.legal {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-intro {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  padding: 1.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--purple-soft));
  color: var(--primary);
  margin-bottom: 0.9rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.portal-card {
  padding: 1.35rem;
  border-top: 4px solid var(--primary);
}

.portal-student { border-top-color: var(--primary); }
.portal-teacher { border-top-color: var(--purple); }
.portal-principal { border-top-color: #0ea5e9; }
.portal-admin { border-top-color: var(--navy); }

.portal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.portal-teacher .portal-badge { color: var(--purple); }
.portal-principal .portal-badge { color: #0284c7; }
.portal-admin .portal-badge { color: var(--navy); }

.benefits-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.benefit-list li {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.benefit-list i {
  color: var(--primary);
  margin-top: 0.25rem;
}

.illustration {
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.illu-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.illu-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.illu-line {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #dbeafe;
}

.illu-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--line);
}

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 90px;
  margin: 0.8rem 0;
}

.mini-chart span {
  flex: 1;
  background: linear-gradient(180deg, var(--primary), #93c5fd);
  border-radius: 8px 8px 4px 4px;
}

.illu-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.illu-pills span {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: none;
}

.step-card {
  padding: 1.5rem;
  position: relative;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.cta {
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  color: var(--white);
  padding: 4.5rem 0;
  text-align: center;
}

.cta h2,
.cta p {
  color: var(--white);
}

.cta p {
  max-width: 36rem;
  margin-inline: auto;
  opacity: 0.92;
}

.about-wrap {
  max-width: 46rem;
  text-align: center;
}

.about-wrap p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.contact-details li {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.contact-details i {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.contact-details span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-details p {
  margin: 0;
}

.contact-form {
  padding: 1.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--navy);
  background: var(--white);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: var(--primary);
}

.field-error {
  min-height: 1.1rem;
  color: #b91c1c;
  font-size: 0.82rem;
  margin: 0.25rem 0 0;
}

.form-status {
  margin: 0.8rem 0 0;
  font-weight: 500;
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: #b91c1c;
}

.footer {
  background: var(--navy);
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
}

.footer h3 {
  color: var(--white);
}

.logo-footer .logo-img {
  height: 88px;
  background: var(--white);
  border-radius: 12px;
  padding: 0.35rem 0.55rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  max-width: 22rem;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .btn,
  .feature-card {
    transition: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .benefits-grid,
  .contact-grid,
  .portal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .portal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .strength-grid,
  .feature-grid,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(320px, 86vw);
    height: calc(100vh - var(--header-h));
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 1.25rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(110%);
    transition: transform 0.25s ease;
    z-index: 50;
  }

  .nav-menu.open {
    transform: none;
  }

  .nav-links,
  .nav-actions {
    flex-direction: column;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .hero-grid,
  .benefits-grid,
  .contact-grid,
  .dash-body,
  .dash-stats {
    grid-template-columns: 1fr;
  }

  .float-card {
    display: none;
  }

  .hero {
    padding-top: 2rem;
  }
}

@media (max-width: 640px) {
  .strength-grid,
  .feature-grid,
  .portal-grid,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.25rem 0;
  }

  .stat-value {
    font-size: 1.05rem;
  }
}
