/* ==========================================================================
   O'Neill Motorcycle Training — 2026 redesign, version B: "Editorial"
   A motorcycle magazine on cream paper: big serif headlines with italics,
   generous photography with captions, thin rules. Deep green, cream and the
   O'Neill orange of the logo (a quiet nod to the tricolour).
   Display: Newsreader (display optical size). Text: Schibsted Grotesk.
   Self-hosted latin subsets, trimmed to the weights used here.
   Only index.html loads this file for now.
   ========================================================================== */

@font-face {
  font-family: "Newsreader Display";
  src: url("../fonts/newsreader-display-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Display";
  src: url("../fonts/newsreader-display-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* Times and Arial resized to each font's metrics, so text keeps its width
   and line breaks while the real font arrives (no layout shift on swap). */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT");
  font-style: normal;
  font-weight: 500 700;
  size-adjust: 110.07%;
  ascent-override: 66.78%;
  descent-override: 24.08%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT");
  font-style: italic;
  font-weight: 400 700;
  size-adjust: 106.74%;
  ascent-override: 68.86%;
  descent-override: 24.83%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Schibsted Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400 500;
  size-adjust: 104.56%;
  ascent-override: 93.4%;
  descent-override: 24.66%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Schibsted Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600 700;
  size-adjust: 102.12%;
  ascent-override: 95.63%;
  descent-override: 25.25%;
  line-gap-override: 0%;
}

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  /* Paper and ink */
  --paper: #f4efe4;
  --paper-deep: #ebe4d4;
  --card: #fbf8f1;
  --ink: #161513;
  --ink-soft: #57524a;
  --rule: rgba(22, 21, 19, 0.16);
  --rule-strong: rgba(22, 21, 19, 0.7);

  /* Green, cream and orange */
  --green: #173f2f;
  --green-deep: #0f2c21;
  --on-green: #f4efe4;
  --on-green-soft: rgba(244, 239, 228, 0.76);
  --on-green-rule: rgba(244, 239, 228, 0.22);
  --orange: #ff6a1a;         /* the O'Neill orange of the logo */
  --orange-hot: #ff8445;
  --orange-ink: #b8420c;     /* orange text on paper (AA) */
  --orange-glow: #ff8a4a;    /* orange text on green (AA) */
  --plate-red: #d7261e;

  /* Type */
  --serif: "Newsreader Display", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", "Schibsted Fallback", system-ui, -apple-system, sans-serif;
  --h1: clamp(3rem, 1.5rem + 4.9vw, 6.2rem);
  --h2: clamp(2.3rem, 1.3rem + 3vw, 4.2rem);
  --h3: clamp(1.45rem, 1.2rem + 0.7vw, 1.85rem);

  /* Layout */
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 76px;
  --radius: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  /* Paper grain, tiled */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .08 0 0 0 0 .07 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --l-plate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' rx='4' fill='%23fff'/%3E%3Cpath d='M14 8h6.5v17.5H30V32H14z' fill='%23d7261e'/%3E%3C/svg%3E");
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: var(--h2);
  font-weight: 560;
}

h3 {
  font-size: var(--h3);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--orange-ink);
}

:focus-visible {
  outline: 2px solid var(--orange-ink);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Small caps label with a short orange rule in front */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.3rem;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  flex: none;
  width: 28px;
  height: 2px;
  background: var(--orange);
}

.kicker--plate::before {
  display: none;
}

.plate-icon {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 3px;
}

.lead {
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.24rem);
  line-height: 1.6;
}

.section {
  padding-block: clamp(80px, 10vw, 140px);
}

.section-head {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head h2 {
  max-width: 16ch;
}

.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 24px 64px;
  padding-bottom: clamp(28px, 3vw, 40px);
  border-bottom: 1px solid var(--rule);
}

.section-head--split .lead {
  padding-bottom: 0.35rem;
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0.85em 1.5em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary::after {
  content: "";
  width: 16px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 42%, 64% 42%, 64% 0, 100% 50%, 64% 100%, 64% 58%, 0 58%);
  transition: transform 0.3s var(--ease);
}

.btn--primary:hover {
  background: var(--orange-hot);
}

.btn--primary:hover::after {
  transform: translateX(3px);
}

.btn--ghost {
  border-color: var(--rule-strong);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn--wa {
  background: #25d366;
  color: #06301a;
}

.btn--wa:hover {
  background: #36dd76;
}

.btn--sm {
  min-height: 44px;
  padding: 0.7em 1.2em;
  font-size: 0.93rem;
}

.btn--sm::after {
  display: none;
}

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

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.9);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  transition: box-shadow 0.3s;
}

.site-header.is-solid {
  box-shadow: 0 1px 0 var(--rule), 0 10px 30px -18px rgba(22, 21, 19, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  border-bottom: 1px solid var(--rule);
}

.site-header.is-solid .site-header__inner {
  border-bottom-color: transparent;
}

.brand {
  position: relative;
  z-index: 2;
  flex: none;
}

.brand img {
  width: auto;
  height: 46px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav__list {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  display: block;
  padding: 8px 0;
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 500;
  text-decoration: none;
}

.nav__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__item--has-menu {
  position: relative;
}

.nav__menu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 24px 48px -20px rgba(22, 21, 19, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s;
}

.nav__item--has-menu:hover .nav__menu,
.nav__item--has-menu:focus-within .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav__menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav__menu a:hover {
  background: var(--paper-deep);
  color: var(--orange-ink);
}

.nav__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav__phone svg {
  width: 16px;
  height: 16px;
  color: var(--orange-ink);
}

.nav__phone:hover {
  color: var(--orange-ink);
}

.header-call,
.nav-toggle {
  display: none;
}

/* ==========================================================================
   5. Hero: an editorial opener
   ========================================================================== */
.hero {
  padding-top: clamp(40px, 6vw, 72px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 48px;
}

.hero .kicker {
  grid-column: 1 / -1;
}

.hero h1 {
  grid-column: 1 / -1;
  max-width: 17ch;
  font-size: var(--h1);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.hero__aside {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 36rem) auto;
  justify-content: space-between;
  align-items: end;
  gap: 24px 48px;
  margin-top: clamp(24px, 3vw, 36px);
}

.hero__lead {
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.26rem);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__figure {
  grid-column: 1 / -1;
  margin-top: clamp(32px, 4vw, 52px);
}

.hero__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 72%;
}

/* "300+" set like a caption box on the photo */
.hero__stat {
  position: absolute;
  bottom: clamp(14px, 2vw, 28px);
  left: clamp(14px, 2vw, 28px);
  display: grid;
  gap: 6px;
  padding: 16px 20px 14px;
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.5);
}

.hero__stat-num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 1.8rem + 1.6vw, 3.4rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.hero__stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__caption {
  padding-top: 14px;
}

.hero__creds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__creds li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__creds li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__grid > :not(.hero__figure) {
    animation: rise 0.9s var(--ease) both;
  }
  .hero__grid > :nth-child(2) { animation-delay: 0.05s; }
  .hero__grid > :nth-child(3) { animation-delay: 0.12s; }

  .hero__media img {
    animation: settle 1.6s var(--ease) both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes settle {
  from {
    transform: scale(1.06);
  }
}

/* ==========================================================================
   6. Trust strip
   ========================================================================== */
.trust {
  margin-top: clamp(40px, 5vw, 64px);
}

.trust__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--rule);
}

.trust__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}

.trust__item:first-child {
  padding-left: 0;
}

.trust__item + .trust__item {
  border-left: 1px solid var(--rule);
}

.trust__item svg {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--orange-ink);
}

/* ==========================================================================
   7. What we teach: three courses
   ========================================================================== */
.courses {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 36px);
}

.course {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
}

.course__media {
  display: block;
  overflow: hidden;
  height: clamp(300px, 30vw, 440px);
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.course__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.course:hover .course__media img {
  transform: scale(1.04);
}

.course__no {
  margin-bottom: 8px;
  color: var(--orange-ink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.course h3 {
  margin-bottom: 10px;
}

.course__text {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.course__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.95rem;
  font-weight: 600;
}

.course__cta::after {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: width 0.35s var(--ease);
}

.course:hover .course__cta {
  color: var(--orange-ink);
}

.course:hover .course__cta::after {
  width: 40px;
}

.services__more {
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}

.services__more a {
  margin-left: 6px;
  color: var(--ink);
  font-weight: 600;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.services__more a:hover {
  color: var(--orange-ink);
}

/* ==========================================================================
   8. The yard: a photo essay with captions
   ========================================================================== */
.yard {
  padding-top: 0;
}

.essay {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: clamp(28px, 3vw, 40px) clamp(16px, 2vw, 28px);
}

.shot__img {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.shot__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.shot:hover .shot__img img {
  transform: scale(1.03);
}

.shot figcaption {
  max-width: 44ch;
  padding-top: 12px;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.5;
}

.shot figcaption b {
  color: var(--ink);
  font-weight: 700;
}

.shot--yard   { grid-column: 1 / span 8; grid-row: span 2; }
.shot--class  { grid-column: 9 / span 4; }
.shot--gear   { grid-column: 9 / span 4; }
.shot--plate  { grid-column: 1 / span 3; }
.shot--helmet { grid-column: 4 / span 3; }
.shot--road   { grid-column: 7 / span 6; }

.shot--yard .shot__img   { aspect-ratio: 4 / 3; }
.shot--class .shot__img,
.shot--gear .shot__img   { aspect-ratio: 16 / 10; }
.shot--plate .shot__img,
.shot--helmet .shot__img { aspect-ratio: 4 / 5; }
.shot--road .shot__img   { aspect-ratio: 16 / 10.6; }

.shot--plate img  { object-position: 50% 35%; }
.shot--helmet img { object-position: 70% 50%; }
.shot--road img   { object-position: 50% 40%; }

/* ==========================================================================
   9. Licence journey on the green page
   ========================================================================== */
.journey {
  background-color: var(--green);
  background-image: var(--grain);
  color: var(--on-green);
}

.journey .kicker {
  color: var(--on-green-soft);
}

.journey h2 em {
  color: var(--orange-glow);
}

.journey .lead {
  color: var(--on-green-soft);
}

.journey .section-head--split {
  border-bottom-color: var(--on-green-rule);
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 8px;
}

.step__num {
  margin-bottom: 18px;
  color: var(--on-green);
  font-family: var(--serif);
  font-size: clamp(4.2rem, 3rem + 3vw, 6.2rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.9;
}

.step--us .step__num {
  color: var(--orange-glow);
}

.step__tag {
  width: 100%;
  margin-bottom: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--on-green-rule);
  color: var(--on-green-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.step h3 {
  margin-bottom: 12px;
}

.step p:not(.step__tag) {
  color: var(--on-green-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.step__link {
  margin-top: 16px;
  font-weight: 600;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.step__link:hover {
  color: var(--orange-glow);
}

/* ==========================================================================
   10. Why us
   ========================================================================== */
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: clamp(40px, 6vw, 96px);
}

.why__side {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.why .section-head {
  margin-bottom: 32px;
}

.why__media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 30% 50%;
  border-radius: var(--radius);
}

.why__media figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.why__media figcaption::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: var(--l-plate) center / cover;
  box-shadow: 0 0 0 1px var(--rule);
}

.reasons {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: reason;
  border-bottom: 1px solid var(--rule);
}

.reason {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
  counter-increment: reason;
}

.reason::before {
  content: counter(reason, decimal-leading-zero);
  grid-row: span 2;
  color: var(--orange-ink);
  font-family: var(--serif);
  font-size: 2.2rem;
  font-style: italic;
  font-weight: 500;
  line-height: 0.95;
}

.reason p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

/* ==========================================================================
   11. Stats band over the backlit bikes
   ========================================================================== */
.stats-band {
  position: relative;
  isolation: isolate;
  padding: clamp(100px, 13vw, 180px) 0;
  overflow: hidden;
  color: var(--on-green);
}

.stats-band__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.stats-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(15, 44, 33, 0.9) 0%, rgba(15, 44, 33, 0.66) 50%, rgba(15, 44, 33, 0.3) 100%);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.stat {
  display: grid;
  align-content: start;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--on-green-rule);
}

.stat__num {
  font-family: var(--serif);
  font-size: clamp(4.4rem, 3rem + 5vw, 8.4rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.stat__num em {
  color: var(--orange-glow);
  font-style: italic;
}

.stat__label {
  max-width: 22ch;
  color: var(--on-green-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* ==========================================================================
   12. Reviews, set as pull quotes
   ========================================================================== */
.review {
  margin: 0;
}

.review__stars {
  color: var(--orange-ink);
  font-size: 0.95rem;
  letter-spacing: 3px;
}

.review__quote {
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.review__who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.review__name {
  font-weight: 700;
}

.review__meta {
  color: var(--ink-soft);
}

.review--feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 62rem;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.review--feature .review__quote {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem);
  font-style: italic;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.review--feature .review__quote::before {
  content: "\201C";
  display: block;
  height: 0.62em;
  color: var(--orange);
  font-size: 2.6em;
  line-height: 1;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 3vw, 44px);
}

.review-grid .review {
  padding-top: 22px;
  border-top: 1px solid var(--rule-strong);
}

/* ==========================================================================
   13. Gallery: a contact sheet
   ========================================================================== */
.gallery-section {
  padding-top: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: frame;
}

.gallery__item {
  position: relative;
  padding: 8px 8px 30px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
  counter-increment: frame;
}

.gallery__item::after {
  content: counter(frame, decimal-leading-zero);
  position: absolute;
  bottom: 7px;
  left: 10px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
}

.gallery__more {
  display: flex;
  justify-content: center;
  margin-top: clamp(40px, 5vw, 60px);
}

/* ==========================================================================
   14. Book: the call back form on the green page
   ========================================================================== */
.book {
  background-color: var(--green);
  background-image: var(--grain);
  color: var(--on-green);
}

.book .kicker {
  color: var(--on-green-soft);
}

.book h2 em {
  color: var(--orange-glow);
}

.book .lead {
  color: var(--on-green-soft);
}

.book__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "info form"
    "van  form";
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 0 clamp(40px, 6vw, 96px);
}

.book__info {
  grid-area: info;
}

.book h2 {
  max-width: 14ch;
  margin-bottom: 1.4rem;
}

.book__rows {
  display: grid;
  gap: 20px;
  margin: 36px 0 40px;
  padding-top: 24px;
  border-top: 1px solid var(--on-green-rule);
}

.book__row dt {
  margin-bottom: 4px;
  color: var(--on-green-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.book__row dd {
  font-size: 1.1rem;
  font-weight: 600;
}

.book__phone {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-decoration: none;
}

.book__phone:hover {
  color: var(--orange-glow);
}

.book__van {
  grid-area: van;
}

.book__van img {
  width: 100%;
  border-radius: var(--radius);
}

.lead-form {
  grid-area: form;
  position: relative;
  padding: clamp(26px, 3vw, 40px);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}

/* An L plate on the form, as on a learner's vest */
.lead-form::before {
  content: "";
  position: absolute;
  top: -22px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 6px;
  background: var(--l-plate) center / cover;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transform: rotate(6deg);
}

.lead-form__title {
  margin-bottom: 22px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field label {
  font-size: 0.93rem;
  font-weight: 600;
}

.req {
  color: var(--plate-red);
}

.optional {
  color: var(--ink-soft);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(22, 21, 19, 0.28);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 44px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161513' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8b867c;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.25);
}

.field--error input {
  border-color: #b42318;
}

.field__error {
  color: #b42318;
  font-size: 0.86rem;
}

.field__error:empty,
.form-status:empty {
  display: none;
}

.form-status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.form-status--ok {
  background: #e1efe5;
  color: #0e5a2c;
}

.form-status--err {
  background: #fbe6e3;
  color: #8a1c12;
}

.lead-form .btn--primary {
  margin-top: 6px;
}

.lead-form .btn--wa {
  margin-top: 10px;
}

.form-note {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
}

/* ==========================================================================
   15. Footer
   ========================================================================== */
.site-footer {
  padding: 80px 0 30px;
  background-color: var(--green-deep);
  background-image: var(--grain);
  color: var(--on-green-soft);
  font-size: 0.97rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.footer-brand .brand img {
  height: 50px;
}

.footer-brand p {
  max-width: 30ch;
  margin-top: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--on-green-rule);
  border-radius: 50%;
  color: var(--on-green);
  transition: background-color 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: var(--orange);
  color: var(--ink);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-title {
  margin-bottom: 18px;
  color: var(--on-green);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li + li {
  margin-top: 10px;
}

.footer-col li {
  overflow-wrap: anywhere;
}

.site-footer a {
  text-decoration: none;
}

.footer-col a:hover,
.footer-areas a:hover {
  color: var(--orange-glow);
}

.footer-areas {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--on-green-rule);
}

.footer-areas ul {
  columns: 6 130px;
  column-gap: 24px;
}

.footer-areas li {
  padding: 4px 0;
  break-inside: avoid;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--on-green-rule);
  font-size: 0.86rem;
}

/* ==========================================================================
   16. WhatsApp button (desktop) and quick bar (mobile)
   ========================================================================== */
.wa-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s var(--ease);
}

.wa-fab:hover {
  transform: translateY(-3px) scale(1.04);
}

.wa-fab svg {
  width: 30px;
  height: 30px;
}

.quickbar {
  display: none;
}

/* ==========================================================================
   17. Scroll reveals (main.js adds .is-in; without JS nothing is hidden)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal,
  .js [data-stagger] > * {
    opacity: 0;
    translate: 0 24px;
    transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
  }

  .js .reveal.is-in,
  .js [data-stagger].is-in > * {
    opacity: 1;
    translate: none;
  }

  .js [data-stagger].is-in > :nth-child(2) { transition-delay: 0.08s; }
  .js [data-stagger].is-in > :nth-child(3) { transition-delay: 0.16s; }
  .js [data-stagger].is-in > :nth-child(4) { transition-delay: 0.24s; }
  .js [data-stagger].is-in > :nth-child(5) { transition-delay: 0.32s; }
  .js [data-stagger].is-in > :nth-child(6) { transition-delay: 0.4s; }
  .js [data-stagger].is-in > :nth-child(7) { transition-delay: 0.48s; }
  .js [data-stagger].is-in > :nth-child(8) { transition-delay: 0.56s; }
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav__phone {
    display: none;
  }
}

@media (max-width: 1023px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__aside {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .trust__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust__item:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .trust__item:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }

  .courses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course:first-child {
    grid-column: 1 / -1;
  }

  .essay {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shot--yard,
  .shot--road {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .shot--class,
  .shot--gear,
  .shot--plate,
  .shot--helmet {
    grid-column: auto;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 32px;
  }

  .why__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .why__side {
    position: static;
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "info"
      "form"
      "van";
    gap: 0;
  }

  .book__van {
    margin-top: 40px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
  }

  /* backdrop-filter would trap the fixed menu inside the header */
  .site-header {
    background: rgba(244, 239, 228, 0.97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-header__inner {
    gap: 10px;
  }

  .brand img {
    height: 38px;
  }

  .header-call,
  .nav-toggle {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }

  .header-call {
    margin-left: auto;
  }

  .header-call svg {
    width: 18px;
    height: 18px;
  }

  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.3s var(--ease), background-color 0.2s;
  }

  .nav-toggle span {
    position: relative;
  }

  .nav-toggle span::before,
  .nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle span::before {
    top: -6px;
  }

  .nav-toggle span::after {
    top: 6px;
  }

  .nav-toggle[aria-expanded="true"] span {
    background: transparent;
  }

  .nav-toggle[aria-expanded="true"] span::before {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: calc(var(--header-h) + 20px) var(--gutter) 120px;
    overflow-y: auto;
    background: var(--paper) var(--grain);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__link {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 560;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  .nav__link::after {
    display: none;
  }

  .nav__link[aria-current="page"] {
    color: var(--orange-ink);
    font-style: italic;
  }

  .nav__menu {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
    min-width: 0;
    padding: 8px 0 14px;
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__menu a {
    padding: 8px 0;
    color: var(--ink-soft);
  }

  .nav__item--has-menu > .nav__link {
    border-bottom: 0;
  }

  .nav__phone {
    display: inline-flex;
    margin-top: 26px;
    font-size: 1.05rem;
  }

  .nav .btn {
    margin-top: 20px;
    font-size: 1.02rem;
  }

  .hero {
    padding-top: 32px;
  }

  /* On a phone the photo comes straight after the headline */
  .hero__figure {
    order: 3;
    margin-top: 28px;
  }

  .hero__aside {
    order: 4;
    margin-top: 26px;
  }

  .hero__lead {
    font-size: 1.04rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__media {
    aspect-ratio: 4 / 3;
    margin-inline: calc(-1 * var(--gutter));
    border-radius: 0;
  }

  .hero__caption {
    display: none;
  }

  .hero__media img {
    object-position: 60% 70%;
  }

  .hero__stat {
    padding: 12px 14px 10px;
  }

  .hero__creds {
    gap: 8px 18px;
    font-size: 0.7rem;
  }

  .trust__item {
    gap: 10px;
    padding: 18px 10px;
    font-size: 0.9rem;
  }

  .trust__item:nth-child(odd) {
    padding-left: 0;
  }

  .trust__item svg {
    width: 22px;
    height: 22px;
  }

  .courses {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .course__media {
    height: auto;
    aspect-ratio: 5 / 4;
  }

  .essay {
    gap: 28px 12px;
  }

  .shot--class,
  .shot--gear {
    grid-column: 1 / -1;
  }

  .shot--plate figcaption,
  .shot--helmet figcaption {
    font-size: 0.85rem;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .step__num {
    margin-bottom: 10px;
  }

  .reason {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 4px 12px;
    padding: 22px 0;
  }

  .reason::before {
    font-size: 1.8rem;
  }

  .stats-band::before {
    background: linear-gradient(180deg, rgba(15, 44, 33, 0.9) 0%, rgba(15, 44, 33, 0.72) 100%);
  }

  .review-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-form::before {
    top: -18px;
    right: 18px;
    width: 48px;
    height: 48px;
  }

  .lead-form__title {
    padding-right: 52px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-areas ul {
    columns: 2;
  }

  .footer-bottom {
    flex-direction: column;
  }

  /* Thumb-reach call and WhatsApp buttons (the footer makes room for them) */
  .site-footer {
    padding-bottom: calc(30px + 84px + env(safe-area-inset-bottom));
  }

  .wa-fab {
    display: none;
  }

  .quickbar {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 7px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: rgba(251, 248, 241, 0.97);
    box-shadow: 0 16px 40px -14px rgba(22, 21, 19, 0.45);
    transition: transform 0.4s var(--ease), opacity 0.3s;
  }

  .js .quickbar:not(.is-shown) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(100% + 24px));
  }

  .quickbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
  }

  .quickbar svg {
    width: 18px;
    height: 18px;
  }

  .quickbar__call {
    background: var(--orange);
    color: var(--ink);
  }

  .quickbar__wa {
    background: #25d366;
    color: #06301a;
  }
}
