/* Lonsdale Scouts – holding page
   Brand: Scouts Purple #7413DC, Teal #088486, Navy #003982, Yellow #FFE627, Nunito Sans.
   Check section colours against the Scouts Brand Centre. */

:root {
  --purple: #7413DC;
  --purple-dark: #5a0fb0;
  --teal: #066b6d;          /* darkened Scouts Teal for text contrast */
  --navy: #003982;
  --yellow: #FFE627;
  --ink: #1a1a1a;
  --muted: #444;
  --line: #e6e1ef;
  --tint: #f5f2fa;
  --squirrels: #ED3F23;
  --beavers: #006DDF;
  --cubs: #1c8a43;
  --scouts: #066b6d;
  --explorers: #003982;
  --network: #4a4a4a;
  --radius: 18px;
}

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

body {
  margin: 0;
  font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
}

h1, h2 { margin: 0; line-height: 1.05; font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 42px); }
p { margin: 0; }
a { color: var(--purple); }
a:hover { color: var(--purple-dark); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ink); border-radius: 6px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 800; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: inherit; font-weight: 800; text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--purple); color: #fff; }
.btn--primary:hover { background: var(--purple-dark); color: #fff; }
.btn--yellow { background: var(--yellow); color: var(--ink); font-weight: 900; }
.btn--yellow:hover { color: var(--ink); background: #f5d900; }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { border-color: var(--purple); color: var(--purple); background: #fff; }
.btn--large { min-height: 56px; padding: 14px 28px; font-size: 18px; }

/* Utility bar + header */
.utility { background: var(--navy); color: #fff; font-size: 14px; }
.utility__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 8px; padding-bottom: 8px; }
.utility a { color: #fff; }

.header { border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.header__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.btn--campsite { gap: 8px; background: #fff; color: var(--teal); border-color: var(--teal); }
.btn--campsite:hover { background: var(--teal); color: #fff; }

/* Campsite button: a gentle ripple of colour sweeps across once a minute.
   The sweep takes about 2.4s (4% of 60s), then the button rests. */
.btn--campsite { position: relative; overflow: hidden; isolation: isolate; }
.btn--campsite::before {
  content: "";
  position: absolute; inset: -2px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(8, 132, 134, .14) 30%,
    rgba(255, 230, 39, .55) 50%,
    rgba(8, 132, 134, .14) 70%,
    transparent 100%);
  transform: translateX(-110%);
  animation: campsite-ripple 60s ease-in-out 3s infinite;
}
.btn--campsite:hover::before, .btn--campsite:focus-visible::before { animation-play-state: paused; opacity: 0; }
@keyframes campsite-ripple {
  0%        { transform: translateX(-110%); }
  4%, 100%  { transform: translateX(110%); }
}
@media (max-width: 480px) {
  .header__inner { flex-wrap: wrap; }
  .header__actions { width: 100%; }
  .header__actions .btn { flex: 0 0 auto; padding-left: 16px; padding-right: 16px; white-space: nowrap; }
  .header__actions .btn--campsite { flex: 1 1 auto; }
  .header__actions .btn--primary { flex: 1 0 auto; }
}
.brand { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand__scouts { font-size: 30px; font-weight: 900; color: var(--purple); letter-spacing: -0.02em; }
.brand__name { font-size: 19px; font-weight: 800; color: var(--ink); }

/* Hero */
.hero { background: var(--purple); color: #fff; }
.hero__inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 96px; }
.hero__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.badge { align-self: flex-start; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; }
.eyebrow { font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); }
.hero h1 { font-size: clamp(40px, 6.5vw, 64px); }
.hero__lead { font-size: clamp(18px, 2vw, 21px); max-width: 600px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.age-finder { flex: 1 1 380px; min-width: 0; background: #fff; color: var(--ink); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 16px 40px rgba(30, 0, 70, .25); }
.age-finder__title { font-size: 24px; letter-spacing: -0.01em; }
.age-finder label { font-weight: 800; }
.age-finder__row { display: flex; flex-wrap: wrap; gap: 10px; }
.age-finder input { flex: 1 1 140px; min-width: 0; min-height: 52px; font: inherit; padding: 12px 16px; border: 2px solid #c9bfdc; border-radius: 12px; }
.age-finder input:focus { border-color: var(--purple); }
.age-finder__result:empty { display: none; }
.age-finder__result { border-radius: 14px; padding: 16px 18px; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.age-finder__result strong { font-size: 22px; font-weight: 900; }
.age-finder__result a { color: #fff; font-weight: 800; }
.age-finder__result--note { background: var(--tint); color: var(--ink); }
.age-finder__result--note a { color: var(--purple); }

/* Route cards */
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: -48px; position: relative; }
.route { background: #fff; border-radius: 20px; box-shadow: 0 8px 28px rgba(40,10,90,.12); padding: 26px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: transform .15s ease, box-shadow .15s ease; }
.route:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(40,10,90,.18); }
.route__label { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.route__title { font-size: 24px; font-weight: 900; line-height: 1.15; }
.route__text { color: var(--muted); }
.route__cta { font-weight: 800; margin-top: auto; padding-top: 4px; }
.route__label--purple, .route__cta--purple { color: var(--purple); }
.route__label--teal, .route__cta--teal { color: var(--teal); }
.route__label--navy, .route__cta--navy { color: var(--navy); }

/* Sections */
.sections { padding-top: 72px; padding-bottom: 72px; }
.section-lead { color: var(--muted); font-size: 19px; margin: 8px 0 28px; }
.section-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.section-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.section-card.is-match { transform: translateY(-4px); box-shadow: 0 0 0 4px var(--yellow), 0 12px 28px rgba(0,0,0,.12); }
.section-card__head { color: #fff; padding: 16px 18px 12px; display: flex; flex-direction: column; }
.section-card__head strong { font-size: 23px; font-weight: 900; }
.section-card__head span { font-size: 15px; font-weight: 700; }
.section-card__body { padding: 14px 18px 18px; color: #333; font-size: 16px; }
.section-card__head--squirrels { background: var(--squirrels); }
.section-card__head--beavers { background: var(--beavers); }
.section-card__head--cubs { background: var(--cubs); }
.section-card__head--scouts { background: var(--scouts); }
.section-card__head--explorers { background: var(--explorers); }
.section-card__head--network { background: var(--network); }

/* Join */
.join { background: var(--tint); }
.join__inner { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; padding-top: 72px; padding-bottom: 72px; }
.join__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.join__text p { font-size: 19px; color: var(--muted); max-width: 680px; }
.join__actions { display: flex; flex-direction: column; gap: 12px; flex: 0 1 320px; }

/* Volunteer */
.volunteer { background: var(--teal); color: #fff; }
.volunteer__inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.volunteer__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.volunteer__text p:not(.eyebrow) { font-size: 19px; max-width: 600px; }
.roles { flex: 1 1 360px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.roles li { background: rgba(255,255,255,.12); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.roles strong { font-size: 19px; font-weight: 900; }
.roles span { font-size: 15px; }
@media (max-width: 420px) { .roles { grid-template-columns: 1fr; } }

/* History */
.history { background: var(--ink); color: #fff; }
.history__inner { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.history__year { font-size: clamp(72px, 10vw, 112px); font-weight: 900; line-height: .9; color: var(--yellow); }
.history__inner > div:last-child { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.history h2 { font-size: clamp(26px, 3.4vw, 36px); }
.history p { color: #e6e6e6; font-size: 18px; max-width: 680px; }

/* Safeguarding */
.safeguarding { padding-top: 48px; padding-bottom: 48px; }
.safeguarding__box { border: 2px solid var(--line); border-radius: 20px; padding: 26px 30px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.safeguarding__box > div:first-child { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.safeguarding h2 { font-size: 24px; }
.safeguarding p { color: var(--muted); }

/* Footer */
.footer { background: var(--purple); color: #fff; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; padding-top: 48px; padding-bottom: 28px; }
.footer__brand { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.footer__brand .brand__scouts, .footer__brand .brand__name { color: #fff; }
.footer__brand p { font-size: 15px; margin-top: 12px; line-height: 1.4; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer a { color: #fff; }
.footer__legal { border-top: 1px solid rgba(255,255,255,.3); padding-top: 18px; padding-bottom: 28px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .btn--campsite::before { animation: none; display: none; }
}
html { scroll-behavior: smooth; }
