/* =========================================================================
   MLH Brand Design System
   New, hand-written stylesheet — not derived from the vendor theme.
   Loaded after main.css in base.html.

   1. Token override  — recolors/refonts every existing vendor utility class
      (bg-main-600, text-main-600, btn-main, section-heading, ...) across
      every page that shares base.html, with zero markup changes.
   2. New `mlh-*` components — bespoke markup for the rebuilt public shell
      (nav, footer) and homepage. Prefixed to guarantee no collision with
      the vendor file's classes.
   ========================================================================= */

/* ---------- 1. Brand tokens ---------- */
:root {
  /* Navy #1A2B4A — replaces vendor blue, drives .bg-main-*/.text-main-*/.btn-main */
  --main-h: 219;
  --main-s: 48%;
  --main-l: 20%;
  /* Gold #C9A24A — replaces vendor orange, drives .bg-main-two-*/.text-main-two-* */
  --main-two-h: 42;
  --main-two-s: 54%;
  --main-two-l: 54%;
  /* Off-white #F0EDE6 — replaces pure white for text/light sections/cards */
  --white: 42 25% 92%;

  --heading-font: "Playfair Display", Georgia, "Times New Roman", serif;
  --body-font: "Montserrat", Arial, Helvetica, sans-serif;

  /* Bespoke design-system tokens (not part of the vendor scale) */
  --mlh-navy: #1a2b4a;
  --mlh-navy-deep: #101c30;
  --mlh-gold: #c9a24a;
  --mlh-gold-deep: #b3893a;
  --mlh-cream: #f0ede6;
  --mlh-ink: #1c2733;
  --mlh-space-1: 0.5rem;
  --mlh-space-2: 1rem;
  --mlh-space-3: 1.5rem;
  --mlh-space-4: 2.5rem;
  --mlh-space-5: 4rem;
  --mlh-space-6: 7.5rem;
  --mlh-radius: 14px;
  --mlh-radius-pill: 999px;
  --mlh-shadow: 0 20px 45px -20px rgba(16, 28, 48, 0.35);
  --mlh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: var(--body-font);
}

h1, h2, h3, h4, h5, h6,
.mlh-font-display {
  font-family: var(--heading-font);
}

/* ---------- Reduced motion (brief §7 requirement) ---------- */
@media (prefers-reduced-motion: reduce) {
  .mlh-preloader,
  .mlh-reveal,
  .mlh-divider,
  .mlh-stat,
  .mlh-tutor-card,
  .mlh-subject-card,
  [data-aos] {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .mlh-preloader { display: none !important; }
}

/* ---------- Buttons ---------- */
.mlh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.9rem 1.75rem;
  border-radius: var(--mlh-radius-pill);
  border: 1.5px solid transparent;
  transition: background-color 150ms var(--mlh-ease), color 150ms var(--mlh-ease),
    border-color 150ms var(--mlh-ease), transform 150ms var(--mlh-ease);
  text-decoration: none;
}
.mlh-btn i { transition: transform 150ms var(--mlh-ease); }

.mlh-btn--primary {
  background: var(--mlh-gold);
  color: var(--mlh-navy-deep);
}
.mlh-btn--primary:hover {
  background: var(--mlh-gold-deep);
  color: var(--mlh-navy-deep);
}
.mlh-btn--primary:hover i { transform: translateX(4px); }

.mlh-btn--outline {
  background: transparent;
  border-color: var(--mlh-gold);
  color: var(--mlh-gold);
}
.mlh-btn--outline:hover {
  background: var(--mlh-gold);
  color: var(--mlh-navy-deep);
}

.mlh-btn--outline-light {
  background: transparent;
  border-color: rgba(240, 237, 230, 0.6);
  color: var(--mlh-cream);
}
.mlh-btn--outline-light:hover {
  background: var(--mlh-cream);
  color: var(--mlh-navy-deep);
  border-color: var(--mlh-cream);
}

/* ---------- Nav ----------
   Solid navy on every page (simplest, safe default across ~70 templates).
   The homepage hero sits directly below it; `.mlh-nav--scrolled` just
   tightens padding + adds a shadow once the page scrolls. */
.mlh-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mlh-navy);
  padding: 1.1rem 0;
  transition: padding 250ms var(--mlh-ease), box-shadow 250ms var(--mlh-ease);
}
.mlh-nav--scrolled {
  padding: 0.75rem 0;
  box-shadow: 0 8px 24px -12px rgba(10, 16, 28, 0.5);
}
.mlh-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.mlh-logo img { display: block; height: 34px; width: auto; }
.mlh-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mlh-nav__link {
  font-family: var(--body-font);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--mlh-cream);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 150ms var(--mlh-ease), color 150ms var(--mlh-ease);
}
.mlh-nav__link:hover,
.mlh-nav__link.active { opacity: 1; color: var(--mlh-gold); }
.mlh-nav__actions { display: flex; align-items: center; gap: 0.75rem; }

/* ---------- Gold divider (signature element: draws outward from centre) ---------- */
.mlh-divider {
  --w: 64px;
  display: block;
  height: 2px;
  width: var(--w);
  margin-inline: auto;
  background: var(--mlh-gold);
  transform: scaleX(0);
  transition: transform 300ms var(--mlh-ease);
}
.mlh-divider.is-visible { transform: scaleX(1); }
.mlh-divider--left { margin-inline: 0; }

/* ---------- Section scaffolding ---------- */
.mlh-section { padding-block: var(--mlh-space-6); }
.mlh-section--tight { padding-block: var(--mlh-space-5); }
.mlh-section--navy { background: var(--mlh-navy); }
.mlh-section--cream { background: var(--mlh-cream); }
.mlh-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--body-font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mlh-gold-deep);
}
.mlh-section__title {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  color: var(--mlh-navy);
  margin: 0.75rem 0 1rem;
}
/* Vendor main.css sets a direct (non-inherited) color on bare h1-h6 tags,
   which otherwise wins over color inherited from a dark section wrapper —
   every heading placed on navy needs its own explicit override like this. */
.mlh-section__title--on-dark { color: var(--mlh-cream); }
.mlh-section__lede--on-dark { color: rgba(240, 237, 230, 0.7); }
.mlh-section__eyebrow--on-dark { color: var(--mlh-gold); }
.mlh-section__lede {
  color: #5b6474;
  max-width: 42rem;
  margin-inline: auto;
}

/* ---------- Scroll reveal ----------
   Progressive enhancement: content is visible by default. JS "arms" an
   element (adds .mlh-armed) right before observing it, so a no-JS/slow-JS
   visitor — or a headless full-page screenshot taken before the observer
   fires — always sees real content instead of a stuck, invisible section. */
.mlh-reveal.mlh-armed {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--mlh-ease), transform 600ms var(--mlh-ease);
}
.mlh-reveal.mlh-armed.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Hero ---------- */
.mlh-hero {
  position: relative;
  background-color: var(--mlh-navy);
  background-image:
    linear-gradient(90deg, var(--mlh-navy-deep) 0%, rgba(16, 28, 48, 0.96) 32%, rgba(26, 43, 74, 0.72) 55%, rgba(26, 43, 74, 0.32) 78%, rgba(26, 43, 74, 0.12) 100%),
    url("../images/thumbs/banner-three-img1.png");
  background-size: cover, cover;
  background-position: center, right center;
  background-repeat: no-repeat, no-repeat;
  padding: 5.5rem 0;
  color: var(--mlh-cream);
  overflow: hidden;
}
.mlh-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--mlh-gold);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mlh-hero__title {
  font-family: var(--heading-font);
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
  line-height: 1.12;
  font-weight: 600;
  color: var(--mlh-cream);
  margin: 1.25rem 0 1.25rem;
  max-width: 22ch;
}
.mlh-hero__title em { font-style: normal; color: var(--mlh-gold); }
.mlh-hero__lede {
  font-size: 1.05rem;
  color: rgba(240, 237, 230, 0.78);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}
.mlh-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Cards: tutors ---------- */
.mlh-tutor-card {
  background: var(--mlh-cream);
  border: 1px solid rgba(26, 43, 74, 0.08);
  border-radius: var(--mlh-radius);
  padding: 1.75rem;
  text-align: center;
  height: 100%;
  transition: transform 200ms var(--mlh-ease), border-color 200ms var(--mlh-ease),
    box-shadow 200ms var(--mlh-ease);
}
.mlh-tutor-card:hover {
  transform: translateY(-5px);
  border-color: var(--mlh-gold);
  box-shadow: var(--mlh-shadow);
}
.mlh-tutor-card__avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
  margin-bottom: 1rem;
  border: 2px solid var(--mlh-gold);
}
.mlh-tutor-card__name {
  font-family: var(--heading-font);
  font-weight: 600;
  color: var(--mlh-navy);
  margin-bottom: 0.15rem;
}
.mlh-tutor-card__meta { font-size: 0.85rem; color: #6b7280; margin-bottom: 0.75rem; }
.mlh-tutor-card__rating { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin-bottom: 0.5rem; color: var(--mlh-gold-deep); font-size: 0.9rem; }
.mlh-tutor-card__price { font-weight: 700; color: var(--mlh-navy); margin-bottom: 1rem; }

/* ---------- Stats ---------- */
.mlh-stat { text-align: center; }
.mlh-stat__icon {
  width: 60px;
  height: 60px;
  margin-inline: auto;
  margin-bottom: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 162, 74, 0.12);
  color: var(--mlh-gold-deep);
  font-size: 1.5rem;
}
.mlh-stat__value {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
  color: var(--mlh-navy);
}
.mlh-stat__label { color: #6b7280; font-size: 0.9rem; }

/* ---------- Subjects ---------- */
.mlh-subject-card {
  display: block;
  text-align: center;
  padding: 2rem 1.25rem;
  border-radius: var(--mlh-radius);
  border: 1px solid rgba(26, 43, 74, 0.1);
  background: var(--mlh-cream);
  text-decoration: none;
  transition: transform 200ms var(--mlh-ease), border-color 200ms var(--mlh-ease);
  height: 100%;
}
.mlh-subject-card:hover { transform: translateY(-4px); border-color: var(--mlh-gold); }
.mlh-subject-card__icon {
  font-size: 2rem;
  color: var(--mlh-navy);
  margin-bottom: 0.85rem;
  transition: color 200ms var(--mlh-ease);
}
.mlh-subject-card:hover .mlh-subject-card__icon { color: var(--mlh-gold-deep); }
.mlh-subject-card__label {
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mlh-navy);
}

/* ---------- CTA banner ---------- */
.mlh-cta-banner {
  background: var(--mlh-navy);
  color: var(--mlh-cream);
  border-radius: var(--mlh-radius);
  padding: 3.5rem;
}
.mlh-cta-banner h2 { font-family: var(--heading-font); font-weight: 600; color: var(--mlh-cream); }
.mlh-cta-banner p { color: rgba(240, 237, 230, 0.75); }

/* ---------- Footer ---------- */
.mlh-footer { background: var(--mlh-navy-deep); color: rgba(240, 237, 230, 0.75); }
.mlh-footer a { color: inherit; text-decoration: none; }
.mlh-footer a:hover { color: var(--mlh-gold); }
.mlh-footer__title {
  font-family: var(--body-font);
  font-weight: 600;
  color: var(--mlh-cream);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.mlh-footer__desc { color: rgba(240, 237, 230, 0.6); }
.mlh-footer__social { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 1.75rem 0 0; }
.mlh-footer__social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(240, 237, 230, 0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  transition: border-color 150ms var(--mlh-ease), color 150ms var(--mlh-ease), background-color 150ms var(--mlh-ease);
}
.mlh-footer__social a:hover { border-color: var(--mlh-gold); background: rgba(201, 162, 74, 0.12); }
.mlh-footer__bottom { border-top: 1px solid rgba(240, 237, 230, 0.12); }
.mlh-footer input.form-control {
  background: rgba(240, 237, 230, 0.06);
  border-color: rgba(240, 237, 230, 0.2);
  color: var(--mlh-cream);
}
.mlh-footer input.form-control::placeholder { color: rgba(240, 237, 230, 0.45); }

/* ---------- Preloader (brief §7 page-load sequence) ---------- */
.mlh-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--mlh-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 400ms var(--mlh-ease);
}
.mlh-preloader.is-hidden { opacity: 0; pointer-events: none; }
.mlh-preloader__mark {
  text-align: center;
}
.mlh-preloader__logo {
  width: 64px;
  height: 64px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms var(--mlh-ease), transform 500ms var(--mlh-ease);
}
.mlh-preloader__mark.is-in .mlh-preloader__logo { opacity: 1; transform: translateY(0); }
.mlh-preloader__line {
  height: 1px;
  width: 0;
  background: var(--mlh-gold);
  margin: 1rem auto;
  transition: width 350ms var(--mlh-ease);
}
.mlh-preloader__mark.is-in .mlh-preloader__line { width: 120px; }
.mlh-preloader__word {
  font-family: var(--body-font);
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: var(--mlh-cream);
  opacity: 0;
  transition: opacity 400ms var(--mlh-ease);
}
.mlh-preloader__mark.is-word .mlh-preloader__word { opacity: 1; }

@media (max-width: 991.98px) {
  .mlh-cta-banner { padding: 2.5rem; text-align: center; }
  /* Below the fold width where hero text and photo would otherwise fight
     for the same narrow strip, favor a heavier, flatter wash so the photo
     reads as texture behind the text instead of competing with it. */
  .mlh-hero {
    background-image:
      linear-gradient(180deg, var(--mlh-navy-deep) 0%, rgba(16, 28, 48, 0.94) 55%, rgba(26, 43, 74, 0.88) 100%),
      url("../images/thumbs/banner-three-img1.png");
    background-position: center, center 20%;
  }
}
