/* =========================================================================
   Ushindi Academy — Landing Page Styles
   Mobile-first. Patterns: scroll-triggered reveals, social-proof-heavy,
   flat illustration, photography-centric.
   ========================================================================= */

/* ---------- Reset / Normalize ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img {
  height: auto;
}

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

ul {
  list-style: none;
  padding: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Color palette */
  --primary-blue: #1e3a8a;
  --primary-blue-dark: #152a63;
  --primary-blue-light: #3b60c4;
  --accent-orange: #f97316;
  --accent-orange-dark: #ea640c;
  --neutral-gray: #6b7280;
  --neutral-dark: #1f2937;
  --neutral-light: #f3f4f6;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e5e7eb;

  /* Typography scale */
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 48px;

  /* Spacing rhythm */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 64px;

  /* Misc */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.15);
  --maxw: 1120px;
  --header-h: 68px;
}

/* ---------- Base ---------- */
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial,
    sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--neutral-gray);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
}

h1,
h2,
h3 {
  color: var(--neutral-dark);
  line-height: 1.2;
  font-weight: 800;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -60px;
  z-index: 200;
  background: var(--primary-blue);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--accent-orange);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================================
   Buttons (morphing hover/focus states)
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px var(--space-md);
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease, color 0.2s ease;
}

.btn--primary {
  background: var(--accent-orange);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--accent-orange-dark);
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  transform: scale(0.98);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.04);
}

.btn--block {
  width: 100%;
}

/* =========================================================================
   Header / Navigation
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 800;
  color: var(--primary-blue);
}

.brand__mark {
  display: inline-flex;
}

.brand__name {
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-toggle__bar {
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  background: var(--primary-blue);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.site-nav.open {
  max-height: 340px;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
}

.site-nav__list a {
  display: block;
  padding: 12px var(--space-xs);
  font-weight: 600;
  color: var(--neutral-dark);
  border-radius: var(--radius);
}

.site-nav__list a:hover {
  color: var(--primary-blue);
  background: var(--neutral-light);
}

.site-nav__cta {
  background: var(--accent-orange);
  color: #fff !important;
  text-align: center;
}

.site-nav__cta:hover {
  background: var(--accent-orange-dark) !important;
}

/* =========================================================================
   Hero (photography-centric + gradient overlay)
   ========================================================================= */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: var(--space-xl) 0;
  background-image: url("https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(21, 42, 99, 0.94) 0%,
    rgba(30, 58, 138, 0.82) 45%,
    rgba(30, 58, 138, 0.55) 100%
  );
}

.hero__content {
  position: relative;
  max-width: 760px;
}

.hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fdba74;
  margin-bottom: var(--space-sm);
}

.hero__title {
  color: #fff;
  font-size: clamp(2rem, 6vw, var(--text-3xl));
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  max-width: 54ch;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
}

.hero__badges li {
  display: flex;
  flex-direction: column;
}

.hero__badges strong {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.hero__badges span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

/* =========================================================================
   Generic section header
   ========================================================================= */
.section {
  padding: var(--space-xl) 0;
}

.section__header {
  max-width: 640px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-bottom: var(--space-xs);
}

.section__eyebrow--light {
  color: #fdba74;
}

.section__title {
  font-size: clamp(1.6rem, 4.5vw, var(--text-2xl));
  margin-bottom: var(--space-sm);
}

.section__title--light {
  color: #fff;
}

.section__lead {
  font-size: var(--text-lg);
  color: var(--neutral-gray);
}

/* =========================================================================
   Programs (flat illustration cards, CSS Grid)
   ========================================================================= */
.programs {
  background: var(--surface-alt);
}

.programs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.program-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.program-card__figure {
  width: 96px;
  height: 96px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-light);
  border-radius: 50%;
}

.illustration {
  width: 68px;
  height: 68px;
}

.program-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.program-card__text {
  margin-bottom: var(--space-sm);
}

.program-card__list {
  display: grid;
  gap: var(--space-xs);
}

.program-card__list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.95rem;
  color: var(--neutral-dark);
}

.program-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--accent-orange);
  border-bottom: 2.5px solid var(--accent-orange);
  transform: rotate(-45deg);
}

/* =========================================================================
   Social Proof (testimonials flexbox + stats)
   ========================================================================= */
.testimonials {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.testimonial {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.testimonial__stars {
  color: var(--accent-orange);
  letter-spacing: 2px;
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.testimonial__quote {
  color: var(--neutral-dark);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
}

.testimonial__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial__name {
  display: block;
  font-weight: 700;
  color: var(--neutral-dark);
}

.testimonial__role {
  display: block;
  font-size: 0.9rem;
  color: var(--neutral-gray);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin: 0;
  background: var(--primary-blue);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
}

.stat {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.stat__value {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.stat__label {
  order: 2;
  margin-top: var(--space-xs);
  font-size: 0.9rem;
  color: #c7d2fe;
}

/* =========================================================================
   Gallery (photography-centric, CSS Grid)
   ========================================================================= */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 3;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item:hover img {
  transform: scale(1.06);
}

/* =========================================================================
   Enrollment CTA + form
   ========================================================================= */
.enroll {
  background: linear-gradient(
    135deg,
    var(--primary-blue-dark),
    var(--primary-blue)
  );
  color: rgba(255, 255, 255, 0.92);
}

.enroll__inner {
  display: grid;
  gap: var(--space-lg);
}

.enroll__lead {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--space-md);
}

.enroll__points {
  display: grid;
  gap: var(--space-xs);
}

.enroll__points li {
  position: relative;
  padding-left: 28px;
  color: #fff;
}

.enroll__points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-orange);
  font-weight: 800;
}

.enroll__form {
  background: var(--surface);
  color: var(--neutral-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-lg);
}

.enroll__form-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.field {
  margin-bottom: var(--space-sm);
}

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

.field__optional {
  font-weight: 400;
  color: var(--neutral-gray);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px var(--space-sm);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.field textarea {
  resize: vertical;
}

.field input:invalid:not(:placeholder-shown),
.field select.invalid,
.field input.invalid {
  border-color: #dc2626;
}

.form-status {
  margin-top: var(--space-sm);
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 1.2em;
}

.form-status.is-success {
  color: #15803d;
}

.form-status.is-error {
  color: #dc2626;
}

.enroll__privacy {
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  color: var(--neutral-gray);
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--neutral-dark);
  color: #cbd5e1;
}

.site-footer__inner {
  display: grid;
  gap: var(--space-lg);
  padding-block: var(--space-xl);
}

.brand--footer {
  color: #fff;
}

.site-footer__tagline {
  margin-top: var(--space-sm);
  max-width: 40ch;
  font-size: 0.95rem;
}

.site-footer__heading {
  color: #fff;
  font-size: var(--text-base);
  margin-bottom: var(--space-sm);
}

.site-footer__contact a:hover {
  color: var(--accent-orange);
}

.social {
  display: flex;
  gap: var(--space-sm);
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.social a:hover {
  background: var(--accent-orange);
  transform: translateY(-3px);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: var(--space-md);
  font-size: 0.85rem;
  text-align: center;
}

/* =========================================================================
   Scroll-triggered reveal animations
   ========================================================================= */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Convenience utility classes */
.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.fade-in.animate-in {
  opacity: 1;
}

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================================
   Responsive — Tablet (>= 768px)
   ========================================================================= */
@media (min-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    padding: 0;
  }

  .site-nav__cta {
    padding: 10px var(--space-sm);
    border-radius: 999px;
  }

  .testimonials {
    flex-direction: row;
  }

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

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .enroll__inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .enroll__form {
    padding: var(--space-lg);
  }

  .site-footer__inner {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-xl);
  }
}

/* =========================================================================
   Responsive — Desktop (>= 1024px)
   ========================================================================= */
@media (min-width: 1024px) {
  :root {
    --header-h: 76px;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .programs__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section__header {
    margin-bottom: var(--space-xl);
  }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@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;
  }

  [data-animate],
  .fade-in,
  .slide-up {
    opacity: 1;
    transform: none;
  }
}
