/* ==========================================================================
   Makondo Tutoring Services : Mathematics Online Tutoring
   Stylesheet
   ========================================================================== */

:root {
  --navy-900: #050f20;
  --navy-800: #0b1f3a;
  --navy-700: #123c6a;
  --navy-600: #17518f;
  --blue-400: #3d8bdd;

  --gold: #ffd166;
  --red: #e63946;
  --red-hover: #ff4d5a;
  --whatsapp: #25d366;

  --text: #eef4fc;
  --text-muted: #b3c4dc;
  --line: rgba(255, 255, 255, 0.12);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.1);

  --wrap: 1140px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);

  --font-display: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--navy-900);
  overflow-x: hidden;
}

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

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

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

p { margin: 0 0 1rem; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-900);
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  z-index: 2000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(230, 57, 70, 0.35);
}
.btn-primary:hover { background: var(--red-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.92rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 15, 32, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(5, 15, 32, 0.95);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--navy-600), var(--blue-400));
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 6px 16px rgba(29, 111, 208, 0.4);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; }
.brand-text small { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.03em; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.is-active { color: var(--gold); }
.nav .nav-cta { color: #fff; }
.nav .nav-cta.is-active { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(1000px 600px at 78% 12%, rgba(29, 111, 208, 0.45), transparent 62%),
    linear-gradient(150deg, var(--navy-800) 0%, var(--navy-700) 55%, var(--navy-800) 100%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 30% 40%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000, transparent 78%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(255, 209, 102, 0.45);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.1);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--gold), #ffe9a8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
  max-width: 34rem;
}

.hero-points {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.hero-points li {
  position: relative;
  padding-left: 2rem;
  font-size: 0.98rem;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 20px;
  height: 12px;
  border-left: 2.5px solid var(--gold);
  border-bottom: 2.5px solid var(--gold);
  transform: rotate(-45deg) scale(0.8);
  transform-origin: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.hero-contact a { color: var(--text-muted); }
.hero-contact a:hover { color: var(--gold); }
.hero-contact .dot { opacity: 0.5; }

/* Tutor photo */
.hero-media { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.photo-frame {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-600), var(--navy-800));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The source photo is a tall portrait (866x1600). Anchoring to the top keeps
     the head fully in frame; anchoring lower crops the top of the head. */
  object-position: 50% 0%;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.32);
  letter-spacing: 0.05em;
}
.photo-fallback[hidden] { display: none; }

.photo-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.1rem;
}
.photo-caption strong { font-family: var(--font-display); font-size: 1.1rem; }
.photo-caption span { font-size: 0.85rem; color: var(--text-muted); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); }

.section-eyebrow {
  margin: 0 0 0.4rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-lede {
  max-width: 46rem;
  color: var(--text-muted);
  font-size: 1.03rem;
  margin-bottom: 2.5rem;
}

.note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 209, 102, 0.09);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.note strong { color: var(--text); }

/* ==========================================================================
   Cards
   ========================================================================== */

.cards { display: grid; gap: 1.5rem; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }

.card,
.service,
.bank {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.card:hover,
.service:hover,
.bank:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.24);
}

.card h3,
.service h3,
.bank h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.card p,
.service p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 13px;
  background: rgba(255, 209, 102, 0.14);
  color: var(--gold);
}
.card-icon svg { width: 24px; height: 24px; }

/* ==========================================================================
   Steps
   ========================================================================== */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.steps li {
  position: relative;
  padding: 1.6rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps h3 { font-size: 1.08rem; margin-bottom: 0.35rem; }
.steps p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }

.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-900);
  font-family: var(--font-display);
  font-weight: 800;
}

/* ==========================================================================
   Payment
   ========================================================================== */

.bank dl { margin: 0; }
.bank dt {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1rem;
}
.bank dd {
  margin: 0.25rem 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: #fff;
}
.acct { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }

.copy-btn {
  min-height: 36px;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.copy-btn:hover { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }

/* ==========================================================================
   Register / form
   ========================================================================== */

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-list a { font-size: 1.02rem; font-weight: 600; word-break: break-word; }

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.field label span { color: var(--red-hover); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.97rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(179, 196, 220, 0.5); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.4);
}

.field select option { background: var(--navy-800); color: var(--text); }

.hp { position: absolute; left: -9999px; }

.form-note {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #030a15;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.85rem; }
.footer-brand strong { font-family: var(--font-display); font-size: 1.1rem; }
.footer-brand p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

.footer-contact { display: grid; gap: 0.35rem; font-size: 0.93rem; }
.footer-contact a { color: var(--text-muted); }
.footer-contact a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  padding-bottom: 1.5rem;
}
.footer-bottom p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* ==========================================================================
   Floating WhatsApp button + toast
   ========================================================================== */

.whatsapp-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-fab:hover {
  transform: scale(1.05);
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.4);
}
.whatsapp-fab svg { width: 22px; height: 22px; flex: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 1500;
  transform: translate(-50%, 20px);
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

/* Progressive enhancement: content is visible by default. Only once the inline
   head script confirms JavaScript is running do we hide it for the animation,
   so a blocked or failed script can never leave the page blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

/* The brand name is long, so switch to the hamburger while there is still
   comfortable room for it on one line alongside the nav. */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.25rem 1.75rem;
    background: rgba(5, 15, 32, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    /* visibility + pointer-events keep the closed menu out of the keyboard tab
       order and unclickable, even if the transform is not applied. */
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s ease, visibility 0s;
  }
  .nav a {
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.02rem;
  }
  .nav .nav-cta {
    margin-top: 1.1rem;
    border-bottom: 0;
    text-align: center;
    padding: 0.85rem 1.5rem;
  }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .photo-frame { width: min(100%, 300px); }

  .register-grid { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .hero-actions .btn { flex: 1 1 100%; }
  .whatsapp-fab span { display: none; }
  .whatsapp-fab { padding: 0.85rem; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
