/* Splash Swimming Club: the public website. Mobile first; body text 18px, tap targets 48px+.
   Pool blue and teal from the logo, sunny yellow for the main action, Nunito for a friendly,
   rounded feel (served from /fonts, never from Google). Light and dark follow the phone. */
@font-face {
  font-family: Nunito;
  src: url(/fonts/nunito.woff2) format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}
:root {
  --bg: #f3f9fc;
  --surface: #ffffff;
  --ink: #0d2b3a;
  --muted: #46616e;
  --line: #d3e5ee;
  --field-line: #7491a0;
  --blue: #0b5fa5;
  --teal: #1b7273;
  --on-teal: #ffffff;
  --aqua: #e0f2fa;
  --sun: #ffd23f;
  --on-sun: #0d2b3a;
  --head: #ffffff;
  --foot: #0b3550;
  --foot-ink: #e6f3f9;
  --ok-soft: #dbf0e5;
  --warn-soft: #fae5e0;
  --shadow: 0 6px 20px rgba(13, 43, 58, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06161f;
    --surface: #0c2532;
    --ink: #e4f2f8;
    --muted: #a6c3cf;
    --line: #1d3f4f;
    --field-line: #5a7f92;
    --blue: #7fc6f2;
    --teal: #74d3d1;
    --on-teal: #06161f;
    --aqua: #0f3343;
    --head: #0a1f2a;
    --foot: #030f16;
    --foot-ink: #d7ebf3;
    --ok-soft: #0f3326;
    --warn-soft: #3b1f1a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
h1, h2, h3 { font-weight: 850; line-height: 1.15; margin: 0 0 0.4em; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 4vw, 2rem); }
h3 { font-size: 1.2rem; margin-top: 0.9em; }
p { margin: 0 0 0.7em; }
a { color: var(--blue); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.lead { font-size: 1.15rem; color: var(--muted); }
.muted, .hint { color: var(--muted); }
.hint { font-size: 1rem; margin: 0 0 6px; }
.small { font-size: 1rem; }
.big { font-size: 1.25rem; }
.ref { letter-spacing: 0.08em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pre { white-space: pre-line; }
.eyebrow { color: var(--teal); font-weight: 850; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; margin: 0 0 0.3em; }

/* Buttons: sunny yellow with dark text for the main action, an outline for the rest */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--sun); border-color: var(--sun); color: var(--on-sun); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12); }
.button.block, .form .button { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.choices { display: grid; gap: 10px; margin-top: 10px; }

/* Header: the colour logo on white, the white logo in dark mode (a <picture> swaps them) */
.site-top { background: var(--head); border-bottom: 1px solid var(--line); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; padding-top: 10px; }
.brand { display: inline-flex; align-items: center; min-height: 48px; }
.brand img { display: block; height: 40px; width: auto; }
.top nav { flex-basis: 100%; display: flex; gap: 0 22px; flex-wrap: wrap; }
.top nav a { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); font-weight: 750; text-decoration: none; }
.top nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--sun); }
.head-cta { display: none; }
/* Phones: logo left, "Menu" right (menu.js); the links open below as big buttons */
.menu-button { display: none; }
@media (max-width: 899px) {
  .js-menu .top { padding-bottom: 10px; }
  .js-menu .menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--aqua);
    color: var(--blue);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }
  .js-menu nav { display: none; }
  .js-menu.menu-open nav { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
  .js-menu.menu-open nav a { min-height: 56px; border-top: 1px solid var(--line); font-size: 1.1rem; }
}

/* A wave along the bottom (or top) edge of a photo or band, in the colour of what follows */
.wave { display: block; position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 34px; }
.wave path { fill: var(--bg); }

/* Page heading band on the inner pages */
.page-head { position: relative; background: var(--aqua); padding: 28px 0 48px; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); }
.page-head .lead { margin: 0; max-width: 40rem; }
/* Inner pages: the heading lines up with the 760px text column below it. */
.page-head .wrap { max-width: 760px; }

main { display: block; }
.stack { display: grid; gap: 16px; max-width: 760px; padding-top: 8px; padding-bottom: 32px; }
section.band { padding: 28px 0; }
section.band.alt { background: var(--aqua); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.notice-banner { background: var(--aqua); border: 2px solid var(--blue); margin-top: 16px; }
.notice-banner p { white-space: pre-line; }
.note { margin: 8px 0 0; }

/* Home: hero */
.hero { padding-bottom: 8px; }
.hero-photo { position: relative; margin: 0 -16px; }
.hero-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-text { padding-top: 8px; }
.hero .actions { display: none; }
.trust { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trust li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-weight: 750; line-height: 1.25; box-shadow: var(--shadow); }
.trust svg { flex: none; width: 34px; height: 34px; }
.trust circle { fill: var(--aqua); }
.trust path { fill: none; stroke: var(--teal); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* Lesson cards with a photo and a wave edge */
.cards { display: grid; gap: 16px; }
.lesson { padding: 0; overflow: hidden; }
.lesson .pic { position: relative; }
.lesson .pic img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.lesson .pic .wave path { fill: var(--surface); }
.lesson .body { padding: 6px 20px 20px; }
.tag { display: inline-block; background: var(--aqua); color: var(--teal); font-weight: 800; border-radius: 999px; padding: 2px 12px; font-size: 0.9rem; margin-bottom: 8px; }
.more { display: inline-flex; align-items: center; min-height: 48px; font-weight: 800; }

/* Term dates (filled in by site.js) */
.term + .term { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.term h3 { margin-top: 0; font-size: 1.5rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 12px 0; }
.facts dt { font-weight: 850; }
.facts dd { margin: 0; }
.chips { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--aqua); border-radius: 999px; padding: 4px 12px; font-size: 1rem; }

/* How to join */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; }
.steps + p { margin-top: 18px; }
.steps li::before { content: counter(step); width: 52px; height: 52px; border-radius: 50%; background: var(--teal); color: var(--on-teal); display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; }

/* Two columns on wide screens, stacked with space between on phones */
.split { display: grid; gap: 28px; }

/* Photos */
.split img, .photo img { display: block; width: 100%; border-radius: 22px; aspect-ratio: 4 / 3; object-fit: cover; }
figure { margin: 0; }
.photo { margin: 14px 0 4px; }
.photos { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }

/* The video: our own photo until someone taps play; only then does Vimeo load (site.js) */
.video { position: relative; display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; color: #fff; text-decoration: none; }
.video img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.video .play { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; font-weight: 850; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.video .play svg { width: 72px; height: 72px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4)); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Parents' words */
.quotes { display: grid; gap: 14px; margin-top: 8px; }
.quote { display: grid; grid-template-rows: 1fr auto; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 22px 6px; padding: 18px 20px; }
.quote blockquote { margin: 0; }
.quote blockquote p:last-child { margin: 0; }
.quote figcaption { font-weight: 850; color: var(--teal); }

/* Lists */
.lines { padding-left: 1.2em; margin: 0.4em 0; }
.lines li { margin: 6px 0; }
.contents { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.contents a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; background: var(--aqua); color: var(--blue); font-weight: 800; text-decoration: none; }
.places { padding-left: 1.2em; columns: 2; column-gap: 24px; }
@media (max-width: 380px) { .places { columns: 1; } }
.badges { margin: 4px 0 8px; }
.badges img, .badge-tile img { display: block; width: 210px; height: auto; }
.badge-tile { display: inline-block; background: #ffffff; padding: 8px; border-radius: 12px; }

/* Forms (Request a call, Register) */
.form { display: grid; gap: 6px; }
.form > .card, .form fieldset.card { display: grid; gap: 6px; }
label, legend { font-weight: 800; margin-top: 10px; }
legend { float: left; width: 100%; padding: 0; font-size: 1.15rem; }
legend + * { clear: both; }
fieldset.card > legend { margin-top: 0; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit; /* 18px also stops iOS zooming into fields */
}
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
fieldset.card { border: 1px solid var(--line); padding: 20px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair > * { min-width: 0; }
.birth legend { font-size: inherit; }
@media (max-width: 380px) { .pair { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 12px; font-weight: 700; min-height: 52px; }
/* A checkbox with a sentence beside it ("top" would clash with the header's .top). */
.check.long { align-items: flex-start; font-weight: 400; }
.check.long input { margin-top: 2px; }
.check input { width: 28px; min-height: 28px; height: 28px; flex: none; accent-color: var(--blue); }
.form .button { margin-top: 10px; }
/* Request a call: the child's details only show for lessons for a child (browsers without :has()
   show them always, and the Worker ignores them for other topics). */
.form:has(input[name="topic"]:checked:not([value="child"])) .for-child { display: none; }
.for-child { display: grid; gap: 6px; }
/* Read out by screen readers, not shown (for example "opens in a new tab"). */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The spam trap: off screen, never focused. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.errors { background: var(--warn-soft); border-radius: 12px; padding: 12px 16px; }
.errors ul { margin: 4px 0 0; padding-left: 1.2em; }

/* Footer: deep blue with a wave along the top */
.site-foot { position: relative; background: var(--foot); color: var(--foot-ink); padding: 52px 0 28px; margin-top: 28px; }
.site-foot .wave { top: -1px; bottom: auto; transform: rotate(180deg); }
.site-foot a { color: var(--foot-ink); }
.site-foot .brand img { height: 44px; }
.foot-cols { display: grid; gap: 22px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li a { display: inline-flex; min-height: 44px; align-items: center; }

/* Phone: the main actions stay in thumb reach on the static pages */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--head);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
}
.callbar .button { padding: 10px 12px; }
body:has(.callbar) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

@media (min-width: 900px) {
  body:has(.callbar) { padding-bottom: 0; }
  .callbar { display: none; }
  .top { flex-wrap: nowrap; padding: 14px 16px; }
  .brand img { height: 52px; }
  .top nav { flex-basis: auto; margin-left: auto; gap: 12px; }
  .top nav a { min-width: 48px; justify-content: center; padding: 0 8px; }
  .head-cta { display: inline-flex; }
  .page-head { padding: 44px 0 64px; }
  .hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; padding-top: 40px; }
  .hero-photo { order: 2; margin: 0; }
  .hero-photo img { border-radius: 32px 32px 120px 32px; }
  .hero-photo .wave { display: none; }
  .hero .actions { display: flex; }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .cards, .quotes { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .split.top { align-items: start; }
  .photos { grid-template-columns: repeat(6, 1fr); }
  .foot-cols { grid-template-columns: 1.2fr 1fr 1fr; }
}
