/* ===========================================================================
   WELLSFORD COMMUNITY BOXING
   ===========================================================================

   Dark by default, because the gym is: charcoal block walls, a red ring apron,
   one row of windows. The palette is sampled straight out of assets/img/
   emblem-1.jpg rather than chosen alongside it —

     forest   #3F4F33  the ring the badge sits in
     oxblood  #492D24  the EST / 2026 side panels
     red      #94352F  the gloves, and the only action colour on the site
     gold     #D8A24A  the bull's eyes; used sparingly, never for body text
     bone     #F4F2EA  the horns and the lettering

   Sections carry TEXTURE rather than flat fill — canvas weave, tape hatch,
   concrete mottle, and a turbulence grain over the top. All of it is generated
   in CSS or as an inline SVG data URI, so nothing here costs a request and
   nothing needs a CSP exemption (img-src already permits data:).

   Mobile-first throughout. Base styles are the narrow viewport and everything
   widens with min-width only. THE 62rem BREAKPOINT MUST MATCH the matchMedia
   query in assets/js/nav.js.

   Bump ASSET_VERSION in includes/site.php after editing this file — assets are
   cached for a year.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Typography — self-hosted, no external origin

   Anton for display and Barlow for body, both SIL Open Font License (the
   licences ship alongside the files in assets/fonts/). Self-hosted because the
   CSP forbids external origins, and because a font CDN would hand a visitor's
   IP address to a third party on every page load and need its own privacy
   disclosure.

   latin-ext is loaded as well as latin, and that is not padding: MACRONS LIVE
   IN latin-ext. Without it "Māori" and "tamariki" fall back to a system face
   mid-word, which looks like a typo rather than a design.

   Anton ships in ONE weight and is already black. Never ask for 600 or 700 from
   it — the browser would synthesise a fake bold and smear the letterforms.
   --------------------------------------------------------------------------- */

@font-face {
    font-family: 'Anton';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/anton-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Anton';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/anton-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/barlow-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/barlow-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/barlow-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/barlow-600-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/barlow-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/barlow-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------------
   Tokens

   The platform's markup reads the role names (--ink, --paper, --accent…), so
   those stay. The brand values sit above them as raw colours, and the roles
   point at the brand — which is what lets .band--bone below flip a whole
   section to light by redefining six variables rather than restyling anything.
   --------------------------------------------------------------------------- */

:root {
    /* Sampled from the emblem. Do not tweak these by eye — resample the file. */
    --deep:       #13170f;
    --deep-2:     #1b2116;
    --deep-3:     #232b1c;
    --forest:     #2e3a26;
    --forest-lt:  #3f4f33;
    --oxblood:    #492d24;
    --red:        #94352f;
    --red-hot:    #b3453c;
    --gold:       #d8a24a;
    --bone:       #f4f2ea;
    --bone-dim:   #a8af9a;

    /* Platform role tokens — dark is the default state of this site. */
    --ink:        var(--bone);
    --ink-soft:   var(--bone-dim);
    --paper:      var(--deep);
    --paper-alt:  var(--deep-2);
    --rule:       rgba(244, 242, 234, 0.14);
    --rule-strong: rgba(244, 242, 234, 0.30);
    --accent:     var(--red);
    --accent-ink: #ffffff;

    /* Lifted surfaces — cards, panels, table rows, inputs.
       THESE ARE TOKENS RATHER THAN LITERALS FOR ONE REASON: they are a
       translucent WHITE lift, which reads as a raised panel on the dark bands
       and as absolutely nothing on a cream one. Every time a component hard-
       coded rgba(244,242,234,…) it had to grow a .band--bone twin, and the one
       that got forgotten went invisible. Naming them means .band--bone flips
       every surface on the site by redefining three values. */
    --surface:      rgba(244, 242, 234, 0.045);
    --surface-hi:   rgba(244, 242, 234, 0.075);
    --surface-soft: rgba(244, 242, 234, 0.05);

    /* Notices. Tuned for a dark ground — the skeleton's pale tints would glow. */
    --ok:         #9ccf9a;
    --ok-bg:      rgba(80, 140, 76, 0.16);
    --error:      #f0a49c;
    --error-bg:   rgba(148, 53, 47, 0.22);

    --font-display: 'Anton', 'Arial Narrow', 'Haettenschweiler', Impact, sans-serif;
    --font-body:    'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --s1: 0.25rem;
    --s2: 0.5rem;
    --s3: 1rem;
    --s4: 1.5rem;
    --s5: 2rem;
    --s6: 3rem;
    --s7: 4.5rem;
    --s8: 7rem;

    --measure: 36rem;
    --gutter:  1.25rem;
    --max:     76rem;

    --radius: 3px;

    /* One easing curve for the whole site. A punch decelerates hard. */
    --ease: cubic-bezier(0.16, 0.84, 0.34, 1);

    /* Grain. A single turbulence tile, reused by every textured surface.
       Inline SVG as a data: URI — permitted by img-src 'self' data:, and it
       costs no request. */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------------
   Reset and base
   --------------------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Anchored sections must clear the sticky header. */
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;              /* Anton has one weight. Never synthesise. */
    line-height: 0.95;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    margin: 0 0 var(--s3);
    text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 11vw, 5rem); }
h2 { font-size: clamp(1.9rem, 7vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 4.5vw, 1.7rem); }
h4 { font-size: 1.1rem; }

p, ul, ol, dl { margin: 0 0 var(--s3); }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--red-hot); }

strong, b { font-weight: 700; }

::selection { background: var(--red); color: #fff; }

/* Visible focus, always. Never remove this without replacing it. */
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Respect a reduced-motion preference across the whole site. */
@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;
        scroll-behavior: auto !important;
    }
}

/* ---------------------------------------------------------------------------
   Textured surfaces

   Each band gets a woven or hatched gradient plus the shared grain tile. Kept
   deliberately low-contrast: texture should be felt at a glance and never
   compete with the words sitting on it. The ::before carrying the grain is
   pointer-events:none so it cannot swallow a click.
   --------------------------------------------------------------------------- */

.band,
.hero,
.site-footer { position: relative; isolation: isolate; }

.band--canvas,
.band--hatch,
.band--concrete,
.band--bone,
.band--forest,
.band--oxblood { position: relative; }

.band--canvas::before,
.band--hatch::before,
.band--concrete::before,
.band--bone::before,
.band--forest::before,
.band--oxblood::before,
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-size: 160px 160px;
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: -1;
}

/* Woven canvas — the wrap on a hand, or a heavy bag seam. */
.band--canvas {
    background-color: var(--deep-2);
    background-image:
        repeating-linear-gradient(90deg,
            rgba(255,255,255,0.022) 0 2px, transparent 2px 5px),
        repeating-linear-gradient(0deg,
            rgba(0,0,0,0.20) 0 2px, transparent 2px 5px);
}

/* Diagonal tape hatch — the ring apron, and the tape on a wrist. */
.band--hatch {
    background-color: var(--deep);
    background-image:
        repeating-linear-gradient(135deg,
            rgba(255,255,255,0.030) 0 1px, transparent 1px 11px),
        linear-gradient(180deg, var(--deep-2), var(--deep));
}

/* Mottled concrete — the block wall behind the bags. */
.band--concrete {
    background-color: var(--deep-3);
    background-image:
        radial-gradient(ellipse 60% 40% at 15% 20%, rgba(255,255,255,0.045), transparent 60%),
        radial-gradient(ellipse 50% 45% at 82% 70%, rgba(0,0,0,0.35), transparent 62%),
        radial-gradient(ellipse 40% 30% at 55% 95%, rgba(63,79,51,0.35), transparent 65%),
        linear-gradient(160deg, var(--deep-3), var(--deep));
}

/* Deep forest — the ring the badge sits in. Used for the strongest sections. */
.band--forest {
    background-color: var(--forest);
    background-image:
        repeating-linear-gradient(135deg,
            rgba(0,0,0,0.10) 0 1px, transparent 1px 14px),
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(63,79,51,0.85), transparent 70%),
        linear-gradient(180deg, var(--forest), #222b1c);
}

/* Oxblood — the EST / 2026 panels. Reserved for the memorial. */
.band--oxblood {
    background-color: var(--oxblood);
    background-image:
        repeating-linear-gradient(45deg,
            rgba(0,0,0,0.10) 0 1px, transparent 1px 13px),
        radial-gradient(ellipse 80% 70% at 50% 30%, rgba(90,56,45,0.75), transparent 70%),
        linear-gradient(180deg, #3d2620, #2a1a15);
}

/* ---------------------------------------------------------------------------
   The light band — a full token inversion, not a set of overrides

   Long prose on a near-black ground is tiring, so the reading-heavy sections
   run light. Redefining the role tokens on the section flips every child that
   already reads them — buttons, rules, notices, captions — with no component
   needing a variant class of its own.
   --------------------------------------------------------------------------- */

.band--bone {
    --ink:       #1c2016;
    --ink-soft:  #5a6150;
    --paper:     #f4f2ea;
    --paper-alt: #e8e5d9;
    --rule:      rgba(28, 32, 22, 0.16);
    --rule-strong: rgba(28, 32, 22, 0.30);
    --accent:    #7e2a25;
    --gold:      #8a6420;

    /* The surfaces invert from a translucent white lift to an opaque white one.
       Every card, panel, table row and contact tile on this band follows from
       these three lines — no component needs a variant of its own. */
    --surface:      rgba(255, 255, 255, 0.70);
    --surface-hi:   #ffffff;
    --surface-soft: rgba(28, 32, 22, 0.05);

    /* THE STATUS PAIRS MUST BE INVERTED TOO — this is easy to forget and the
       failure is ugly rather than obvious. The :root values are tuned to glow
       on a near-black ground (a pale #9ccf9a on a dark translucent green). Drop
       that combination onto this cream band, as the contact form does, and the
       success message becomes pale green text on pale green: legible in the
       sense that the pixels differ, unreadable in every sense that matters.

       Dark ink on a light tint here, measured against the tinted background
       rather than against the bare band — the tint lifts the floor:
         --ok    #2f6a3f on the 10% green wash ..... 5.0:1
         --error #a3231a on the 10% red wash ....... 5.9:1 */
    --ok:        #2f6a3f;
    --ok-bg:     rgba(47, 106, 63, 0.10);
    --error:     #a3231a;
    --error-bg:  rgba(163, 35, 26, 0.10);

    background-color: #f4f2ea;
    background-image:
        repeating-linear-gradient(90deg, rgba(28,32,22,0.020) 0 1px, transparent 1px 4px),
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(28,32,22,0.05), transparent 70%);
    color: var(--ink);
}
.band--bone::before { opacity: 0.10; mix-blend-mode: multiply; }

/* ---------------------------------------------------------------------------
   Layout helpers
   --------------------------------------------------------------------------- */

.measure { max-width: var(--measure); }

.band { padding-block: var(--s7); }
.band--lift { background: var(--paper-alt); }
.band--tight { padding-block: var(--s6); }

.band__inner,
.site-header__inner,
.site-footer__inner,
.page-head__inner,
.prose {
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.prose {
    max-width: calc(var(--measure) + var(--gutter) * 2);
    padding-block: var(--s6);
}
.prose h2 { margin-top: var(--s6); }
.prose h3 { margin-top: var(--s5); }

@media (min-width: 48em) {
    :root { --gutter: 2rem; }
    .band { padding-block: var(--s8); }
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--s3);
    display: flex;
    align-items: center;
    gap: var(--s2);
}
/* A short rule leading into the label — a corner post, visually. */
.eyebrow::before {
    content: '';
    width: 1.75rem;
    height: 2px;
    background: var(--red);
    flex: none;
}

.lede {
    font-size: clamp(1.1rem, 2.4vw, 1.375rem);
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 42rem;
}

/* ---------------------------------------------------------------------------
   Skip link — visible only once focused.
   --------------------------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--red);
    color: #fff;
    padding: var(--s2) var(--s3);
    font-weight: 700;
    z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------------
   Header and navigation

   Sticky, and it condenses once the page scrolls — assets/js/nav.js adds
   .is-stuck. Without JavaScript it simply stays at its full height, which is
   fine, and the nav renders as a plain visible list.
   --------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(19, 23, 15, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
    transition: padding 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-stuck {
    background: rgba(19, 23, 15, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
/* The red hairline under the header — the ring apron again. */
.site-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--oxblood), var(--red));
    opacity: 0.85;
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    padding-block: var(--s2);
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s3);
    text-decoration: none;
    color: var(--bone);
    min-height: 44px;
}
.site-header__brand img {
    width: 4.5rem;
    height: auto;
    transition: width 0.35s var(--ease), transform 0.4s var(--ease);
}
/* Still shrinks on scroll, but from a bigger starting size — the badge is the
   thing people recognise, so it should not be a thumbnail at the top of the
   page. */
.site-header.is-stuck .site-header__brand img { width: 3.4rem; }
.site-header__brand:hover img { transform: rotate(-8deg) scale(1.08); }

@media (min-width: 62rem) {
    .site-header__brand img { width: 5.5rem; }
    .site-header.is-stuck .site-header__brand img { width: 4rem; }
}

.site-header__wordmark {
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: var(--bone);
    max-width: 7.5em;
}
.site-header__wordmark em {
    display: block;
    font-style: normal;
    color: var(--red-hot);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    min-height: 44px;
    padding: var(--s2) var(--s3);
    background: none;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--bone);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--red); background: rgba(148, 53, 47, 0.15); }

.nav-toggle__bars {
    width: 1.125rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
    transition: box-shadow 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
    box-shadow: 0 -6px 0 var(--red), 0 6px 0 var(--red);
}

.site-nav { flex-basis: 100%; }

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0 0 var(--s2);
}

.site-nav__list a,
.site-nav__aside a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: var(--s2) 0;
    text-decoration: none;
    color: var(--bone);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--rule);
}
.site-nav__list a:hover { color: var(--red-hot); }
.site-nav__list a[aria-current="page"] { color: var(--gold); }

.site-nav__aside { margin: 0; padding-block: var(--s2); }
.site-nav__aside a { border-bottom: 0; color: var(--gold); }

/* Collapsed state applies only when nav.js has run — it adds .js to <html> and
   toggles .is-open on the nav. Without JavaScript neither appears, the rules
   below never match, and the nav stays a plain visible list. That is the
   fallback, not a bug.

   THE 62rem BREAKPOINT BELOW MUST MATCH the matchMedia query in
   assets/js/nav.js. If you move one, move the other, or the script will keep
   managing an open/closed state for a nav the stylesheet has already expanded. */
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; animation: nav-drop 0.28s var(--ease); }

@keyframes nav-drop {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

@media (min-width: 62rem) {
    .nav-toggle { display: none; }

    /* .is-open is listed too. Without it, a nav left open on a phone and then
       widened would keep the more specific .js .site-nav.is-open rule and lay
       out as a block. nav.js does clear the state on crossing this breakpoint,
       so this is belt and braces — but the stylesheet should be correct on its
       own rather than relying on a script having run. */
    .site-nav,
    .js .site-nav,
    .js .site-nav.is-open {
        display: flex;
        align-items: center;
        gap: var(--s4);
        flex-basis: auto;
        animation: none;
    }

    /* ── WHY THIS ROW IS TIGHTER THAN THE TYPE ELSEWHERE ────────────────────
       Six nav items, a phone number and a Donate button, next to a badge and a
       two-line wordmark. At the --s4 gap and the 0.9rem/0.1em uppercase the
       mobile nav uses, that row measures wider than 62rem — and because
       .site-header__inner is flex-wrap: wrap, it does not overflow, it silently
       drops the whole nav onto a second line. That reads as a broken header
       rather than a design.

       So the desktop row runs at 0.8rem and a tighter gap from 62rem, and gets
       its full size back at 80rem where there is room for it. ADDING A SEVENTH
       ITEM MEANS MEASURING THIS AGAIN — do not assume it still fits. */
    .site-nav__list { display: flex; gap: var(--s3); padding-bottom: 0; }
    .site-nav__list a,
    /* :not(.btn) because this is the NAV LINK reset, and the aside holds a
       button as well as the phone number. As a bare `a` it outranked .btn--sm
       (0,1,1 against 0,1,0) and flattened the donate button's padding to zero
       from this breakpoint up. Colour had already been rescued one property at
       a time further down; scoping the selector fixes the whole class of it,
       so the next property added here does not silently land on the button. */
    .site-nav__aside a:not(.btn) {
        padding: 0;
        border-bottom: 0;
        position: relative;
        font-size: 0.8rem;
        letter-spacing: 0.05em;
    }
    /* Underline that grows from the left on hover. */
    .site-nav__list a::after {
        content: '';
        position: absolute;
        left: 0; bottom: -6px;
        height: 2px; width: 100%;
        background: var(--red);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.25s var(--ease);
    }
    .site-nav__list a:hover::after,
    .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
    .site-nav__list a[aria-current="page"]::after { background: var(--gold); }
}

/* Full-size nav type again, once the row has room for it. See the note in the
   62rem block above. */
@media (min-width: 80rem) {
    .site-nav__list { gap: var(--s4); }
    .site-nav__list a,
    .site-nav__aside a { font-size: 0.9rem; letter-spacing: 0.1em; }
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-height: 48px;
    padding: var(--s2) var(--s5);
    border: 2px solid var(--red);
    border-radius: var(--radius);
    background: var(--red);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
                background 0.2s var(--ease), border-color 0.2s var(--ease);
}
/* A light sweep that crosses the face on hover. */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.55s var(--ease);
}
.btn:hover {
    background: var(--red-hot);
    border-color: var(--red-hot);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(148, 53, 47, 0.4);
}
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }

.btn--ghost {
    background: transparent;
    border-color: var(--rule);
    color: var(--ink);
}
.btn--ghost:hover {
    background: var(--surface-hi);
    border-color: var(--ink);
    color: var(--ink);
    box-shadow: none;
}

.btn--gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #221a08;
}
.btn--gold:hover {
    background: #e6b25c;
    border-color: #e6b25c;
    color: #221a08;
    box-shadow: 0 10px 24px rgba(216, 162, 74, 0.35);
}

.btn--sm {
    min-height: 40px;
    padding: var(--s1) var(--s4);
    font-size: 0.9rem;
    border-width: 2px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3);
    margin-bottom: var(--s3);
}

/* The nav aside holds the phone number and the donate button. On a phone they
   stack full-width inside the open drawer; side by side from the nav
   breakpoint. The .btn here must win over the generic .site-nav__aside a rule
   above it, hence the repeated colour. */
.site-nav__aside {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s3);
}
.site-nav__aside .btn { color: #fff; border-bottom: 2px solid var(--red); }
.site-nav__aside .btn:hover { color: #fff; border-bottom-color: var(--red-hot); }

/* Horizontal padding is set per tier rather than left to .btn--sm's 1.5rem.
   THE NAV ROW AT 62rem IS MEASURED, NOT ROOMY — six items plus a phone number
   and this button only just fit, and .site-header__inner wraps, so an extra
   48px of button does not overflow visibly, it drops the nav onto a second
   line and reads as a broken header. 1rem here, the full 1.5rem at 80rem where
   the nav type also goes back to full size. If the row grows again, this is one
   of the things to re-measure. */
@media (min-width: 62rem) {
    .site-nav__aside .btn { padding: var(--s1) var(--s3); }
}
@media (min-width: 80rem) {
    .site-nav__aside .btn { padding: var(--s1) var(--s4); }
}

@media (max-width: 61.9375rem) {
    /* Inside the drawer only. This is the one place a max-width query is
       correct rather than an undo: the drawer is the NARROW state, so the rule
       belongs to it, and writing it as min-width would mean styling the wide
       layout and then unstyling it below the breakpoint. */
    .site-nav__aside { padding-top: var(--s3); }
    .site-nav__aside .btn { width: 100%; }
}

/* ---------------------------------------------------------------------------
   Hero

   The gym photo sits behind a heavy scrim so the type stays legible. The image
   is a background rather than an <img> because it is decoration — the headline
   carries the meaning, and a screen reader should not have to hear the room.
   --------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding-block: var(--s8) var(--s7);
    background-color: var(--deep);
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(19,23,15,0.82) 0%, rgba(19,23,15,0.90) 55%, var(--deep) 100%),
        linear-gradient(90deg, rgba(19,23,15,0.95) 0%, rgba(19,23,15,0.35) 60%, rgba(19,23,15,0.75) 100%),
        url('../img/boxing-ring.jpg');
    background-size: cover, cover, cover;
    background-position: center, center, center 35%;
    z-index: -2;
    animation: hero-drift 26s var(--ease) infinite alternate;
}
@keyframes hero-drift {
    from { transform: scale(1.06) translate3d(0, 0, 0); }
    to   { transform: scale(1.14) translate3d(-1.5%, -1.5%, 0); }
}

.hero::before { opacity: 0.07; }

.hero__inner {
    position: relative;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.hero__badge {
    width: clamp(6.5rem, 24vw, 10rem);
    margin-bottom: var(--s4);
    filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.7));
    animation: badge-float 5s ease-in-out infinite alternate;
    will-change: transform;
}
/* A proper sway rather than a nudge — the badge rocks about 10 degrees through
   its arc and lifts most of its own depth, with a slight scale so it reads as
   swinging towards you at the top of the travel. Three stops rather than two so
   the bob and the rotation peak at different moments; with two it just slides. */
@keyframes badge-float {
    0%   { transform: translateY(10px)  rotate(-5deg) scale(0.97); }
    50%  { transform: translateY(-14px) rotate(0.5deg) scale(1.03); }
    100% { transform: translateY(-28px) rotate(5deg)  scale(0.97); }
}

.hero h1 {
    margin-bottom: var(--s4);
    line-height: 0.88;
    text-shadow: 0 6px 34px rgba(0, 0, 0, 0.55);
}
.hero h1 span { display: block; }
.hero h1 .is-red { color: var(--red-hot); }

.hero__tagline {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--s4);
}

.hero__lede {
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    line-height: 1.55;
    color: #d7d9cd;
    max-width: 34rem;
    margin-bottom: var(--s5);
}

/* Staggered entrance. Scoped to .js so a no-JS page paints them in place. */
.js .hero__badge,
.js .hero__tagline,
.js .hero h1,
.js .hero__lede,
.js .hero .btn-row,
.js .hero__meta {
    animation-name: rise-in;
    animation-duration: 0.85s;
    animation-timing-function: var(--ease);
    animation-fill-mode: both;
}
.js .hero__badge   { animation-name: badge-in; animation-delay: 0.05s; }
.js .hero__tagline { animation-delay: 0.20s; }
.js .hero h1       { animation-delay: 0.30s; }
.js .hero__lede    { animation-delay: 0.45s; }
.js .hero .btn-row { animation-delay: 0.58s; }
.js .hero__meta    { animation-delay: 0.70s; }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}
@keyframes badge-in {
    from { opacity: 0; transform: scale(0.6) rotate(-24deg); }
    60%  { opacity: 1; transform: scale(1.06) rotate(4deg); }
    to   { opacity: 1; transform: none; }
}

/* Once the entrance has finished the float takes over. Two animations on one
   element would fight, so the float is delayed past the entrance instead. */
.js .hero__badge {
    animation-name: badge-in, badge-float;
    animation-duration: 1s, 5s;
    animation-delay: 0.05s, 1.05s;
    animation-iteration-count: 1, infinite;
    animation-direction: normal, alternate;
    animation-timing-function: var(--ease), ease-in-out;
    animation-fill-mode: both, none;
}

.hero__meta {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3) var(--s5);
    padding-top: var(--s5);
    margin-top: var(--s5);
    border-top: 1px solid var(--rule);
    font-size: 0.9rem;
    color: var(--bone-dim);
}
.hero__meta strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--bone);
    text-transform: uppercase;
}

@media (min-width: 62rem) {
    .hero { padding-block: calc(var(--s8) + 2rem) var(--s8); }
    .hero__inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s7); align-items: center; }
    .hero__badge { width: 100%; max-width: 20rem; margin: 0 auto; grid-column: 2; grid-row: 1; }
    .hero__copy  { grid-column: 1; grid-row: 1; }
}

/* ---------------------------------------------------------------------------
   Marquee — the class names on a loop

   aria-hidden and duplicated: the visible strip is decoration, and the real
   list of classes is a proper <ul> on /classes. A screen reader hearing the
   same seven names scroll past forever is not getting information.
   --------------------------------------------------------------------------- */

.marquee {
    overflow: hidden;
    padding-block: var(--s3);
    background: var(--red);
    border-block: 2px solid rgba(0, 0, 0, 0.3);
    user-select: none;
}
.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
    display: inline-flex;
    align-items: center;
    gap: var(--s4);
    padding-inline: var(--s4);
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}
.marquee__item::after {
    content: '';
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--gold);
    flex: none;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    /* Not merely slowed — a marquee that still creeps is worse than one that
       stops, because it never settles for anyone reading it. */
    .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ---------------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------------- */

/* Row gap is larger than column gap on purpose. Side by side, cards are read as
   a row and 1.5rem is plenty; stacked on a phone — or wrapped onto a second row
   — that same 1.5rem reads as cramped, because there is nothing but vertical
   space separating one card's last line from the next card's heading.

   The block margin is what was missing: a grid has no bottom margin of its own,
   so a .btn-row following one sat hard against the cards. First/last resets keep
   a grid that opens or closes a band from double-spacing against the band's own
   padding. */
.grid {
    display: grid;
    gap: var(--s5) var(--s4);
    grid-template-columns: 1fr;
    margin-block: var(--s5);
}
.grid:first-child { margin-top: 0; }
.grid:last-child  { margin-bottom: 0; }
/* ORDER MATTERS. These have equal specificity, so when two queries both match
   the later one wins — the wide rule must come last or a desktop viewport
   silently gets the tablet column count. Ascending only. */
@media (min-width: 40em) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 48em) {
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 62em) {
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--s5) var(--s4) var(--s4);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
                background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* Red bar that wipes across the top edge on hover. */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}
.card:hover,
.card:focus-within {
    transform: translateY(-6px);
    border-color: var(--rule-strong);
    background: var(--surface-hi);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.card:hover::before,
.card:focus-within::before { transform: scaleX(1); }

.card h3 { margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }

.card__tag {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: var(--s3);
    padding: 0.2rem 0.6rem;
    background: rgba(148, 53, 47, 0.22);
    border: 1px solid rgba(148, 53, 47, 0.5);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red-hot);
}
.band--bone .card__tag { color: #7e2a25; background: rgba(148, 53, 47, 0.1); }

.card__when {
    margin-top: auto;
    padding-top: var(--s3);
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--gold);
}
.card__when span { white-space: nowrap; }
.card__when span + span::before { content: ' · '; color: var(--ink-soft); }

/* A number that leads a card — the big red index on a step or a stat. */
.card__num {
    font-family: var(--font-display);
    font-size: 2.6rem;
    line-height: 0.8;
    color: var(--red);
    margin-bottom: var(--s3);
}

/* Platform class: the quicklinks list. */
.quicklinks {
    list-style: none;
    margin: var(--s6) auto;
    padding-inline: var(--gutter);
    max-width: var(--max);
    display: grid;
    gap: var(--s3);
}
.quicklinks__link {
    display: block;
    min-height: 44px;
    padding: var(--s4);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.quicklinks__link:hover { transform: translateY(-4px); border-color: var(--red); color: var(--ink); }
.quicklinks__title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.25rem;
    text-transform: uppercase;
    margin-bottom: var(--s1);
}
@media (min-width: 40em) {
    .quicklinks { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
}

/* ---------------------------------------------------------------------------
   Timetable

   Cards on a phone, a real table from 48em. The markup is ONE <table> either
   way — a schedule is tabular data and rebuilding it as <div>s would strip the
   row/column relationship a screen reader uses to say "Monday, 3.30pm".
   --------------------------------------------------------------------------- */

.timetable { width: 100%; border-collapse: collapse; margin-bottom: var(--s4); }
.timetable caption {
    text-align: left;
    padding-bottom: var(--s3);
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.timetable thead { display: none; }

.timetable tbody tr {
    display: block;
    margin-bottom: var(--s4);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
    background: var(--surface);
    padding: var(--s3) var(--s4);
}

.timetable th[scope="row"] {
    display: block;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--gold);
    padding-bottom: var(--s2);
    margin-bottom: var(--s2);
    border-bottom: 1px solid var(--rule);
}

.timetable td { display: block; padding: 0; }

.session {
    display: flex;
    align-items: baseline;
    gap: var(--s3);
    padding-block: var(--s2);
}
.session + .session { border-top: 1px dashed var(--rule); }
.session__time {
    flex: none;
    width: 4.6rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    /* --ink, not --bone. They are the same colour on every dark band, but the
       role token follows a light band and the raw brand token does not — which
       is the whole reason this rule used to need a .band--bone twin. */
    color: var(--ink);
    letter-spacing: 0.02em;
}
.session__name { font-weight: 600; }
.session__note {
    display: block;
    font-size: 0.85rem;
    color: var(--ink-soft);
    font-weight: 400;
}
@media (min-width: 48em) {
    .timetable thead { display: table-header-group; }
    .timetable thead th {
        text-align: left;
        font-family: var(--font-body);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--ink-soft);
        padding: 0 var(--s4) var(--s3);
        border-bottom: 2px solid var(--rule);
    }
    .timetable tbody tr {
        display: table-row;
        border: 0;
        border-bottom: 1px solid var(--rule);
        border-radius: 0;
        background: none;
        padding: 0;
        transition: background 0.25s var(--ease);
    }
    .timetable tbody tr:hover { background: var(--surface-soft); }
    .timetable th[scope="row"] {
        display: table-cell;
        width: 9rem;
        vertical-align: top;
        padding: var(--s4);
        border-bottom: 0;
        margin: 0;
    }
    .timetable td { display: table-cell; padding: var(--s4) var(--s4) var(--s4) 0; vertical-align: top; }
    .session { padding-block: var(--s1); }
    .session + .session { border-top: 0; }
}

/* ---------------------------------------------------------------------------
   Stats — counted up by assets/js/reveal.js
   --------------------------------------------------------------------------- */

.stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--s5);
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
}
@media (min-width: 48em) { .stats { grid-template-columns: repeat(4, 1fr); text-align: left; } }

.stats__n {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 8vw, 4rem);
    line-height: 0.85;
    color: var(--bone);
    margin-bottom: var(--s2);
}
.stats__n em { font-style: normal; color: var(--red-hot); }
.stats__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------
   Split — image beside prose
   --------------------------------------------------------------------------- */

.split { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 56em) {
    .split { grid-template-columns: 1fr 1fr; gap: var(--s7); }
    .split--wide-left { grid-template-columns: 1.25fr 1fr; }
}
.split__media img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--rule);
}
.split__media {
    position: relative;
    /* Offset red frame behind the photo. */
}
.split__media::after {
    content: '';
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 2px solid var(--red);
    border-radius: var(--radius);
    z-index: -1;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Memorial — the quietest, heaviest section on the site
   --------------------------------------------------------------------------- */

.memorial { text-align: center; }
.memorial__inner { max-width: 40rem; margin-inline: auto; }
.memorial .eyebrow { justify-content: center; color: #d9b48a; }
.memorial h2 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    color: var(--bone);
    margin-bottom: var(--s2);
}
.memorial__name {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 9vw, 4.2rem);
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--s3);
}
.memorial__role {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #c9a58c;
    margin-bottom: var(--s5);
}
.memorial p { color: #e0d6cd; }
.memorial__rule {
    width: 4rem;
    height: 3px;
    margin: var(--s5) auto;
    border: 0;
    background: var(--gold);
    opacity: 0.7;
}

/* ---------------------------------------------------------------------------
   Club event — the dated announcement on the home page (club_event())

   Rides on .band--concrete and adds one thing: a red-and-green taped edge top
   and bottom, so a seasonal notice reads as a notice rather than as one more
   section of the standing site. Built from gradients — no image, no request.
   --------------------------------------------------------------------------- */

.band--event::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(135deg, var(--red) 0 14px, var(--forest-lt) 14px 28px) top / 100% 5px no-repeat,
        repeating-linear-gradient(135deg, var(--red) 0 14px, var(--forest-lt) 14px 28px) bottom / 100% 5px no-repeat;
    pointer-events: none;
    z-index: -1;
}

.event {
    display: grid;
    gap: var(--s5);
    align-items: start;
}
@media (min-width: 48em) {
    .event { grid-template-columns: auto 1fr; gap: var(--s7); align-items: center; }
}

/* A calendar tile: weekday on a red header, the date huge, the time in gold. */
.event__tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-self: start;
    min-width: 9.5rem;
    margin: 0;
    padding-bottom: var(--s3);
    background: var(--surface-hi);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    text-align: center;
    text-transform: uppercase;
}
.event__dow {
    align-self: stretch;
    padding: var(--s2) var(--s3);
    background: var(--red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
}
.event__day {
    font-family: var(--font-display);
    font-size: 4.5rem;
    line-height: 1;
    padding-top: var(--s2);
    color: var(--bone);
}
.event__month {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--ink-soft);
}
.event__time {
    margin-top: var(--s2);
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--gold);
}

.event__body h2 { margin-bottom: var(--s3); }
.event__body .lede { color: var(--ink); }

.event__list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--s4);
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2);
}
.event__list li {
    padding: 0.35rem 0.9rem;
    background: rgba(63, 79, 51, 0.45);
    border: 1px solid rgba(156, 207, 154, 0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event__note {
    font-weight: 600;
    color: var(--gold);
}

.event__thanks {
    max-width: 42rem;
    padding-left: var(--s3);
    border-left: 3px solid var(--red);
}
.event__whanau {
    margin-bottom: 0;
    font-style: italic;
    color: var(--gold);
}

/* ---------------------------------------------------------------------------
   Callout / donation panel
   --------------------------------------------------------------------------- */

.callout {
    padding: var(--s5);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    background: rgba(216, 162, 74, 0.08);
}
.callout h3 { margin-bottom: var(--s3); }
.callout p:last-child, .callout dl:last-child { margin-bottom: 0; }

.bank {
    display: grid;
    gap: var(--s1) var(--s4);
    margin: 0;
    font-size: 1rem;
}
@media (min-width: 34em) { .bank { grid-template-columns: auto 1fr; } }
.bank dt {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-top: 0.35em;
}
.bank dd {
    margin: 0 0 var(--s2);
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.03em;
    color: var(--ink);
    word-break: break-word;
}

/* ---------------------------------------------------------------------------
   Contact cards
   --------------------------------------------------------------------------- */

.people { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
@media (min-width: 34em) { .people { grid-template-columns: repeat(2, 1fr); } }

.people a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 72px;
    padding: var(--s3) var(--s4);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    color: var(--ink);
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
                transform 0.25s var(--ease);
}
.people a:hover {
    border-color: var(--accent);
    background: var(--surface-hi);
    transform: translateY(-3px);
    color: var(--ink);
}
.people__name {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}
.people__num { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.02em; }

/* Funders on /support (funders()). The logo sits on a white tile because the
   funder's mark is black on transparent and is never recoloured; the tile
   keeps it crisp on the bone band and would keep it legible on a dark one. */
.funder + .funder { margin-top: var(--s7); }
.funder__media { display: grid; gap: var(--s4); justify-items: start; }
.funder__logo {
    display: block;
    width: 100%;
    max-width: 18rem;
    padding: var(--s4) var(--s5);
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.funder__logo:hover { border-color: var(--accent); transform: translateY(-3px); }
.funder__logo img { width: 100%; }
.funder__proof { margin: 0; }
.funder__proof img {
    width: 100%;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(28, 32, 22, 0.18);
}
.funder__proof figcaption { margin-top: var(--s2); }

/* /faq — every answer visible, no accordion, so a crawler, an assistant and a
   reader with scripts off all get the same text. Each question is a ruled
   block; the follow-on link is quiet and sits under its answer. */
.faq__item { padding-block: var(--s4); border-top: 1px solid var(--rule); }
.faq h2 + .faq__item { border-top: 0; padding-top: 0; }
.faq__item h3 {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 var(--s2);
}
.faq__item p:last-child { margin-bottom: 0; }
.faq__more { font-size: 0.9rem; font-weight: 600; }
.faq__more a::after { content: ' →'; }

/* The summer-break notice on the home page (season_break()). One booking
   number, so the two-column .people grid collapses to one, capped so the tile
   does not stretch across a desktop half-column. */
.notice p:last-child { margin-bottom: 0; }
.notice__people { grid-template-columns: 1fr; max-width: 22rem; margin-bottom: 0; }
@media (min-width: 34em) { .notice__people { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   Coaches

   Every colour here is a role token, never a literal, so the alternating
   .band--bone section on /coaches inverts the whole block — frame, monogram,
   rule, tags — without a single variant class. See the note on .band--bone.
   --------------------------------------------------------------------------- */

.coach { display: grid; gap: var(--s5); align-items: start; }

@media (min-width: 56em) {
    .coach { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: var(--s7); }

    /* Alternating sides. `order` works on grid items, so the flip needs the
       column widths swapped as well — otherwise the prose lands in the narrow
       column and the portrait stretches across the wide one. */
    .coach--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); }
    .coach--flip .coach__media { order: 2; }
    .coach--flip .coach__body  { order: 1; }

    /* The portrait holds position while a long bio scrolls past it. `top`
       clears the sticky header at its shrunken height. */
    .coach__media { position: sticky; top: 6.5rem; }
}

.coach__media { position: relative; }
.coach__media img {
    display: block;
    width: 100%;
    /* Fixed ratio and object-fit, because these are supplied photos of three
       different shapes. Without it the three sections sit at three different
       heights and the run reads as an accident. */
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--rule);
}

/* The same offset red frame the .split photos carry. */
.coach__media::after {
    content: '';
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    z-index: -1;
    pointer-events: none;
}

/* Shown only while a coach's portrait has not been uploaded — coaches.php
   tests the file with is_file() first. A drawn initial rather than a stock
   photo of somebody else's gym. */
.coach__monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--font-display);
    font-size: clamp(4rem, 14vw, 7rem);
    line-height: 1;
    color: var(--ink-soft);
    opacity: 0.55;
}

.coach__name { margin-bottom: var(--s1); }

.coach__tag {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--s4);
}

/* The credentials sit under a rule rather than a heading — they are a footnote
   to the bio above them, not a second section. */
.coach__creds {
    margin-top: var(--s5);
    padding-top: var(--s4);
    border-top: 1px solid var(--rule);
}
.coach__creds li { margin-bottom: var(--s2); font-size: 0.95rem; color: var(--ink-soft); }

.coach__contact { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0; }
.coach__contact a { font-weight: 600; }

/* The home page teaser reuses .card wholesale and adds only the portrait, so
   the hover, the top rule and the .band--bone inversion all come for free. */
.card__portrait {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--rule);
    margin-bottom: var(--s3);
}
.card__portrait--mono {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-soft);
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--ink-soft);
    opacity: 0.55;
}

/* ---------------------------------------------------------------------------
   Page head
   --------------------------------------------------------------------------- */

.page-head {
    position: relative;
    padding-block: var(--s7) var(--s6);
    background-color: var(--deep-2);
    background-image:
        repeating-linear-gradient(135deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 11px),
        radial-gradient(ellipse 80% 100% at 15% 0%, rgba(63,79,51,0.5), transparent 70%),
        linear-gradient(180deg, #1c2317, var(--deep));
    border-bottom: 1px solid var(--rule);
}
.page-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-size: 160px 160px;
    opacity: 0.05;
    mix-blend-mode: overlay;
    pointer-events: none;
}
.page-head__inner { position: relative; }
.page-head h1 { margin-bottom: var(--s3); }
.page-head__lede {
    max-width: 40rem;
    color: var(--bone-dim);
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Lists and content blocks
   --------------------------------------------------------------------------- */

.detail-list { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: var(--s4); }
.detail-list dt {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: var(--s4);
}
.detail-list dd { margin: 0; font-size: 1.05rem; }

/* A ticked list — the check is drawn, so no icon font and no image request. */
.ticks { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.ticks li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: var(--s3);
}
.ticks li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.45em;
    width: 0.7rem; height: 0.38rem;
    border-left: 3px solid var(--red);
    border-bottom: 3px solid var(--red);
    transform: rotate(-45deg);
}

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */

/* HONEYPOT — LOAD-BEARING. DO NOT DELETE THIS RULE.
 *
 * spam_trap_fields() in includes/security.php emits a decoy field wrapped in
 * .hp. Bots fill it in; people never see it. If this rule goes missing the
 * field becomes visible, and a visitor who dutifully completes every field is
 * treated as a bot — spam_trap_reason() returns 'honeypot', the page reports
 * success to them, and the enquiry is discarded without ever being sent. The
 * failure is silent on both sides, which is what makes it dangerous.
 *
 * Off-screen rather than display:none, which some bots detect and skip. Must
 * be a class, never an inline style — the CSP forbids those. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

label {
    display: block;
    margin-bottom: var(--s1);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: var(--s2) var(--s3);
    margin-bottom: var(--s4);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.25);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;                     /* ≥16px so iOS does not zoom on focus */
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.band--bone input[type="text"],
.band--bone input[type="email"],
.band--bone input[type="tel"],
.band--bone select,
.band--bone textarea { background: #fff; }

input:focus, textarea:focus, select:focus {
    border-color: var(--red);
    background: rgba(0, 0, 0, 0.35);
}
.band--bone input:focus,
.band--bone textarea:focus,
.band--bone select:focus { background: #fff; }

textarea { min-height: 10rem; resize: vertical; }

.hint, .privacy { font-size: 0.875rem; color: var(--ink-soft); text-transform: none; letter-spacing: 0; font-weight: 400; }

.notice {
    padding: var(--s4);
    margin-bottom: var(--s4);
    border-left: 4px solid;
    border-radius: var(--radius);
}
.notice--ok    { border-color: var(--ok);    background: var(--ok-bg);    color: var(--ok); }
.notice--error { border-color: var(--error); background: var(--error-bg); color: var(--error); }
.notice ul { margin: 0; padding-left: var(--s4); }
.notice p:last-child { margin-bottom: 0; }

/* A link inside a notice takes the notice's own colour rather than --accent.
   The success message ends with a phone number, and rendering that in brand red
   inside a green panel reads as a warning sitting inside a confirmation. The
   underline is what marks it as a link, so nothing is lost by dropping the
   colour change — and it keeps whatever contrast the notice already passes. */
.notice a { color: inherit; text-decoration: underline; }
.notice a:hover { color: inherit; text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------------------
   Scroll reveal

   Scoped to .js so that with JavaScript off nothing is ever hidden — the page
   is fully readable, which is both an accessibility rule and the reason
   crawlers and assistants can read it. reveal.js adds .is-in as each element
   crosses the viewport.
   --------------------------------------------------------------------------- */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Children stagger in sequence. */
.js [data-reveal-group] > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js [data-reveal-group].is-in > * { opacity: 1; transform: none; }
.js [data-reveal-group].is-in > :nth-child(1) { transition-delay: 0.00s; }
.js [data-reveal-group].is-in > :nth-child(2) { transition-delay: 0.08s; }
.js [data-reveal-group].is-in > :nth-child(3) { transition-delay: 0.16s; }
.js [data-reveal-group].is-in > :nth-child(4) { transition-delay: 0.24s; }
.js [data-reveal-group].is-in > :nth-child(5) { transition-delay: 0.32s; }
.js [data-reveal-group].is-in > :nth-child(6) { transition-delay: 0.40s; }
.js [data-reveal-group].is-in > :nth-child(7) { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal],
    .js [data-reveal-group] > * { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */

/* ── FOOTER VERTICAL RHYTHM ──────────────────────────────────────────────────
   Top and bottom are NOT the same number, and that is what makes them look
   even. The staff link at the very bottom is a 44px touch target wrapping 0.7rem
   text, so roughly 0.9rem of that target is already blank space below the words.
   Matching --s7 (4.5rem) top against --s6 (3rem) bottom lands the visible gap at
   about 3.9rem against 4.5rem — close enough to read as balanced, where an equal
   --s7 both ends would leave the bottom looking half again too deep.

   Measure the SPACE YOU CAN SEE, not the padding value. */
.site-footer {
    margin-top: 0;
    padding-block: var(--s7) var(--s6);
    background-color: #0e1109;
    background-image:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 6px),
        linear-gradient(180deg, #141810, #0b0d07);
    border-top: 2px solid var(--red);
    color: var(--bone-dim);
}
.site-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grain);
    background-size: 160px 160px;
    opacity: 0.045;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: -1;
}

.site-footer__inner { display: grid; gap: var(--s5); position: relative; }

@media (min-width: 40em) {
    .site-footer__inner { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
}

.site-footer .eyebrow { color: var(--gold); margin-bottom: var(--s3); }
.site-footer a { color: var(--bone); text-decoration: none; }
.site-footer a:hover { color: var(--red-hot); text-decoration: underline; }
.site-footer__block address { font-style: normal; }
.site-footer__block p { margin-bottom: var(--s2); }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list a, .site-footer__social a { display: inline-block; padding-block: var(--s1); }
.site-footer__social a + a { margin-left: var(--s3); }

/* The charity registration, stated where a donor looks for it. */
.site-footer__charity {
    max-width: var(--max);
    margin: var(--s5) auto 0;
    padding: var(--s4) var(--gutter) 0;
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
}
.site-footer__charity strong { color: var(--bone); font-family: var(--font-display); font-weight: 400; letter-spacing: 0.04em; }

/* The closing three, in descending loudness: what the business owes the public,
   who built it, and the staff door.

   RANK THEM. If a redesign leaves all three the same size and colour, the staff
   link reads as a public feature — which is what this structure exists to
   prevent. Here: 0.85rem bone-dim, then 0.8rem dimmer, then 0.7rem dimmest. */

/* Padding-top is 0, not --s3. The charity line above already carries the
   border and the section break; adding padding here as well as the margin gave
   this line a 2rem gap above it against the credit line's 1rem below, which is
   the uneven step. One --s3 margin each, and the three closing lines sit on one
   rhythm. */
.site-footer__legal {
    max-width: var(--max);
    margin: var(--s3) auto 0;
    padding: 0 var(--gutter);
    font-size: 0.85rem;
    color: var(--bone-dim);
}

.site-footer__credit {
    max-width: var(--max);
    margin: var(--s3) auto 0;
    padding-inline: var(--gutter);
    font-size: 0.8rem;
    color: rgba(168, 175, 154, 0.75);
}

/* Quietest thing on the page: smallest type, softest ink.

   ── WHY ITS MARGIN IS --s1 AND NOT --s3 LIKE THE LINE ABOVE ──────────────────

   The 44px target is taller than the 11px text inside it, and the link centres
   that text, so about 16px of the target already reads as blank space above the
   word. Giving this line the same --s3 margin as the credit makes the gap
   MEASURE equal and LOOK half as big again. --s1 plus that space lands on the
   same optical spacing as the other two.

   The target comes from min-height and centring, not padding-block. Padding
   would need a negative margin to reclaim the layout space, which would float
   this link's invisible hit area over the credit link above it and quietly
   steal its clicks. Do not "tidy" this back into padding. */
.site-footer__staff {
    max-width: var(--max);
    margin: var(--s1) auto 0;
    padding-inline: var(--gutter);
    font-size: 0.7rem;
}
.site-footer__staff a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: rgba(168, 175, 154, 0.5);
    text-decoration: none;
}
.site-footer__staff a:hover { color: var(--bone-dim); text-decoration: underline; }

/* ---------------------------------------------------------------------------
   PushPress embed

   Everything here reads the role tokens rather than the brand colours, so a
   .band--bone section flips the panel to light along with everything else in
   it and this file needs no second variant. See the tokens block at the top.

   The panel is what a visitor sees until they choose to load the calendar; the
   frame replaces it in place. See includes/pushpress.php for why it works that
   way round.
   --------------------------------------------------------------------------- */

.pp-embed {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.pp-embed__panel {
    padding: var(--s5) var(--s4);
    text-align: center;
}

.pp-embed__heading { margin: 0 0 var(--s2); }

.pp-embed__body {
    max-width: 46ch;
    margin: 0 auto var(--s4);
    color: var(--ink-soft);
}

.pp-embed__actions { margin: 0; }

/* The disclosure. Quiet, but never below the 0.8rem the rest of the site
   treats as the floor for something a person is expected to read — a notice
   set small enough to skip is a notice that was not really given. */
.pp-embed__note {
    max-width: 52ch;
    /* Centred explicitly, not by inheritance from the panel: classes.php also
       uses this class on its own for the "ring us instead" line, which sits
       outside the panel and would otherwise be the only left-aligned one. */
    margin: var(--s4) auto 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

/* The frame carries its own height attribute, set from the server, so it has a
   size before this stylesheet loads and the page does not jump when it does.
   width is driven from here because 100% of the panel is not knowable in PHP. */
.pp-embed__frame {
    display: block;
    width: 100%;
    border: 0;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

/* Focus lands here after the button is pressed — the frame is given
   tabindex="-1" by the script so focus can move into what just appeared. */
.pp-embed__frame:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (min-width: 48em) {
    .pp-embed__panel { padding: var(--s6) var(--s5); }
}

/* ---------------------------------------------------------------------------
   Print — someone will print the timetable and pin it to a fridge
   --------------------------------------------------------------------------- */

@media print {
    .site-header, .site-footer, .marquee, .hero__bg, .btn-row, .skip-link { display: none !important; }
    /* The fridge copy wants the timetable, not an empty box where a booking
       widget would have been. */
    .pp-embed { display: none !important; }
    body { background: #fff; color: #000; font-size: 12pt; }
    .band, .page-head, .hero { background: none !important; padding-block: 1rem; }
    .band::before, .page-head::before, .hero::before { display: none; }
    .timetable thead { display: table-header-group; }
    .timetable tbody tr { display: table-row; border-bottom: 1px solid #999; background: none; }
    .timetable th[scope="row"] { display: table-cell; color: #000; }
    .timetable td { display: table-cell; }
    a { color: #000; }
}
