/* ==========================================================
   WATAHA TRAINING CENTRE: one stylesheet for the whole site
   Colours and fonts are set once in :root below.
   ========================================================== */

:root {
  --night: #171717;        /* poster black */
  --night-2: #222221;      /* tiles on black */
  --bone: #e3e2dd;         /* poster off-white */
  --paper: #fafaf7;        /* light sections */
  --mist: #efeee9;         /* tiles on light */
  --ink: #171717;
  --graphite: #6b6a65;     /* secondary text on light */
  --ash: #a3a29c;          /* secondary text on dark */
  --rule: #dedcd6;
  --rule-dark: #34342f;

  /* CSCS card colours */
  --c-green: #2c7d40;
  --c-blue: #2160ab;
  --c-gold: #c49b21;
  --c-black: #2a2a2a;

  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --thin: "Montserrat", "Avenir Next", "Century Gothic", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(18px, 4vw, 40px);
  --radius: 28px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
p, ul, ol, address, figure, dl, dd { margin: 0; }
address { font-style: normal; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; }

.eyebrow {
  font-family: var(--thin);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.sub { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.4; color: var(--graphite); letter-spacing: -0.01em; }
.dark .sub, .on-dark .sub { color: var(--ash); }
.small { font-size: 0.9rem; color: var(--graphite); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bone); color: var(--ink); padding: 8px 14px; z-index: 100; border-radius: 99px; }
.skip:focus { left: 8px; }

/* ---------- Buttons & links ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 1rem/1 var(--body); letter-spacing: -0.01em;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--paper);
  transition: background-color .2s, color .2s, border-color .2s;
}
.pill:hover { background: #3a3a38; }
.pill.light { background: var(--bone); color: var(--ink); }
.pill.light:hover { background: #ffffff; }
.pill.ghost { background: transparent; color: inherit; border-color: currentColor; }
.pill.ghost:hover { background: rgba(127,127,127,.12); }
.pill.sm { padding: 9px 16px; font-size: .875rem; }
.more { font-weight: 500; text-decoration: none; white-space: nowrap; }
.more::after { content: " ›"; }
.more:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.center { text-align: center; }
.center .actions { justify-content: center; }

/* ---------- Navigation ---------- */
.nav-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 23, 23, .82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  color: var(--bone);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-bar .wrap { display: flex; align-items: center; gap: 20px; height: 56px; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.nav-logo img { width: 34px; height: 34px; }
.nav-logo span { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.05em; }
.nav-links { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.nav-links a { display: block; padding: 8px 12px; font-size: .875rem; text-decoration: none; color: rgba(227,226,221,.82); border-radius: 99px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"] { background: rgba(255,255,255,.08); }
.nav-bar .pill { margin-left: 8px; }
.nav-menu { display: none; }

@media (max-width: 820px) {
  .nav-links, .nav-bar .pill.desk { display: none; }
  .nav-menu { display: block; position: relative; }
  .nav-menu summary { list-style: none; cursor: pointer; padding: 8px 4px 8px 12px; font-size: .95rem; color: var(--bone); }
  .nav-menu summary::-webkit-details-marker { display: none; }
  .nav-menu summary span::after { content: "  +"; }
  .nav-menu[open] summary span::after { content: "  –"; }
  .nav-menu ul {
    position: absolute; right: calc(var(--gutter) * -1); top: 48px; width: 100vw; max-width: 100vw;
    list-style: none; margin: 0; padding: 8px var(--gutter) 24px;
    background: rgba(23,23,23,.97); border-bottom: 1px solid var(--rule-dark);
  }
  .nav-menu li a { display: block; padding: 14px 0; font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.03em; text-decoration: none; border-bottom: 1px solid var(--rule-dark); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 140px); }
.dark { background: var(--night); color: var(--bone); }
.mist { background: var(--mist); }
.head { display: grid; gap: 16px; margin-bottom: clamp(40px, 6vw, 72px); }
.head.center { justify-items: center; margin-inline: auto; max-width: 820px; }
.head.center .sub { max-width: 40ch; }

/* ---------- Hero (the poster) ---------- */
.hero { background: var(--night); color: var(--bone); overflow: hidden; }
.hero .wrap { padding-block: clamp(32px, 5vw, 56px) 0; }
.hero-intro {
  font-family: var(--thin); font-weight: 300;
  font-size: clamp(1rem, 1.55vw, 1.3rem); line-height: 1.5; letter-spacing: .01em;
}
@media (min-width: 900px) { .hero-intro { text-align: justify; text-align-last: left; hyphens: auto; } }

.stage {
  margin-top: clamp(8px, 2vw, 20px);
  isolation: isolate;
  --wm: min(25.5vw, 320px);   /* wordmark size; site.js fits it to the width */
}
.wordmark {
  font-family: var(--display); font-weight: 800;
  font-size: var(--wm);
  line-height: .78;
  letter-spacing: -0.075em;
  margin-left: -0.04em;
  color: var(--bone);
  padding-bottom: .06em;
  white-space: nowrap;
}
.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: end;
  margin-top: clamp(18px, 3vw, 34px);
  padding-block: clamp(26px, 4vw, 44px) clamp(48px, 7vw, 92px);
  border-top: 1px solid rgba(227, 226, 221, .16);
}
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.join { font-family: var(--thin); font-weight: 300; font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: .02em; line-height: 1; text-transform: uppercase; }
.hero-foot p.lead { color: var(--ash); max-width: 32ch; font-size: 1.1rem; }
.hero-badge { width: clamp(104px, 15vw, 190px); height: auto; justify-self: end; align-self: end; opacity: .95; }

@media (max-width: 760px) {
  .hero-foot { grid-template-columns: 1fr; gap: 26px; }
  .hero-badge { justify-self: start; width: 104px; }
}

/* ---------- Statement ---------- */
.statement h2 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); }
.statement .sub { margin-top: 20px; }
.statement .actions { margin-top: 28px; }

/* ---------- ID card graphic ---------- */
.idcard {
  --cc: var(--c-green); --ct: #fff;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  width: 100%; max-width: 100%;
  aspect-ratio: 85.6 / 54;
  padding: 7% 8%;
  border-radius: clamp(10px, 1.4vw, 16px);
  background: var(--cc);
  background-image: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,0) 55%);
  color: var(--ct);
  box-shadow: 0 30px 50px -30px rgba(0,0,0,.45);
  text-decoration: none;
}
.idcard.green { --cc: var(--c-green); }
.idcard.blue { --cc: var(--c-blue); }
.idcard.gold { --cc: var(--c-gold); --ct: var(--ink); }
.idcard.black { --cc: var(--c-black); box-shadow: 0 30px 50px -30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); }
.idcard .chip { width: 18%; aspect-ratio: 1.3; border-radius: 4px; background: linear-gradient(135deg, #efe1ad, #b99a4b); }
.idcard .name { font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 2.2vw, 1.7rem); letter-spacing: -0.04em; line-height: 1; }
.idcard .role { font-family: var(--thin); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; opacity: .85; margin-top: 6px; }
.idcard .bottom { display: grid; }
.idcard .row { display: flex; justify-content: space-between; align-items: flex-start; }

/* ---------- Compare (which card) ---------- */
.compare { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.compare > article { display: grid; gap: 18px; align-content: start; text-align: center; justify-items: center; }
.compare .idcard { max-width: 240px; }
.compare h3 { font-size: 1.5rem; margin-top: 8px; }
.compare .role-line { color: var(--graphite); margin-top: -10px; }
.compare dl { width: 100%; border-top: 1px solid var(--rule); display: grid; }
.compare dl > div { padding-block: 16px; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.compare dt { font-family: var(--thin); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--graphite); }
.compare dd { font-weight: 500; line-height: 1.35; }
@media (max-width: 980px) { .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 64px; } }
@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--night-2); border-radius: 22px; padding: 28px 24px 30px; display: grid; gap: 10px; align-content: start; }
.steps li::before { content: counter(s); font-family: var(--thin); font-weight: 300; font-size: 3rem; line-height: 1; color: var(--bone); margin-bottom: 18px; }
.steps p { color: var(--ash); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--mist); border-radius: var(--radius); padding: clamp(28px, 3.4vw, 44px); display: grid; gap: 12px; align-content: start; text-decoration: none; transition: transform .25s ease; }
a.tile:hover { transform: scale(1.012); }
.mist .tile { background: var(--paper); }
.tile .num { font-family: var(--display); font-weight: 800; font-size: clamp(4rem, 8vw, 6.5rem); letter-spacing: -0.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.tile p { color: var(--graphite); }
.tile .more { margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 500; }
.dot { width: 12px; height: 12px; border-radius: 3px; background: var(--dc); flex: none; }
.dot.green { --dc: var(--c-green); } .dot.blue { --dc: var(--c-blue); } .dot.gold { --dc: var(--c-gold); } .dot.black { --dc: var(--c-black); }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- Big dark band ---------- */
.band { text-align: center; }
.band h2 { font-size: clamp(2.6rem, 7vw, 5.5rem); letter-spacing: -0.05em; }
.band .sub { margin: 22px auto 0; max-width: 44ch; }
.band .actions { margin-top: 32px; justify-content: center; }

/* ---------- Blog cards ---------- */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.posts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post { background: var(--mist); border-radius: 22px; padding: 30px; display: grid; gap: 12px; align-content: start; text-decoration: none; transition: transform .25s ease; }
.mist .post { background: var(--paper); }
.post:hover { transform: scale(1.012); }
.post h3 { font-size: 1.3rem; }
.post p { color: var(--graphite); }
.post .date { font-family: var(--thin); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--graphite); }
@media (max-width: 860px) { .posts, .posts.two { grid-template-columns: 1fr; } }

/* ---------- Visit strip ---------- */
.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.visit > div { background: var(--paper); border-radius: 22px; padding: 28px; display: grid; gap: 8px; align-content: start; }
.visit .big { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.03em; text-decoration: none; line-height: 1.2; }
.visit a.big:hover { text-decoration: underline; }
@media (max-width: 860px) { .visit { grid-template-columns: 1fr; } }

/* ---------- Page header (sub pages) ---------- */
.page-head { padding-block: clamp(64px, 9vw, 120px) clamp(40px, 6vw, 72px); text-align: center; }
.page-head .wrap { display: grid; gap: 18px; justify-items: center; }
.page-head .sub { max-width: 44ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; background: var(--mist); text-decoration: none; font-weight: 500; font-size: .95rem; }
.chips a:hover { background: var(--rule); }

/* ---------- CSCS page ---------- */
.card-sec { scroll-margin-top: 64px; }
.card-sec .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.card-sec .visual { display: grid; place-items: center; }
.card-sec .idcard { max-width: 420px; }
.card-sec .idcard .name { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.card-sec .body { display: grid; gap: 20px; justify-items: start; }
.card-sec h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.facts { width: 100%; display: grid; border-top: 1px solid var(--rule); }
.facts > div { padding-block: 16px; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.facts dt { font-family: var(--thin); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--graphite); }
.facts dd { font-weight: 500; font-size: 1.1rem; line-height: 1.35; }
.dark .facts, .dark .facts > div { border-color: var(--rule-dark); }
.dark .facts dt { color: var(--ash); }
.card-sec.flip .visual { order: 2; }
@media (max-width: 820px) { .card-sec .wrap { grid-template-columns: 1fr; } .card-sec.flip .visual { order: 0; } }

/* ---------- NVQ list ---------- */
.search { display: flex; justify-content: center; margin-top: 18px; width: 100%; }
.search input {
  font: inherit; font-size: 1.05rem; width: min(100%, 460px);
  padding: 15px 22px; border-radius: 999px; border: 1px solid var(--rule); background: var(--mist); color: var(--ink);
}
.search input:focus { outline: 2px solid var(--ink); outline-offset: 2px; background: #fff; }
.result { color: var(--graphite); font-size: .95rem; }
.level-block { padding-block: clamp(40px, 5vw, 64px); scroll-margin-top: 64px; }
.level-block + .level-block { border-top: 1px solid var(--rule); }
.level-block header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 28px; }
.level-block header p { color: var(--graphite); max-width: 52ch; margin-top: 10px; }
.quals { list-style: none; padding: 8px clamp(18px, 3vw, 32px); margin: 0; background: var(--mist); border-radius: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.quals li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--rule); }
.quals li .more { font-size: .9rem; }
.quals li[hidden], .level-block[hidden] { display: none; }
@media (max-width: 760px) { .quals { grid-template-columns: 1fr; } }
.no-match { text-align: center; color: var(--graphite); padding: 32px 0; }

/* ---------- Article ---------- */
.article { padding-block: clamp(56px, 8vw, 104px); }
.prose { font-size: 1.15rem; line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose h1 { font-size: clamp(2.4rem, 5.4vw, 3.8rem); margin-top: .3em; }
.prose h2 { font-size: 1.75rem; margin-top: 1.8em; letter-spacing: -0.03em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose a { text-decoration-thickness: 1px; }
.article-cta { margin-top: 56px; background: var(--mist); border-radius: 22px; padding: 32px; display: grid; gap: 14px; justify-items: start; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 20px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.form { background: var(--mist); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label, .field legend { font-weight: 500; font-size: .95rem; }
.field small { color: var(--graphite); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; width: 100%; color: var(--ink);
  padding: 13px 16px; border-radius: 12px; border: 1px solid var(--rule); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.field textarea { min-height: 130px; resize: vertical; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.radios label { font-weight: 400; display: inline-flex; gap: 8px; align-items: center; }
.radios input { width: 18px; height: 18px; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 12px; background: #fbe9e6; color: #8a2317; font-weight: 500; }
.details { display: grid; gap: 16px; }
.details > div { background: var(--night); color: var(--bone); border-radius: 22px; padding: 28px; display: grid; gap: 8px; }
.details .eyebrow { color: var(--ash); }
.details .big { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.03em; text-decoration: none; line-height: 1.2; overflow-wrap: anywhere; }
.details a.big:hover { text-decoration: underline; }
.details address { color: var(--bone); }
.details :focus-visible { outline-color: var(--bone); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--ash); font-size: .875rem; }
.site-footer .top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 64px 40px; }
.site-footer .brand-col { display: grid; gap: 16px; justify-items: start; align-content: start; }
.site-footer .brand-col img { width: 88px; height: 88px; }
.site-footer .brand-col p { max-width: 36ch; }
.site-footer h2 { font-family: var(--thin); font-weight: 400; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bone); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--bone); text-decoration: underline; }
.site-footer .legal { border-top: 1px solid var(--rule-dark); padding-block: 22px 28px; font-size: .82rem; display: grid; gap: 10px; }
.legal-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.legal-links { display: flex !important; flex-wrap: wrap; gap: 6px 20px !important; }
.legal-links a { color: var(--bone); }
.site-footer .company { max-width: 90ch; }
.site-footer :focus-visible { outline-color: var(--bone); }
@media (max-width: 860px) { .site-footer .top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .brand-col { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer .top { grid-template-columns: 1fr; } }

/* ---------- Mobile quick bar ---------- */
.quickbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 72px; }
  .quickbar {
    display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(23,23,23,.88);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
  }
  .quickbar a { display: grid; place-items: center; height: 48px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--bone); border: 1px solid rgba(227,226,221,.3); }
  .quickbar a:last-child { background: var(--bone); color: var(--ink); border-color: var(--bone); }
  .quickbar :focus-visible { outline-color: var(--bone); }
}
