/* =====================================================================
   Kelyn Training Services – redesign mockup stylesheet
   Implements 03-design/design-system.md exactly.
   Display: Archivo (condensed via width axis). Body: Public Sans.
   Single accent: Main Roads WA roadwork orange #F36F21 on bitumen/concrete.
   Motif: the regulatory taper chevron + hazard edge, pure CSS.
   Hard rules: border-radius 0 everywhere; no glass; no ambient motion;
   touch targets >=44px; responsive 360/480/768/1080/1280/1440.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
  /* ---------- Typography ---------- */
  --font-display: 'Archivo', 'Arial Narrow', Arial, system-ui, sans-serif;
  --font-body:    'Public Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  /* fluid sizes (360 floor; scaled up by media queries) */
  --fs-display: 2.0625rem;  /* 33px */
  --fs-h1:      1.8125rem;  /* 29px */
  --fs-h2:      1.5625rem;  /* 25px */
  --fs-h3:      1.3125rem;  /* 21px */
  --fs-h4:      1.125rem;   /* 18px */
  --fs-lead:    1.0625rem;  /* 17px */
  --fs-body:    1rem;       /* 16px */
  --fs-body-sm: 0.9375rem;  /* 15px */
  --fs-small:   0.875rem;   /* 14px */
  --fs-xs:      0.75rem;    /* 12px */
  --fs-overline:0.8125rem;  /* 13px */

  /* ---------- Brand colour ---------- */
  --accent:        #F36F21;  /* Main Roads WA roadwork orange */
  --accent-hover:  #D85E15;
  --accent-tint:   #FCE4D2;
  --hivis:         #C7E000;  /* hi-vis safety yellow-green */
  --hivis-ink:     #2B3300;

  /* raw palette (for reference / category cards) */
  --bitumen-950: #0E0F11;
  --bitumen-900: #16181B;
  --charcoal-800:#22262B;
  --concrete-600:#4A4F57;
  --concrete-300:#9AA0A8;
  --concrete-150:#D7DADF;
  --concrete-80: #ECEEF1;
  --paper:       #F7F8F9;

  /* ---------- Semantic (light default) ---------- */
  --bg:         #F7F8F9;
  --surface:    #FFFFFF;
  --surface-2:  #ECEEF1;
  --ink:        #16181B;
  --ink-2:      #22262B;
  --muted:      #4A4F57;
  --line:       #D7DADF;
  --line-strong:#9AA0A8;

  /* ---------- Status ---------- */
  --success:    #C7E000;
  --success-ink:#2B3300;
  --danger:     #C42B1C;
  --danger-bg:  #FBE7E5;

  /* ---------- Focus ---------- */
  --focus:      #F36F21;
  --focus-ring: 0 0 0 3px #16181B, 0 0 0 6px #F36F21;

  /* ---------- Spacing ---------- */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.5rem;  --space-6: 2rem;
  --space-7: 3rem;     --space-8: 4rem;    --space-9: 6rem;
  --space-10: 8rem;

  /* ---------- Layout ---------- */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: 1.25rem;

  /* ---------- Borders / elevation ---------- */
  --border:        1px solid var(--line);
  --border-strong: 2px solid var(--ink);
  --border-accent: 2px solid var(--accent);
  --shadow-nav:    0 1px 0 0 var(--line);

  /* ---------- Motion ---------- */
  --dur-fast: .12s; --dur: .15s; --dur-slow: .2s;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

/* Dark sections: hero, footer, feature bands. Add .on-dark to wrapper. */
.on-dark {
  --bg:        #0E0F11;
  --surface:   #16181B;
  --surface-2: #22262B;
  --ink:       #FFFFFF;
  --ink-2:     #ECEEF1;
  --muted:     #9AA0A8;
  --line:      #2E3338;
  --line-strong:#4A4F57;
  color: var(--ink);
  background: var(--bg);
}

/* ---------- responsive type drops ---------- */
@media (min-width: 480px) {
  :root {
    --fs-display: 2.5rem;     /* 40px */
    --fs-h1:      2.125rem;   /* 34px */
    --fs-h2:      1.75rem;    /* 28px */
    --fs-h3:      1.4375rem;  /* 23px */
    --fs-h4:      1.1875rem;  /* 19px */
    --fs-lead:    1.125rem;   /* 18px */
  }
}
@media (min-width: 768px) {
  :root {
    --fs-display: 3.25rem;    /* 52px */
    --fs-h1:      2.625rem;   /* 42px */
    --fs-h2:      2.0625rem;  /* 33px */
    --fs-h3:      1.625rem;   /* 26px */
    --fs-h4:      1.25rem;    /* 20px */
    --fs-lead:    1.1875rem;  /* 19px */
    --gutter: 2rem;
  }
}
@media (min-width: 1080px) {
  :root {
    --fs-display: 4.1875rem;  /* 67px */
    --fs-h1:      3.125rem;   /* 50px */
    --fs-h2:      2.375rem;   /* 38px */
    --fs-h3:      1.75rem;    /* 28px */
    --fs-h4:      1.3125rem;  /* 21px */
    --fs-lead:    1.25rem;    /* 20px */
  }
}
@media (min-width: 1280px) { :root { --gutter: 2.5rem; } }

/* ---------------------------------------------------------------------
   2. Reset / base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent); color: #16181B; }

/* ---------------------------------------------------------------------
   3. Typography element bindings
   --------------------------------------------------------------------- */
.display, .hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
h1 {
  font-family: var(--font-display);
  font-weight: 800; font-stretch: 75%;
  font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.015em;
  color: var(--ink); margin: 0 0 var(--space-4);
}
h2 {
  font-family: var(--font-display);
  font-weight: 700; font-stretch: 75%;
  font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 var(--space-4);
}
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3); line-height: 1.18; letter-spacing: -0.005em;
  color: var(--ink); margin: 0 0 var(--space-3);
}
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h4); line-height: 1.25;
  color: var(--ink); margin: 0 0 var(--space-2);
}
h5 { font-family: var(--font-body); font-weight: 700; font-size: 1.125rem; line-height: 1.3; color: var(--ink); margin: 0 0 var(--space-2); }
h6 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.35; letter-spacing: 0.01em; color: var(--ink); margin: 0 0 var(--space-2); }

p { font-size: var(--fs-body); line-height: 1.65; margin: 0 0 var(--space-4); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }
.body-sm { font-size: var(--fs-body-sm); line-height: 1.6; }
small, .small { font-size: var(--fs-small); line-height: 1.5; letter-spacing: 0.005em; }
.xs { font-size: var(--fs-xs); line-height: 1.4; font-weight: 500; }
.muted { color: var(--muted); }

.overline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-overline);
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}

/* ---------------------------------------------------------------------
   4. Layout helpers
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-8); }
@media (min-width: 768px) { .section { padding-block: var(--space-9); } }
.section--tight { padding-block: var(--space-7); }

.section-head { margin-bottom: var(--space-6); max-width: 60ch; }
.section-head .overline { margin-bottom: var(--space-3); }
.section-head p { color: var(--muted); margin-top: var(--space-2); }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 480px) { .grid-2 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(4,1fr); }
}

.stack > * + * { margin-top: var(--space-4); }
.flow > * + * { margin-top: var(--space-3); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------------------------------------------------------------------
   5. Motif – taper chevron + hazard edge
   --------------------------------------------------------------------- */
.motif-taper {
  --taper-h: 8px;
  height: var(--taper-h);
  width: 96px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--taper-h)) 100%, 0 100%);
  margin-bottom: var(--space-4);
}
.motif-hazard {
  height: 6px;
  width: 100%;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--accent) 0,
    var(--accent) 14px,
    #16181B 14px,
    #16181B 28px
  );
}
.section-divider {
  display: flex; align-items: center; gap: var(--space-4);
  margin: var(--space-8) 0;
}
.section-divider::before,
.section-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-divider__mark { display: inline-flex; gap: 4px; }
.section-divider__mark i {
  width: 18px; height: 12px; background: var(--accent);
  clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%);
}

/* ---------------------------------------------------------------------
   6. Skip link + focus
   --------------------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
  font-family: var(--font-display); font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0; outline: none; box-shadow: var(--focus-ring); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }
:focus:not(:focus-visible) { outline: none; }
/* fallback for non-supporting browsers */
:focus { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------------
   7. Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform .05s var(--ease);
  text-align: center;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #16181B;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #16181B; }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: var(--bg); }

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-inline: 0.25rem;
  min-height: 44px;
}
.btn--ghost:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; }

.btn--block { width: 100%; }

/* taper chevron glyph before primary buttons, static */
.btn--primary::before {
  content: "";
  width: 12px; height: 12px; flex: none;
  background: currentColor;
  clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%);
}

/* ---------------------------------------------------------------------
   8. Header / navigation
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: var(--border);
  transition: box-shadow var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-nav); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 72px;
  transition: min-height var(--dur) var(--ease);
}
.site-header.is-scrolled .nav { min-height: 60px; }
.nav__logo {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; min-height: 44px;
}
.nav__logo .mark {
  width: 30px; height: 30px; flex: none; background: var(--accent);
  clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%);
}
.nav__logo .wordmark {
  font-family: var(--font-display); font-weight: 900; font-stretch: 75%;
  font-size: 1.5rem; letter-spacing: -0.01em; color: var(--ink);
  line-height: 1;
}
.nav__logo .sub {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: .625rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-top: 2px;
}

.nav__right { display: flex; align-items: center; gap: var(--space-3); }

/* Desktop links */
.nav__links { display: none; }
@media (min-width: 1080px) {
  .nav__links {
    display: flex; align-items: center; gap: var(--space-5);
    list-style: none; margin: 0; padding: 0;
  }
  .nav__item { position: relative; }
  .nav__link {
    font-family: var(--font-display); font-weight: 600; font-size: 1rem;
    color: var(--ink); text-decoration: none;
    padding: 0.5rem 0; min-height: 44px;
    display: inline-flex; align-items: center; gap: .3rem; position: relative;
    background: none; border: none; cursor: pointer;
  }
  .nav__link::after {
    content: "";
    position: absolute; left: 0; bottom: 6px;
    height: 3px; width: 0;
    background: var(--accent);
    clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
    transition: width var(--dur) var(--ease);
  }
  .nav__link:hover::after,
  .nav__link[aria-current="page"]::after,
  .nav__item[data-open="true"] > .nav__link::after { width: 100%; }
  .nav__link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
  .nav__caret { width: 9px; height: 9px; }
}

/* persistent phone */
.nav__phone {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--ink); text-decoration: none;
  display: none; align-items: center; gap: .4rem; min-height: 44px;
}
.nav__phone:hover { color: var(--accent); }
.nav__phone svg { width: 18px; height: 18px; }
@media (min-width: 768px) { .nav__phone { display: inline-flex; } }
.nav__cta { display: none; }
@media (min-width: 768px) { .nav__cta { display: inline-flex; } }

/* phone icon button on mobile */
.nav__phone-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; color: var(--ink); border: 2px solid var(--ink);
  text-decoration: none;
}
.nav__phone-icon svg { width: 20px; height: 20px; }
.nav__phone-icon:hover { color: var(--accent); border-color: var(--accent); }
@media (min-width: 768px) { .nav__phone-icon { display: none; } }

/* Courses dropdown */
.dropdown__panel {
  position: absolute;
  top: 100%; left: 0;
  display: none;
  min-width: 560px;
  background: var(--surface);
  border: var(--border);
  border-top: var(--border-accent);
  padding: var(--space-5);
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  z-index: 120;
}
@media (min-width: 1080px) {
  .nav__item[data-open="true"] .dropdown__panel,
  .nav__item:hover .dropdown__panel,
  .nav__item:focus-within .dropdown__panel { display: grid; }
}
.dropdown__group-title {
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: var(--space-2);
}
.dropdown__item {
  display: block; padding: .5rem 0; min-height: 44px;
  color: var(--ink); text-decoration: none; font-size: .9375rem;
  display: flex; align-items: center;
}
.dropdown__item:hover { color: var(--accent); }
.dropdown__all {
  grid-column: 1 / -1; border-top: var(--border); padding-top: var(--space-3);
  margin-top: var(--space-2);
}

/* Mobile toggle */
.nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: transparent; border: 2px solid var(--ink); cursor: pointer;
  color: var(--ink);
}
.nav__toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.nav__toggle svg { width: 22px; height: 22px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }
@media (min-width: 1080px) { .nav__toggle { display: none; } }

/* Mobile panel */
.mobile-panel {
  position: fixed; inset: 72px 0 0 0;
  background: var(--bg);
  padding: var(--space-5);
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--space-2);
  z-index: 90;
  visibility: hidden;
}
.mobile-panel[data-open="true"] { transform: translateX(0); visibility: visible; }
@media (min-width: 1080px) { .mobile-panel { display: none; } }
.mobile-panel .btn { margin-bottom: var(--space-3); }
.mobile-panel a:not(.btn) {
  min-height: 48px; display: flex; align-items: center; font-size: 1.0625rem;
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink); text-decoration: none; border-bottom: var(--border);
}
.mobile-panel a:not(.btn):hover { color: var(--accent); }
.mobile-acc { border-bottom: var(--border); }
.mobile-acc__toggle {
  width: 100%; min-height: 48px; display: flex; align-items: center;
  justify-content: space-between;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  color: var(--ink); padding: 0;
}
.mobile-acc__toggle:hover { color: var(--accent); }
.mobile-acc__toggle svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.mobile-acc__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.mobile-acc__panel { display: none; padding: 0 0 var(--space-3) var(--space-4); }
.mobile-acc__panel[data-open="true"] { display: block; }
.mobile-acc__panel a { border-bottom: none !important; min-height: 44px !important; font-weight: 400 !important; font-size: 1rem !important; }
.mobile-acc__group { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-top: var(--space-3); }
.mobile-panel .social-row { display: flex; gap: var(--space-4); margin-top: var(--space-4); }
.mobile-panel .social-row a { border: none; min-height: 44px; width: 44px; justify-content: center; }

/* ---------------------------------------------------------------------
   9. Hero
   --------------------------------------------------------------------- */
.hero { position: relative; padding-block: var(--space-9); overflow: hidden; }
.hero__grid {
  display: grid; gap: var(--space-7);
  grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 1080px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero .overline { margin-bottom: var(--space-3); }
.hero h1 { margin: 0 0 var(--space-4); max-width: 18ch; }
.hero__sub {
  font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2);
  max-width: 52ch; margin-bottom: var(--space-6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6); }
.hero__trust {
  font-family: var(--font-body); font-size: .875rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; list-style: none; margin: 0; padding: 0;
}
.hero__trust li { position: relative; padding-left: 1rem; }
.hero__trust li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--accent); }
.hero__media { position: relative; border: 3px solid var(--surface-2); }
.hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.hero__media-cap {
  position: absolute; left: 0; bottom: 0;
  background: var(--accent); color: #16181B;
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem;
  letter-spacing: .04em; text-transform: uppercase; padding: .4rem .7rem;
}

/* page-top compact hero for inner pages */
.page-hero { padding-block: var(--space-8) var(--space-7); }
.page-hero .overline { margin-bottom: var(--space-3); }
.page-hero p.lead { max-width: 60ch; margin-top: var(--space-3); }

/* ---------------------------------------------------------------------
   10. Breadcrumb
   --------------------------------------------------------------------- */
.breadcrumb { font-size: .8125rem; color: var(--muted); margin-bottom: var(--space-5); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--line-strong); }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* ---------------------------------------------------------------------
   11. Course / product card
   --------------------------------------------------------------------- */
.course-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: var(--border);
  border-left: 6px solid var(--accent);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.course-card:hover { border-color: var(--ink); border-left-color: var(--accent-hover); }
.course-card__media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: var(--border); }
.course-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease); }
.course-card:hover .course-card__media img { transform: scale(1.03); }
.course-card__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }

.course-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag {
  font-family: var(--font-display); font-weight: 700; font-size: .6875rem;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .25rem .5rem; border: 1px solid var(--line-strong); color: var(--muted);
}
.tag--accredited { color: var(--accent); border-color: var(--accent); }
.tag--renewal { color: var(--muted); }
.tag--new { color: var(--hivis-ink); background: var(--hivis); border-color: var(--hivis); }

.course-card__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h4); line-height: 1.2; color: var(--ink); margin: 0; }
.course-card__summary { font-size: .9375rem; color: var(--muted); margin: 0; line-height: 1.55; }
.course-card__meta { font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.course-card__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.course-card__meta svg { width: 15px; height: 15px; color: var(--accent); }
.course-card__units { font-size: .8125rem; color: var(--muted); font-family: var(--font-body); }

.course-card__price {
  margin-top: auto;
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  padding-top: var(--space-3); border-top: var(--border);
}
.price__main { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); }
.price__ctf {
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--hivis); color: var(--hivis-ink);
  padding: .2rem .45rem;
}
.course-card__cta { margin-top: var(--space-4); }

/* ---------------------------------------------------------------------
   12. Category cards
   --------------------------------------------------------------------- */
.category-card {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 210px;
  background: #22262B;
  color: #fff;
  border: 1px solid #2E3338;
  border-top: 6px solid var(--accent);
  padding: var(--space-5);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.category-card:hover { background: #16181B; border-top-color: var(--accent-hover); }
.category-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.category-card__count { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; font-size: 3rem; line-height: 1; color: var(--accent); }
.category-card__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); margin-top: var(--space-3); color: #fff; }
.category-card__desc { font-size: .9375rem; color: #9AA0A8; margin-top: var(--space-2); }
.category-card__more { font-family: var(--font-display); font-weight: 700; font-size: .875rem; color: #fff; margin-top: var(--space-4); display: inline-flex; align-items: center; gap: .4rem; }
.category-card:hover .category-card__more { color: var(--accent); }

/* ---------------------------------------------------------------------
   13. Why-Kelyn feature blocks
   --------------------------------------------------------------------- */
.feature {
  background: var(--surface); border: var(--border);
  border-top: 6px solid var(--accent);
  padding: var(--space-5);
  transition: border-color var(--dur) var(--ease);
}
.feature:hover { border-top-color: var(--accent-hover); }
.feature__num { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; font-size: 2rem; line-height: 1; color: var(--accent); }
.feature h3 { margin: var(--space-3) 0 var(--space-2); }
.feature p { font-size: .9375rem; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------------
   14. Trainer card
   --------------------------------------------------------------------- */
.trainer-card {
  background: var(--surface);
  border: var(--border);
  border-bottom: 6px solid var(--accent);
  transition: border-color var(--dur) var(--ease);
}
.trainer-card:hover { border-bottom-color: var(--accent-hover); }
.trainer-card__photo { aspect-ratio: 1 / 1; overflow: hidden; border-bottom: var(--border); }
.trainer-card__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%); display: block; }
.trainer-card__body { padding: var(--space-5); }
.trainer-card__name { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h4); color: var(--ink); margin: 0; }
.trainer-card__role { font-family: var(--font-display); font-weight: 700; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-top: .15rem; }
.trainer-card__bio { font-size: .9375rem; color: var(--muted); margin-top: var(--space-3); line-height: 1.55; }
.trainer-card__quote {
  margin-top: var(--space-4); padding-top: var(--space-4); border-top: var(--border);
  font-size: .9375rem; line-height: 1.55; color: var(--muted); font-style: italic; margin-bottom: 0;
}
.trainer-card__quote cite { display: block; font-style: normal; font-size: .8125rem; color: var(--ink); margin-top: .4rem; }

/* compact team strip */
.team-strip { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 480px) { .team-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .team-strip { grid-template-columns: repeat(5, 1fr); } }
.team-member { text-align: center; }
.team-member__photo { aspect-ratio: 1 / 1; overflow: hidden; border: var(--border); border-bottom: 4px solid var(--accent); }
.team-member__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%); }
.team-member__name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-top: var(--space-2); color: var(--ink); }
.team-member__role { font-size: .8125rem; color: var(--muted); }

/* mini trainer headshots (homepage teaser) */
.trainer-teaser { display: grid; grid-template-columns: 1fr; gap: var(--space-6); align-items: center; }
@media (min-width: 768px) { .trainer-teaser { grid-template-columns: 1fr 1fr; } }
.trainer-teaser__photos { display: flex; gap: var(--space-3); }
.trainer-teaser__photos figure { margin: 0; flex: 1; }
.trainer-teaser__photos .ph { aspect-ratio: 1 / 1; overflow: hidden; border: var(--border); border-bottom: 4px solid var(--accent); }
.trainer-teaser__photos img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%); }
.trainer-teaser__photos figcaption { font-family: var(--font-display); font-weight: 700; font-size: .875rem; margin-top: var(--space-2); color: var(--ink); }

/* ---------------------------------------------------------------------
   15. Testimonials
   --------------------------------------------------------------------- */
.testimonial {
  background: var(--surface);
  border: var(--border);
  border-left: 6px solid var(--accent);
  padding: var(--space-6);
  height: 100%;
  display: flex; flex-direction: column;
}
.testimonial__stars { color: var(--accent); font-size: 1rem; letter-spacing: .15em; margin-bottom: var(--space-3); }
.testimonial__quote { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); margin: 0; }
.testimonial__cite {
  display: flex; flex-direction: column; gap: .15rem;
  margin-top: auto; padding-top: var(--space-4);
}
.testimonial__cite-inner { padding-top: var(--space-4); border-top: var(--border); }
.testimonial__name { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.testimonial__course { font-size: .8125rem; color: var(--muted); }
.rating-strip { display: inline-flex; align-items: baseline; gap: .5rem; }
.rating-strip strong { font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; color: var(--ink); }
.rating-strip .stars { color: var(--accent); letter-spacing: .1em; }

/* ---------------------------------------------------------------------
   16. Two-up panels (corporate + venue), funding band, AoC
   --------------------------------------------------------------------- */
.panel {
  background: var(--surface); border: var(--border); border-top: 6px solid var(--accent);
  padding: var(--space-6);
  transition: border-color var(--dur) var(--ease);
}
.panel:hover { border-top-color: var(--accent-hover); }
.panel h3 { margin-top: 0; }
.panel p { color: var(--muted); }

.band { background: var(--surface-2); }
.band--accent { background: var(--accent-tint); }
.band .container { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 768px) { .band .container { grid-template-columns: 1.4fr 1fr; } }
.band__note { font-size: .8125rem; color: var(--muted); margin-top: var(--space-4); }

.aoc {
  border-left: 6px solid var(--accent);
  background: var(--surface-2);
  padding: var(--space-5) var(--space-6);
  font-size: .9375rem; color: var(--muted); line-height: 1.6;
}

/* news teaser */
.news-item {
  background: var(--surface); border: var(--border); border-left: 6px solid var(--accent);
  padding: var(--space-5);
  transition: border-color var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.news-item:hover { border-color: var(--ink); }
.news-item h3 { font-size: var(--fs-h4); margin: 0 0 var(--space-2); }
.news-item p { font-size: .9375rem; color: var(--muted); margin: 0 0 var(--space-3); }
.news-item .btn--ghost { margin-top: auto; align-self: flex-start; }

/* ---------------------------------------------------------------------
   17. Course detail layout
   --------------------------------------------------------------------- */
.course-detail { display: grid; gap: var(--space-7); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1080px) { .course-detail { grid-template-columns: 1fr 360px; } }
.course-detail__main h2 { margin-top: var(--space-7); }
.course-detail__main h2:first-of-type { margin-top: 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.badge {
  font-family: var(--font-display); font-weight: 700; font-size: .75rem;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .35rem .65rem; border: 1px solid var(--line-strong); color: var(--muted);
}
.badge--accent { color: var(--accent); border-color: var(--accent); }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding-left: 1.6rem; margin-bottom: var(--space-2); line-height: 1.55; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 12px; height: 12px; background: var(--accent);
  clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%);
}

.ataglance {
  position: relative; background: var(--surface); border: var(--border);
  border-top: 6px solid var(--accent); padding: var(--space-6);
}
@media (min-width: 1080px) { .ataglance { position: sticky; top: 96px; } }
.ataglance h2 { font-size: var(--fs-h3); margin-top: 0; }
.ataglance dl { margin: 0 0 var(--space-5); }
.ataglance dt { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: var(--space-3); }
.ataglance dd { margin: .15rem 0 0; font-size: .9375rem; color: var(--ink-2); }
.ataglance .price-block { padding: var(--space-4) 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin-bottom: var(--space-5); }
.ataglance .price-block .price__main { font-size: 2rem; }
.ataglance .price-block .price__ctf { margin-top: var(--space-2); display: inline-block; }
.ataglance .btn { width: 100%; margin-bottom: var(--space-3); }
.ataglance .btn:last-child { margin-bottom: 0; }

.faq { border-top: var(--border); }
.faq__item { border-bottom: var(--border); }
.faq__q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  min-height: 56px; padding: var(--space-3) 0; display: flex; align-items: center;
  justify-content: space-between; gap: var(--space-4);
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; color: var(--ink);
}
.faq__q:hover { color: var(--accent); }
.faq__q svg { width: 18px; height: 18px; flex: none; transition: transform var(--dur) var(--ease); color: var(--accent); }
.faq__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq__a { display: none; padding: 0 0 var(--space-4); color: var(--muted); }
.faq__a[data-open="true"] { display: block; }
.faq__a p { margin: 0; }

/* ---------------------------------------------------------------------
   18. Tables
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: var(--border); }
.table { width: 100%; border-collapse: collapse; font-family: var(--font-body); }
.table caption { text-align: left; font-family: var(--font-display); font-weight: 700; margin-bottom: var(--space-3); color: var(--ink); }
.table th {
  text-align: left; font-family: var(--font-display); font-weight: 700;
  font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: .75rem 1rem; border-bottom: 2px solid var(--ink);
  background: var(--surface); white-space: nowrap;
}
.table td { padding: .85rem 1rem; border-bottom: var(--border); font-size: .9375rem; color: var(--ink-2); vertical-align: top; }
.table tbody tr:nth-child(even) { background: var(--surface-2); }
.table .num, .table .price { font-family: var(--font-display); font-weight: 800; text-align: right; white-space: nowrap; color: var(--ink); }
.table .ctf { color: var(--hivis-ink); background: var(--hivis); font-weight: 700; padding: .1rem .4rem; white-space: nowrap; }
.table a { color: var(--accent); text-decoration: none; font-weight: 600; }
.table a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------
   19. Forms
   --------------------------------------------------------------------- */
.form { max-width: 640px; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: var(--space-5); }
.field label {
  font-family: var(--font-display); font-weight: 700; font-size: .875rem;
  color: var(--ink); letter-spacing: .01em;
}
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  min-height: 48px; padding: .65rem .85rem;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--concrete-300); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: var(--focus-ring);
}
.field--error input, .field--error textarea { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: .8125rem; }
.field__hint { color: var(--muted); font-size: .8125rem; }
.checkbox { display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; margin-bottom: var(--space-5); }
.checkbox input { width: 22px; height: 22px; accent-color: var(--accent); margin-top: .15rem; flex: none; }
.checkbox label { font-family: var(--font-body); font-weight: 400; font-size: .9375rem; color: var(--ink-2); }

/* ---------------------------------------------------------------------
   20. Contact specifics
   --------------------------------------------------------------------- */
.contact-grid { display: grid; gap: var(--space-7); grid-template-columns: 1fr; }
@media (min-width: 1080px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-detail { margin-bottom: var(--space-5); }
.contact-detail dt { font-family: var(--font-display); font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.contact-detail dd { margin: .25rem 0 0; font-size: 1rem; color: var(--ink-2); line-height: 1.5; }
.contact-detail dd a { color: var(--ink-2); text-decoration: none; }
.contact-detail dd a:hover { color: var(--accent); }
.map-frame { border: 3px solid var(--surface-2); margin-top: var(--space-4); }
.map-frame iframe { display: block; width: 100%; height: 360px; border: 0; }
.quick-links { list-style: none; padding: 0; margin: 0; }
.quick-links li { border-bottom: var(--border); }
.quick-links a { display: flex; align-items: center; gap: .5rem; min-height: 52px; text-decoration: none; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.quick-links a:hover { color: var(--accent); }
.quick-links svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------------------------------------------------------------------
   21. Footer
   --------------------------------------------------------------------- */
.site-footer { padding-block: var(--space-8) var(--space-6); }
.footer__grid { display: grid; gap: var(--space-7); grid-template-columns: 1fr; }
@media (min-width: 600px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.2fr 1fr 1.4fr; } }
.footer__brand { margin-bottom: var(--space-6); }
.footer__logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.footer__logo .mark { width: 30px; height: 30px; background: var(--accent); clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%); flex: none; }
.footer__logo .wordmark { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; font-size: 1.5rem; color: #fff; line-height: 1; }
.footer__col h3 { font-family: var(--font-display); font-weight: 700; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-3); }
.footer__col p { color: var(--muted); font-size: .9375rem; line-height: 1.7; margin: 0 0 var(--space-2); }
.footer__col a { color: var(--muted); text-decoration: none; font-size: .9375rem; min-height: 44px; display: flex; align-items: center; }
.footer__col a:hover { color: #fff; }
.footer__col address { font-style: normal; color: var(--muted); font-size: .9375rem; line-height: 1.7; }
.footer__col address a { display: inline-flex; min-height: auto; }
.footer__contact-line { display: flex; flex-direction: column; }
.footer__social { display: flex; gap: var(--space-4); margin-top: var(--space-3); }
.footer__social a { width: 44px; min-height: 44px; justify-content: center; }
.footer__social svg { width: 20px; height: 20px; }

.footer__trust {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  margin-top: var(--space-7); padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: .8125rem;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  list-style: none; padding-left: 0;
}
.footer__trust span { position: relative; padding-left: 1.1rem; }
.footer__trust span::before { content: ""; position: absolute; left: 0; top: .35em; width: 7px; height: 7px; background: var(--accent); }
.footer__base { margin-top: var(--space-6); font-size: .8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; }
.footer__base a { color: var(--muted); text-decoration: none; }
.footer__base a:hover { color: #fff; }
.footer__base-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   22. Scroll reveal
   --------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------
   23. Print
   --------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav__toggle, .mobile-panel, .btn { display: none !important; }
  body { color: #000; background: #fff; font-size: 12pt; }
  .course-card, .testimonial, .trainer-card { border: 1px solid #000; break-inside: avoid; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #000; }
}

/* ---------------------------------------------------------------------
   24. Reduced motion
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
