/* ─── Google Fonts ───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ─── Variables ─────────────────────────────────────────────────── */
:root {
  --colour-primary:       #1a9e6e;
  --colour-primary-dark:  #0d6b4a;
  --colour-primary-light: #e6f7f1;
  --colour-accent:        #f5a623;
  --colour-accent-dark:   #d4881a;
  --colour-text:          #0f1923;
  --colour-muted:         #6b7280;
  --colour-border:        #e2e8f0;
  --colour-bg:            #ffffff;
  --colour-bg-alt:        #f8fafc;
  --colour-dark:          #0c1a14;
  --colour-dark-surface:  #162b20;
  --colour-dark-text:     #e8f5ef;
  --radius:               10px;
  --radius-lg:            18px;
  --radius-xl:            28px;
  --shadow:               0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:            0 8px 32px rgba(0,0,0,.15);
  --shadow-xl:            0 20px 60px rgba(0,0,0,.2);
  --font-display:         'Outfit', system-ui, -apple-system, sans-serif;
  --font:                 system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max-width:            1140px;
  --header-h:             68px;
  /* Shared width for the hero's Explore trails button and code box. */
  --hero-action-w:        260px;
  /* How far the logo badge hangs below the header bar. Everything that
     has to clear it reads this rather than repeating the number — the
     hero padding did repeat it, fell behind when the badge shrank for
     phones, and the logo landed on the headline on an iPhone SE. */
  --logo-badge-drop:      36px;
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Put the indent back on lists that still show a marker.
   The reset above zeroes padding on everything, lists included — and a bullet
   or number is drawn OUTSIDE the content box, so with no padding it lands
   outside the container and every list in the app reads as misaligned against
   the paragraphs around it. Creators write bullets in the rich text editor, so
   this shows up on trail summaries, safety notes and endings.
   Lists that deliberately have no marker set `list-style: none; padding: 0`
   themselves, and a class selector beats this one. */
ul, ol { padding-left: 1.4rem; }
ul[style*="list-style: none"], ol[style*="list-style: none"] { padding-left: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--colour-text);
  background: var(--colour-bg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--colour-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ────────────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  border: none;
  text-align: center;
  text-decoration: none;
  transition: background .18s, transform .12s, box-shadow .18s;
  line-height: 1.4;
}
.btn:active { transform: scale(.96); }
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--colour-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26,158,110,.35);
}
.btn-primary:hover {
  background: var(--colour-primary-dark);
  box-shadow: 0 6px 20px rgba(26,158,110,.45);
}

.btn-accent {
  background: var(--colour-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245,166,35,.35);
}
.btn-accent:hover {
  background: var(--colour-accent-dark);
  box-shadow: 0 6px 20px rgba(245,166,35,.45);
}

.btn-ghost {
  background: transparent;
  color: var(--colour-primary);
  border: 2px solid var(--colour-primary);
}
.btn-ghost:hover {
  background: var(--colour-primary-light);
}

.btn-ghost-white {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.btn-ghost-white:hover {
  background: rgba(255,255,255,.22);
  border-color: #fff;
}

.btn-large { padding: .9rem 2.2rem; font-size: 1.1rem; }
.btn-xl    { padding: 1.1rem 2.8rem; font-size: 1.2rem; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ─── Header ────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s, box-shadow .3s, -webkit-backdrop-filter .3s, backdrop-filter .3s;
}

/* Default state: transparent over hero */
.site-header--transparent {
  background: transparent;
}

/* Scrolled / non-hero pages */
.site-header--solid,
.site-header:not(.site-header--transparent) {
  background: var(--colour-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}

.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: 100%;
  /* Fixed height so the overhanging logo badge below can spill past the bar
     without stretching the header along with it. */
  height: 100%;
}

.site-logo { display: flex; align-items: center; text-decoration: none; }
.site-logo img { height: 44px; width: auto; }

/* Uploaded logo: hangs below the header on a frosted panel. Over a photo hero
   a bare logo washes out, and brand logos are rarely legible in white — the
   panel gives it a light backdrop to sit on while the hero still shows through.
   Padding is deliberately tight: logo files usually carry their own whitespace,
   which adds to whatever is set here. Raise it if a tightly-cropped logo is
   uploaded. */
.site-logo--badged {
  align-self: flex-start;
  height: calc(var(--header-h) + var(--logo-badge-drop));
  padding: 0 .9rem;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.site-logo--badged img {
  height: 92px;
  width: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 900;
  color: #fff;
  letter-spacing: -.03em;
}
.logo-text span { color: var(--colour-accent); }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: rgba(255,255,255,.88);
  letter-spacing: .01em;
  transition: color .15s;
}
.site-nav a:not(.btn):hover { color: #fff; text-decoration: none; }
.site-nav .btn { font-size: .9rem; padding: .5rem 1.2rem; }

/* ─── Body offset for fixed header ──────────────────────────────── */
.has-hero { /* pages with hero — no offset, hero is full-bleed */ }
.no-hero main { padding-top: var(--header-h); }
/* The logo badge hangs below the header bar, so pages without a hero need to
   start below the badge — not the bar — or it lands on top of the page title. */
.has-logo-badge.no-hero main { padding-top: calc(var(--header-h) + 56px); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  background: var(--colour-dark);
}

.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
}

.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(12,26,20,.35) 0%,
    rgba(12,26,20,.2) 40%,
    rgba(12,26,20,.75) 75%,
    rgba(12,26,20,.92) 100%
  );
}

/* ─── Hero wash (CMS-controlled) ────────────────────────────────────
   Laid over the picture and the fixed gradient above, under .hero__content
   at z-index 3. The strength arrives as an inline opacity from the page, so
   there is nothing here to keep in step with the CMS. */
.hero__scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
}
.hero__scrim--white { background: #fff; }
.hero__scrim--grey  { background: #6b7280; }
.hero__scrim--dark  { background: #0c1a14; }

/* The other placement: a panel behind the words rather than a wash over the
   whole photograph. Usually the better answer — the picture keeps its colour
   and only the part being read over is quieted. The strength arrives as
   --hero-wash on the section, so one number drives either placement. */
.hero__panel { max-width: 760px; }
.hero--wash-panel .hero__panel {
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius-lg, 18px);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.hero--wash-panel.hero--wash-white .hero__panel {
  background: rgb(255 255 255 / var(--hero-wash, 0));
}
.hero--wash-panel.hero--wash-grey .hero__panel {
  background: rgb(107 114 128 / var(--hero-wash, 0));
}
.hero--wash-panel.hero--wash-dark .hero__panel {
  background: rgb(12 26 20 / var(--hero-wash, 0));
}
@media (max-width: 560px) {
  /* Edge to edge on a phone: a rounded card with the photograph showing in a
     10px gutter either side reads as a mistake rather than a design. */
  .hero--wash-panel .hero__panel { padding: 1.2rem 1.1rem; }
}

/* Dark hero wording, for use with a strong white wash. Every white value in
   the hero has to be answered here — miss one and it disappears into the
   page, which is how "unreadable" gets traded for "invisible". */
.hero--dark-text .hero__heading {
  color: var(--colour-dark-surface, #162b20);
  text-shadow: 0 1px 12px rgba(255,255,255,.45);
}
.hero--dark-text .hero__tagline,
.hero--dark-text .hero__code-label { color: rgba(12,26,20,.82); }
.hero--dark-text .hero__eyebrow { color: var(--colour-primary-dark, #0d6b4a); }
.hero--dark-text .hero__code-input {
  color: var(--colour-dark-surface, #162b20);
  background: rgba(255,255,255,.55);
  border-color: rgba(12,26,20,.3);
}
.hero--dark-text .hero__code-input::placeholder { color: rgba(12,26,20,.5); }
.hero--dark-text .hero__code-input:focus {
  border-color: rgba(12,26,20,.55); background: rgba(255,255,255,.75);
}
.hero--dark-text .hero__scroll-hint,
.hero--dark-text .hero__slide-caption { color: rgba(12,26,20,.7); }
.hero--dark-text .hero__motion-toggle {
  color: var(--colour-dark-surface, #162b20);
  background: rgba(255,255,255,.6);
  border-color: rgba(12,26,20,.25);
}

/* Subtle animated grain */
.hero__grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.hero__content {
  position: relative; z-index: 3;
  padding: 6.5rem 0 3.5rem;
}
/* Clear the logo badge. Derived rather than guessed: the fixed 6.5rem above
   happened to equal the badge exactly on a desktop — zero clearance — and was
   12px short of it on a phone, which is why the logo sat on the headline. */
.has-logo-badge .hero__content {
  padding-top: calc(var(--header-h) + var(--logo-badge-drop) + 1.75rem);
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--colour-accent);
  margin-bottom: 1rem;
}

.hero__heading {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
  max-width: 720px;
}

.hero__tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,.8);
  max-width: 580px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* The two ways into the product — browse, or enter a code — are sized to match
   so they read as one stacked pair rather than two unrelated controls. */
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.hero__cta .btn-xl { min-width: var(--hero-action-w); text-align: center; }

.hero__code-entry { margin-top: 1.5rem; }
.hero__code-label {
  /* Matches the hero tagline — this is a primary route into the product for
     anyone arriving with a code, not fine print. */
  display: block; color: rgba(255,255,255,.85); font-size: 1.15rem;
  margin-bottom: .7rem; font-weight: 500;
}
.hero__code-row {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}
.hero__code-input {
  padding: .65rem 1rem; border: 2px solid rgba(255,255,255,.35);
  border-radius: 10px; background: rgba(255,255,255,.15);
  color: #fff; font-size: 1rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; width: var(--hero-action-w); outline: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.hero__code-input::placeholder { color: rgba(255,255,255,.45); font-weight: 400; letter-spacing: 0; text-transform: none; }
.hero__code-input:focus { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.22); }

.hero__scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: .3rem;
  color: rgba(255,255,255,.5); font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; font-family: var(--font-display); font-weight: 600;
  animation: bounce-hint 2s ease-in-out infinite;
}
.hero__scroll-hint svg { width: 20px; height: 20px; }
@keyframes bounce-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* Fallback hero (no image set) */
.hero--default {
  background: linear-gradient(135deg, var(--colour-dark) 0%, #1a3d2a 60%, #0d2e1e 100%);
}

/* ─── How it works (below hero) ──────────────────────────────────
   Replaced the green stat strip. The artwork is 2172×360 — six to one — so
   below 700px it is swapped for the same three steps as text, because at a
   phone's width the picture is sixty pixels tall and the words in it cannot
   be read. */
.how-it-works { background: #fff; padding: 1.6rem 0; }
.how-it-works__art { display: block; width: 100%; height: auto; margin: 0 auto; }
.how-it-works__steps { display: none; }

@media (max-width: 700px) {
  .how-it-works__art { display: none; }
  .how-it-works__steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: .9rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .hiw-step {
    display: grid;
    grid-template-columns: 72px 2rem 1fr;
    grid-template-areas: "img n title" "img n text";
    column-gap: .7rem;
    align-items: center;
  }
  /* The three objects cut out of the wide artwork, so the phone layout shows
     the same things rather than three numbers and some words. Decorative —
     the step's own title and line carry the meaning. */
  .hiw-step__img {
    grid-area: img;
    width: 72px; height: 72px;
    object-fit: contain;
    align-self: center;
  }
  .hiw-step__n {
    grid-area: n;
    width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--colour-accent, #f5a623); color: #fff;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  }
  .hiw-step__title {
    grid-area: title;
    font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
    color: var(--colour-primary-dark, #0d6b4a); line-height: 1.2;
  }
  .hiw-step__text {
    grid-area: text;
    font-size: .92rem; color: var(--colour-muted, #6b7280); line-height: 1.4;
  }
}

/* ─── Stat strip (below hero) ────────────────────────────────────── */
.stat-strip {
  background: var(--colour-primary);
  color: #fff;
  padding: .9rem 0;
}
.stat-strip__inner {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem;
}
.stat-item {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-size: .85rem; font-weight: 600;
}
/* Line icons. One stroke weight, inheriting the colour around them, so they
   read as part of the typography rather than stickers on top of it.
   vector-effect keeps the stroke honest at any size — scale an SVG up and the
   stroke scales with it, which is how a set of icons stops matching. */
.icon-line {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -.125em;
  flex-shrink: 0;
}

.stat-item__icon {
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  /* The strip is on the brand green; the icons sit a shade back from the
     words so the words are what you read first. */
  color: var(--colour-accent, currentColor);
  opacity: .95;
}

/* ─── Sections ───────────────────────────────────────────────────── */
/* The org page and the collection page both wrap their trail grid in
   <section class="section">, and this rule did not exist — so the grid had no
   padding at all and the bottom row of cards ran into the footer's top border.
   Matches .route-index, which is the same shape of page. */
.section { padding: 2rem 0 4rem; }

/* ─── Section headings ───────────────────────────────────────────── */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--colour-text);
  margin-bottom: .5rem;
}
.section-sub {
  font-size: 1rem; color: var(--colour-muted); margin-bottom: 2rem;
}

/* ─── Filter bar ────────────────────────────────────────────────── */
#trails { scroll-margin-top: var(--header-h); }
/* With a logo badge hanging below the bar, the sticky filter row has to stop
   below the badge rather than under it — otherwise the badge lands on the
   search box as soon as the page scrolls. */
.has-logo-badge #trails { scroll-margin-top: calc(var(--header-h) + 44px); }
.has-logo-badge .filter-bar {
  top: var(--header-h);
  /* Badge overhang (36px) + the bar's own .75rem. The bar still snaps right
     under the black header; its white area simply starts above the search row
     so trail cards can't scroll through the gap behind the translucent badge. */
  padding-top: calc(36px + .75rem);
}
.filter-bar {
  background: white;
  border-bottom: 1px solid var(--colour-border);
  padding: .75rem 0;
  position: sticky; top: var(--header-h); z-index: 90;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.filter-bar__row {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}

/* Search pill */
.filter-bar__search {
  display: flex; flex: 1 1 220px; min-width: 160px;
  border: 1.5px solid var(--colour-border);
  border-radius: 99px;
  overflow: hidden; background: white;
  transition: border-color .18s, box-shadow .18s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.filter-bar__search:focus-within {
  border-color: var(--colour-primary);
  box-shadow: 0 0 0 3px rgba(26,158,110,.14);
}
.filter-bar__input {
  flex: 1; padding: .55rem 1rem; border: none;
  font-size: .9rem; outline: none; min-width: 0; background: transparent;
  font-family: var(--font);
}
.filter-bar__btn {
  background: var(--colour-primary); color: white; border: none;
  padding: 0 1rem; font-size: .95rem; cursor: pointer; flex-shrink: 0;
  border-radius: 0 99px 99px 0; transition: background .15s;
}
.filter-bar__btn:hover { background: var(--colour-primary-dark); }

/* Native select — hidden, replaced by .gdi-select */
.filter-bar__select { display: none; }

/* ─── Custom select widget ──────────────────────────────────────── */
.gdi-select {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.gdi-select__trigger {
  display: flex; align-items: center; gap: .45rem;
  padding: .55rem 1.1rem;
  border: 1.5px solid var(--colour-border);
  border-radius: 99px;
  background: white;
  font: 600 .85rem/1.4 var(--font-display);
  color: var(--colour-text);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: border-color .18s, box-shadow .18s, background .18s, color .18s;
  -webkit-user-select: none;
  user-select: none;
}
.gdi-select__trigger:hover,
.gdi-select__trigger:focus-visible {
  border-color: var(--colour-primary);
  box-shadow: 0 2px 12px rgba(26,158,110,.18);
  outline: none;
}
.gdi-select__trigger--active {
  background: var(--colour-primary);
  border-color: var(--colour-primary);
  color: white;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(26,158,110,.32);
}
.gdi-select__chevron {
  width: 14px; height: 14px; flex-shrink: 0;
  transition: transform .2s;
  opacity: .65;
}
.gdi-select--open .gdi-select__chevron { transform: rotate(180deg); }
.gdi-select--open .gdi-select__trigger { border-color: var(--colour-primary); }

.gdi-select__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background: white;
  border: 1.5px solid var(--colour-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  overflow: hidden;
  z-index: 200;
  animation: gdi-drop .15s ease;
}
.gdi-select--open .gdi-select__dropdown { display: block; }

@keyframes gdi-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gdi-select__option {
  padding: .65rem 1.2rem;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
  display: flex; align-items: center; gap: .5rem;
}
.gdi-select__option:hover { background: var(--colour-bg-alt); }
.gdi-select__option--selected {
  color: var(--colour-primary);
  font-weight: 700;
  background: var(--colour-primary-light);
}
.gdi-select__option--selected::after {
  content: '✓';
  margin-left: auto;
  font-size: .8rem;
}

.tag-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .5rem 0 0; }
.tag-filter-label { font-size: .78rem; font-weight: 700; color: var(--colour-muted); text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-display); }
.tag-pill {
  display: inline-block; padding: .28rem .8rem;
  border-radius: 99px; font-size: .82rem; font-weight: 600;
  background: var(--colour-bg); border: 1.5px solid var(--colour-border);
  color: var(--colour-muted); text-decoration: none;
  font-family: var(--font-display);
  transition: all .15s;
}
.tag-pill:hover { border-color: var(--colour-primary); color: var(--colour-primary); text-decoration: none; }
.tag-pill--active { background: var(--colour-primary); border-color: var(--colour-primary); color: white; }
.badge--tag { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

/* ─── Active filter chips ───────────────────────────────────────── */
.active-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  margin-bottom: 1.5rem; font-size: .85rem; color: var(--colour-muted);
  font-family: var(--font-display);
}
.active-filter-chip {
  background: var(--colour-primary-light); color: var(--colour-primary-dark);
  border: 1px solid var(--colour-primary); border-radius: 99px;
  padding: .22rem .75rem; font-weight: 700; font-size: .82rem;
}

/* ─── Trail listing section ──────────────────────────────────────── */
.trail-listing { padding: 2.5rem 0 5rem; }
.trail-listing__header { margin-bottom: 1.5rem; }
.trail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); grid-gap: 1.75rem; gap: 1.75rem; }
.no-results { grid-column: 1/-1; color: var(--colour-muted); text-align: center; padding: 3rem; }
.org-page-empty { text-align: center; color: var(--colour-muted); padding: 3rem; }

/* ── Routes (running / cycling / bikepacking) ───────────────────── */
.route-detail, .route-index { padding: 2rem 0 4rem; }
.route-hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; margin-bottom: 1.25rem; display: block; }
.route-eyebrow { text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; color: var(--colour-muted); margin: 0; }
.route-title { font-size: 2rem; margin: .2rem 0 .3rem; }
.route-credit { color: var(--colour-muted); margin: 0 0 1rem; font-style: italic; }
.route-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; font-weight: 600; }
.route-downloads { margin: 1rem 0 1.5rem; }
.route-map { height: 420px; border-radius: 14px; margin: 1.25rem 0; z-index: 0; }
.route-section { line-height: 1.65; margin: .5rem 0 1rem; }
.route-section--warn { background: #fef2f2; border-left: 4px solid #f87171; border-radius: 0 10px 10px 0; padding: .9rem 1.1rem; }
.route-h2 { font-size: 1.25rem; margin: 1.75rem 0 .75rem; }
.stage-card { border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: .75rem; }
.stage-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stage-card__head h3 { margin: 0; font-size: 1.05rem; }
.stage-card__stats { display: flex; flex-wrap: wrap; gap: .9rem; color: var(--colour-muted); font-size: .9rem; margin-top: .4rem; }
.stage-card__notes { margin: .5rem 0 0; color: #374151; }
.route-points { list-style: none; padding: 0; margin: .5rem 0; }
.route-points li { padding: .45rem 0; border-bottom: 1px solid #f3f4f6; }
.route-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.75rem; }
.route-chip { padding: .35rem .8rem; border-radius: 20px; border: 1.5px solid #e5e7eb; font-size: .85rem; text-decoration: none; color: #374151; }
.route-chip--active { background: var(--colour-primary); border-color: var(--colour-primary); color: #fff; }
.route-index__intro { color: var(--colour-muted); margin: .25rem 0 1rem; }
.elevation-wrap { margin: .5rem 0 1.5rem; }
.elevation-chart { width: 100%; height: 180px; display: block; background: #f9fafb; border: 1px solid #eef0f2; border-radius: 10px; }
.elevation-axis { font-size: .8rem; color: var(--colour-muted); margin: .35rem 0 0; }
.route-summary { font-size: 1.05rem; color: #374151; margin: .25rem 0 1rem; }

/* Public organisation page */
.org-page-header { padding: 3rem 0 1.5rem; text-align: center; }
.org-page-header__logo { width: 96px; height: 96px; object-fit: contain; margin: 0 auto 1rem; display: block; }
.org-page-header__title { font-size: 2rem; margin: 0 0 .5rem; }
.org-page-header__blurb { max-width: 640px; margin: 0 auto .75rem; color: var(--colour-muted); }
.org-page-header__count { color: var(--colour-muted); font-size: .9rem; }
.org-page-empty { text-align: center; color: var(--colour-muted); padding: 3rem; }
.collection-hero { width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; margin-bottom: 1.5rem; display: block; }
.collection-qr { margin-top: 1rem; }

/* ─── Trail card ─────────────────────────────────────────────────── */
.trail-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  transition: box-shadow .4s, transform .4s;
}
.trail-card:hover {
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  transform: translateY(-8px);
}

.trail-card__link {
  display: block; position: relative;
  height: 380px; overflow: hidden;
  text-decoration: none;
}
.trail-card__image {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}
.trail-card:hover .trail-card__image { transform: scale(1.08); }

.trail-card__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #1a3d2a 0%, #0d2e1e 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}

.trail-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(5,15,10,.96) 0%,
    rgba(5,15,10,.55) 38%,
    rgba(5,15,10,.05) 65%,
    transparent 100%
  );
  transition: background .4s;
}
.trail-card:hover .trail-card__overlay {
  background: linear-gradient(
    to top,
    rgba(5,15,10,.98) 0%,
    rgba(5,15,10,.75) 48%,
    rgba(5,15,10,.15) 75%,
    transparent 100%
  );
}

/* Difficulty + price badges at top */
.trail-card__top {
  position: absolute; top: 1rem; left: 1rem; right: 1rem;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 2;
}
.trail-card__tag {
  display: inline-block; padding: .28rem .75rem;
  border-radius: 99px; font-family: var(--font-display);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.trail-card__tag--easy        { background: rgba(22,163,74,.85);  color: #fff; }
.trail-card__tag--moderate    { background: rgba(234,179,8,.9);   color: #1c1400; }
.trail-card__tag--challenging { background: rgba(220,38,38,.85);  color: #fff; }
.trail-card__price-tag {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 800;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

/* Title block — always visible */
.trail-card__bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.6rem 1.4rem 1.5rem;
  z-index: 2;
}
.trail-card__caption {
  transition: transform .4s cubic-bezier(.25,.46,.45,.94);
  margin-bottom: .5rem;
}
.trail-card:hover .trail-card__caption { transform: translateY(-4px); }

.trail-card__timed-pill {
  display: inline-block; margin-bottom: .4rem;
  background: rgba(245,166,35,.9); color: #1c1400;
  padding: .1rem .55rem; border-radius: 99px;
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
}
.trail-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800; line-height: 1.2;
  color: #fff; margin-bottom: .3rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.trail-card__location {
  font-family: var(--font-display); font-size: .83rem; font-weight: 500;
  color: rgba(255,255,255,.78);
}

/* Stats + CTA reveal on hover */
.trail-card__reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
}
.trail-card:hover .trail-card__reveal {
  opacity: 1;
  transform: translateY(0);
}
.trail-card__stats {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: .85rem;
}
.trail-card__stat {
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.72);
}
.trail-card__cta-text {
  display: inline-block;
  font-family: var(--font-display); font-size: .92rem; font-weight: 700;
  color: #fff;
  border-bottom: 2px solid var(--colour-primary);
  padding-bottom: .1rem;
}

/* ─── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .22rem .65rem; border-radius: 99px;
  font-family: var(--font-display); font-size: .78rem; font-weight: 700;
  background: var(--colour-bg-alt); color: var(--colour-muted);
  border: 1px solid var(--colour-border);
}
.badge--location { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge--difficulty { background: #fefce8; color: #92400e; border-color: #fde68a; }
.badge--timed { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

/* ─── Values strip (local voices) ──────────────────────────────── */
.values-strip {
  background: var(--colour-dark-surface);
  padding: 4rem 0;
}
.values-strip__heading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800; color: #fff;
  margin-bottom: .6rem;
}
.values-strip__sub { color: rgba(255,255,255,.6); font-size: 1rem; margin-bottom: 2.5rem; }
/* Sized to match how these cards read on a phone, where they were already
   right — the desktop versions were shrunken by comparison. */
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; }
.value-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  text-align: center;
}
.value-item__icon {
  /* Smaller than the 2.9rem the emoji needed: a line icon carries at this
     size, and at emoji scale it looks like a diagram. */
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--colour-primary);
  display: flex;
  justify-content: center;
}

/* A creator's own emoji still gets the size an emoji needs — this only steps
   down for the icons we draw. */
.value-item__icon:not(:has(.icon-line)) { font-size: 2.9rem; display: block; }

.value-item__icon .icon-line {
  /* A little weight off: at 2rem the 1.75 stroke of the small icons starts to
     look heavy. */
  stroke-width: 1.5;
}
.value-item__img {
  display: block;
  width: 76px; height: 76px;
  object-fit: contain;
  margin: 0 auto 1rem;
}
.value-item__title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: #fff; margin-bottom: .5rem;
}
.value-item__text { font-size: .95rem; color: rgba(255,255,255,.62); line-height: 1.6; }

/* ─── Social impact band ────────────────────────────────────────── */
.impact-band {
  background: var(--colour-primary-light, #e7f6ef);
  padding: 6rem 0;
}
.impact-band__inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
}
.impact-band__inner--no-image { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; text-align: center; }
.impact-band__eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--colour-primary, #1a9e6e);
  margin-bottom: 1.1rem;
}
.impact-band__heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--colour-dark, #10281d);
  margin-bottom: 1.5rem;
}
.impact-band__body { color: #374151; font-size: 1.06rem; line-height: 1.75; }
.impact-band__body p { margin: 0 0 1rem; }
.impact-band__body p:last-child { margin-bottom: 0; }
.impact-band__cta { margin-top: 1.4rem; display: inline-block; }
.impact-band__media img {
  width: 100%; height: 100%; max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
}
.impact-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}
.impact-band__inner--no-image .impact-stats { max-width: 640px; margin-left: auto; margin-right: auto; }
.impact-stat {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radius-lg, 14px);
  padding: 1rem .9rem;
  text-align: center;
}
.impact-stat__icon { display: block; font-size: 1.5rem; margin-bottom: .3rem; }
.impact-stat__figure {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  color: var(--colour-primary, #1a9e6e);
  line-height: 1.1;
}
.impact-stat__label { display: block; font-size: .82rem; color: #4b5563; margin-top: .2rem; line-height: 1.4; }

@media (max-width: 820px) {
  .impact-band { padding: 3.5rem 0; }
  .impact-band__inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .impact-band__media { order: -1; }
}

/* ─── Trail detail ──────────────────────────────────────────────── */
.trail-hero {
  width: 100%; height: 580px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.trail-hero--no-image {
  height: auto;
  background: linear-gradient(135deg, var(--colour-dark) 0%, #1a3d2a 100%);
  padding-top: var(--header-h);
}
.trail-hero__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.trail-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,16,.15) 0%,
    rgba(10,22,16,.1)  35%,
    rgba(10,22,16,.72) 68%,
    rgba(10,22,16,.93) 100%
  );
}
.trail-hero__content {
  position: relative; z-index: 2;
  padding: 2.5rem 0 2.5rem;
}
.trail-hero__breadcrumb { margin-bottom: 1rem; }
.trail-hero__breadcrumb a {
  color: rgba(255,255,255,.6); font-size: .85rem;
  font-family: var(--font-display); font-weight: 600; text-decoration: none;
}
.trail-hero__breadcrumb a:hover { color: #fff; text-decoration: none; }
.trail-hero__tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.trail-hero__tag {
  display: inline-block; padding: .32rem .9rem;
  border-radius: 99px; font-family: var(--font-display);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.trail-hero__tag--easy        { background: rgba(22,163,74,.85);  color: #fff; }
.trail-hero__tag--moderate    { background: rgba(234,179,8,.92);  color: #1c1400; }
.trail-hero__tag--challenging { background: rgba(220,38,38,.85);  color: #fff; }
.trail-hero__tag--timed       { background: rgba(245,166,35,.9);  color: #1c1400; }
.trail-hero__tag--theme       { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.trail-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900; color: #fff; line-height: 1.05;
  text-shadow: 0 2px 24px rgba(0,0,0,.45); margin-bottom: .55rem;
}
.trail-hero__location {
  color: rgba(255,255,255,.75);
  font-size: 1rem; font-family: var(--font-display); font-weight: 500;
}

/* Stats strip */
.trail-stats-strip {
  background: #fff;
  border-bottom: 1px solid var(--colour-border);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.trail-stats-strip__inner {
  display: flex; flex-wrap: wrap;
  border-left: 1px solid var(--colour-border);
}
.trail-stat {
  flex: 1; min-width: 90px;
  display: flex; flex-direction: column; align-items: center;
  padding: 1.1rem .75rem;
  border-right: 1px solid var(--colour-border);
  text-align: center;
}
.trail-stat__icon { font-size: 1.25rem; margin-bottom: .2rem; }
.trail-stat__value {
  font-family: var(--font-display); font-size: 1rem; font-weight: 800;
  color: var(--colour-text); line-height: 1.15;
}
.trail-stat__label {
  font-size: .7rem; color: var(--colour-muted);
  font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; margin-top: .1rem;
}

.trail-detail { padding-bottom: 5rem; }
.trail-detail__body { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; margin-top: 2.5rem; }
.lead { font-size: 1.1rem; color: var(--colour-muted); margin-bottom: 1.75rem; line-height: 1.7; }

/* ─── Info boxes ────────────────────────────────────────────────── */
.info-box {
  background: var(--colour-bg-alt); border: 1px solid var(--colour-border);
  border-radius: var(--radius-lg); padding: 1.2rem 1.4rem; margin-bottom: 1.1rem;
}
.info-box h3 {
  font-family: var(--font-display); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--colour-muted); margin-bottom: .5rem; font-weight: 700;
}
.info-box--safety { background: #fff7ed; border-color: #fed7aa; }

/* ─── Purchase card ─────────────────────────────────────────────── */
.purchase-card {
  background: var(--colour-bg); border: 1px solid var(--colour-border);
  border-radius: var(--radius-xl); padding: 1.75rem;
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  box-shadow: 0 8px 40px rgba(0,0,0,.1);
  display: flex; flex-direction: column; gap: .9rem;
  overflow: hidden;
}
.purchase-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--colour-primary), var(--colour-accent));
}
.purchase-card__price-row {
  display: flex; align-items: baseline; gap: .5rem;
}
.purchase-card__price {
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 900;
  color: var(--colour-primary); line-height: 1;
}
.purchase-card__per {
  font-size: .85rem; color: var(--colour-muted);
  font-family: var(--font-display);
}
.purchase-card__btn { width: 100%; text-align: center; }
.purchase-card__access-note {
  font-size: .85rem; color: var(--colour-muted);
  background: var(--colour-bg-alt); border-radius: var(--radius);
  padding: .6rem .9rem; line-height: 1.4;
}
.purchase-card__reassurance {
  display: flex; flex-direction: column; gap: .32rem;
  font-size: .82rem; color: var(--colour-muted);
  font-family: var(--font-display); font-weight: 600;
  border-top: 1px solid var(--colour-border); padding-top: .75rem;
}
.purchase-card__duration { font-size: .85rem; color: var(--colour-muted); }

/* ─── Booking page ──────────────────────────────────────────────── */
.trail-select { display: flex; flex-direction: column; gap: .7rem; margin: 1.75rem 0; }
.trail-select__item {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
  border: 2px solid var(--colour-border); border-radius: var(--radius-lg);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.trail-select__item:has(input:checked), .trail-select__item--preselected {
  border-color: var(--colour-primary); background: var(--colour-primary-light);
}
.trail-select__item input { width: 1.2rem; height: 1.2rem; accent-color: var(--colour-primary); }
.trail-select__info { flex: 1; }
.trail-select__info strong { font-family: var(--font-display); font-weight: 700; }
.trail-select__location { font-size: .85rem; color: var(--colour-muted); display: block; }
.trail-select__price { font-family: var(--font-display); font-weight: 800; color: var(--colour-primary); white-space: nowrap; }
.booking-total { margin: 1rem 0; font-size: 1.1rem; font-family: var(--font-display); font-weight: 700; }
.email-field { margin: 1.25rem 0; display: flex; flex-direction: column; gap: .4rem; }
.email-field label { font-family: var(--font-display); font-weight: 700; }
.email-field input {
  padding: .75rem 1rem; border: 1.5px solid var(--colour-border);
  border-radius: var(--radius); font-size: 1rem;
  transition: border-color .15s;
}
.email-field input:focus { outline: none; border-color: var(--colour-primary); }

/* ─── Success / cancel ──────────────────────────────────────────── */
.success-card {
  max-width: 520px; margin: 5rem auto; text-align: center;
  padding: 2.5rem; background: var(--colour-primary-light);
  border-radius: var(--radius-xl); border: 2px solid var(--colour-primary);
  box-shadow: var(--shadow-lg);
}
.success-icon { font-size: 3.5rem; margin-bottom: 1.1rem; }

/* ─── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--colour-dark);
  padding: 3rem 0 2rem;
}
.site-footer .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer-text { color: rgba(255,255,255,.5); font-size: .88rem; }
.footer-text a { color: rgba(255,255,255,.7); }
.footer-text a:hover { color: #fff; }
.footer-logo-text {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 900;
  color: rgba(255,255,255,.85); letter-spacing: -.02em;
}
.footer-contact { margin-top: .45rem; font-size: .9rem; }
.footer-contact a { color: rgba(255,255,255,.72); }
.footer-contact a:hover { color: #fff; }

/* The footer sits on the dark green, so the logo gets a light plate to read
   against — the same reasoning as the header badge. */
.footer-logo-img {
  height: 52px; width: auto; display: block;
  background: rgba(255,255,255,.9);
  border-radius: 10px;
  padding: .35rem .6rem;
}
.partner-logo { height: 36px; width: auto; opacity: .7; filter: brightness(0) invert(1); }

/* ─── Alerts ────────────────────────────────────────────────────── */
.alert { padding: .9rem 1.3rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .95rem; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.alert-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert a { color: inherit; font-weight: 600; }
.alert code { background: rgba(0,0,0,.08); padding: .1em .4em; border-radius: 3px; font-size: .88em; }

/* ─── Have-code link on booking page ────────────────────────────── */
.have-code {
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--colour-border);
  color: var(--colour-muted); font-size: .95rem;
}

/* ─── Leaderboard ────────────────────────────────────────────────── */
.leaderboard-page { padding: 2.5rem 0 5rem; min-height: 60vh; }
.leaderboard-title {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 900; color: var(--colour-text);
  margin-bottom: 1.75rem;
}
.leaderboard-header { margin-bottom: 1.75rem; }
.leaderboard-header h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-bottom: .3rem; }
.leaderboard-meta { color: var(--colour-muted); font-size: .9rem; }

.leaderboard-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.leaderboard-table { width: 100%; border-collapse: collapse; background: white; }
.leaderboard-table thead { background: var(--colour-dark); }
.leaderboard-table th {
  padding: .85rem 1.1rem; text-align: left;
  font-family: var(--font-display); font-size: .78rem; color: rgba(255,255,255,.6);
  font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  border-bottom: none;
}
.leaderboard-table td { padding: .9rem 1.1rem; border-bottom: 1px solid #f1f5f9; }
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-row--gold   td { background: #fefce8; }
.leaderboard-row--silver td { background: #f8fafc; }
.leaderboard-row--bronze td { background: #fff7ed; }
.leaderboard-rank { font-size: 1.3rem; font-weight: 900; width: 3rem; font-family: var(--font-display); }
.leaderboard-team { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.leaderboard-time { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: var(--colour-primary); }
.leaderboard-date { color: #9ca3af; font-size: .85rem; }
.leaderboard-empty {
  text-align: center; padding: 3.5rem 1rem; color: var(--colour-muted);
  background: var(--colour-bg-alt); border-radius: var(--radius-lg);
}

/* ─── QR code download ───────────────────────────────────────────── */

/* ─── Page header (non-hero pages) ──────────────────────────────── */
.page-header {
  background: var(--colour-dark);
  padding: 4rem 0 2.5rem;
  margin-bottom: 2.5rem;
}
.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900; color: #fff;
  margin-bottom: .5rem;
}
.page-header__sub { color: rgba(255,255,255,.6); font-size: 1rem; }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .trail-detail__body { grid-template-columns: 1fr; }
  .purchase-card { position: static; }
  .trail-hero { height: 460px; }
  .trail-stat { min-width: 80px; }
}
@media (max-width: 768px) {
  .hero { min-height: 80vh; }
  .hero__content { padding: 5rem 0 4rem; }
  .trail-hero__title { font-size: 1.8rem; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .site-nav a:not(.btn) { display: none; }
  .site-nav { gap: .75rem; }
  .leaderboard-title { font-size: 1.6rem; }
  /* Logo badge overhangs less on phones and leaves room for Book now.
     Everything that clears it follows from this one value. */
  :root { --logo-badge-drop: 24px; }
  .site-logo--badged {
    padding: 0 .7rem;
    border-radius: 0 0 18px 18px;
    max-width: 62vw;
  }
  .site-logo--badged img { height: 66px; }
  .has-logo-badge.no-hero main { padding-top: calc(var(--header-h) + 40px); }
  .has-logo-badge .filter-bar { top: var(--header-h); padding-top: calc(var(--logo-badge-drop) + .75rem); }
  .has-logo-badge #trails { scroll-margin-top: calc(var(--header-h) + 30px); }

  /* Letter-spaced caps get wide fast — ease off so the eyebrow still fits on
     a narrow screen without breaking into three lines. */
  .hero__eyebrow { font-size: .88rem; letter-spacing: .1em; }

  /* On a phone the Go button drops below the code box, and everything in the
     hero runs full width so the two actions line up edge to edge. */
  .hero__cta { display: block; }
  .hero__cta .btn-xl { display: block; width: 100%; min-width: 0; }
  .hero__code-row { flex-direction: column; align-items: stretch; gap: .6rem; }
  .hero__code-input { width: 100%; }
  .hero__code-row .btn { width: 100%; }
}
@media (max-width: 420px) {
  :root { --logo-badge-drop: 18px; }
  .site-logo--badged {
    padding: 0 .55rem;
    max-width: 58vw;
  }
  .site-logo--badged img { height: 54px; }
  .has-logo-badge.no-hero main { padding-top: calc(var(--header-h) + 32px); }
  .has-logo-badge .filter-bar { top: var(--header-h); padding-top: calc(var(--logo-badge-drop) + .75rem); }
  .has-logo-badge #trails { scroll-margin-top: calc(var(--header-h) + 24px); }
}
@media (max-width: 600px) {
  /* Filters wrap onto as many rows as they need. They used to sit in one
     horizontally-scrolling row, but `overflow-x: auto` clips absolutely
     positioned children — so in portrait you tapped a filter, the dropdown
     opened inside the clipped strip, and nothing appeared. The off-screen
     pills were undiscoverable too. */
  .filter-bar__row {
    flex-wrap: wrap;
    overflow: visible;
    row-gap: .45rem;
  }
  /* Search gets its own full-width row; filter pills wrap underneath. */
  .filter-bar__search { flex: 1 1 100%; min-width: 0; max-width: none; }
  .gdi-select { flex: 0 1 auto; min-width: 0; }
  .gdi-select__trigger {
    padding: .5rem .85rem;
    font-size: .82rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Keep a wide dropdown inside the screen rather than off the right edge. */
  .gdi-select__dropdown { max-width: calc(100vw - 2rem); }

  /* Trail hero shorter on phones */
  .trail-hero { height: 340px; }
  .trail-stats-strip__inner { flex-wrap: wrap; }

  /* Page header less padding on mobile */
  .page-header { padding: 3rem 0 1.75rem; }

  /* Purchase card full bleed on mobile */
  .purchase-card { border-radius: var(--radius-lg); }
}
@media (max-width: 520px) {
  .trail-grid { grid-template-columns: 1fr; }
  .hero__heading { font-size: 2rem; }
  .hero__tagline { font-size: 1rem; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { text-align: center; }
  .hero__code-row { flex-direction: column; align-items: stretch; }
  .hero__code-input { width: 100%; }
  .hero__code-row .btn { text-align: center; }
  .values-grid { grid-template-columns: 1fr; }
  .stat-strip__inner { gap: 1.5rem; }
  /* Footer: stack vertically */
  .site-footer .container { flex-direction: column; align-items: flex-start; gap: 1rem; }
  /* Booking page: full-width button */
  .booking-total { font-size: 1rem; }
}

/* ─── Hero carousel ─────────────────────────────────────────────────
   Pictures cross-fade behind the headline, each drifting slowly in or out so
   a still photograph feels filmed. The drift alternates direction slide to
   slide: every picture pushing the same way reads as a fault rather than an
   effect. All of it stops when `.is-paused` is set — the pause button, a
   backgrounded tab, or a device asking for reduced motion. */
.hero__carousel {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
  background: var(--colour-dark);
}

.hero__slide {
  position: absolute; inset: 0;
  margin: 0;
  opacity: 0;
  /* Slower than the change itself, so two pictures are briefly both there and
     the join is a dissolve rather than a cut. */
  transition: opacity 1.4s ease-in-out;
}

.hero__slide.is-active { opacity: 1; }

.hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* The drift. Held slightly beyond the slide's own time so the picture is still
   moving as it fades out — stopping dead before the cross-fade is what makes a
   slideshow look like a slideshow. */
.hero__carousel.is-cinematic .hero__slide.is-active img {
  animation: hero-drift-in calc(var(--slide-seconds, 7s) + 2.5s) ease-out forwards;
}

.hero__carousel.is-cinematic .hero__slide:nth-child(even).is-active img {
  animation-name: hero-drift-out;
}

@keyframes hero-drift-in {
  from { transform: scale(1)     translate3d(0, 0, 0); }
  to   { transform: scale(1.12)  translate3d(-1.2%, -1%, 0); }
}

@keyframes hero-drift-out {
  from { transform: scale(1.12)  translate3d(1.2%, 1%, 0); }
  to   { transform: scale(1)     translate3d(0, 0, 0); }
}

.hero__carousel.is-paused .hero__slide img { animation: none; }

.hero__slide-caption {
  position: absolute; right: 1rem; bottom: .75rem;
  font-size: .72rem; letter-spacing: .04em;
  color: rgba(255,255,255,.72);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  z-index: 4;
}

.hero__motion-toggle {
  position: absolute; right: 1rem; top: calc(var(--header-h) + 1rem);
  z-index: 5;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .8rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(12,26,20,.55);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .2s ease, border-color .2s ease;
}

.hero__motion-toggle:hover,
.hero__motion-toggle:focus-visible {
  background: rgba(12,26,20,.8);
  border-color: rgba(255,255,255,.7);
}

/* Asked for plainly, given plainly. The carousel still works — the pause
   button starts it for anyone who wants it — but nothing moves unbidden. */
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
  .hero__carousel.is-cinematic .hero__slide img { animation: none; }
}

/* ─── Where to find an AR overlay ───────────────────────────────────────
   A closed panel in the builder rather than a page of links: it is read once,
   when a creator needs artwork, and is clutter every other time. */
.ar-sources {
  margin-top: .8rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: .7rem .9rem;
  background: #fafafa;
}
.ar-sources > summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.ar-source-group { margin-top: .9rem; }
.ar-source-group h4 { font-size: .88rem; margin: 0 0 .15rem; }
.ar-source { margin: .55rem 0 0; font-size: .86rem; }
.ar-source a { font-weight: 600; }
.ar-source p { margin: .1rem 0 0; color: #6b7280; font-size: .82rem; }
.ar-source__licence {
  display: inline-block; margin-left: .45rem;
  font-size: .72rem; color: #6b7280;
  background: #eef2f7; border-radius: 999px; padding: .1rem .5rem;
}
.ar-source__warn { margin-top: 1rem; color: #b45309; }

/* The AR overlay picker is styled in the trail builder's own <style> block,
   because the builder does not load this file. Rules for it lived here and
   quietly did nothing: the grid never applied, every overlay rendered full
   width, and choosing between them was impossible. */


/* ── Walks & runs pointer on the front page ───────────────────────────────
   A link into the trail listing filtered to routes, not a second listing of
   them. The first version of this was its own grid of cards built with
   trail-card class names that mostly do not exist — .trail-card lays its
   title over a dark image in white, so on a plain background the titles were
   white on white and could not be read. One listing, one set of card styles. */
.section--routes-promo { padding-top: 0; }
.routes-promo {
  display: flex; align-items: center; gap: 1.1rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--surface, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.routes-promo:hover {
  border-color: var(--colour-primary, #1a9e6e);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
}
.routes-promo__icon { font-size: 2rem; line-height: 1; flex: none; }
.routes-promo__text { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.routes-promo__title {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  color: var(--text, #111827);
}
.routes-promo__sub { font-size: .92rem; color: var(--text-muted, #6b7280); }
.routes-promo__cta {
  font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  color: var(--colour-primary, #1a9e6e); flex: none;
}
@media (max-width: 560px) {
  .routes-promo { flex-wrap: wrap; }
  .routes-promo__cta { width: 100%; }
}

/* The price unit sits beside the figure wherever a price is shown. Muted and
   smaller so the number still reads first; hidden entirely for free trails,
   which carry no unit at all (see TrailDetailPage.price_suffix). */
.price-unit {
  font-size: .72em;
  font-weight: 500;
  opacity: .72;
  white-space: nowrap;
}

/* Credits, in the footer. Quiet, but reachable — the case-board art is
   CC BY 3.0 and a credits page nothing links to is not attribution. */
.footer-credits { margin-top: .6rem; font-size: .82rem; }
.footer-credits a { color: inherit; opacity: .75; text-decoration: underline; }
.footer-credits a:hover { opacity: 1; }

/* ─── Gift promo (trail list) ────────────────────────────────────────
   The gift offer, where people are already choosing. Built on the same
   shape as the walks-and-runs promo so the list keeps one rhythm, but
   warmer — this is a seasonal thing, and it should feel like one. */
.section--gift-promo { padding: 0 0 1.5rem; }
.gift-promo {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.4rem;
  border: 1.5px solid #e8d9b8;
  border-radius: var(--radius-lg, 18px);
  background: linear-gradient(100deg, #fffaf0 0%, #fdf4e3 100%);
  text-decoration: none;
  transition: border-color .18s, transform .12s;
}
.gift-promo:hover { border-color: var(--colour-accent, #f5a623); text-decoration: none; }
.gift-promo:active { transform: scale(.995); }
.gift-promo__text { flex: 1; min-width: 12rem; }
.gift-promo__title {
  display: block;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-weight: 800; font-size: 1.05rem; color: #14301f;
}
.gift-promo__sub { display: block; font-size: .88rem; color: #7a6a4f; margin-top: .15rem; line-height: 1.5; }
.gift-promo__price {
  flex: none;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-weight: 900; font-size: 1.35rem;
  color: var(--colour-primary-dark, #0d6b4a);
}
@media (max-width: 560px) {
  .gift-promo { padding: .9rem 1rem; }
  .gift-promo__price { font-size: 1.2rem; }
}

/* ─── Who a trail suits ──────────────────────────────────────────────────
   Icons always beside words, never instead of them. See
   trails/suitability.py for why. */
.suit-list { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .5rem; }
.suit-list__item { display: flex; align-items: center; gap: .6rem; line-height: 1.45; }
.suit-list__none { color: #5c5c5c; margin: 0; }
.suit-notes { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid rgba(0,0,0,.08); }
.suit-icon { width: 24px; height: 24px; flex: 0 0 24px; color: var(--colour-primary, #1a9e6e); }

/* The storefront's suitability toggles. */
.filter-suits {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin-top: .7rem;
}
.filter-suits__label { font-size: .85rem; color: #5c5c5c; margin-right: .2rem; }
.filter-suits__box {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .7rem; border: 1px solid #d8d8d8; border-radius: 999px;
  font-size: .85rem; cursor: pointer; background: #fff; line-height: 1;
}
.filter-suits__box:hover { border-color: var(--colour-primary, #1a9e6e); }
.filter-suits__box input { position: absolute; opacity: 0; width: 0; height: 0; }
.filter-suits__box .suit-icon { width: 18px; height: 18px; flex-basis: 18px; }
.filter-suits__box.is-on {
  border-color: var(--colour-primary, #1a9e6e);
  background: color-mix(in srgb, var(--colour-primary, #1a9e6e) 10%, #fff);
  font-weight: 700;
}
.filter-suits__count { color: #8a8a8a; font-size: .78rem; }
.filter-suits__box.is-on .filter-suits__count { color: inherit; opacity: .7; }

/* ─── Reviews on a trail page ───────────────────────────────────────── */
.trail-reviews { padding: 2.5rem 0 3rem; background: #fafaf8; }
.trail-reviews__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .4rem 1.2rem; margin-bottom: 1.4rem;
}
.trail-reviews__title { margin: 0; font-size: 1.5rem; }
.trail-reviews__score { margin: 0; display: flex; align-items: center; gap: .5rem; }
.trail-reviews__count { color: #5c5c5c; font-size: .92rem; }
.star { color: #d6d2c4; }
.star--on { color: #f5a623; }
.trail-reviews__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.trail-review {
  background: #fff; border: 1px solid #ebe8e0; border-radius: 10px;
  padding: 1rem 1.1rem;
}
.trail-review__stars { margin: 0 0 .5rem; font-size: .95rem; }
.trail-review__text { margin: 0 0 .6rem; line-height: 1.55; }
.trail-review__by { margin: 0; color: #767676; font-size: .84rem; }

/* ─── The reviews page ─────────────────────────────────────────────────── */
.reviews-page { padding: 3rem 0 4rem; }
.reviews-page__head { margin-bottom: 2rem; }
.reviews-page__title { margin: 0 0 .5rem; }
.reviews-page__score { margin: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.reviews-page__layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { .reviews-page__layout { grid-template-columns: 1fr; } }
.reviews-page__side { position: sticky; top: 1.5rem; }
.rating-bars { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .4rem; }
.rating-bars__row { display: grid; grid-template-columns: 2.2rem 1fr 2.2rem; gap: .5rem; align-items: center; font-size: .86rem; }
.rating-bars__track { height: .55rem; background: #eceae3; border-radius: 4px; overflow: hidden; }
.rating-bars__fill { display: block; height: 100%; background: #f5a623; }
.rating-bars__count { color: #767676; text-align: right; }
.reviews-page__filter label { display: block; font-size: .86rem; color: #5c5c5c; margin-bottom: .3rem; }
.reviews-page__filter select { width: 100%; padding: .5rem .6rem; border: 1px solid #d8d8d8; border-radius: 8px; font: inherit; }
.reviews-page__pages { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1.6rem; color: #5c5c5c; }
.reviews-page__empty { color: #5c5c5c; max-width: 36rem; line-height: 1.6; }
.reviews-page__back { margin-top: 2.5rem; }

/* Two links now, so they need to sit apart. */
.footer-credits { display: flex; gap: 1.1rem; flex-wrap: wrap; }

/* ─── The public gift-card gallery ──────────────────────────────────────
   A shop window that works whether or not anything is on sale. */
.gc-gallery { padding: 2.5rem 0 4rem; }
.gc-gallery__draft {
  background: #fff8e6; border: 1px solid #f0dca8; border-radius: 8px;
  padding: .7rem 1rem; font-size: .9rem; margin: 0 0 1.2rem;
}
.gc-gallery__banner {
  width: 100%; height: auto; border-radius: 14px; margin-bottom: 1.8rem;
  display: block;
}
.gc-gallery__head { max-width: 42rem; margin-bottom: 2.2rem; }
.gc-gallery__title { margin: 0 0 .6rem; }
.gc-gallery__intro { color: #4a4a4a; line-height: 1.6; }
.gc-gallery__cta { margin: 1.4rem 0 0; }
.gc-gallery__group { font-size: 1.15rem; margin: 2rem 0 .9rem; }
.gc-gallery__grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.gc-gallery__item { margin: 0; }
.gc-gallery__card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid #e8e5dd; border-radius: 12px; overflow: hidden;
  background: #fff; transition: transform .15s, box-shadow .15s;
}
.gc-gallery__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.09);
}
.gc-gallery__art { display: block; aspect-ratio: 320/150; }
.gc-gallery__art svg, .gc-gallery__art img {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.gc-gallery__card.is-night .gc-gallery__art { background: #16233a; color: #eef3f8; }
.gc-gallery__card.is-day .gc-gallery__art { background: #fdfaf3; color: #2f3a2e; }
.gc-gallery__name { display: block; font-weight: 700; padding: .75rem .9rem .1rem; }
.gc-gallery__blurb {
  display: block; padding: 0 .9rem .85rem; color: #6b6b6b;
  font-size: .86rem; line-height: 1.45;
}
.gc-gallery__empty { color: #5c5c5c; }
