/* The Last Scot: race-poster styles. Mobile first. */

:root {
  --peat: #2a2019;
  --haar: #d3d4cb;
  --haar-pale: #e3e4dc;
  --sandstone: #a63c1e;       /* Arbroath Abbey red, pushed brighter */
  --sandstone-deep: #84301a;
  --gorse: #f2b11f;
  --marram: #7d8049;
  --sea: #3d5658;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: 1rem;
  --wrap: 80rem;
  --section-space: clamp(4rem, 10vw, 7.5rem);
}

@media (min-width: 48em) {
  :root { --gutter: 2rem; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}

/* Scale everything up on very wide or zoomed-out screens so the page keeps
   its proportions instead of shrinking into a narrow strip down the middle. */
@media (min-width: 90em) {
  html { font-size: clamp(100%, 1.111vw, 175%); }  /* 16px at 1440px wide */
}

body {
  margin: 0;
  background: var(--haar);
  color: var(--peat);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

/* The tilted ticker pokes past the screen edges; trim it without a sideways scroll. */
main { overflow-x: clip; }

p { margin: 0 0 1em; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }

:focus-visible {
  outline: 3px solid var(--gorse);
  outline-offset: 3px;
}
.section--light :focus-visible,
.footer :focus-visible,
.hero :focus-visible,
.nav :focus-visible { outline-color: var(--sandstone); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--peat);
  color: var(--haar);
  font-weight: 700;
}
.skip-link:focus { top: 0.5rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 50rem; }
.wrap--form { max-width: 42rem; }

/* Film grain over photos and dark panels */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Ragged, torn-poster top edge where a section's colour changes */
.torn { position: relative; }
.torn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -13px;
  height: 14px;
  z-index: 6;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14'%3E%3Cpath d='M0 14V6l8 3 7-6 9 5 7-6 9 5 7-3 10 6 7-7 9 4 9-6 8 7 9-4 9 5 6-6 6 3v8z'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 14px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14'%3E%3Cpath d='M0 14V6l8 3 7-6 9 5 7-6 9 5 7-3 10 6 7-7 9 4 9-6 8 7 9-4 9 5 6-6 6 3v8z'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 14px;
}

/* ---------- Type ---------- */

.h2 {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.75rem, 10vw, 5.75rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  max-width: 16ch;
}

.h3 {
  margin: 2.25rem 0 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
}

.lede {
  font-size: 1.3rem;
  line-height: 1.35;
  font-weight: 600;
}

.section__intro { max-width: 60ch; }

/* Highlighter on a few key facts */
mark {
  background: var(--gorse);
  color: var(--peat);
  padding: 0 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.todo,
.todo-block {
  background: var(--gorse);
  color: var(--peat);
  font-weight: 600;
  padding: 0 0.25em;
  outline: 2px dashed var(--peat);
  outline-offset: -2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.todo-block {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.5rem 0.75rem;
  max-width: 60ch;
}

/* ---------- Buttons: chunky stickers with a hard shadow ---------- */

.btn {
  --btn-shadow: var(--peat);
  display: inline-block;
  padding: 0.8rem 1.6rem 0.75rem;
  border: 3px solid var(--peat);
  background: var(--gorse);
  color: var(--peat);
  box-shadow: 5px 5px 0 var(--btn-shadow);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--btn-shadow); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--btn-shadow); }
.btn:disabled { background: #8a8378; transform: none; box-shadow: none; cursor: not-allowed; }
.btn--small { padding: 0.45rem 0.9rem 0.4rem; font-size: 1.2rem; border-width: 2px; box-shadow: 3px 3px 0 var(--btn-shadow); }
.btn--small:hover { box-shadow: 5px 5px 0 var(--btn-shadow); }
.btn--small:active { transform: translate(3px, 3px); }
.btn--big { font-size: clamp(1.6rem, 6vw, 2.1rem); padding: 1rem 1.75rem 0.9rem; }

.section--dark .btn { --btn-shadow: var(--sandstone); border-color: var(--gorse); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Photo placeholders ---------- */

.ph {
  display: grid;
  place-items: center;
  min-height: 12rem;
  padding: 1rem;
  border: 2px dashed var(--peat);
  background: repeating-linear-gradient(-45deg, rgb(42 32 25 / 0.06) 0 12px, transparent 12px 24px), var(--haar-pale);
  color: var(--peat);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.35;
}
.ph strong { display: block; font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; }
.ph--dark {
  border-color: var(--haar);
  background: repeating-linear-gradient(-45deg, rgb(211 212 203 / 0.08) 0 12px, transparent 12px 24px), var(--sea);
  color: var(--haar);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0.5rem max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  background: var(--haar);
  border-bottom: 3px solid var(--peat);
}

/* The logo is a pennant, so it hangs down from the bar like one.
   Once the page scrolls it tucks back up into the bar (see main.js). */
.nav__brand {
  position: relative;
  flex: none;
  align-self: stretch;
  width: 3.4rem;
  transition: width 0.2s ease;
}
.nav__brand img {
  position: absolute;
  top: -0.1rem;
  left: 0;
  width: auto;
  height: 5.5rem;
  max-width: none;
  filter: drop-shadow(3px 4px 0 rgb(42 32 25 / 0.3));
  transition: height 0.2s ease;
}
.nav.is-scrolled .nav__brand { width: 1.75rem; }
.nav.is-scrolled .nav__brand img { height: 2.75rem; filter: none; }

.nav__links { display: none; }
.nav .btn { margin-left: auto; }

@media (min-width: 48em) {
  .nav__brand { width: 4.4rem; }
  .nav__brand img { height: 7rem; }
  .nav.is-scrolled .nav__brand { width: 1.85rem; }
  .nav.is-scrolled .nav__brand img { height: 2.9rem; }
}

@media (min-width: 52em) {
  .nav__links {
    display: flex;
    gap: 1.75rem;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
    font-weight: 600;
  }
  .nav__links a { text-decoration: none; }
  .nav__links a:hover { text-decoration: underline; }
  .nav .btn { margin-left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nav__brand, .nav__brand img { transition: none; }
}

/* ---------- Hero ---------- */

/* The race location fills the hero. A haar-grey wash, lighter at the top where
   the sky is, keeps the black type readable over the grass. */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(52rem, calc(100svh - 7rem));
  overflow: hidden;
  padding: 3.5rem var(--gutter) 3rem;   /* top room for the hanging logo */
  background:
    linear-gradient(180deg, rgb(211 212 203 / 0.35) 0%, rgb(211 212 203 / 0.55) 45%, rgb(211 212 203 / 0.82) 100%),
    url("images/race-location.jpeg") center 62% / cover,
    var(--haar);
}

.hero__stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: calc(var(--wrap) - 2 * var(--gutter));
  margin-inline: auto;
  container-type: inline-size;
}

/* THE LAST SCOT on one line, sized to fill the width on any screen. */
.hero__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 18vw;
  font-size: 18.4cqi;
  line-height: 0.8;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--peat);
}

.hero__info { position: relative; z-index: 6; max-width: 30rem; }
.hero__kind {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--sandstone);
}
.hero__date {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.75rem, 13vw, 5rem);
  line-height: 0.9;
  text-transform: uppercase;
}
.hero__where, .hero__start { margin: 0; font-size: 1.15rem; font-weight: 600; }
.hero__map { display: inline-block; margin-top: 0.25rem; font-size: 1rem; }
.hero__start { margin: 0.5rem 0 1.4rem; }
.hero__price { margin: 1rem 0 0; font-size: 0.95rem; font-weight: 600; }

@media (min-width: 48em) {
  .hero { padding-top: 4.75rem; padding-bottom: 3.5rem; }
}

/* One orchestrated moment: the name rises into place over the coast path. */
@media (prefers-reduced-motion: no-preference) {
  .hero__title { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both; }
  .hero__info { animation: fade-in 0.6s 0.5s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(25%); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  z-index: 7;
  margin: -0.9rem -2% 0;
  overflow: hidden;
  background: var(--gorse);
  color: var(--peat);
  border-block: 3px solid var(--peat);
  transform: rotate(-1.2deg);
}
.ticker__track { display: flex; width: max-content; }
.ticker p {
  display: flex;
  margin: 0;
  padding: 0.55rem 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker span { display: inline-flex; align-items: center; }
.ticker span::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  margin: 0 0.9em;
  background: var(--sandstone);
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .ticker__track { animation: ticker 40s linear infinite; }
  .ticker:hover .ticker__track { animation-play-state: paused; }
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Facts strip ---------- */

.facts {
  display: grid;
  margin: -0.6rem 0 0;
  padding: 0.6rem max(0px, calc((100% - var(--wrap)) / 2)) 0;
  list-style: none;
  background: var(--peat);
  color: var(--haar);
}
.facts li {
  padding: 1.1rem var(--gutter);
  border-top: 1px solid rgb(211 212 203 / 0.2);
  font-size: 1rem;
  line-height: 1.3;
}
.facts li:first-child { border-top: 0; }
.facts strong {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gorse);
}
.facts__left { display: block; font-weight: 600; }

@media (min-width: 48em) {
  .facts { grid-template-columns: 1.3fr 1fr 1fr; }
  .facts li { border-top: 0; border-left: 1px solid rgb(211 212 203 / 0.2); padding: 1.5rem var(--gutter); }
  .facts li:first-child { border-left: 0; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-space); }
.section--light { background: var(--haar); color: var(--peat); }
.section--dark { background: var(--peat); color: var(--haar); }
.section--sea { background: var(--sea); color: var(--haar-pale); }

.split { display: grid; gap: 3rem; }
.split p { max-width: 62ch; }

@media (min-width: 56em) {
  .split { grid-template-columns: 1.25fr 1fr; gap: 4rem; align-items: start; }
}


/* ---------- What it is ---------- */

.dial { margin: 0; max-width: 24rem; justify-self: center; width: 100%; }
.dial svg { width: 100%; height: auto; overflow: visible; }
.dial__face { fill: var(--haar-pale); stroke: var(--peat); stroke-width: 3; }
.dial__ticks line { stroke: var(--peat); stroke-width: 3; }
.dial__run { fill: none; stroke: var(--sandstone); stroke-width: 20; }
.dial__rest { fill: none; stroke: var(--gorse); stroke-width: 20; }
.dial__start { fill: var(--peat); stroke: var(--haar); stroke-width: 3; }
.dial__big { font-family: var(--display); font-weight: 900; font-size: 58px; fill: var(--peat); }
.dial__small { font-family: var(--body); font-size: 15px; fill: var(--peat); }
.dial__label { font-family: var(--display); font-weight: 900; font-size: 24px; text-transform: uppercase; }
.dial__label--run { fill: var(--sandstone); }
.dial__label--rest { fill: var(--peat); }
.dial figcaption { margin-top: 1rem; font-size: 0.95rem; text-align: center; }

@media (min-width: 56em) {
  .dial { margin-top: 2rem; }
}

/* ---------- Schedule ---------- */

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 3px solid var(--marram);
}
.timeline li {
  position: relative;
  display: grid;
  gap: 0.1rem;
  padding: 0 0 1.5rem 1.25rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -0.55rem;
  top: 0.55rem;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--gorse);
  border: 3px solid var(--peat);
}
.timeline time {
  font-family: var(--display);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--gorse);
}
.timeline p { margin: 0; font-size: 1.1rem; }

/* Lap prizes as raffle-style tickets */
.prize {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.9rem 0.15rem;
  background: var(--gorse);
  color: var(--peat);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.1;
  text-transform: uppercase;
  vertical-align: 0.1em;
  transform: rotate(-2deg);
  -webkit-mask:
    radial-gradient(circle 0.4rem at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 0.4rem at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 0.4rem at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 0.4rem at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}

.schedule__note { margin: 1.5rem 0 0; font-size: 1.1rem; font-weight: 700; color: var(--gorse); }

/* The route map as a taped-up print, with the race pennant pinned to its corner */
.schedule__aside { display: grid; justify-items: center; padding: 2.5rem 0 1rem 2.5rem; }
.schedule__map {
  position: relative;
  width: 100%;
  max-width: 20rem;
  margin: 0;
  padding: 0.6rem 0.6rem 0;
  background: var(--haar-pale);
  box-shadow: 8px 8px 0 var(--sandstone);
  transform: rotate(2deg);
}
.schedule__map::before {            /* strip of tape */
  content: "";
  position: absolute;
  top: -0.9rem;
  right: 1.5rem;
  width: 6rem;
  height: 1.7rem;
  background: rgb(242 177 31 / 0.85);
  transform: rotate(5deg);
}
.schedule__route { width: 100%; }
.schedule__map figcaption {
  padding: 0.55rem 0.2rem 0.65rem;
  color: var(--peat);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
  text-transform: uppercase;
}
.schedule__logo {
  position: absolute;
  top: -2.5rem;
  left: -2.75rem;
  width: auto;
  height: 9rem;
  transform: rotate(-10deg);
  filter: drop-shadow(4px 5px 0 rgb(0 0 0 / 0.4));
}

@media (min-width: 40em) {
  .timeline li { grid-template-columns: 9.5rem 1fr; align-items: baseline; gap: 1rem; }
}
@media (min-width: 56em) {
  .split--schedule { grid-template-columns: 1.5fr 1fr; }
  .schedule__aside { position: sticky; top: 7rem; }
  .schedule__map { max-width: 22rem; }
  .schedule__logo { height: 11rem; top: -3rem; left: -3.5rem; }
}

/* ---------- Rules ---------- */

.section--sandstone { background: var(--sandstone); color: var(--haar-pale); }

.rules {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 48rem;
}
.rules li {
  padding: 0.9rem 0;
  border-top: 2px solid rgb(227 228 220 / 0.35);
  font-size: clamp(1.15rem, 3.4vw, 1.45rem);
  line-height: 1.35;
  font-weight: 600;
}

/* ---------- Prizes: the sword runs the full width, weaving between the figures ---------- */

.prizes { overflow: hidden; }

.prize-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.25rem 1.25rem;
  margin: 0;
}
.prize-line strong {
  position: relative;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(5rem, 24vw, 13rem);
  line-height: 0.85;
}
.prize-line span {
  position: relative;
  z-index: 3;                       /* small print always stays on top */
  max-width: 24ch;
  padding-bottom: 0.4em;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}
/* Over and under: the sword passes in front of £5,000 and behind £1,000. */
.prize-line--main strong { z-index: 0; color: var(--sandstone); }
.prize-line--laps { justify-content: flex-end; }
.prize-line--laps strong { z-index: 2; color: var(--peat); }
.prize-line--laps span { text-align: right; }

.sword {
  position: relative;
  z-index: 1;
  width: 100vw;
  margin: -2vw 0 -9vw calc(50% - 50vw);
  pointer-events: none;
}
.sword img {
  width: 150%;
  max-width: none;
  margin-left: -22%;
  transform: rotate(-5deg);
  filter: drop-shadow(5px 9px 0 rgb(42 32 25 / 0.3));
}

.prizes__more { margin-top: 2.5rem; max-width: 40rem; }
.prizes__total { font-weight: 700; font-size: 1.2rem; }

@media (min-width: 56em) {
  .prize-line--laps span { order: -1; }
  .sword { margin-block: -7.5vw -9vw; }
  .sword img { width: 104%; margin-left: -2%; }
}

/* ---------- Kit ---------- */

.kit { display: grid; gap: 1rem 3rem; margin-top: 1rem; }
.kit__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.kit__group legend { margin-top: 1rem; padding: 0; }
.kit label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-top: 1px solid rgb(227 228 220 / 0.3);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
}
.kit input { flex: none; width: 1.3rem; height: 1.3rem; margin: 0.2rem 0 0; accent-color: var(--gorse); }
.kit label:has(input:checked) { text-decoration: line-through; opacity: 0.7; }

@media (min-width: 48em) {
  .kit { grid-template-columns: 1fr 1fr; }
}

/* ---------- FAQ ---------- */

.faq details { border-top: 3px solid var(--peat); }
.faq details:last-child { border-bottom: 3px solid var(--peat); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.6em;
  line-height: 0.6;
  color: var(--sandstone);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { max-width: 62ch; margin: 0 0 1.25rem; }

/* ---------- Sign-up ---------- */

.places {
  margin: -0.5rem 0 1.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  text-transform: uppercase;
  color: var(--gorse);
}

.notice {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 6px solid var(--haar);
  background: rgb(211 212 203 / 0.1);
}
.notice--test { border-color: var(--gorse); }
.notice--ok { border-color: var(--marram); background: rgb(125 128 73 / 0.35); }
.notice--soon { border-color: var(--gorse); background: rgb(242 177 31 / 0.15); font-size: 1.1rem; }
.notice--closed { border-color: var(--sandstone); background: rgb(166 60 30 / 0.4); }

.entry { display: grid; gap: 1.25rem; }
.entry[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.field { display: grid; gap: 0.35rem; }
.field label, .field-group legend { font-weight: 700; }
.field input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 2px solid var(--haar);
  border-radius: 0;
  background: var(--haar-pale);
  color: var(--peat);
  font: inherit;
}
.field input:focus-visible { outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--gorse); box-shadow: 0 0 0 2px var(--gorse); }
.field__hint { margin: 0; font-size: 0.9rem; opacity: 0.85; }

.field-group {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid rgb(211 212 203 / 0.3);
  min-width: 0;
}
.field-group legend { float: left; width: 100%; padding: 0; font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; }
.field-group legend + * { clear: both; }

@media (min-width: 36em) {
  .field-group { grid-template-columns: 1fr 1fr; }
  .field-group legend { grid-column: 1 / -1; }
}

.check {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 2px solid rgb(211 212 203 / 0.35);
  cursor: pointer;
}
.check:has(input:checked) { border-color: var(--haar); background: rgb(211 212 203 / 0.08); }
.check input { flex: none; width: 1.35rem; height: 1.35rem; margin: 0.1rem 0 0; accent-color: var(--gorse); }
.check__note { display: block; font-size: 0.9rem; opacity: 0.85; }
.check--off { opacity: 0.55; cursor: not-allowed; }
.check[aria-invalid="true"] { border-color: var(--gorse); box-shadow: 0 0 0 2px var(--gorse); }

.form-error {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--gorse);
  color: var(--peat);
  font-weight: 700;
}

.entry__pay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 3px solid var(--haar);
}
.entry__total { margin: 0; font-size: 1.1rem; }
.entry__total strong {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 3rem;
  line-height: 1;
}

/* ---------- Footer ---------- */

.footer {
  padding: var(--section-space) 0 2rem;
  background: var(--haar);
}
.footer__grid { display: grid; gap: 2.5rem; }
.footer__email {
  font-weight: 700;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  text-decoration-color: var(--sandstone);
  overflow-wrap: anywhere;
}
.privacy { font-size: 0.95rem; }
.privacy .h3 { margin-top: 0; }
.privacy p { max-width: 62ch; }

/* Sign-off: the logo big and centred, like the bottom of a race poster */
.footer__end {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 3px solid var(--peat);
  text-align: center;
}
.footer__end img {
  width: auto;
  height: clamp(16rem, 55vw, 26rem);
  filter: drop-shadow(8px 10px 0 rgb(42 32 25 / 0.25));
}
.footer__end p {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.1;
  text-transform: uppercase;
}

@media (min-width: 56em) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
