/* ==========================================================================
   Base: reset, typography, layout primitives, accessibility helpers
   Mobile-first. Breakpoints: 480 / 768 / 1024 / 1280
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--zl-header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--zl-font);
  font-size: var(--zl-fs-16);
  line-height: var(--zl-lh);
  color: var(--zl-text);
  background: var(--zl-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, video { display: block; max-width: 100%; height: auto; }
svg { overflow: visible; }
.icon { flex: none; vertical-align: middle; fill: none; stroke: currentColor; }
h1, h2, h3, h4 { line-height: var(--zl-lh-tight); margin: 0 0 var(--zl-sp-3); font-weight: var(--zl-fw-bold); letter-spacing: -0.01em; }
h1 { font-size: var(--zl-fs-32); }
h2 { font-size: var(--zl-fs-24); }
h3 { font-size: var(--zl-fs-18); }
h4 { font-size: var(--zl-fs-16); }
@media (min-width: 768px) {
  h1 { font-size: var(--zl-fs-40); }
  h2 { font-size: var(--zl-fs-32); }
  h3 { font-size: var(--zl-fs-20); }
}
p { margin: 0 0 var(--zl-sp-4); }
ul, ol { margin: 0 0 var(--zl-sp-4); padding-left: 1.25rem; }
a { color: var(--zl-link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
hr { border: 0; border-top: 1px solid var(--zl-border); margin: var(--zl-sp-4) 0; }
code, pre { font-family: var(--zl-font-mono); font-size: 0.9em; }
:not(pre) > code { background: var(--zl-surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
summary { cursor: pointer; }
[hidden] { display: none !important; }

/* Focus: always visible for keyboard users */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--zl-focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: var(--zl-sp-2); top: -100px; z-index: 100;
  background: var(--zl-primary); color: #fff; padding: var(--zl-sp-3) var(--zl-sp-4);
  border-radius: var(--zl-radius); font-weight: var(--zl-fw-semibold); text-decoration: none;
}
.skip-link:focus { top: var(--zl-sp-2); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-muted { color: var(--zl-text-muted); }
.eyebrow { font-size: var(--zl-fs-12); font-weight: var(--zl-fw-semibold); text-transform: uppercase; letter-spacing: 0.08em; color: var(--zl-text-muted); margin: 0 0 var(--zl-sp-2); }
.eyebrow--inverse { color: rgba(255, 255, 255, 0.85); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Layout primitives */
.container { width: 100%; max-width: var(--zl-container); margin-inline: auto; padding-inline: var(--zl-sp-4); }
.container--narrow { max-width: var(--zl-container-narrow); }
@media (min-width: 768px) { .container { padding-inline: var(--zl-sp-5); } }
.section { padding-block: var(--zl-sp-7); }
.section--alt { background: var(--zl-surface); border-block: 1px solid var(--zl-border); }
.section__head { margin-bottom: var(--zl-sp-5); max-width: 720px; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; gap: var(--zl-sp-4); align-items: end; justify-content: space-between; }
.section__title { margin-bottom: var(--zl-sp-2); }
.section__lead, .page-head__lead { color: var(--zl-text-muted); font-size: var(--zl-fs-18); margin: 0; }
.section-title { font-size: var(--zl-fs-20); margin-top: var(--zl-sp-6); }
.page-head { padding-block: var(--zl-sp-5) var(--zl-sp-5); }
.page-head__title { margin-bottom: var(--zl-sp-2); }

.grid { display: grid; gap: var(--zl-sp-4); }
.grid--cards { grid-template-columns: 1fr; }
@media (min-width: 480px) { .grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--zl-sp-5); } }
@media (min-width: 1280px) { .grid--cards:not(.grid--cards-sm) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ratio-4x3 { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--zl-surface-2); }
.ratio-4x3 > img { width: 100%; height: 100%; object-fit: cover; }
.ratio-16x9 { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--zl-surface-2); }

.hide-sm { display: none !important; }
@media (min-width: 768px) { .hide-sm { display: initial !important; } .show-sm-only { display: none !important; } }

/* Reduced motion: no smooth scroll, no transitions/animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Low-bandwidth mode (toggle, stage 2): hide decorative imagery */
.low-bandwidth .hero__media, .low-bandwidth .program-card__media img, .low-bandwidth .course-card__media img { visibility: hidden; }

/* Print */
@media print {
  .site-header, .site-footer, .action-bar, .toast-region, .skip-link, .drawer { display: none !important; }
  body { background: #fff; color: #000; }
}
