/* Kaylord (Pty) Ltd — kaylord.org
   Brand: monochrome (black / white / light-grey / mid-grey).
   Mobile-first. Optimised for Limpopo data budgets.
*/

:root {
  --black: #0A0A0A;
  --light-grey: #F9F9F9;
  --mid-grey: #666666;
  --line: #E6E6E6;
  --white: #FFFFFF;

  --font-body: Verdana, Geneva, Tahoma, Arial, sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(48px, 8vw, 96px);

  --radius: 4px;
  --shadow: 0 1px 0 var(--line);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--black); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* skip link for keyboard users */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--black); color: var(--white);
  padding: 12px 16px; z-index: 100;
}
.skip:focus { left: 16px; top: 16px; }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

/* nav */
.nav {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--max); margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand img {
  height: 56px; width: auto; display: block;
}
@media (max-width: 600px) {
  .brand img { height: 44px; }
}
/* The logo image already contains the KAYLORD wordmark + tagline,
   so we hide the redundant text span visually but keep it for
   screen readers. */
.brand-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-links { display: none; gap: 18px; }
.nav-links a { text-decoration: none; color: var(--black); font-size: 15px; }
.nav-links a:hover { text-decoration: underline; }
.nav-links a[aria-current="page"] { font-weight: bold; }
.menu-btn {
  background: none; border: 1px solid var(--black); padding: 8px 12px;
  font-family: var(--font-body); font-size: 14px; cursor: pointer;
}
@media (min-width: 920px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}

#mobile-menu { display: none; border-bottom: 1px solid var(--line); }
#mobile-menu.open { display: block; }
#mobile-menu a {
  display: block; padding: 14px var(--gutter);
  border-top: 1px solid var(--line); text-decoration: none; color: var(--black);
}
@media (min-width: 920px) { #mobile-menu { display: none !important; } }

/* hero */
.hero { padding: var(--section-y) 0 calc(var(--section-y) - 16px); }
.hero-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 56px; }
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 12px; color: var(--mid-grey); margin-bottom: 16px;
}

h1 {
  font-size: clamp(36px, 6.5vw, 64px);
  line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 18px;
  font-weight: 900;
}
h2 {
  font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15;
  margin: 0 0 24px; font-weight: 800; letter-spacing: -0.01em;
}
h3 { font-size: 18px; margin: 0 0 8px; font-weight: 700; }
p  { margin: 0 0 14px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--mid-grey); margin-bottom: 28px; }

.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--light-grey);
}

/* eligibility strip */
.eligibility {
  border: 2px solid var(--black); padding: 20px 22px; margin: 28px 0 24px;
  background: var(--white);
}
.eligibility-title {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px;
  font-weight: bold; margin-bottom: 10px;
}
.eligibility ul { margin: 0; padding-left: 20px; }
.eligibility li { margin: 4px 0; }

/* anti-scam — most important sentence on the page */
.anti-scam {
  background: var(--black); color: var(--white);
  padding: 22px 22px;
  margin: 0 0 28px;
}
.anti-scam strong { display: block; font-size: 18px; margin-bottom: 6px; letter-spacing: 0.01em; }
.anti-scam p { margin: 0; font-size: 15px; line-height: 1.5; }
.anti-scam a { color: var(--white); text-decoration: underline; font-weight: bold; }

/* CTAs */
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }

.btn {
  display: inline-block; padding: 14px 22px;
  font-family: var(--font-body); font-size: 16px; font-weight: bold;
  text-decoration: none; border-radius: 0; cursor: pointer;
  transition: transform 0.05s ease;
}
.btn-primary { background: var(--black); color: var(--white); border: 2px solid var(--black); }
.btn-primary:hover { background: #000; }
.btn-secondary { background: transparent; color: var(--black); border: 2px solid var(--black); }
.btn-secondary:hover { background: var(--black); color: var(--white); }

/* stage cards */
.stages {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
  counter-reset: stage;
}
@media (min-width: 700px) { .stages { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stages { grid-template-columns: repeat(4, 1fr); } }
.stage {
  border: 1px solid var(--line); padding: 24px;
  position: relative; counter-increment: stage;
}
.stage::before {
  content: counter(stage, decimal-leading-zero);
  display: block;
  font-size: 28px; font-weight: 900;
  margin-bottom: 12px; color: var(--black);
  letter-spacing: -0.02em;
}
.stage h3 { margin-bottom: 8px; }
.stage p  { color: var(--mid-grey); font-size: 15px; margin: 0; }

/* benefits */
.benefits { display: grid; gap: 0; grid-template-columns: 1fr; }
@media (min-width: 800px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
.benefit {
  display: grid; gap: 14px; grid-template-columns: 56px 1fr;
  padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.benefit:last-child { border-bottom: 0; }
.benefit-icon {
  width: 44px; height: 44px;
  border: 2px solid var(--black);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
}
.benefit h3 { margin-bottom: 4px; }
.benefit p  { margin: 0; color: var(--mid-grey); font-size: 15px; }

/* districts */
.districts {
  display: grid; gap: 18px; grid-template-columns: 1fr;
}
@media (min-width: 700px) { .districts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .districts { grid-template-columns: repeat(5, 1fr); } }
.district {
  border: 1px solid var(--line); padding: 18px;
}
.district h3 { margin-bottom: 6px; font-size: 16px; }
.district p  { margin: 0; color: var(--mid-grey); font-size: 14px; }

/* faq */
.faq details {
  border-top: 1px solid var(--line); padding: 18px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  font-weight: bold; font-size: 17px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: bold; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin-top: 12px; color: var(--mid-grey); }

/* audience routing */
.routing { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .routing { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .routing { grid-template-columns: repeat(4, 1fr); } }
.route {
  border: 2px solid var(--black); padding: 24px;
  text-decoration: none; color: var(--black);
  display: flex; flex-direction: column; gap: 6px;
  transition: background 0.1s ease, color 0.1s ease;
}
.route:hover { background: var(--black); color: var(--white); }
.route h3 { margin: 0; font-size: 18px; }
.route p { margin: 0; color: inherit; opacity: 0.8; font-size: 14px; }
.route span { margin-top: 10px; font-size: 14px; font-weight: bold; }

/* photos */
figure { margin: 0; }
figure img { width: 100%; }
figcaption { font-size: 13px; color: var(--mid-grey); margin-top: 8px; }

/* full-width banner photo (between sections) */
.wide-photo {
  margin: 0; padding: 0;
}
.wide-photo img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 16 / 9; object-fit: cover; background: var(--light-grey);
}
.wide-photo figcaption {
  max-width: var(--max);
  margin: 12px auto 0;
  padding: 0 var(--gutter);
}

/* Photo treatment — applied site-wide to harmonise heterogeneous
   colour temperatures with the monochrome UI without killing skin
   tone. The brand logo is intentionally excluded. */
.hero-photo,
.wide-photo img,
figure img {
  filter: saturate(0.85) contrast(1.05);
}
/* Override: explicit grayscale for non-learner-facing photos
   (admin / audit / institutional context). Applied via class. */
.photo--mono,
img.photo--mono {
  filter: grayscale(1) contrast(1.05);
}

/* split / image-text rows */
.row {
  display: grid; gap: 32px; grid-template-columns: 1fr;
}
@media (min-width: 900px) { .row { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; } }
.row.reverse > :first-child { order: 1; }
@media (min-width: 900px) { .row.reverse > :first-child { order: 2; } }

/* recruitment calendar (apply page) */
.calendar { display: grid; gap: 12px; }
.session {
  display: grid; gap: 6px 24px;
  grid-template-columns: 1fr;
  border: 1px solid var(--line); padding: 18px;
}
@media (min-width: 700px) {
  .session { grid-template-columns: 130px 1fr 160px; align-items: center; }
}
.session .date { font-weight: bold; }
.session .where strong { display: block; }
.session .where span { color: var(--mid-grey); font-size: 14px; }
.session .district-tag {
  display: inline-block; border: 1px solid var(--black); padding: 4px 10px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: bold;
}

.calendar-empty {
  border: 2px dashed var(--mid-grey);
  padding: 28px; text-align: center; color: var(--mid-grey);
}

/* footer */
footer {
  background: var(--black); color: var(--white);
  padding: 56px 0 32px; margin-top: var(--section-y);
}
footer .wrap { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { footer .wrap { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { footer .wrap { grid-template-columns: 2fr 1fr 1fr 1fr; } }
footer h4 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.14em; }
footer p, footer a { color: var(--white); font-size: 14px; line-height: 1.6; }
footer a { text-decoration: underline; opacity: 0.85; }
footer a:hover { opacity: 1; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 6px; }
.footer-meta {
  border-top: 1px solid #2a2a2a; margin-top: 32px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12px; color: #a0a0a0;
}
.footer-tagline {
  font-style: italic; letter-spacing: 0.08em;
}
.portal-soon {
  display: inline-block; margin-left: 8px;
  font-size: 9px; font-weight: bold;
  text-transform: uppercase; letter-spacing: 0.14em;
  background: var(--white); color: var(--black);
  padding: 2px 6px; vertical-align: middle;
}

/* programme streams (nine training streams) */
.streams {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .streams { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .streams { grid-template-columns: repeat(3, 1fr); } }
.stream {
  border: 1px solid var(--line); padding: 22px;
  background: var(--white);
}
.stream h3 { margin-bottom: 6px; font-size: 17px; }
.stream p { margin: 0; color: var(--mid-grey); font-size: 14.5px; line-height: 1.5; }
.stream-tag {
  display: inline-block; font-size: 11px; font-weight: bold;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--mid-grey); margin-bottom: 10px;
}

/* training sites (per-district list of delivery sites) */
.sites-grid {
  display: grid; gap: 18px; grid-template-columns: 1fr;
}
@media (min-width: 700px) { .sites-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .sites-grid { grid-template-columns: repeat(3, 1fr); } }
.site-block { border: 1px solid var(--line); padding: 20px; }
.site-block h3 { margin-bottom: 8px; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.1em; }
.site-block ul { margin: 0; padding-left: 18px; }
.site-block li { margin: 3px 0; font-size: 15px; }
.site-block li.muted { color: var(--mid-grey); font-style: italic; list-style: none; padding-left: 0; }

/* operations: stat tiles */
.stats {
  display: grid; gap: 0; grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
@media (max-width: 999px) {
  .stat { border-right: 0; }
  .stat:nth-child(2n) { border-right: 0; }
}
.stat-num {
  display: block; font-size: clamp(28px, 4vw, 40px);
  font-weight: 900; line-height: 1.05; letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 14px; color: var(--mid-grey); line-height: 1.4;
}
.stat-asof {
  display: block; font-size: 11px; color: var(--mid-grey);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 10px;
}

/* operations: process flow */
.process {
  display: grid; gap: 12px; grid-template-columns: 1fr;
  counter-reset: pstep;
}
@media (min-width: 800px) { .process { grid-template-columns: repeat(2, 1fr); } }
.process-step {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px;
  padding: 18px 0; counter-increment: pstep;
  border-top: 1px solid var(--line);
}
.process-step::before {
  content: counter(pstep, decimal-leading-zero);
  font-weight: 900; font-size: 18px;
}
.process-step h3 { margin-bottom: 4px; font-size: 16px; }
.process-step p { margin: 0; color: var(--mid-grey); font-size: 14.5px; }

/* utility */
.muted { color: var(--mid-grey); }
.center { text-align: center; }
.small { font-size: 14px; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 32px; }

/* print */
@media print {
  .nav, footer, .anti-scam { background: white !important; color: black !important; }
  a { text-decoration: underline; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   MOBILE OPTIMISATIONS (v6)
   All rules are additive media-queries. Desktop behaviour unchanged.
   Target: phones at 320–600px viewport, on cellular data, in Limpopo.
   ===================================================================== */

/* 1. Hero photo: hide entirely on the narrowest screens.
      The eligibility + anti-scam panels are content; the photo is decoration.
      Below 600px, decoration that pushes content below the fold is wrong.
      Tablet portrait (600–900px) keeps the photo. */
@media (max-width: 599px) {
  .hero-photo { display: none; }
}

/* 2. Hero grid order on mobile: text first, photo second.
      Default grid stacks them in source order, which is correct (text
      comes first in the HTML). This rule is defensive — explicit ordering
      ensures the photo never accidentally renders first. */
@media (max-width: 899px) {
  .hero-grid > div:first-child { order: 1; }
  .hero-grid > div:last-child { order: 2; }
}

/* 3. CTA buttons: full-width on mobile so they're easy to tap.
      Two CTAs side-by-side at 320px would each be ~140px wide,
      below recommended tap-target generosity.
      Below 600px, stack and fill. */
@media (max-width: 599px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; text-align: center; }
}

/* 4. Wide-banner photos: hide on the narrowest screens.
      A 16:9 photo at 393px wide becomes a 220px-tall horizontal strip
      that adds nothing and looks like a separator. Tablet+ keeps them. */
@media (max-width: 599px) {
  .wide-photo { display: none; }
}

/* 5. Anti-scam panel: bump body font to 16px on mobile.
      15px is technically readable but cramped on small screens
      for the single most important content block on the page. */
@media (max-width: 599px) {
  .anti-scam p { font-size: 16px; }
}

/* 6. Eligibility list: cleaner mobile bullets.
      Default browser bullets look dated on small screens. Use a custom
      bullet that matches the brand's monochrome treatment. */
.eligibility ul {
  list-style: none;
  padding-left: 0;
}
.eligibility li {
  position: relative;
  padding-left: 20px;
  margin: 6px 0;
}
.eligibility li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px; height: 8px;
  background: var(--black);
}

/* 7. Mobile menu: visible current-page indicator.
      The desktop nav has aria-current styling (font-weight: bold).
      The mobile menu didn't. Now it does, plus a left-edge bar
      so the indicator is unambiguous. */
#mobile-menu a[aria-current="page"] {
  font-weight: bold;
  border-left: 4px solid var(--black);
  padding-left: calc(var(--gutter) - 4px);
  background: var(--light-grey);
}

/* 8. Footer link tap targets: enforce minimum tap height on mobile.
      Default footer links are 14px font with no padding. On a 320px
      iPhone SE that's tight thumb-territory. */
@media (max-width: 799px) {
  footer ul li {
    margin-bottom: 4px;
  }
  footer ul li a {
    display: inline-block;
    padding: 8px 0;
    min-height: 44px;
    line-height: 1.4;
  }
}

/* 9. Stage card counter: tighten on the narrowest screens.
      The "01", "02" counter glyph at 28px font + 12px margin is
      proportional on tablet but visually heavy on a 320px phone. */
@media (max-width: 480px) {
  .stage::before {
    font-size: 22px;
    margin-bottom: 8px;
  }
  .stage { padding: 20px; }
}

/* 10. Touch-friendly anchor underlines.
       Default underline-offset 3px is fine for desktop hover but visually
       busy on mobile when a paragraph has multiple inline links.
       This is the single intervention I'm uncertain about — leaving it
       for now to keep the change set conservative. */
