/* Bay Area Track Club — the only stylesheet. Phone layout first; wider layouts in min-width queries. */

/* Fonts: self-hosted latin subsets from @fontsource 5.3.0, SIL OFL 1.1 (licences in /fonts/). Only these three files exist: add a weight here before using it. */
@font-face{font-family:"Fraunces";src:url("/fonts/fraunces-latin-600-normal.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Jost";src:url("/fonts/jost-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Jost";src:url("/fonts/jost-latin-600-normal.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}

:root{
  /* Sunset palette, after the old site's banner: deep orange through amber to yellow, a strong red as the accent, dark slate for type.
     Contrast ratios are in README.md, "Colours". */
  --paper:#FFF6E6;       /* page ground */
  --band:#FFDB9A;        /* light amber: alternate sections */
  --sun-orange:#F07A22;  /* deep orange: the Contact band, step numbers */
  --sun-amber:#FBB124;   /* amber */
  --sun-yellow:#FFD83A;  /* yellow: a highlight only, never carries text */
  --card:#ffffff;
  --line:#E7C27E;
  --ink:#222C33;         /* dark slate: all type */
  --ink-2:#4A535B;       /* secondary slate; never on deep orange */
  --accent:#C0362C;      /* red: buttons, link underlines, focus rings. Never on deep orange */
  --accent-ink:#9E2B22;  /* red for text (link hover) */
  --on-accent:#ffffff;
  --footer-ink:#FFE6BA;

  /* Draft markers. Nothing goes live while any are on the page. */
  --gap-bg:#FFF3BF;
  --gap-line:#B07D00;
  --gap-ink:#553F00;
  --confirm-bg:#F3EFFC;
  --confirm-line:#6A4DB8;

  /* Jost, set wide in capitals, for the wordmark; Fraunces for headings and figures; Jost for everything else. */
  --display:"Fraunces",Georgia,"Times New Roman",serif;
  --text:"Jost",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:ui-monospace,"SFMono-Regular",Menlo,monospace;

  --gutter:16px;
  --maxw:1120px;
  --measure:38rem;
  color-scheme:light;
}
@media (min-width:760px){:root{--gutter:32px}}

*,*::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;background:var(--paper);color:var(--ink);font-family:var(--text);font-size:17px;line-height:1.55}
img{display:block;max-width:100%;height:auto}
a{color:var(--ink);text-decoration-color:var(--accent);text-decoration-thickness:2px;text-underline-offset:.18em}
a:hover{color:var(--accent-ink)}
a:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}
h1,h2,h3,h4{font-family:var(--display);font-weight:600;line-height:1.1;margin:0;text-wrap:balance}
b,strong{font-weight:600}
p,ul,ol,figure{margin:0}

.wrap{max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}

/* Header */
.site-header{background:var(--paper)}
/* The sunset stripe: yellow's one job is this highlight. */
.site-header::after{content:"";display:block;height:6px;background:linear-gradient(90deg,var(--sun-orange),var(--sun-amber) 55%,var(--sun-yellow))}
.header-inner{display:flex;flex-direction:column;gap:2px;padding-top:14px;padding-bottom:4px}
/* The wordmark links home on every page: inside the <h1> on the home page, a <p> elsewhere. It looks the same on both and underlines on hover, like other links. */
.wordmark{font-family:var(--text);font-weight:600;line-height:1.2;font-size:1.0625rem;letter-spacing:.24em;text-transform:uppercase;text-wrap:balance}
.wordmark a{color:inherit;text-decoration:none}
.wordmark a:hover{text-decoration:underline;text-decoration-color:var(--accent);text-decoration-thickness:2px;text-underline-offset:.3em}
.nav{display:flex;flex-wrap:wrap;column-gap:20px}
.nav a{display:inline-block;padding:10px 0;color:var(--ink-2);text-decoration:none;font-size:.9375rem}
.nav a:hover{color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent)}
@media (min-width:760px){
  .header-inner{flex-direction:row;align-items:center;justify-content:space-between;padding-top:12px;padding-bottom:12px}
  .wordmark{font-size:1.3125rem}
  .nav{column-gap:28px}
}

/* Hero */
/* Phones: the tall crop (1296 × 972), full width, shown whole at 4:3.
   From 760px, index.html's <picture> swaps in the wide crop (2112 × 792, 8:3). It sits in the text column as a banner, with cream either side,
   at the crop's own shape, and is never taller than half the window, so the opening text shows without scrolling. */
.hero picture{display:block}
.hero img{width:100%;aspect-ratio:4/3;object-fit:cover;object-position:50% 50%}
@media (min-width:760px){
  .hero{max-width:var(--maxw);margin:32px auto 0;padding:0 var(--gutter)}
  .hero img{aspect-ratio:8/3;max-height:max(240px,50vh);border-radius:4px} /* when the cap bites, the crop loses sky and shin equally */
  .hero + .section{padding-top:32px} /* the opening text: 32px under the banner, matching the space above it */
}

/* Sections */
.section{padding:44px 0}
.band{background:var(--band)}
/* Deep orange carries slate type only: no red and no secondary slate on it. */
.band-deep{background:var(--sun-orange)}
.band-deep a{text-decoration-color:currentColor}
.band-deep a:hover{color:var(--ink);text-decoration-thickness:3px}
.band-deep a:focus-visible{outline-color:var(--ink)}
@media (min-width:760px){.section{padding:72px 0}}
h2{font-size:2rem;margin-bottom:16px}
h3{font-size:1.25rem}
@media (min-width:760px){h2{font-size:2.5rem;margin-bottom:20px}}

.split{display:grid;gap:28px}
@media (min-width:960px){.split{grid-template-columns:minmax(0,1fr) minmax(0,26rem);gap:56px;align-items:start}}
.col-text{max-width:var(--measure)}
.col-text > * + *{margin-top:14px}
.col-text > h2 + *{margin-top:0}
.lede{font-size:1.1875rem;line-height:1.45}

.facts{list-style:none;padding:0;border-top:1px solid var(--line)}
.facts li{padding:12px 0;border-bottom:1px solid var(--line)}
.facts b{font-weight:600}

.cost{display:flex;align-items:baseline;gap:10px;padding-top:8px}
.cost b{font-weight:600}
.amount{font-family:var(--display);font-size:2.25rem;font-weight:600;line-height:1;color:var(--ink)}

/* The Winter photo is square (1440 × 1440); shown 4:3, keeping both runners and the ridge. */
.photo img{width:100%;aspect-ratio:4/3;object-fit:cover;object-position:50% 52%;border-radius:4px}

/* How to join */
.steps{list-style:none;padding:0;counter-reset:step;display:grid;gap:16px}
.steps > li{counter-increment:step;background:var(--card);border:1px solid var(--line);border-radius:8px;padding:20px}
.steps > li::before{content:counter(step);display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--sun-orange);color:var(--ink);font-weight:600;margin-bottom:12px}
.steps > li > * + *{margin-top:12px}
/* Side by side from 760px, each card its own height: Pay holds the QR and the checks wording, so it runs about twice as tall as Join, and stretching Join to match would leave it half empty. */
@media (min-width:760px){.steps{grid-template-columns:1fr 1fr;gap:24px;align-items:start}}
.club-no{font-family:var(--display);font-size:1.2em;white-space:nowrap}
.btn{display:inline-block;background:var(--accent);color:var(--on-accent);text-decoration:none;font-weight:600;padding:12px 18px;border-radius:6px}
.btn:hover{background:var(--accent-ink);color:var(--on-accent)}
/* A QR code is no use on the phone showing it, so it appears only on wider screens. index.html's <picture> keeps phones from fetching it. */
.qr{display:none}
/* 144px: the code itself is about 122px, roughly 2.5cm on a high-density laptop screen and 3cm on a standard monitor, enough for a phone camera.
   The image's white margin is the code's required quiet zone (4 of its 53 modules, 11px); the negative margin lines the code itself up with the text. */
@media (min-width:760px){.qr{display:block}.qr img{width:144px;margin-left:-11px}}

/* Coaches: one row per coach, photo then text; side by side from 760px */
.coaches{display:grid;gap:48px}
.coach{display:grid;gap:16px}
@media (min-width:760px){
  .coach{grid-template-columns:200px minmax(0,1fr);gap:32px;align-items:start}
  .coach.no-photo .coach-text{grid-column:2}
}
.coach-photo{aspect-ratio:4/5;width:100%;max-width:240px;object-fit:cover;border-radius:4px}
.coach-text{max-width:var(--measure)}
.coach .role{margin-top:4px;color:var(--ink-2)}
.coach-text > .gap,.summary,.bio{margin-top:16px}
.more{margin-top:12px}

/* A coach's own page (/patrick-wales-dinan/) */
.back{font-size:.9375rem;margin-bottom:24px}
.back a{text-decoration:none}
.back a:hover{text-decoration:underline}
.coach-page h1{font-size:2.25rem;line-height:1.05}
@media (min-width:760px){.coach-page h1{font-size:2.75rem}}
.bio > * + *{margin-top:14px}
.bio h2{font-size:1.375rem;line-height:1.2;margin-top:32px;margin-bottom:0}

/* Contact */
.contact-email{font-size:1.25rem}
.contact-email a{overflow-wrap:anywhere}

/* Footer */
.site-footer{background:var(--ink);color:var(--footer-ink);padding:24px 0;font-size:.875rem}

/* Draft markers: .gap = missing, .confirm = carried over from the old site and not yet confirmed */
.gap{background:var(--gap-bg);color:var(--gap-ink);border:2px dashed var(--gap-line);border-radius:6px;padding:12px 14px;font-size:.9375rem;line-height:1.4}
span.gap{display:inline;padding:1px 6px;border-width:1px;border-radius:4px;font-size:.875em;white-space:nowrap}
.gap-label{font-family:var(--mono);font-size:.6875rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin-right:6px}
.confirm{background:var(--confirm-bg);border:2px dotted var(--confirm-line);border-radius:6px;padding:12px 14px}
.confirm > * + *{margin-top:12px}
.confirm-label{font-family:var(--mono);font-size:.6875rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--confirm-line)}
