/*
Theme Name: Maclav
Theme URI: https://miramarketing.co.uk
Author: Mira Marketing
Description: Custom theme for MacLav Ltd: Free, government-funded Functional Skills courses in English & Maths.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: maclav
*/

:root {
  /* Brand colour */
  --color-primary: #9f0012;        /* deep red — links, accents, icons */
  --color-primary-bright: #c61d23; /* brighter red — buttons, CTA panels */
  --color-primary-tint: #bc131d;

  /* Neutrals */
  --color-ink: #1a1c1c;            /* body text on light */
  --color-muted: #565f6f;          /* secondary text */
  --color-bg: #f9f9f9;             /* page background */
  --color-surface: #ffffff;        /* cards / panels */
  --color-surface-gray: #f8f8f8;   /* subtle banded sections */
  --color-line: #e2e2e2;           /* borders / dividers */
  --color-line-subtle: #e8e8e8;

  /* Inverse (dark bands: stats, testimonial, footer) */
  --color-dark: #2f3131;
  --color-on-dark: #ffffff;
  --color-on-dark-muted: rgba(255, 255, 255, 0.72);

  /* Support */
  --color-soft-blue: #d7e0f3;      /* light panel (Live Zoom card) */
  --color-primary-wash: #fbe9e9;  /* pale red panel — guide warning callouts, homepage Why MacLav backdrop */
  --color-success: #2d6a4f;
  --color-error: #ba1a1a;

  /* Typography */
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-display: clamp(2.25rem, 1.3rem + 4vw, 3.5rem);  /* 36 -> 56 */
  /* Page, post, guide and vacancy titles. Smaller than --fs-display
     because those headings sit in a narrower measure and are often long
     — at 56px a guide title wraps to four or five words per line. The
     homepage hero keeps --fs-display. */
  --fs-title: clamp(1.875rem, 1.1rem + 2.6vw, 2.75rem);/* 30 -> 44 */
  --fs-h2: clamp(1.75rem, 1.3rem + 1.6vw, 2rem);       /* 28 -> 32 */
  --fs-h3: 1.5rem;                                     /* 24 */
  --fs-body-lg: 1.125rem;                              /* 18 */
  --fs-body: 1rem;                                     /* 16 */
  --fs-small: 0.875rem;                                /* 14 */
  --fs-label: 0.75rem;                                 /* 12 — uppercase eyebrow */

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.6;

  /* Spacing & layout */
  --container: 1280px;
  --margin-inline: clamp(1rem, 5vw, 2.5rem);           /* 16 -> 40 */
  --space-section: clamp(3.5rem, 2rem + 6vw, 5rem);    /* 56 -> 80 */
  --space-xs: 0.5rem;   /* 8 */
  --space-sm: 1rem;     /* 16 */
  --space-md: 1.5rem;   /* 24 — gutter */
  --space-lg: 2.5rem;   /* 40 */

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);

  --transition: 200ms ease;
}

/* =========================================================================
   2. Self-hosted fonts
   ========================================================================= */
/* Noto Sans Ethiopic (SIL Open Font License 1.1) — Ge'ez script for Tigrinya.
   Montserrat and Inter contain no Ge'ez characters, so without this Tigrinya
   text falls back to whatever the device happens to have: usually readable on
   Android, often empty boxes on Windows. Only loaded on Tigrinya pages (see
   "Tigrinya" below), so the other nine languages download nothing extra. */
@font-face {
  font-family: "Noto Sans Ethiopic";
  src: url("assets/fonts/noto-sans-ethiopic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+1200-139F, U+2D80-2DDF, U+AB00-AB2F;
}
@font-face {
  font-family: "Noto Sans Ethiopic";
  src: url("assets/fonts/noto-sans-ethiopic-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+1200-139F, U+2D80-2DDF, U+AB00-AB2F;
}
@font-face {
  font-family: "Noto Sans Ethiopic";
  src: url("assets/fonts/noto-sans-ethiopic-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+1200-139F, U+2D80-2DDF, U+AB00-AB2F;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* =========================================================================
   3. Reset / base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

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


/* -------------------------------------------------------------------------
   Tigrinya (20 Oct)

   The Ge'ez font goes FIRST in both stacks, with Montserrat and Inter kept
   behind it: the unicode-range above means the browser only downloads Noto for
   Ge'ez characters, so Latin text on a Tigrinya page (names, "Functional
   Skills", "Zoom") still renders in the site's own fonts.

   Ge'ez sits taller than Latin, so headings get a little more line height to
   stop ascenders and descenders touching.
   ------------------------------------------------------------------------- */
html[lang^="ti"] {
  --font-display: "Noto Sans Ethiopic", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Noto Sans Ethiopic", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[lang^="ti"] h1,
html[lang^="ti"] h2,
html[lang^="ti"] h3 {
  line-height: 1.35;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-snug);
  margin: 0 0 0.5em;
  color: var(--color-ink);
}
h1 { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0 0 1em; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-bright); }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; }
li { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* =========================================================================
   4. Accessibility
   ========================================================================= */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--color-ink);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

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