/* ============================================================
   NAEEM VIRTUAL ACADEMY — design tokens
   Palette sampled directly from the brand logo:
     --ink        #0B3444  deep teal-navy (primary dark)
     --indigo     #0E5A73  brand teal (secondary dark / gradients)
     --parchment  #F6EFE2  warm parchment (light bg)
     --gold       #A8583F  brand maroon, from the logo's "V" block (primary accent)
     --teal       #14798F  bright brand teal (secondary accent)
     --slate      #4F6B75  muted teal-grey (secondary text)
   Type: 'Fraunces' (display, academic/warm serif) + 'Inter' (body/UI)
   Signature: the "Orbit of Knowledge" — subject badges circling the
   real logo badge in the hero, echoing "every subject, every age".
   ============================================================ */

:root {
  /* Palette sampled from the Naeem's Virtual Academy logo:
     deep brand teal (badge ring / N + A blocks) and brand
     maroon (V block) as the accent. */
  --ink: #0b3444;
  --indigo: #0e5a73;
  --parchment: #f6efe2;
  --parchment-dim: #eee4d2;
  --gold: #a8583f;
  --gold-dim: #8a4531;
  --teal: #14798f;
  --slate: #4f6b75;
  --white: #fffdf8;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 14px;
  --max-w: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}

.eyebrow.on-dark {
  color: var(--gold);
}

p.lede {
  font-size: 1.1rem;
  color: var(--slate);
  max-width: 46ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(233, 180, 76, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(20, 33, 61, 0.25);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-ghost.on-dark {
  border-color: rgba(246, 239, 226, 0.35);
  color: var(--parchment);
}

.btn-ghost.on-dark:hover {
  border-color: var(--parchment);
}

/* ---------------- Nav ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 239, 226, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  height: 42px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.footer-brand .brand-mark {
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.94rem;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  background: radial-gradient(circle at 78% 18%, var(--indigo) 0%, var(--ink) 62%);
  color: var(--parchment);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  padding-top: 88px;
  padding-bottom: 96px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  color: var(--white);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero .lede {
  color: rgba(246, 239, 226, 0.78);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-trust {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(246, 239, 226, 0.6);
}

.hero-trust strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.3rem;
  display: block;
  font-weight: 600;
}

/* Orbit signature */
.orbit-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin: 0 auto;
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118px;
  height: 118px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 60px 14px rgba(168, 88, 63, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.orbit-core img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(246, 239, 226, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-ring.r1 {
  width: 250px;
  height: 250px;
  animation: spin 26s linear infinite;
}

.orbit-ring.r2 {
  width: 380px;
  height: 380px;
  animation: spin 40s linear infinite reverse;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.orbit-badge {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(30, 46, 90, 0.9);
  border: 1px solid rgba(233, 180, 76, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  animation: counterspin 26s linear infinite;
}

.r1 .orbit-badge {
  animation-duration: 26s;
}

.r2 .orbit-badge {
  animation-duration: 40s;
  animation-direction: reverse;
}

@keyframes counterspin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

.b1 {
  top: -27px;
  left: 50%;
  margin-left: -27px;
}
.b2 {
  top: 50%;
  right: -27px;
  margin-top: -27px;
}
.b3 {
  bottom: -27px;
  left: 50%;
  margin-left: -27px;
}
.b4 {
  top: 18%;
  left: -10px;
}
.b5 {
  bottom: 12%;
  right: -6px;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-ring,
  .orbit-badge {
    animation: none;
  }
}

/* ---------------- Stats ---------------- */
.stats-bar {
  background: var(--ink);
  color: var(--parchment);
  padding: 30px 0;
}

.stats-bar .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold);
  display: block;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(246, 239, 226, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------------- Section shared ---------------- */
.section {
  padding: 96px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head.left {
  margin-left: 0;
  text-align: left;
}

.section.alt {
  background: var(--white);
}

/* ---------------- App screenshot gallery ---------------- */
.app-section {
  background: var(--white);
}

.screen-gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 28px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
}

.screen-gallery::-webkit-scrollbar {
  height: 8px;
}

.screen-gallery::-webkit-scrollbar-thumb {
  background: rgba(20, 33, 61, 0.18);
  border-radius: 999px;
}

.screen-card {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  margin: 0;
}

.screen-card img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(20, 33, 61, 0.08);
  box-shadow: 0 14px 30px rgba(20, 33, 61, 0.12);
}

.screen-card figcaption {
  padding: 14px 4px 0;
}

.screen-card h3 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.screen-card p {
  font-size: 0.85rem;
  color: var(--slate);
  margin: 0;
}

.app-download-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.app-download-meta {
  font-size: 0.85rem;
  color: var(--slate);
}

/* ---------------- Programs ---------------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.program-card {
  background: var(--white);
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: var(--radius);
  padding: 30px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(20, 33, 61, 0.1);
}

.program-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--parchment-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.program-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.program-card p {
  color: var(--slate);
  font-size: 0.94rem;
  margin: 0;
}

.program-tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------------- Why us ---------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 48px;
}

.feature-item {
  display: flex;
  gap: 18px;
}

.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.feature-item h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.feature-item p {
  margin: 0;
  color: var(--slate);
  font-size: 0.93rem;
}

/* ---------------- How it works ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 6px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold-dim);
  opacity: 0.55;
  display: block;
  margin-bottom: 6px;
}

.step h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.step p {
  color: var(--slate);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------------- CTA / Contact ---------------- */
.contact-section {
  background: radial-gradient(circle at 15% 20%, var(--indigo) 0%, var(--ink) 65%);
  color: var(--parchment);
}

.connect-wrap {
  text-align: center;
  max-width: 560px;
}

.connect-wrap h2 {
  color: var(--white);
}

.connect-lede {
  color: rgba(246, 239, 226, 0.75);
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 34px 0;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: rgba(246, 239, 226, 0.08);
  border: 1px solid rgba(246, 239, 226, 0.18);
  color: var(--parchment);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.18s ease, background 0.18s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  background: rgba(246, 239, 226, 0.14);
}

.social-icon {
  font-size: 1.15rem;
}

.connect-empty {
  color: rgba(246, 239, 226, 0.6);
}

.connect-location {
  color: rgba(246, 239, 226, 0.6);
  font-size: 0.9rem;
  margin: 0;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gold);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(246, 239, 226, 0.22);
  background: rgba(20, 33, 61, 0.4);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(246, 239, 226, 0.4);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.page-note {
  color: var(--slate);
  font-size: 0.9rem;
}

.alert-error {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: rgba(168, 88, 63, 0.1);
  color: var(--gold-dim);
  border: 1px solid rgba(168, 88, 63, 0.3);
}

/* ---------------- Delete Account page ---------------- */
.delete-hero .wrap {
  padding-top: 64px;
  padding-bottom: 64px;
  display: block;
  text-align: center;
}

.delete-hero-wrap {
  max-width: 620px;
  margin: 0 auto;
}

.delete-hero h1 {
  color: var(--white);
}

.delete-hero .lede {
  color: rgba(246, 239, 226, 0.78);
  margin-left: auto;
  margin-right: auto;
}

.delete-content {
  max-width: 720px;
}

.delete-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 44px;
}

.delete-info-card {
  background: var(--parchment-dim);
  border-radius: var(--radius);
  padding: 20px;
}

.delete-info-card h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.delete-info-card p {
  font-size: 0.86rem;
  color: var(--slate);
  margin: 0;
}

.delete-form-card {
  background: var(--white);
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: var(--radius);
  padding: 32px;
}

.delete-form-card h2 {
  font-size: 1.3rem;
}

.delete-success {
  text-align: center;
}

.delete-form .field label {
  color: var(--ink);
}

.delete-form .field input,
.delete-form .field textarea {
  background: var(--parchment-dim);
  color: var(--ink);
  border: 1px solid rgba(20, 33, 61, 0.15);
}

.delete-form .field input::placeholder,
.delete-form .field textarea::placeholder {
  color: rgba(20, 33, 61, 0.35);
}

@media (max-width: 720px) {
  .delete-info-grid {
    grid-template-columns: 1fr;
  }

  .delete-form-card {
    padding: 22px;
  }
}

/* ---------------- Footer ---------------- */
footer {
  background: var(--ink);
  color: rgba(246, 239, 226, 0.6);
  padding: 40px 0;
  font-size: 0.85rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

footer .brand {
  color: var(--parchment);
  font-size: 1rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold);
}

/* ---------------- Responsive ---------------- */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-nav {
  padding-top: env(safe-area-inset-top);
}

@media (max-width: 920px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 48px;
    text-align: left;
  }

  .orbit-stage {
    max-width: 300px;
    margin: 12px auto 0;
  }

  .program-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar .wrap {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }

  .section {
    padding: 76px 0;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  body.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--parchment);
    flex-direction: column;
    padding: 20px 20px 28px;
    gap: 18px;
    border-bottom: 1px solid rgba(20, 33, 61, 0.08);
    z-index: 60;
  }

  .brand-mark {
    height: 34px;
  }

  .nav-cta {
    gap: 10px;
  }

  .nav-cta .btn {
    padding: 10px 16px;
    font-size: 0.82rem;
  }

  .section-head {
    margin-bottom: 40px;
  }

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

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

  .hero-trust {
    gap: 20px;
  }

  .stats-bar {
    padding: 22px 0;
  }

  .stat-num {
    font-size: 1.5rem;
  }
}

/* ---------------- Small phones & safe areas ---------------- */
@media (max-width: 480px) {
  .section {
    padding: 56px 0;
  }

  .hero .wrap {
    padding-top: 36px;
    padding-bottom: 48px;
    gap: 24px;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  h2 {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .hero-trust {
    gap: 14px 22px;
  }

  .hero-trust strong {
    font-size: 1.1rem;
  }

  .orbit-stage {
    max-width: 240px;
  }

  .stats-bar .wrap {
    gap: 14px;
  }

  .program-card,
  .admin-card {
    padding: 22px 18px;
  }

  .screen-card {
    width: 168px;
  }

  .app-download-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .social-links {
    flex-direction: column;
    align-items: stretch;
  }

  .social-link {
    justify-content: center;
  }

  form.signup-form,
  .admin-form {
    padding: 20px;
  }
}
