/* =========================================================
   CLEARWAY DRIVING SCHOOL
   Design tokens cloned from samenveiligonderweg.nl
   cream #F5F1E4 · signal yellow #FFD702 · ink #231F20
   ========================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Hanken+Grotesk:ital,wght@0,300..800;1,400..600&display=swap');

:root {
  --primary: #FFD702;
  --primary-deep: #E8C200;
  --text: #231F20;
  --bg: #F5F1E4;
  --bg-2: #EFEADA;
  --paper: #FBF8EF;
  --blue: #1d4ed8;     /* road-sign blue */
  --green: #2f9e2f;
  --red: #e02424;
  --line: rgba(35,31,32,.14);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  /* fluid sizing, same idea as original clamp() system */
  --container: min(92%, 1400px); /* % (not vw) so centring ignores the scrollbar width */
  --gap: clamp(1rem, 2.2vw, 2.2rem);
  --radius: clamp(18px, 2.4vw, 34px);
  --radius-pill: 999px;

  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; scroll-behavior: auto; }

/* ---- Accessibility: skip link + visible keyboard focus ---- */
.skip-link {
  position: fixed; top: .7rem; left: .7rem; z-index: 1000;
  background: var(--text); color: #fff; font-weight: 700; text-decoration: none;
  padding: .75rem 1.1rem; border-radius: 12px;
  transform: translateY(-160%); transition: transform .2s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }
/* two-tone ring (yellow + ink halo) stays visible on cream, yellow and dark photo backgrounds.
   No border-radius here — the browser rounds the outline to each element's own radius. */
:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(35,31,32,.55);
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(1rem, .55vw + .85rem, 1.18rem);
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--primary); color: var(--text); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---- Layout helpers ---- */
.container { width: var(--container); margin-inline: auto; }
.section { padding-block: clamp(3rem, 6vw, 6.5rem); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 4.5vw, 4.5rem); }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  display: inline-flex; align-items: center; gap: .6em;
  color: var(--text);
}
.eyebrow::before {
  content: ""; width: 26px; height: 8px; border-radius: 99px;
  background: var(--primary);
}

/* ---- Typography ---- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.01em;
  text-transform: none;
}
h1.display { font-size: clamp(2.9rem, 9.2vw, 9.5rem); }
h2.display { font-size: clamp(2.2rem, 6.2vw, 6rem); }
h3.display { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.lead { font-size: clamp(1.1rem, 1.4vw, 1.45rem); line-height: 1.5; max-width: 40ch; }
.muted { opacity: .72; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .7em;
  font-weight: 700; font-size: 1rem;
  padding: .95em 1.5em; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--text);
  transition: transform .5s var(--ease-out), background .3s, box-shadow .4s;
  will-change: transform; line-height: 1;
}
.btn:hover { background: var(--primary-deep); }
.btn--ink { background: var(--text); color: var(--bg); }
.btn--ink:hover { background: #000; }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--text); }
.btn--ghost:hover { background: var(--text); color: var(--bg); }
.btn .btn__arrow { transition: transform .4s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* magnetic wrapper */
[data-magnetic-strength] { display: inline-flex; }

/* ---- Squiggle-underline hover link ---- */
[data-draw-line] { position: relative; display: inline-block; }
[data-draw-line-box] {
  position: absolute; left: -2%; right: -2%; width: 104%;
  bottom: -.42em; height: .55em; color: var(--primary);
  pointer-events: none;
}
[data-draw-line-box] svg { width: 100%; height: 100%; overflow: visible; }
.text-link {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 700;
}
.text-link .arrow { transition: transform .4s var(--ease-out); }
.text-link:hover .arrow { transform: translateX(4px); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; padding: 1.1rem clamp(1rem, 4vw, 3rem);
  transition: transform .5s var(--ease-out), background .4s, padding .4s;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  padding-block: .7rem;
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-hidden { transform: translateY(-105%); }

/* Brand logo — fills driven by CSS vars so it re-colours to suit its background.
   Defaults below = light/cream backgrounds (nav, footer, mobile menu). */
.logo {
  display: flex; align-items: center; z-index: 2; line-height: 0;
  --lg-ink: var(--text);      /* DRIVING / SCHOOL wordmark */
  --lg-accent: #FDCB03;       /* CLEARWAY */
  --lg-road: #605E5F;         /* road graphic */
  --lg-stroke: transparent;   /* hairline letter joins */
}
.logo .lg { height: 44px; width: auto; display: block; }
.footer .logo .lg { height: 52px; }
/* on dark backgrounds: flip the wordmark light, keep the yellow accent */
.on-dark .logo, .logo.on-dark {
  --lg-ink: var(--bg); --lg-accent: #FFD702; --lg-road: #cfccc4;
}
/* legacy fallbacks (pre-injection markup) */
.logo__mark { width: 40px; height: 40px; flex: none; }
.logo__text { font-family: var(--font-display); font-size: .95rem; line-height: .82; text-transform: uppercase; }
.logo__text span { display: block; }

.nav__menu { display: flex; align-items: center; gap: clamp(1.3rem, 2.6vw, 2.8rem); }
.nav__links { display: flex; align-items: center; gap: clamp(1.3rem, 2.6vw, 2.8rem); }
.nav__links a { font-weight: 800; font-size: 1.08rem; position: relative; letter-spacing: -0.01em; }
.nav__links a.is-active { color: var(--primary-deep); }
/* squiggle-underline hover box, tuned for nav */
.nav__links a[data-draw-line] { display: inline-block; }
.nav__links a [data-draw-line-box] { bottom: -.34em; height: .5em; }

.nav__toggle { display: none; width: 46px; height: 46px; border-radius: 50%; background: var(--text); position: relative; z-index: 2; }
.nav__toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--bg); transition: .3s; }
.nav__toggle span:nth-child(1){ top: 18px; }
.nav__toggle span:nth-child(2){ bottom: 18px; }
.nav.is-open .nav__toggle span:nth-child(1){ top: 22px; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2){ bottom: 22px; transform: rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-top: clamp(8rem, 16vh, 12rem); padding-bottom: clamp(2rem,5vw,4rem); text-align: center; position: relative; }
.hero__inner { position: relative; }
.hero h1 { margin-inline: auto; max-width: 16ch; }
.hero .rotating-wrap { display: block; }

/* rotating word */
[data-rotating-title] { display: inline-block; }
[data-rotating-words] { display: inline-block; vertical-align: top; position: relative; }
.rotating-text__inner { display: inline-flex; position: relative; height: 1em; overflow: visible; }
.rotating-text__word {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  color: var(--text); display: inline-block; line-height: 1;
}
.rotating-text__word .line-wrapper {
  position: absolute; left: 0; right: 0; top: 100%; bottom: auto;
  height: .34em; margin-top: -.06em;
  color: var(--primary);
}
.rotating-text__word .line-wrapper svg { width: 100%; height: 100%; overflow: visible; }

.hero__sub { margin: 1.8rem auto 2.2rem; max-width: 52ch; font-size: clamp(1.1rem,1.4vw,1.4rem); }
.hero__cta { display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.hero__figure { position: relative; margin-top: clamp(2.5rem, 6vw, 5rem); }
.hero__media {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/9;
}
@media (max-width: 700px) {
  /* taller frame on phones so the full driving scene (incl. the bottom) shows */
  .hero__media { aspect-ratio: 4/3.4; }
}
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }

/* roundabout sign at the image's top-left corner */
.hero__sign {
  position: absolute; z-index: 5;
  width: clamp(70px, 9vw, 132px); height: auto;
  top: clamp(-22px, -1.4vw, -10px); left: clamp(-14px, -1vw, -6px);
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.22));
  will-change: transform;
}
.hero__sign--2 { left: auto; right: clamp(-6px, 3vw, 60px); top: 16%; width: clamp(60px,8vw,110px); }
.hero__sign img { width: 100%; height: auto; -webkit-user-drag: none; }

/* =========================================================
   USP CARDS (icon + momentum hover)
   ========================================================= */
.usps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.usp {
  background: var(--paper); border-radius: var(--radius);
  padding: clamp(1.6rem, 2.4vw, 2.6rem);
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: 0 1px 0 var(--line);
  will-change: transform, opacity;
}
.usp__icon {
  width: clamp(74px, 8vw, 104px); height: clamp(74px, 8vw, 104px);
  display: grid; place-items: center; margin-bottom: .4rem;
}
.usp__icon svg, .usp__icon img { width: 100%; height: 100%; object-fit: contain; will-change: transform; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.usp h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem,2vw,2rem); line-height: 1; }
.usp p { opacity: .82; }
.usp .text-link { margin-top: auto; }

/* momentum hover plumbing */
[data-momentum-hover-element] { cursor: pointer; }
[data-momentum-hover-target] { will-change: transform; }

/* =========================================================
   STICKY TITLE SCROLL  (the "Achter ieder…" effect)
   ========================================================= */
.sticky-title {
  min-height: 135vh; position: relative;
}
.sticky-title__pin {
  position: sticky; top: 0; height: 100vh;
  display: grid; place-items: center; text-align: center;
  padding-inline: 5vw;
}
.sticky-title__stack { position: relative; display: grid; }
[data-sticky-title="heading"] {
  grid-area: 1 / 1; visibility: hidden;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 7.5rem); line-height: .98;
  max-width: 18ch; margin-inline: auto;
}
.sticky-title .last-word { position: relative; display: inline-block; white-space: nowrap; color: var(--text); line-height: 1; }
.sticky-title .last-word svg {
  position: absolute; left: -2%; width: 104%; top: 100%; bottom: auto; margin-top: -.04em; height: .32em;
  color: var(--primary); overflow: visible;
}

/* =========================================================
   LOGO WALL  (Trusted & approved)
   ========================================================= */
.logowall { text-align: center; }
.logowall__grid {
  margin-top: 2.5rem; display: grid; gap: clamp(1rem,2vw,2rem);
  grid-template-columns: repeat(5, 1fr); align-items: center;
}
.badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding: 1.4rem 1rem; border-radius: var(--radius);
  background: var(--paper); box-shadow: 0 1px 0 var(--line);
  min-height: 120px; text-align: center;
}
.badge svg, .badge img { width: 54px; height: 54px; object-fit: contain; }
.badge b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; letter-spacing: .02em; }
.badge span { font-size: .74rem; opacity: .7; text-transform: uppercase; letter-spacing: .1em; }

/* =========================================================
   SCROLL-DRAWN ROAD LINE  (Your road to a full licence)
   ========================================================= */
.roadmap { background: var(--bg-2); }
.roadmap__head { text-align: center; max-width: 30ch; margin: 0 auto clamp(2rem,5vw,4rem); }
.roadmap__head h2 { margin-bottom: 1rem; }

.draw-wrap { position: relative; }
.draw-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.draw-svg path { fill: none; }
[data-draw-scroll-path] { visibility: hidden; }

.roadmap__steps { position: relative; z-index: 1; display: grid; gap: clamp(3rem, 8vw, 7rem); }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,4rem); align-items: center; }
.step:nth-child(even) .step__text { order: 2; }
.step__num {
  font-family: var(--font-display); font-size: clamp(3rem,7vw,7rem);
  -webkit-text-stroke: 2px var(--text); color: transparent; line-height: 1;
}
.step h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem,3vw,2.6rem); margin: .4rem 0 .6rem; }
.step__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.step__media img { width: 100%; height: 100%; object-fit: cover; }
.step__dot {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 30%, transparent);
}

/* =========================================================
   FALLING / DRAGGABLE ROAD SIGNS  (Matter.js physics)
   ========================================================= */
.signs { background: var(--bg); }
.canvas-matter {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--primary); min-height: clamp(440px, 66vh, 700px);
  display: flex; align-items: flex-start; justify-content: center;
  isolation: isolate;
}
/* text sits ABOVE the falling signs (z-index 3) so it stays legible, and is
   wide so the heading reads horizontally instead of one word per line */
.canvas-matter__content {
  position: relative; z-index: 3; text-align: center; pointer-events: none;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 5vw, 3rem) 0; max-width: min(94%, 940px);
}
.canvas-matter__content h2 { color: var(--text); font-size: clamp(1.9rem, 5.4vw, 4.4rem); line-height: .98; }
.canvas-matter__content p { color: var(--text); opacity: .85; margin: 1rem auto 0; max-width: 48ch; font-weight: 500; }
.canvas-matter__hint { display: none; }
.canvas-matter__target {
  position: absolute; inset: 0; z-index: 2; cursor: grab;
}
.canvas-matter__target:active { cursor: grabbing; }
.canvas-matter__target canvas { width: 100% !important; height: 100% !important; display: block; }

/* =========================================================
   NEWS
   ========================================================= */
.news__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem,4vw,3.5rem); }
.news__head .lead { max-width: 46ch; margin-top: 1rem; }
.news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card {
  display: flex; flex-direction: column; background: var(--paper);
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line);
  transition: transform .5s var(--ease-out), box-shadow .5s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,.12); }
.card__media { aspect-ratio: 16/10; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.4rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.card__date { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; opacity: .6; font-weight: 700; }
.card h3 { font-size: 1.3rem; line-height: 1.15; font-weight: 800; }
.card .text-link { margin-top: auto; padding-top: .6rem; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  background: var(--primary); color: var(--text); padding: .35em .8em; border-radius: 99px; }

/* =========================================================
   FOOTER + CTA
   ========================================================= */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); text-align: center; color: #fff;
  padding: clamp(4rem, 10vw, 8.5rem) clamp(1.5rem, 5vw, 5rem);
  /* darkened driving photo behind the message — flat, even overlay (no gradient) */
  background:
    linear-gradient(rgba(20,18,17,.72), rgba(20,18,17,.72)),
    #231F20 url("../images/brit/brit-london.jpg") center/cover no-repeat;
}
/* yellow accent pill above the heading */
.cta::before {
  content: ""; display: block; width: 52px; height: 7px; border-radius: 99px;
  background: var(--primary); margin: 0 auto clamp(1.2rem, 2vw, 1.8rem);
}
.cta h2 { color: #fff; margin-bottom: 1.2rem; }
.cta .lead { margin: 0 auto 2.2rem; color: #fff; opacity: .9; max-width: 46ch; }

.footer { padding-block: clamp(3rem,6vw,5rem) 2.5rem; }
.footer__top { display: grid; grid-template-columns: 1.8fr 1fr 1.2fr; gap: 2rem; }
.footer__brand .logo { margin-bottom: 1.2rem; }
.footer__brand p { opacity: .72; max-width: 32ch; }
.footer col, .footer__col h4 { }
.footer__col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; opacity: .6; }
/* footer links: an arrow slides in on hover (like the reference) */
.footer__col a {
  display: flex; align-items: center; width: fit-content; padding: .35rem 0; font-weight: 600;
  transition: color .2s;
}
.footer__col a::before {
  content: "→"; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
  transform: translateX(-.35em); margin-right: 0; font-weight: 800; color: var(--primary-deep);
  transition: max-width .35s var(--ease-out), opacity .3s, margin-right .35s var(--ease-out), transform .35s var(--ease-out);
}
.footer__col a:hover { color: var(--primary-deep); }
.footer__col a:hover::before { max-width: 1.4em; opacity: 1; margin-right: .45em; transform: translateX(0); }
.footer__bottom {
  margin-top: clamp(2.5rem,5vw,4rem); padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .88rem;
}
.footer__bottom > span { opacity: .7; }
.credit {
  display: inline-block; font-weight: 700; opacity: .75; transform-origin: center;
  transition: color .2s, opacity .2s;
}
.credit:hover { opacity: 1; color: var(--primary-deep); animation: credit-wiggle .5s ease-in-out; }
@keyframes credit-wiggle {
  0%,100% { transform: rotate(0deg); }
  20% { transform: rotate(-4deg); }
  45% { transform: rotate(3deg); }
  70% { transform: rotate(-2deg); }
  88% { transform: rotate(1deg); }
}

/* =========================================================
   PAGE TRANSITION (Barba) — yellow curtain w/ logo mark
   ========================================================= */
.transition {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  display: grid; place-items: center;
  background: var(--primary);
  transform: translateY(100%);
  will-change: transform;
  /* curtain is yellow → whole logo renders ink for contrast */
  --lg-ink: #231F20; --lg-accent: #231F20; --lg-road: #231F20; --lg-stroke: transparent;
}
.transition__mark { width: clamp(180px, 30vw, 280px); height: auto; opacity: 0; }
.transition__mark .lg { width: 100%; height: auto; display: block; }

/* generic reveal helper (for non-scrub fade-ups set by JS) */
.reveal { will-change: transform, opacity; }

/* =========================================================
   PAGE HEADER (interior pages)
   ========================================================= */
.pagehead { padding-top: clamp(8rem, 16vh, 12rem); padding-bottom: clamp(2rem,4vw,3rem); }
.pagehead h1 { max-width: 18ch; }
.pagehead .lead { margin-top: 1.4rem; }
.pagehead__row { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem,4vw,4rem); align-items: end; }

/* split content sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,4.5rem); align-items: center; }
.split__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3.4; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split h2 { margin-bottom: 1.2rem; }
.split p + p { margin-top: 1rem; }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--gap); text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem,5vw,4.4rem); line-height: 1; color: var(--text); }
.stat span { opacity: .7; font-weight: 600; }

/* course list */
.courses-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--gap); }
.course {
  display: grid; grid-template-columns: 0.9fr 1.1fr; background: var(--paper);
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line);
}
.course__media { overflow: hidden; }
.course__media img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }
.course__body { padding: clamp(1.4rem,2.4vw,2.2rem); display: flex; flex-direction: column; gap: .7rem; }
.course__price { font-family: var(--font-display); font-size: 1.8rem; }
.course h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem,2.4vw,2.1rem); }
.course ul { display: flex; flex-direction: column; gap: .4rem; margin: .4rem 0; }
.course li { display: flex; gap: .6rem; align-items: flex-start; opacity: .85; font-size: .98rem; }
.course li::before { content: "✓"; color: var(--green); font-weight: 800; }
.course .btn { margin-top: auto; align-self: flex-start; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,5rem); }
.field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: .9em 1.1em; border-radius: 14px; border: 2px solid var(--line);
  background: var(--paper); color: var(--text); transition: border-color .25s;
  width: 100%; max-width: 100%; box-sizing: border-box;
}
/* let the form/grid columns shrink on mobile so controls never overflow */
.contact-grid, .contact-form, .contact-info { min-width: 0; }
.contact-form { max-width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); }
.contact-info { display: flex; flex-direction: column; gap: 1.4rem; }
.contact-info .row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info .row svg { width: 28px; height: 28px; flex: none; margin-top: 2px; }
.contact-info b { display: block; font-weight: 800; }

/* =========================================================
   FRAMED PHOTOS — thick white mat + soft shadow on every content image
   ========================================================= */
.hero__media, .split__media, .step__media, .course__media, .card__media {
  background: #fff;
  /* white mat as a BORDER (not padding) — Safari mis-handles %-height children inside
     aspect-ratio + padding boxes, which ate the bottom mat. A border always renders and
     the image is clipped inside it via overflow:hidden, so the mat is even on all sides. */
  border: clamp(7px, 0.7vw, 11px) solid #fff;
  border-radius: clamp(18px, 2vw, 26px);
  box-shadow: 0 16px 40px rgba(35,31,32,.13);
}
/* the photo itself is clearly rounded inside the white mat */
.hero__media img, .hero__media video,
.split__media img, .step__media img,
.course__media img, .card__media img {
  border-radius: clamp(12px, 1.5vw, 18px);
  display: block;
}
/* card thumbnails: keep the white mat flush to the card's rounded top */
.card__media, .course__media { box-shadow: none; }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.quote {
  background: var(--paper); border-radius: var(--radius); padding: clamp(1.6rem,2.4vw,2.4rem);
  display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 1px 0 var(--line);
}
.quote .stars { color: var(--primary-deep); letter-spacing: .15em; font-size: 1.05rem; }
.quote blockquote { font-size: 1.12rem; line-height: 1.5; font-weight: 500; }
.quote figcaption { margin-top: auto; display: flex; flex-direction: column; gap: .1rem; }
.quote figcaption b { font-weight: 800; }
.quote figcaption span { opacity: .65; font-size: .9rem; }

/* check list */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 2rem; }
.checks li { display: flex; gap: .7rem; align-items: flex-start; font-weight: 600; }
.checks li::before { content: "✓"; color: var(--green); font-weight: 800; flex: none; }
@media (max-width: 700px) { .checks { grid-template-columns: 1fr; } }

/* big pull quote */
.pullquote { text-align: center; max-width: 24ch; margin-inline: auto; }
.pullquote .display { font-size: clamp(1.9rem,4.5vw,4rem); }

/* =========================================================
   FAQ ACCORDION
   ========================================================= */
.faq { max-width: 860px; margin-inline: auto; display: flex; flex-direction: column; gap: .8rem; }
.faq__item { background: var(--paper); border-radius: 18px; box-shadow: 0 1px 0 var(--line); overflow: hidden; }
.faq__q {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.1rem,2vw,1.5rem) clamp(1.2rem,2.4vw,1.8rem); font-weight: 800; font-size: clamp(1.02rem,1.4vw,1.2rem);
}
.faq__icon { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; position: relative; transition: transform .4s var(--ease-out); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: var(--text); border-radius: 2px; }
.faq__icon::before { width: 14px; height: 2.6px; }
.faq__icon::after { width: 2.6px; height: 14px; transition: transform .4s var(--ease-out); }
.faq__item.is-open .faq__icon { transform: rotate(180deg); }
.faq__item.is-open .faq__icon::after { transform: scaleY(0); }
.faq__a { height: 0; overflow: hidden; }
.faq__a p { padding: 0 clamp(1.2rem,2.4vw,1.8rem) clamp(1.1rem,2vw,1.6rem); opacity: .82; max-width: 60ch; }

/* =========================================================
   AREA CHIPS
   ========================================================= */
.chips { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5em; padding: .6em 1.1em; border-radius: 99px;
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; font-size: .96rem;
  transition: background .25s, box-shadow .25s, transform .4s var(--ease-out);
}
.chip:hover { background: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); transform: translateY(-2px); }

/* news topic chips (active = filled) */
.topics { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.topics .chip.is-on { background: var(--text); color: var(--bg); box-shadow: inset 0 0 0 2px var(--text); }

/* =========================================================
   DETAIL PAGES (articles + courses)
   ========================================================= */
.back-link { display: inline-flex; align-items: center; gap: .5em; font-weight: 800; margin-bottom: 1.2rem; transition: color .2s; }
.back-link:hover { color: var(--primary-deep); }
.article__head { padding-bottom: 0; }
.article__head .tag { margin-bottom: 1rem; }
.article__head h1 { max-width: 20ch; }
.article__meta { opacity: .6; font-weight: 700; margin-top: 1rem; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.article__hero { aspect-ratio: 16/8; }
.prose { max-width: 70ch; margin-inline: auto; font-size: clamp(1.02rem, 1.1vw, 1.16rem); line-height: 1.65; }
.prose > * + * { margin-top: 1.15rem; }
.prose .lead { font-size: clamp(1.2rem, 1.7vw, 1.5rem); font-weight: 500; line-height: 1.45; color: var(--text); }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.8vw, 2.3rem); line-height: 1; margin-top: 2.4rem; }
.prose ul { display: flex; flex-direction: column; gap: .7rem; }
.prose li { display: flex; gap: .7rem; align-items: flex-start; }
.prose li::before { content: "\2192"; color: var(--primary-deep); font-weight: 800; flex: none; }
.prose blockquote { border-left: 5px solid var(--primary); padding: .1rem 0 .1rem 1.4rem; margin-block: 1.8rem; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.15; }
.course-detail__aside { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
  .nav__toggle { display: block; }
  /* road-styled menu: asphalt with a dashed centre-line */
  .nav__menu {
    position: fixed; inset: 0; z-index: 1; overflow: hidden;
    background: var(--text); flex-direction: column; align-items: center; justify-content: center;
    gap: 2rem;
    clip-path: inset(0 0 100% 0); pointer-events: none;
    transition: clip-path .55s var(--ease-out);
  }
  .nav__menu::before {
    content: ""; position: absolute; top: -12%; bottom: -12%; left: 50%; width: 11px; transform: translateX(-50%);
    background: repeating-linear-gradient(to bottom, var(--primary) 0 36px, transparent 36px 74px);
    opacity: .85; z-index: -1;
  }
  .nav.is-open .nav__menu { clip-path: inset(0 0 0 0); pointer-events: auto; }
  /* backdrop-filter / transform on .nav would make the fixed menu a child of the
     nav box (~60px) instead of the viewport — breaking the full-screen overlay.
     So on mobile the nav keeps a solid bg with no filter, and never hides. */
  .nav.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav.is-hidden { transform: none; }
  .nav.is-open { background: transparent; }
  .nav__links { flex-direction: column; align-items: center; gap: 1.7rem; }
  .nav__menu .nav__links a {
    color: var(--bg); font-family: var(--font-display); font-weight: 400;
    font-size: clamp(2.2rem, 9vw, 3.2rem); line-height: 1; padding: .15em .6em; background: var(--text);
  }
  .nav__menu .nav__links a .arrow, .nav__links a.is-active::after { display: none; }
  .nav__menu .nav__links a.is-active { color: var(--primary); }
  .nav__menu .nav__cta { font-size: 1.1rem; margin-top: .8rem; }
  /* light logo + toggle so they read on the dark menu */
  .nav.is-open .logo { --lg-ink: var(--bg); --lg-accent: #FFD702; --lg-road: #cfccc4; }
  .nav.is-open .nav__toggle { background: var(--bg); }
  .nav.is-open .nav__toggle span { background: var(--text); }

  .usps { grid-template-columns: 1fr; }
  .news__grid { grid-template-columns: 1fr; }
  .logowall__grid { grid-template-columns: repeat(2,1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); gap: 2rem; }
  .courses-grid { grid-template-columns: 1fr; }
  .course { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .contact-grid, .split, .pagehead__row { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; }
  .step:nth-child(even) .step__text { order: 0; }
  .step__num { font-size: clamp(3.4rem,16vw,6rem); }
}
@media (max-width: 560px) {
  .logowall__grid { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: center; }
}
@media (max-width: 560px) {
  .hero__sign { width: clamp(54px, 16vw, 74px); }
}

/* mobile tap targets — keep interactive hit areas >=44px (WCAG 2.5.8) */
@media (max-width: 700px) {
  .text-link { min-height: 44px; }
  .back-link { display: inline-flex; align-items: center; min-height: 44px; }
  .footer__col a { min-height: 44px; }
  .footer__bottom { font-size: .92rem; row-gap: .2rem; }
  .credit { display: inline-flex; align-items: center; min-height: 44px; }
}

/* reduced-motion static fallbacks (classes added by JS) */
.sticky-title.is-reduced { min-height: auto; }
.sticky-title.is-reduced .sticky-title__pin { position: static; height: auto; padding-block: clamp(3rem, 8vw, 7rem); }
.canvas-matter__target.signs-static {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center;
  gap: clamp(.6rem, 1.5vw, 1.4rem); padding: 0 clamp(1rem, 4vw, 3rem) clamp(1.6rem, 4vw, 3rem);
}
.canvas-matter__target.signs-static img { width: clamp(48px, 7vw, 86px); height: auto; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
