/* ==========================================================================
   Memories, Miles & Mountains — design system
   Tamsin Green · TCS London Marathon 2027 · in aid of Child Bereavement UK
   --------------------------------------------------------------------------
   Contents
   01. Tokens
   02. Reset & base
   03. Typography
   04. Layout & utilities
   05. Buttons & pills
   06. Header / navigation
   07. Hero
   08. Cards, panels & motifs
   09. Photos (polaroid)
   10. Stats, countdown & progress
   11. Prizes (toggle + grid)
   12. Timeline, FAQ, quote
   13. Footer
   14. Motion & responsive
   ========================================================================== */

/* 01. Tokens ============================================================== */

:root {
  /* Brand — drawn from Tamsin's logo artwork */
  --ink:          #2E0F42;   /* deepest purple, headings */
  --ink-2:        #3F1A5B;
  --purple:       #5E2C87;
  --purple-mid:   #7A4BA8;
  --lilac:        #B79AD6;
  --lilac-soft:   #EDE4F6;
  --pink:         #D6197D;   /* primary action */
  --pink-deep:    #B01064;
  --pink-soft:    #FBE3F0;
  --gold:         #FFAC2A;   /* shared with Child Bereavement UK */
  --gold-soft:    #FFF1D8;

  /* Child Bereavement UK palette (used only in charity contexts) */
  --cbuk-red:     #D1212E;
  --cbuk-yellow:  #FFAC2A;
  --cbuk-blush:   #FDEBEC;
  --cbuk-slate:   #3E4241;

  /* Surfaces */
  --cream:        #FDF7EF;
  --paper:        #FFFCF8;
  --paper-2:      #FBF3E9;
  --line:         #E8DCCB;
  --line-soft:    #F1E8DC;

  /* Text */
  --text:         #33263C;
  --text-soft:    #5C4E66;
  --text-faint:   #6B5F76;
  --on-dark:      #F6EEFB;
  --on-dark-soft: #CBB4DE;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-script:  "Caveat", "Bradley Hand", cursive;

  /* Space scale */
  --s-1: .25rem;  --s-2: .5rem;   --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;

  /* Radii & shadow */
  --r-sm: 8px;  --r-md: 14px;  --r-lg: 22px;  --r-xl: 32px;  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(46,15,66,.06), 0 2px 8px rgba(46,15,66,.05);
  --shadow-md: 0 2px 6px rgba(46,15,66,.06), 0 12px 28px -10px rgba(46,15,66,.18);
  --shadow-lg: 0 4px 10px rgba(46,15,66,.06), 0 28px 60px -22px rgba(46,15,66,.30);

  --container: 1180px;
  --container-narrow: 760px;
}

/* 02. Reset & base ======================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--pink); }
::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 999;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
  border-radius: var(--r-pill); font-weight: 600; text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: var(--s-4); color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 03. Typography ========================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 30, "WONK" 1;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-4);
  font-weight: 600;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.9vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); letter-spacing: -0.01em; }
h4 { font-size: 1.075rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.15rem, 2.1vw, 1.4rem);
  line-height: 1.6;
  color: var(--text-soft);
}

.script {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.25;
  color: var(--purple);
  font-weight: 600;
}
.script--pink { color: var(--pink); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--pink);
  margin: 0 0 var(--s-4);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: currentColor; opacity: .55;
}
.eyebrow--center { justify-content: center; }
.eyebrow--gold { color: #9a6200; }

.section-head { max-width: 60ch; margin-bottom: var(--s-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

/* Hand-drawn highlighter sweep behind a word */
.mark {
  display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  background-image: linear-gradient(100deg,
    rgba(255,172,42,.42) 0%, rgba(255,172,42,.78) 45%, rgba(255,172,42,.34) 100%);
  background-repeat: no-repeat;
  background-size: 100% .36em;
  background-position: 0 84%;
  padding-inline: .06em;
}
.mark--pink {
  background-image: linear-gradient(100deg,
    rgba(214,25,125,.16) 0%, rgba(214,25,125,.30) 50%, rgba(214,25,125,.14) 100%);
}

/* 04. Layout & utilities ================================================== */

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, var(--container-narrow)); }

.section { padding-block: clamp(3.5rem, 8vw, var(--s-9)); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 5vw, 3.75rem); }
.section--paper { background: var(--paper); }
.section--lilac { background: linear-gradient(180deg, var(--lilac-soft), #F7F1FB); }
.section--blush { background: linear-gradient(180deg, var(--pink-soft), #FDF1F7); }
.section--ink { background: var(--ink); color: var(--on-dark); }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: var(--on-dark-soft); }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.split {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr .95fr; }
  .split--media-first > :first-child { order: 2; }
  .split--wide-text { grid-template-columns: 1.25fr .75fr; }
}

.stack > * + * { margin-top: var(--s-4); }
.center { text-align: center; }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }

.divider-wave { display: block; width: 100%; height: auto; }

/* Soft watercolour washes */
.wash { position: relative; isolation: isolate; }
.wash::before {
  content: ""; position: absolute; inset: -10% -5%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 12% 18%, rgba(183,154,214,.34), transparent 70%),
    radial-gradient(34% 38% at 88% 10%, rgba(255,172,42,.22), transparent 68%),
    radial-gradient(42% 46% at 78% 88%, rgba(214,25,125,.14), transparent 70%);
  filter: blur(6px);
}

/* 05. Buttons & pills ===================================================== */

.btn {
  --btn-bg: var(--pink); --btn-fg: #fff; --btn-bd: var(--pink);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  line-height: 1; letter-spacing: .005em;
  padding: 1.05rem 1.75rem;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 2px solid var(--btn-bd); border-radius: var(--r-pill);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(214,25,125,.75);
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(214,25,125,.8); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--lg { font-size: 1.075rem; padding: 1.2rem 2.15rem; }
.btn--sm { font-size: .9rem; padding: .7rem 1.2rem; }
.btn--block { width: 100%; }

.btn--outline {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: rgba(94,44,135,.32);
  box-shadow: none;
}
.btn--outline:hover { --btn-bd: var(--purple); background: rgba(94,44,135,.06); }

.btn--gold { --btn-bg: var(--gold); --btn-fg: #422A00; --btn-bd: var(--gold);
  box-shadow: 0 10px 22px -12px rgba(255,172,42,.9); }
.btn--gold:hover { box-shadow: 0 16px 30px -14px rgba(255,172,42,.95); }

.btn--ghost-light {
  --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.42); box-shadow: none;
}
.btn--ghost-light:hover { --btn-bd: #fff; background: rgba(255,255,255,.10); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center; }
.btn-row--center { justify-content: center; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .42rem .95rem; border-radius: var(--r-pill);
  font-size: .82rem; font-weight: 700; letter-spacing: .02em;
  background: var(--lilac-soft); color: var(--purple);
  border: 1px solid rgba(94,44,135,.14);
}
.pill--gold { background: var(--gold-soft); color: #8a5600; border-color: rgba(255,172,42,.4); }
.pill--pink { background: var(--pink-soft); color: var(--pink-deep); border-color: rgba(214,25,125,.2); }
.pill--dark { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.22); }

/* 06. Header / navigation ================================================= */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,247,239,.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -18px rgba(46,15,66,.5);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); min-height: 84px; padding-block: .5rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
/* The logo artwork carries its own transparent margin, so it is sized a little
   larger than the optical size you want it to read at. */
.brand img { width: clamp(182px, 23vw, 248px); height: auto; }

.nav-links { display: none; }
@media (min-width: 980px) {
  .nav-links {
    display: flex; align-items: center; gap: clamp(.5rem, 1.6vw, 1.4rem);
    list-style: none; margin: 0; padding: 0;
  }
}
.nav-links a {
  position: relative; display: inline-block;
  font-weight: 600; font-size: .96rem; color: var(--ink-2);
  text-decoration: none; padding: .5rem .25rem;
}
.nav-links a::after {
  content: ""; position: absolute; left: .25rem; right: .25rem; bottom: .1rem;
  height: 2px; border-radius: 2px; background: var(--pink);
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--pink-deep); }

.nav-cta { display: none; }
@media (min-width: 980px) { .nav-cta { display: inline-flex; } }

/* Compact donate button, mobile only. On a fundraising site the primary action
   should never be hidden behind a menu. */
.nav-cta-mobile { display: inline-flex; padding: .8rem 1.15rem; flex: none; }
@media (min-width: 980px) { .nav-cta-mobile { display: none; } }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  padding: .7rem 1.05rem; border-radius: var(--r-pill);
}
@media (min-width: 980px) { .nav-toggle { display: none; } }
.nav-toggle-bars { display: grid; gap: 4px; }
.nav-toggle-bars span {
  display: block; width: 17px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: none; border-top: 1px solid var(--line);
  background: var(--paper); padding: var(--s-4) 0 var(--s-6);
}
.mobile-menu.is-open { display: block; }
@media (min-width: 980px) { .mobile-menu, .mobile-menu.is-open { display: none; } }
.mobile-menu ul { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: grid; }
.mobile-menu li + li { border-top: 1px solid var(--line-soft); }
/* Scoped to the list only — the donate button below it must keep its own
   button styling, font and colour. */
.mobile-menu ul a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .95rem .25rem; font-family: var(--font-display); font-size: 1.35rem;
  font-weight: 600; color: var(--ink); text-decoration: none;
}
.mobile-menu ul a[aria-current="page"] { color: var(--pink-deep); }
.mobile-menu ul a::after { content: "→"; opacity: .35; font-family: var(--font-body); }

/* Charity strip under the nav */
.aid-strip {
  background: var(--ink); color: var(--on-dark-soft);
  font-size: .82rem; letter-spacing: .02em;
}
.aid-strip .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .5rem 1.1rem; padding-block: .6rem; text-align: center;
}
.aid-strip strong { color: #fff; font-weight: 700; }
.aid-strip .dot { opacity: .4; }
/* Keep the strip to a single tidy line on phones — it is context, not content,
   and it should not eat a fifth of the screen before the page begins. */
@media (max-width: 720px) {
  .aid-strip { font-size: .74rem; }
  .aid-strip .container { gap: .35rem .6rem; padding-block: .45rem; }
  .aid-strip .dot, .aid-strip__reg { display: none; }
}

/* 07. Hero ================================================================ */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(58% 48% at 78% 6%, rgba(255,172,42,.20), transparent 62%),
    radial-gradient(52% 46% at 6% 22%, rgba(183,154,214,.36), transparent 66%),
    radial-gradient(60% 52% at 92% 82%, rgba(214,25,125,.13), transparent 66%),
    linear-gradient(180deg, var(--paper) 0%, var(--cream) 62%, var(--paper-2) 100%);
  padding-block: clamp(2.75rem, 6vw, 5.25rem) 0;
}
.hero__grid {
  display: grid; gap: clamp(2.25rem, 5vw, 4rem);
  grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 940px) { .hero__grid { grid-template-columns: 1.04fr .96fr; } }

.hero h1 { margin-bottom: var(--s-5); }
.hero h1 .hero__line-1 { display: block; font-size: .46em; font-family: var(--font-script); color: var(--purple); font-weight: 600; letter-spacing: 0; margin-bottom: -.05em; }
.hero h1 .hero__line-2 { display: block; color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--pink); }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: var(--s-5);
}

.hero__media { position: relative; }
.hero__skyline {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  width: 100%; opacity: .9;
}

/* 08. Cards, panels & motifs ============================================== */

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 2.6vw, 2rem);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(94,44,135,.22); }
.card--lilac { background: linear-gradient(165deg, #fff, var(--lilac-soft)); border-color: rgba(94,44,135,.14); }
.card--gold { background: linear-gradient(165deg, #fff, var(--gold-soft)); border-color: rgba(255,172,42,.34); }
.card--pink { background: linear-gradient(165deg, #fff, var(--pink-soft)); border-color: rgba(214,25,125,.18); }
.card--ink { background: linear-gradient(165deg, var(--ink-2), var(--ink)); border-color: rgba(255,255,255,.1); color: var(--on-dark); }
.card--ink h3 { color: #fff; }
.card--ink p { color: var(--on-dark-soft); }
.card h3 { margin-bottom: var(--s-3); }
.card p { color: var(--text-soft); }

.card__icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: var(--s-4);
  background: var(--lilac-soft); color: var(--purple);
}
.card__icon svg { width: 26px; height: 26px; }
.card__icon--gold { background: var(--gold-soft); color: #8a5600; }
.card__icon--pink { background: var(--pink-soft); color: var(--pink-deep); }

.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: var(--shadow-md);
}
.panel--ink {
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(214,25,125,.28), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(255,172,42,.16), transparent 60%),
    linear-gradient(150deg, var(--ink-2), var(--ink));
  border-color: rgba(255,255,255,.12); color: var(--on-dark);
}
.panel--ink h2, .panel--ink h3 { color: #fff; }
.panel--ink p { color: var(--on-dark-soft); }

/* Layered/staggered content boxes — a Child Bereavement UK design motif */
.layered { position: relative; }
.layered::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border-radius: var(--r-xl); background: var(--lilac-soft);
  z-index: -1;
}

/* 09. Photos (polaroid) =================================================== */

.photo {
  background: #fff; padding: .75rem .75rem 3.25rem;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.photo img { border-radius: 3px; width: 100%; }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: .9rem;
  font-family: var(--font-script); font-size: 1.4rem; line-height: 1.15;
  color: var(--purple); text-align: center; padding-inline: 1rem;
}
.photo { position: relative; }
.photo--right { transform: rotate(2.2deg); }
.photo:hover { transform: rotate(0deg) scale(1.012); }

.photo-stack { position: relative; padding-bottom: 3rem; padding-right: 2%; }
.photo-stack .photo--back {
  position: absolute; width: 38%; right: -5%; bottom: -1.5rem; z-index: 2;
}
.photo-stack .photo--back figcaption { font-size: 1.05rem; bottom: .7rem; }
.photo-stack .photo--back { padding-bottom: 2.4rem; }
@media (max-width: 620px) {
  .photo-stack .photo--back { position: static; width: 78%; margin: -1rem auto 0; }
}

/* 10. Stats, countdown & progress ========================================= */

.stat { text-align: center; padding: var(--s-4) var(--s-2); }
.stat__num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1;
  color: var(--pink); letter-spacing: -.02em;
}
.stat__label {
  margin-top: .5rem; font-size: .84rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
}
.section--ink .stat__num { color: var(--gold); }
.section--ink .stat__label, .panel--ink .stat__label { color: var(--on-dark-soft); }
.panel--ink .stat__num { color: var(--gold); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.countdown__unit {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-md); padding: .9rem .25rem; text-align: center;
}
.countdown__num {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(1.6rem, 4.4vw, 2.4rem); line-height: 1; color: #fff;
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  margin-top: .4rem; font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-soft);
}
.countdown--light .countdown__unit { background: rgba(94,44,135,.06); border-color: rgba(94,44,135,.14); }
.countdown--light .countdown__num { color: var(--ink); }
.countdown--light .countdown__label { color: var(--text-faint); }

.progress { margin-top: var(--s-5); }
.progress__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4); margin-bottom: .6rem; flex-wrap: wrap;
}
.progress__raised {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1; color: var(--ink);
}
.panel--ink .progress__raised, .section--ink .progress__raised { color: #fff; }
.progress__target { font-size: .92rem; color: var(--text-faint); font-weight: 600; }
.panel--ink .progress__target { color: var(--on-dark-soft); }
.progress__track {
  height: 14px; border-radius: var(--r-pill); overflow: hidden;
  background: rgba(94,44,135,.13);
}
.panel--ink .progress__track, .section--ink .progress__track { background: rgba(255,255,255,.15); }
.progress__bar {
  height: 100%; border-radius: var(--r-pill); width: 0;
  background: linear-gradient(90deg, var(--gold), var(--pink) 70%, var(--pink-deep));
  transition: width 1.2s cubic-bezier(.2,.8,.25,1);
}
.progress__note { margin-top: .7rem; font-size: .85rem; color: var(--text-faint); }
.panel--ink .progress__note { color: var(--on-dark-soft); }

/* 11. Prizes ============================================================== */

.prize-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  align-items: center; justify-content: space-between;
  margin-bottom: var(--s-6);
}

.segmented {
  display: inline-flex; padding: 5px; gap: 4px;
  background: var(--lilac-soft); border: 1px solid rgba(94,44,135,.14);
  border-radius: var(--r-pill);
}
.segmented button {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: .92rem;
  padding: .68rem 1.25rem; border-radius: var(--r-pill);
  background: transparent; color: var(--purple);
  display: inline-flex; align-items: center; gap: .5rem;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.segmented button:hover { background: rgba(255,255,255,.65); }
.segmented button[aria-selected="true"] {
  background: var(--ink); color: #fff; box-shadow: 0 6px 14px -8px rgba(46,15,66,.8);
}
.segmented button svg { width: 1.05em; height: 1.05em; }
.segmented .count {
  font-size: .74rem; font-weight: 700; padding: .1rem .45rem;
  border-radius: var(--r-pill); background: rgba(94,44,135,.12); color: inherit;
}
.segmented button[aria-selected="true"] .count { background: rgba(255,255,255,.22); }
@media (max-width: 720px) {
  .prize-toolbar { flex-direction: column; align-items: stretch; }
  .prize-toolbar .btn { justify-content: center; }
  .segmented { width: 100%; }
  .segmented button {
    flex: 1 1 0; min-width: 0; justify-content: center;
    padding-inline: .45rem; font-size: .84rem;
  }
  .segmented button svg { display: none; }
}

.prize-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
}
.prize {
  display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .25s ease;
}
.prize:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(94,44,135,.22); }
.prize[hidden] { display: none; }
.prize__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.prize__badge {
  width: 46px; height: 46px; flex: none; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--lilac-soft); color: var(--purple);
}
.prize[data-category="fishing"] .prize__badge { background: #E2F0EC; color: #1F6B57; }
.prize__badge svg { width: 24px; height: 24px; }
.prize__tag {
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: var(--r-pill);
  background: var(--lilac-soft); color: var(--purple);
}
.prize[data-category="fishing"] .prize__tag { background: #E2F0EC; color: #1F6B57; }
.prize h3 { font-size: 1.22rem; margin: 0; }
.prize p { color: var(--text-soft); font-size: .97rem; margin: 0; }
.prize__donor {
  margin-top: auto; padding-top: var(--s-3); border-top: 1px dashed var(--line);
  font-size: .86rem; color: var(--text-faint);
}
.prize__donor strong { color: var(--ink-2); font-weight: 700; }

.prize-empty {
  padding: var(--s-8) var(--s-4); text-align: center; color: var(--text-faint);
  border: 2px dashed var(--line); border-radius: var(--r-lg);
}

.notice {
  display: flex; gap: var(--s-4); align-items: flex-start;
  padding: 1.15rem 1.35rem; border-radius: var(--r-md);
  background: var(--gold-soft); border: 1px solid rgba(255,172,42,.42);
  font-size: .95rem; color: #6b4400;
}
.notice svg { width: 22px; height: 22px; flex: none; margin-top: .15rem; color: #b07800; }
.notice strong { color: #4d3100; }

/* The one instruction people actually have to act on, so it gets the
   brand colour rather than the quieter "for information" yellow. */
.notice--action {
  background: var(--pink-soft);
  border-color: rgba(214,25,125,.28);
  color: #5e1038;
}
.notice--action svg { color: var(--pink-deep); }
.notice--action strong { color: var(--pink-deep); }

/* 12. Timeline, FAQ, quote ================================================ */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--pink), var(--purple));
  border-radius: 2px; opacity: .5;
}
.timeline li { position: relative; padding: 0 0 var(--s-6) 3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: .45rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--pink);
}
.timeline .t-date {
  display: block; font-size: .78rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase; color: var(--pink);
  margin-bottom: .3rem;
}
.timeline h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.timeline p { color: var(--text-soft); font-size: .97rem; }

details.faq {
  border-bottom: 1px solid var(--line); padding: .35rem 0;
}
details.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-body); font-weight: 400; font-size: 1.7rem; line-height: 1;
  color: var(--pink); transition: transform .2s ease;
}
details.faq[open] summary::after { content: "–"; }
details.faq .faq__body { padding: 0 1rem 1.35rem 0; color: var(--text-soft); }

.quote {
  position: relative; padding: var(--s-6) 0 0;
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 3.2vw, 2.15rem); line-height: 1.35;
  color: var(--purple);
}
.quote::before {
  content: "\201C"; position: absolute; top: -.1em; left: -.05em;
  font-family: var(--font-display); font-size: 5rem; line-height: 1;
  color: var(--gold); opacity: .5;
}
.quote cite {
  display: block; margin-top: var(--s-4);
  font-family: var(--font-body); font-style: normal; font-size: .86rem;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint);
}

.social-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.social-link {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .8rem 1.25rem; border-radius: var(--r-pill);
  background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.social-link:hover { transform: translateY(-2px); border-color: var(--purple); color: var(--ink); box-shadow: var(--shadow-sm); }
.social-link svg { width: 20px; height: 20px; flex: none; }

/* Compact "follow my journey" row, used high on the page */
.follow-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem;
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.follow-inline__label {
  font-family: var(--font-script); font-size: 1.4rem; line-height: 1;
  color: var(--purple); font-weight: 600;
}
.follow-inline__links { display: flex; gap: .5rem; }
.follow-inline__handle {
  font-size: .88rem; font-weight: 600; color: var(--text-faint);
}

.social-icon {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease;
}
.social-icon svg { width: 21px; height: 21px; }
.social-icon:hover {
  transform: translateY(-2px);
  background: var(--ink); border-color: var(--ink); color: #fff;
}

/* Thank-you panel (Swimbooker). Deliberately quiet: a warm aside on the story
   page rather than a sponsor banner competing with the donate action. */
.thanks { position: relative; }
.thanks .eyebrow { color: var(--purple); }
.thanks h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.thanks p { color: var(--text-soft); }

/* Block, not inline-flex — otherwise the eyebrow below it sits on the same
   line as the logo on wide screens. */
.thanks__brand {
  display: block; width: fit-content;
  margin-bottom: var(--s-5); text-decoration: none;
}
.thanks__logo {
  width: clamp(168px, 40vw, 210px); height: auto;
  transition: opacity .18s ease;
}
.thanks__brand:hover .thanks__logo { opacity: .78; }
.thanks__signoff {
  margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}

/* Charity logo lockup */
.cbuk-logo { background: #fff; border-radius: var(--r-md); padding: 1rem 1.25rem; display: inline-block; box-shadow: var(--shadow-sm); }
.cbuk-logo img { width: 220px; }

/* 13. Footer ============================================================== */

.site-footer {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 80% at 88% 0%, rgba(214,25,125,.22), transparent 60%),
    radial-gradient(50% 70% at 6% 20%, rgba(255,172,42,.12), transparent 60%),
    linear-gradient(170deg, var(--ink-2), #240B33);
  color: var(--on-dark-soft);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.site-footer h2, .site-footer h3, .site-footer strong { color: #fff; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer__grid {
  display: grid; gap: var(--s-6) var(--s-7);
  grid-template-columns: 1fr;
  padding-bottom: var(--s-7);
}
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.footer__brand img { width: 264px; margin: -.5rem 0 var(--s-3) -.6rem; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; font-size: .96rem; }
.footer__list a { display: inline-block; padding-block: .62rem; }
.footer__title {
  font-family: var(--font-body); font-size: .78rem; font-weight: 800;
  letter-spacing: .15em; text-transform: uppercase; color: #fff;
  margin-bottom: var(--s-4); opacity: .75;
}

.footer__skyline {
  width: 100%; display: block; opacity: .3; margin-bottom: -2px;
  color: var(--lilac);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-block: var(--s-5);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  align-items: center; justify-content: space-between;
  font-size: .84rem; color: rgba(203,180,222,.8);
}

/* Deliberately quiet. Present and findable, not shouted about. */
.footer__smallprint {
  margin: 0; padding-bottom: var(--s-6);
  font-size: .69rem; line-height: 1.55;
  /* Quiet, but still above the AA contrast threshold — it is a legal notice,
     so it has to be readable if somebody goes looking for it. */
  color: rgba(203,180,222,.72);
  max-width: 80ch;
}
.footer__smallprint a { color: inherit; text-decoration: underline; }
.footer__smallprint a:hover { color: rgba(255,255,255,.85); }

/* 14. Motion & responsive ================================================= */

/* Only hide reveal elements when JavaScript can actually reveal them again.
   With JS off (or in a browser that doesn't support the query) everything
   stays visible — the content is never dependent on the animation. */
@media (scripting: enabled) {
  .reveal { opacity: 0; transform: translateY(18px); }
}
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal[data-delay="1"].is-visible { transition-delay: .08s; }
.reveal[data-delay="2"].is-visible { transition-delay: .16s; }
.reveal[data-delay="3"].is-visible { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .photo, .btn, .card, .prize, .social-link { transition: none !important; }
  .photo { transform: none; }
}

/* ---- Mobile refinements ------------------------------------------------- */
@media (max-width: 600px) {
  /* Primary calls to action go full width, so they line up rather than
     staggering at whatever width their label happens to be. */
  .btn--lg { width: 100%; }
  .btn-row { gap: var(--s-3); }

  /* Centred, to sit squarely under the full-width buttons above it */
  .follow-inline { justify-content: center; text-align: center; }
  .follow-inline__handle { width: 100%; }


  /* Header: logo, donate, menu, all on one line without crowding */
  .nav { gap: .6rem; min-height: 76px; }
  .brand img { width: min(150px, 42vw); }
  .nav-toggle { padding: .95rem 1rem; }
}

@media (max-width: 400px) {
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: .95rem; }
}

/* Touch-sized controls on anything that is likely to be a touch device */
@media (max-width: 900px) {
  .btn--sm { padding: .85rem 1.3rem; }
  .social-link { padding: .92rem 1.3rem; }
  .segmented button { padding-block: .88rem; }
  .prize-toolbar .btn { padding-block: .85rem; }
  .nav-toggle { padding: .95rem 1rem; }
}

@media print {
  .site-header, .mobile-menu, .site-footer, .btn { display: none !important; }
  body { background: #fff; }
}
