/* Golden Key Training Centre
   Design lock is in PROJECT.md. Do not add a colour or a face without adding it there.

   Palette is taken from the job: stewards wear hi-vis, so amber is a filled
   surface with near-black on it, never coloured text. #E8A200 as type on white
   is 2.2:1 and fails. One grotesque, two weights. White ground throughout, the
   footer is the only dark surface. */

:root {
  --ink: #15171B;
  --ink-2: #383D45;
  --ink-soft: #5E656E;
  --paper: #FFFFFF;
  --paper-2: #F4F5F7;
  --hi-vis: #E8A200;
  --hi-vis-press: #C98C00;
  --hi-vis-wash: #FFF7E4;
  --line: #E2E4E8;
  --line-strong: #C4C8CF;

  --measure: 58ch;
  --inset: 1.5rem;
  --shell: 1140px;

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (min-width: 900px) { :root { --inset: 3rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--sans); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.6vw, 4.5rem); font-weight: 700; line-height: .98; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.028em; max-width: 20ch; }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.35rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--inset); }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-head[data-scrolled="true"] { border-bottom-color: var(--line); background: rgba(255, 255, 255, .97); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.wordmark { display: flex; align-items: center; gap: .6rem; text-decoration: none; line-height: 1; padding-block: .7rem; }
.wordmark strong { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.03em; }
.wordmark span { font-size: .92rem; font-weight: 400; color: var(--ink-soft); letter-spacing: -0.01em; }

.nav { display: none; gap: 2rem; align-items: center; }
.nav a { position: relative; text-decoration: none; font-size: .95rem; font-weight: 500; padding-block: .5rem; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .05rem; height: 2px;
  background: var(--hi-vis); transform: scaleX(0); transform-origin: left;
  transition: transform 200ms var(--ease-out);
}
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .tel { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .nav a:hover::after { transform: scaleX(1); } }
@media (min-width: 900px) { .nav { display: flex; } .nav-toggle { display: none; } }

.nav-toggle {
  appearance: none; background: none; border: 1px solid var(--line-strong); border-radius: 2px;
  padding: .6rem .85rem; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; color: var(--ink);
  transition: transform 150ms var(--ease-out);
}
.nav-toggle:active { transform: scale(.96); }

/* Transition, not keyframes, so a fast double-tap retargets instead of restarting. */
.nav-drawer {
  overflow: hidden; background: var(--paper); border-top: 1px solid var(--line);
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 260ms var(--ease-out), opacity 180ms ease;
}
.nav-drawer > div { min-height: 0; }
.nav-drawer[data-open="true"] { grid-template-rows: 1fr; opacity: 1; }
.nav-drawer a { display: block; padding: 1rem 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.nav-drawer a:last-child { border-bottom: 0; }

/* ---------- buttons ---------- */
/* Amber is a surface here, with near-black on it. That is the only way it passes. */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: .8rem 1.6rem; white-space: nowrap;
  font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
  border: 2px solid var(--hi-vis); border-radius: 2px; cursor: pointer;
  background: var(--hi-vis); color: var(--ink);
  transition: transform 160ms var(--ease-out), background-color 180ms ease, border-color 180ms ease;
}
.btn:active { transform: scale(.975); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--hi-vis-press); border-color: var(--hi-vis-press); }
  .btn--ghost:hover { background: transparent; border-color: var(--ink); }
}
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 1px;
}

/* ---------- scroll reveal ---------- */
/* Seen once per page, so it earns an animation. Opacity plus 10px, nothing more.
   The hidden state only exists under .reveal-on, which JS adds. Content is never
   gated on a script: no JS, or a suspended IntersectionObserver in a background
   tab, and the page simply renders. */

.reveal-on [data-reveal] {
  opacity: 0; transform: translateY(10px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-on [data-reveal][data-shown] { opacity: 1; transform: none; }

/* ---------- media ---------- */

.media { display: block; width: 100%; height: auto; object-fit: cover; background: var(--paper-2); }

/* ---------- hero ---------- */

.hero { padding: clamp(2.75rem, 5vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero__grid { display: grid; gap: 2.25rem; }
.hero .lede { font-size: clamp(1.06rem, 1.7vw, 1.2rem); color: var(--ink-2); max-width: 40ch; margin-top: 1.35rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }
.hero__media .media { aspect-ratio: 3 / 2; }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1fr .68fr; gap: 4rem; align-items: center; }
  .hero__media .media { aspect-ratio: 3 / 4; }
}

/* ---------- bands ---------- */

.band { padding: clamp(3rem, 6.5vw, 5.5rem) 0; }
.band--rule { border-top: 1px solid var(--line); }
.band__head { margin-bottom: clamp(2rem, 3.5vw, 2.75rem); }
.band__head p { margin-top: .9rem; color: var(--ink-soft); }

.figure-band { margin: 0; }
.figure-band .media { aspect-ratio: 16 / 9; }
@media (min-width: 760px) { .figure-band .media { aspect-ratio: 21 / 9; } }

/* ---------- qualification rows ---------- */
/* Flat rows on a hairline, not cards. */

.tracks { border-top: 1px solid var(--ink); }
.track {
  display: grid; gap: .9rem; padding: 2rem 0 2.1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: background-color 200ms ease;
}
@media (min-width: 860px) {
  .track { grid-template-columns: 20rem 1fr; gap: 3rem; padding: 2.4rem 0 2.5rem; }
}
.track h3 { text-wrap: pretty; }
.track p { color: var(--ink-soft); margin-bottom: 1.1rem; }
.track__meta {
  display: flex; flex-wrap: wrap; gap: .3rem 1.4rem;
  font-size: .875rem; color: var(--ink-soft); font-variant-numeric: tabular-nums;
  margin-bottom: 1.1rem;
}
.track__go {
  font-weight: 600; font-size: .93rem;
  border-bottom: 2px solid var(--hi-vis); padding-bottom: 1px;
  transition: border-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .track:hover { background: var(--paper-2); }
  .track:hover .track__go { border-bottom-color: var(--ink); }
}

/* ---------- process list ---------- */

.process { border-top: 1px solid var(--line); }
.process__row { display: grid; gap: .35rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.process__row h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.process__row p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
@media (min-width: 720px) {
  .process__row { grid-template-columns: 13rem 1fr; gap: 2rem; align-items: baseline; padding: 1.5rem 0; }
}
.split .process__row { grid-template-columns: 1fr; gap: .35rem; }

/* ---------- split ---------- */

.split { display: grid; gap: 2.5rem; }
.split > * { min-width: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr .6fr; gap: 4rem; align-items: start; }
  .split__media { position: sticky; top: 6rem; }
}
.split__media .media { aspect-ratio: 4 / 3; }
@media (min-width: 900px) { .split__media .media { aspect-ratio: 3 / 4; } }

/* ---------- key figures ---------- */

.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.25rem; }
@media (min-width: 720px) { .figures { grid-template-columns: repeat(3, 1fr); gap: 2.4rem 2rem; } }
.figures div { display: grid; gap: .15rem; }
.figures dt { font-size: .875rem; font-weight: 400; color: var(--ink-soft); }
.figures dd {
  margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
}
.figures dd small { display: block; font-size: .85rem; font-weight: 400; letter-spacing: -0.005em; color: var(--ink-soft); margin-top: .3rem; }

/* One hairline above the group, none between rows */
.details { display: grid; gap: 1.35rem; margin-top: clamp(2.25rem, 4vw, 3rem); padding-top: 1.9rem; border-top: 1px solid var(--ink); }
@media (min-width: 720px) { .details { grid-template-columns: 1fr 1fr; gap: 1.8rem 3rem; } }
.details div { display: grid; gap: .2rem; }
.details dt { font-size: .875rem; color: var(--ink-soft); }
.details dd { margin: 0; color: var(--ink); max-width: 44ch; }

/* ---------- units ---------- */

.units { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.units li { display: grid; gap: .35rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.units .u-title { font-weight: 500; font-size: 1rem; max-width: 52ch; }
.units .u-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (min-width: 780px) {
  .units li { grid-template-columns: 1fr 17rem; align-items: baseline; gap: 2rem; }
  .units .u-meta { justify-content: flex-end; }
}

.prose { max-width: var(--measure); }
.prose ul { list-style: none; padding: 0; margin: 0 0 1.1em; }
.prose li { position: relative; padding-left: 1.2rem; margin-bottom: .55em; }
.prose li::before { content: ""; position: absolute; left: 0; top: .6em; width: .5rem; height: .5rem; background: var(--hi-vis); }

.callout {
  background: var(--hi-vis-wash); border-left: 4px solid var(--hi-vis);
  padding: 1.25rem 1.4rem; margin: 2rem 0 0; max-width: var(--measure);
}
.callout p { margin-bottom: .65em; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { font-weight: 600; }

/* ---------- enquiry ---------- */

.enquire { display: grid; gap: 2.5rem; }
.enquire > * { min-width: 0; }
@media (min-width: 940px) { .enquire { grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: start; } }

.field { display: grid; gap: .35rem; margin-bottom: 1rem; min-width: 0; }
.field label { font-size: .875rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: .78rem .85rem; min-height: 50px; width: 100%; min-width: 0; max-width: 100%;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 2px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { min-height: 118px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--hi-vis); outline: none;
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #A8291A; }

.contact-card { border-top: 1px solid var(--ink); padding-top: 1.6rem; }
.contact-card dt { font-size: .875rem; color: var(--ink-soft); margin-bottom: .15rem; }
.contact-card dd { margin: 0 0 1.3rem; font-size: 1rem; line-height: 1.5; }
.contact-card dd:last-child { margin-bottom: 0; }
.contact-card a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-card dd > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .contact-card a:hover { text-decoration-color: var(--hi-vis); text-decoration-thickness: 2px; } }

.form-note { font-size: .85rem; color: var(--ink-soft); margin-top: .9rem; }
/* Blur bridges the swap so two strings do not read as two overlapping objects. */
.form-status {
  font-size: .93rem; font-weight: 500; margin-top: .9rem; min-height: 1.5em; max-width: 40ch;
  transition: opacity 200ms ease, filter 200ms ease;
}
.form-status[data-swapping] { opacity: .35; filter: blur(2px); }
.form-status[data-tone="error"] { color: #A8291A; }
.form-status[data-tone="ok"] { color: var(--ink); }

/* ---------- footer ---------- */

.site-foot { background: var(--ink); color: #B9BEC6; padding: clamp(2.75rem, 5vw, 4rem) 0 1.9rem; font-size: .93rem; }
.site-foot a { color: var(--paper); text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .site-foot a:hover { text-decoration-color: var(--hi-vis); } }
.site-foot__grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .site-foot__grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; } }
.site-foot h4 { font-size: .875rem; font-weight: 600; color: var(--paper); margin: 0 0 .8rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .55rem; max-width: 30ch; }
.site-foot p { color: #B9BEC6; }
.site-foot .wordmark strong { color: var(--paper); }
.site-foot .wordmark span { color: #B9BEC6; }
.site-foot__legal { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .82rem; }
.site-foot__legal p { color: #8E949D; max-width: 76ch; margin-bottom: .5em; }

.skip { position: absolute; left: -9999px; background: var(--hi-vis); color: var(--ink); padding: .8rem 1.2rem; z-index: 100; font-weight: 600; }
.skip:focus { left: 0; top: 0; }

/* ---------- reduced motion ---------- */
/* Fewer and gentler, not zero. Opacity survives, movement does not. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on [data-reveal] { transform: none; transition: opacity 300ms ease; transition-delay: 0ms; }
  .btn, .nav-toggle, .track { transition: background-color 180ms ease, border-color 180ms ease; }
  .btn:active, .nav-toggle:active { transform: none; }
  .nav a::after { transition: none; }
  .nav-drawer { transition: opacity 150ms ease; }
  .split__media { position: static; }
}
