/* ==========================================================================
   Shared stylesheet for every page that is not index.html.

   index.html keeps its own inline <style> — it is one hand-edited file with a
   large bespoke layout and it is deliberately left alone. Everything else
   (the service pages, privacy, terms, 404) shares this file so there is one
   place to change the sub-page look, and so a returning visitor gets it from
   cache instead of re-downloading it inside every page.

   The palette is index.html's dark brand theme, copied as flat values rather
   than re-derived: these pages have no light theme to fall back from, so the
   two-layer token dance the homepage needs would be noise here.
   ========================================================================== */

:root {
  color-scheme: dark;

  --paper: #0E1519;
  --wash: #131C22;
  --card: #182229;
  --ink: #F3EFE6;
  --body: #BFC9CE;
  --muted: #8E9BA1;

  --gold: #F5C243;
  --gold-hi: #FFD469;
  --gold-wash: rgba(245, 194, 67, 0.12);
  --gold-line: rgba(245, 194, 67, 0.32);
  --sky: #5CB0E2;
  --on-gold: #23201A;

  --line: rgba(243, 239, 230, 0.15);
  --line-soft: rgba(243, 239, 230, 0.08);

  --serif: "Fredoka", "Baloo 2", "Trebuchet MS", sans-serif;
  --sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* the prose column stays narrow for reading; full-width sections opt out */
  --prose: 760px;
  --container: 1120px;
  --gutter: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
  --radius: 18px;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 40px; --sp-8: 48px; --sp-9: 64px;
  --sp-10: clamp(4rem, 3.333rem + 3.333vw, 6rem);

  --step--1: clamp(0.875rem, 0.854rem + 0.104vw, 0.9375rem);
  --step-0: clamp(1.031rem, 1rem + 0.156vw, 1.125rem);
  --step-1: clamp(1.238rem, 1.15rem + 0.438vw, 1.5rem);
  --step-2: clamp(1.485rem, 1.313rem + 0.858vw, 2rem);
  --step-3: clamp(1.781rem, 1.485rem + 1.479vw, 2.669rem);
  --step-4: clamp(2.138rem, 1.665rem + 2.365vw, 3.556rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
/* Prose shares the container's left edge so headings line up down the page,
   and constrains only the line length of its own children. Centring a narrower
   wrapper instead would step every prose section inwards from the hero. */
.wrap-prose { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-prose > * { max-width: var(--prose); }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: var(--sp-3) var(--sp-4); border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ header */
.bar { border-bottom: 1px solid var(--line-soft); padding: var(--sp-5) 0; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.brand {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 24px; margin: 0 1px; }
.bar nav { display: flex; align-items: center; gap: var(--sp-5); }
.bar nav a { font-size: 0.9375rem; text-decoration: none; }
.bar .nav-back { color: var(--muted); }
.bar .nav-back:hover { color: var(--gold); }
@media (max-width: 560px) { .bar .nav-back { display: none; } }

/* ----------------------------------------------------------------- content */
main { padding-bottom: var(--sp-10); }

.eyebrow {
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold); margin-bottom: var(--sp-3);
}

h1 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}
h2 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.015em;
  margin-bottom: var(--sp-4);
}
h3 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
}
h4 { font-size: 1.0625rem; font-weight: 800; color: var(--ink); margin-bottom: var(--sp-2); }

p, ul, ol { margin-bottom: var(--sp-4); }
ul, ol { padding-left: 22px; }
li { margin-bottom: var(--sp-2); }
li::marker { color: var(--gold); }
strong, b { color: var(--ink); font-weight: 700; }

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); font-weight: 400; }
.updated { font-size: var(--step--1); color: var(--muted); margin-bottom: var(--sp-6); }

section { padding: var(--sp-9) 0; }
section + section { padding-top: 0; }
.section-head { max-width: 640px; margin-bottom: var(--sp-6); }
.section-head p { color: var(--muted); margin-bottom: 0; }

/* -------------------------------------------------------------------- hero */
.hero { padding: var(--sp-10) 0 var(--sp-9); }
.hero .lede { max-width: 620px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-6); font-size: var(--step--1); color: var(--muted);
}
.hero-facts span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hero-facts span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); flex: none;
}

/* ------------------------------------------------------------------ blocks */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: var(--sp-7);
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .num {
  font-family: var(--serif); font-size: var(--step-2); font-weight: 600;
  color: var(--gold); line-height: 1; margin-bottom: var(--sp-3);
}

.callout {
  background: var(--card); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: 12px; padding: var(--sp-5) var(--sp-6); margin: var(--sp-5) 0;
}
.callout p:last-child { margin-bottom: 0; }

.promise {
  border: 1px solid var(--gold-line); background: var(--gold-wash);
  border-radius: var(--radius); padding: var(--sp-6) var(--sp-7);
  color: var(--ink);
}
.promise p:last-child { margin-bottom: 0; }

/* signal list — "this page is for you if…" */
.signals { list-style: none; padding: 0; }
.signals li {
  position: relative; padding-left: 30px; margin-bottom: var(--sp-3);
}
.signals li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 14px; height: 7px; border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold); transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- coaches */
.coach-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-5);
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: var(--sp-6) var(--sp-7);
}
.coach-note .big {
  font-family: var(--serif); font-size: var(--step-3); font-weight: 600;
  color: var(--gold); line-height: 1;
}
.coach-note div { flex: 1 1 260px; }
.coach-note p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------- faq */
.faq details {
  border-bottom: 1px solid var(--line-soft); padding: var(--sp-5) 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line-soft); }
.faq summary {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--sp-5); cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: var(--step-1); font-weight: 600;
  color: var(--ink); line-height: 1.3; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--gold); }
.faq .mark {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--gold);
  display: grid; place-items: center; font-size: 1rem; line-height: 1;
  transition: transform 0.2s var(--ease-out);
}
.faq details[open] .mark { transform: rotate(45deg); }
.faq details p { margin-top: var(--sp-4); margin-bottom: 0; max-width: 68ch; }
.faq details p + p { margin-top: var(--sp-3); }

/* ------------------------------------------------------------- other pages */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  display: block; text-decoration: none; color: var(--body);
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: var(--sp-5);
  transition: border-color 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}
.tile:hover { border-color: var(--gold-line); transform: translateY(-2px); color: var(--body); }
.tile b { display: block; color: var(--ink); font-family: var(--serif); font-weight: 600; margin-bottom: 4px; }
.tile span { font-size: var(--step--1); color: var(--muted); }

/* --------------------------------------------------------------------- cta */
.cta {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: var(--sp-8) var(--sp-7);
  text-align: center;
}
.cta h2 { margin-bottom: var(--sp-3); }
.cta p { color: var(--muted); max-width: 52ch; margin: 0 auto var(--sp-6); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  background: var(--gold); color: var(--on-gold);
  font-family: var(--sans); font-weight: 800; font-size: 1rem;
  padding: 15px 26px; border-radius: 999px; text-decoration: none;
  min-height: 48px; border: 1px solid transparent;
  transition: background 0.16s var(--ease-out);
}
.btn:hover { background: var(--gold-hi); color: var(--on-gold); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: transparent; color: var(--gold); border-color: var(--gold-line); }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
.actions-left { justify-content: flex-start; }

/* ------------------------------------------------------------------ footer */
.foot {
  border-top: 1px solid var(--line-soft); padding: var(--sp-7) 0 var(--sp-8);
  font-size: 0.875rem; color: var(--muted);
}
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-5) var(--sp-7); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--gold); }
.foot p { margin-bottom: 4px; }
.foot .brand { font-size: 1.125rem; }
.foot-legal a { text-decoration: underline; text-underline-offset: 2px; }
/* the Lessons column — every sub-page carries a route to every other one, so
   the service pages are never a dead end you can only leave via the logo */
.foot-nav p { margin-bottom: 2px; }
.foot-head { color: var(--ink); font-weight: 700; margin-bottom: var(--sp-2); }
.foot-nav a { text-decoration: none; }
.foot-nav [aria-current="page"] { color: var(--gold); }
@media (max-width: 700px) { .foot .wrap { flex-direction: column; gap: var(--sp-5); } }

/* Printing a swim-lesson page is rare but a parent forwarding terms to a
   spouse is not. Put dark type back on white rather than burning a cartridge. */
@media print {
  body { background: #fff; color: #23201A; }
  .bar nav, .actions, .cta, .tiles { display: none; }
  h1, h2, h3, h4, strong, b, .lede { color: #23201A; }
  a { color: #23201A; }
  .card, .callout, .promise, .coach-note { border: 1px solid #ccc; background: #fff; }
}
