/* ============================================================
   THE SHALA — globals.css
   Foundation styles: tokens, reset, typography, buttons,
   eyebrows, background utilities, breakpoints.
   Version: aligned with shala-style-guide-v7.html
   ============================================================

   FONT SWAP NOTE:
   All headings currently reference 'Playfair Display'.
   Before launch, do a single global find-replace:
     'Playfair Display' → 'Exquise'
   No other changes required.

   BREAKPOINTS (three only — do not add others):
     max-width: 1100px  Tablet wide
     max-width:  900px  Tablet narrow + hamburger nav
     max-width:  600px  Phone

   LEGACY BREAKPOINTS — delete on sight if found in page files:
   560 / 640 / 720 / 760 / 800 / 860 / 960 / 1020
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   1. GOOGLE FONTS IMPORT
   Paste this <link> in the <head> of every page BEFORE
   your <style> or <link rel="stylesheet"> tags.

   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap" rel="stylesheet">

   NOTE: When Exquise is available, load it via @font-face
   below and remove Playfair Display from the Google import.
──────────────────────────────────────────────────────────── */

/* Exquise — self-hosted web font
   Files confirmed in /fonts folder.
   Font swap: replace 'Playfair Display' → 'Exquise' globally when ready. */

@font-face {
  font-family: "Exquise";
  src:
    url("../fonts/Exquise-Regular.woff2") format("woff2"),
    url("../fonts/Exquise-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Exquise";
  src:
    url("../fonts/Exquise-RegularItalic.woff2") format("woff2"),
    url("../fonts/Exquise-RegularItalic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ────────────────────────────────────────────────────────────
   2. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   Single source of truth. Never hardcode these hex values
   anywhere else in the codebase.
──────────────────────────────────────────────────────────── */

:root {
  /* Brand — keep prominent */
  --pink: #d40062;
  --orange: #f39900;
  --aubergine: #3b132e;
  --white: #fdfaf8;

  /* Supporting — backgrounds & anchors */
  --charcoal-plum: #4b3a43;
  --light-plum: #887479;
  --grey-magenta: #614051;

  /* Neutrals */
  --chalk: #f7f3ee;
  --linen: #e8dcd9;
  --greige: #cfc6bd;
  --dusty-blush: #e6c6cf;
  --pinked-linen: #f0e4e6;

  /* Layout */
  --max-width: 1240px;
  --section-pad-x: 48px;
  --section-pad-y: 72px;

  /* Nav */
  --nav-height: 66px;
  --nav-bg: rgba(212, 0, 98, 0.97);
}

/* ────────────────────────────────────────────────────────────
   3. RESET & BOX MODEL
──────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

html,
body {
  margin: 0;
  padding: 0;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ────────────────────────────────────────────────────────────
   4. BASE BODY
──────────────────────────────────────────────────────────── */

body {
  font-family: "Jost", sans-serif;
  font-size: 15px;
  font-weight: 400; /* Always 400 — never 300 */
  line-height: 1.7;
  color: var(--aubergine);
  background: var(--chalk);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ────────────────────────────────────────────────────────────
   5. TYPOGRAPHY SCALE
   Headings: Playfair Display (→ Exquise on production)
   Subheads / quotes: Cormorant Garamond
   Body / UI: Jost
──────────────────────────────────────────────────────────── */

/* — Headings — */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Exquise", serif;
  font-weight: 400;
  color: var(--aubergine);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

/* Italic <em> inside headings — pink on light, orange on dark */
h1 em,
h2 em,
h3 em {
  font-style: italic;
  color: var(--pink);
}

/* Hero H1 — fluid display size */
.h1-display {
  font-family: "Exquise", serif;
  font-size: clamp(40px, 6.5vw, 68px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--aubergine);
  margin: 0;
}

/* Section H2 */
.h2-section {
  font-family: "Exquise", serif;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 400;
  color: var(--aubergine);
}

/* Sub-heading H3 */
.h3-sub {
  font-family: "Exquise", serif;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 400;
  color: var(--aubergine);
}

/* On dark backgrounds — heading <em> turns orange */
.on-dark h1 em,
.on-dark h2 em,
.on-dark h3 em,
.on-dark .h1-display em,
.on-dark .h2-section em,
.on-dark .h3-sub em {
  color: var(--orange);
}

/* — Intro / lead copy — */

.intro {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--aubergine);
  margin: 0 0 1em;
}

/* Cormorant on dark backgrounds must NOT be italic —
   see §4 italic-on-dark rule in the style guide.
   Exception: featured testimonial quote (handled in component). */
.on-dark .intro {
  font-style: normal;
  opacity: 0.9;
}

/* — Body — */

p {
  font-family: "Jost", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--aubergine);
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* — Small / meta text — */

.text-sm {
  font-size: 13px;
  line-height: 1.6;
}

/* — Links in body copy — */

.body-link {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s;
}

.body-link:hover {
  opacity: 0.75;
}

/* Orange link variant — used on dark backgrounds */
.body-link-orange {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s;
}

.body-link-orange:hover {
  opacity: 0.75;
}

/* ────────────────────────────────────────────────────────────
   6. EYEBROW / LABEL
   Single global class — replaces all page-prefixed variants.
   Orange on light · Off-white on dark
──────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: "Jost", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-block;
  line-height: 1.4;
}

.eyebrow.on-dark {
  color: rgba(255, 255, 255, 0.85);
}

/* ────────────────────────────────────────────────────────────
   7. BUTTONS
   Two base shapes × four colour modifiers × optional sizes.
   Reserved variants: .nav-msg and .footer-msg-btn
──────────────────────────────────────────────────────────── */

/* — Base shapes — */

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 28px;
  font-family: "Jost", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.btn-ghost {
  background: transparent;
  border: 1px solid currentColor;
}

/* — Colour modifiers — */

/* Orange — primary CTA on light backgrounds */
.btn.btn-orange {
  background: var(--orange);
  color: white;
}
.btn.btn-orange:hover {
  background: #c97d00;
}
.btn-ghost.btn-orange {
  color: var(--orange);
}
.btn-ghost.btn-orange:hover {
  background: var(--orange);
  color: white;
}

/* Pink — sticky bars, urgent CTAs on light */
.btn.btn-pink {
  background: var(--pink);
  color: white;
}
.btn.btn-pink:hover {
  opacity: 0.88;
}
.btn-ghost.btn-pink {
  color: var(--pink);
}
.btn-ghost.btn-pink:hover {
  background: var(--pink);
  color: white;
}

/* White — CTAs on dark / coloured backgrounds */
.btn.btn-white {
  background: white;
  color: var(--pink);
}
.btn.btn-white:hover {
  opacity: 0.88;
}
.btn-ghost.btn-white {
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-ghost.btn-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* Aubergine — secondary on light backgrounds */
.btn.btn-aub {
  background: var(--aubergine);
  color: white;
}
.btn.btn-aub:hover {
  background: #2a0d20;
}
.btn-ghost.btn-aub {
  color: var(--aubergine);
  border-color: var(--aubergine);
}
.btn-ghost.btn-aub:hover {
  background: var(--aubergine);
  color: white;
}

/* — Size modifiers — */

.btn-sm,
.btn-ghost.btn-sm {
  height: 38px;
  padding: 0 20px;
  font-size: 10px;
}

.btn-lg,
.btn-ghost.btn-lg {
  height: 54px;
  padding: 0 36px;
  font-size: 12px;
}

/* — Reserved nav variants (do not repurpose) —
   These maintain specific sizing for nav alignment.      */

/* Nav Message Us — standard 46px button, reads as one unit with nav bar */
.nav-msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  background: var(--orange);
  color: white !important;
  font-family: "Jost", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  margin-left: 12px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-msg:hover {
  background: #c97d00;
}

/* Nav Log In — matching height to sit flush with nav-msg */
.nav-login {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 14px;
  color: white !important;
  font-family: "Jost", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-login:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Footer Message Us — fixed orange pill in footer */
.footer-msg-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--orange);
  color: white;
  font-family: "Jost", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease;
}

.footer-msg-btn:hover {
  background: #c97d00;
}

/* ────────────────────────────────────────────────────────────
   8. BACKGROUND UTILITY CLASSES
   Apply to any section wrapper.
   Dark bg classes set text to --white automatically.
──────────────────────────────────────────────────────────── */

/* Light backgrounds */
.bg-chalk {
  background: var(--chalk);
}
.bg-linen {
  background: var(--linen);
}
.bg-greige {
  background: var(--greige);
}
.bg-pinked-linen {
  background: var(--pinked-linen);
}
.bg-dusty-blush {
  background: var(--dusty-blush);
}

/* Dark / coloured backgrounds — text flips to white */
.bg-aubergine {
  background: var(--aubergine);
  color: var(--white);
}
.bg-charcoal-plum {
  background: var(--charcoal-plum);
  color: var(--white);
}
.bg-light-plum {
  background: var(--light-plum);
  color: var(--white);
}
.bg-grey-magenta {
  background: var(--grey-magenta);
  color: var(--white);
}
.bg-pink {
  background: var(--pink);
  color: var(--white);
}
.bg-orange {
  background: var(--orange);
  color: var(--aubergine);
}

/* ────────────────────────────────────────────────────────────
   9. LAYOUT UTILITIES
──────────────────────────────────────────────────────────── */

/* Standard section wrapper */
.section {
  padding: var(--section-pad-y) var(--section-pad-x);
}

/* Centred content container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

/* Orange rule — sits beneath every hero (never pink) */
.hero-rule {
  height: 3px;
  background: var(--orange);
  width: 100%;
  display: block;
}

/* Pink nav underline rule — sits directly below nav */
.nav-pink-rule {
  height: 3px;
  background: var(--pink);
  position: sticky;
  top: var(--nav-height);
  z-index: 199;
}

/* ────────────────────────────────────────────────────────────
   10. ACCESSIBILITY & FOCUS
──────────────────────────────────────────────────────────── */

/* Visible focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Screen-reader only utility */
.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 to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--orange);
  color: white;
  padding: 8px 16px;
  font-family: "Jost", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* Stats Bar */

/* ── STATS BAR ── */
.stats-bar {
  background: var(--orange);
  padding: 0;
}

.stats-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-box {
  padding: 16px 28px;
  border-right: 1px solid rgba(59, 19, 46, 0.15);
  text-align: center;
}

.stat-box:last-child {
  border-right: none;
}

.stat-num {
  font-family: "Exquise", serif;
  font-size: 34px;
  display: block;
  margin-bottom: 4px;
  line-height: 1.1;
  color: var(--aubergine);
  white-space: nowrap;
}

.stat-desc {
  font-family: "Jost", sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--charcoal);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — standardised breakpoints 1100 / 900 / 600
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .stats-bar-inner {
    padding: 0 36px;
  }
}

@media (max-width: 900px) {
  .stats-bar-inner {
    padding: 0 24px;
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-box {
    border-right: none;
    border-bottom: 1px solid rgba(59, 19, 46, 0.15);
    padding: 14px 20px;
  }

  .stat-box:nth-child(odd) {
    border-right: 1px solid rgba(59, 19, 46, 0.15);
  }

  .stat-box:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

@media (max-width: 600px) {
  .stats-bar-inner {
    padding: 0 20px;
    grid-template-columns: 1fr;
  }

  .stat-box {
    border-right: none !important;
    padding: 12px 16px;
    border: none;
  }

  .stat-box:last-child {
    border-bottom: none;
  }
}

/* ────────────────────────────────────────────────────────────
   11. RESPONSIVE BREAKPOINTS
   Three tiers only. Base CSS = desktop.
   Each max-width tier overrides what changes for that viewport.

   IMPORTANT: Do not add breakpoints here outside these three.
   If a component needs responsive tweaks, add them inside
   its own CSS file using these same three queries only.
──────────────────────────────────────────────────────────── */

/* ── Tier 1 — Tablet wide (≤ 1100px) ── */
@media (max-width: 1100px) {
  :root {
    --section-pad-x: 36px;
  }

  .container {
    padding: 0 36px;
  }
}

/* ── Tier 2 — Tablet narrow (≤ 900px) ── */
@media (max-width: 900px) {
  :root {
    --section-pad-x: 24px;
    --section-pad-y: 56px;
  }

  .container {
    padding: 0 24px;
  }

  /* Headings tighten on tablet */
  .h1-display {
    font-size: clamp(34px, 5.5vw, 52px);
  }
}

/* ── Tier 3 — Phone (≤ 600px) ── */
@media (max-width: 600px) {
  :root {
    --section-pad-x: 20px;
    --section-pad-y: 48px;
  }

  .container {
    padding: 0 20px;
  }

  body {
    font-size: 15px; /* Hold body size — do not reduce */
  }

  /* Button group wraps on small screens */
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group .btn,
  .btn-group .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

/* ADDITIONAL */
.highlight-text {
  font-style: italic;
}
.single-course .highlight-text {
  color: var(--orange);
}

.single-faculty .highlight-text {
  color: var(--pink);
}
