/* ==========================================================================
   Salmon Arm Skating Club — styles.css
   Plain CSS. No build step. Section order:
     1. Tokens
     2. Reset & base
     3. Typography
     4. Buttons
     5. Layout primitives
     6. Motion / reveal
     7. Header & mobile nav
     8. Hero
     9. Footer
   ========================================================================== */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  /* Brand — from client brand board */
  --c-black:        #060606;
  --c-black-hover:  #333333;
  --c-sky:          #33C5E0;
  --c-sky-hover:    #2AAECC;
  /* Darkened sky for link/eyebrow text. The spec's #1A8FA6 measures 3.80:1 on
     white and 3.51:1 on ice — below the 4.5:1 floor in spec §8. #15788A is the
     nearest darkening that clears it on both: 5.14:1 white, 4.74:1 ice. */
  --c-sky-text:     #15788A;
  --c-yellow:       #F7C70E;
  --c-yellow-hover: #E0B30A;
  --c-white:        #FFFFFF;
  --c-ice:          #F0F7F9;
  --c-grey-100:     #E1E6E5;
  --c-grey-500:     #8E8E8F;
  --c-grey-700:     #6B6A6B;

  /* Semantic */
  --bg:             var(--c-white);
  --bg-alt:         var(--c-ice);
  --text:           var(--c-grey-700);
  --heading:        var(--c-black);
  --border:         var(--c-grey-100);
  --link:           var(--c-sky-text);
  --focus:          var(--c-yellow);

  /* Type */
  --font-heading:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:      'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --fs-h4:   clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h3:   clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --fs-h2:   clamp(2rem, 1.5rem + 2vw, 3rem);
  --fs-h1:   clamp(2.5rem, 1.75rem + 3.5vw, 4.25rem);
  --lh-tight: 1.15;
  --lh-body:  1.6;

  /* Space (8pt) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-6: 1.5rem;  --s-8: 2rem;   --s-12: 3rem;   --s-16: 4rem;
  --s-24: 6rem;
  --section-y: clamp(3rem, 2rem + 5vw, 7rem);

  /* Layout */
  --container: 72rem;
  --container-narrow: 48rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 24px rgba(6, 6, 6, 0.08);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 300ms;
  --dur-slow: 600ms;

  /* Chrome */
  --header-h: 5.5rem;
  --header-h-scrolled: 4.75rem;   /* .site-header.is-scrolled */
  --subnav-h: 4.5rem;
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

table {
  border-collapse: collapse;
  width: 100%;
}

/* Anchor targets must clear the sticky header — and the sticky sub-nav too on
   pages that have one. By the time anything is scrolled to, the header has
   already shrunk to its --header-h-scrolled height. */
main [id] { scroll-margin-top: calc(var(--header-h-scrolled) + var(--s-6)); }

.has-subnav main [id] {
  scroll-margin-top: calc(var(--header-h-scrolled) + var(--subnav-h) + var(--s-6));
}

/* Focus ring — non-negotiable, applies to everything focusable */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--s-4);
  z-index: 200;
  transform: translateY(-120%);
  padding: var(--s-3) var(--s-6);
  background: var(--c-black);
  color: var(--c-white);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--heading);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--heading);
  line-height: 1.3;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { max-width: 65ch; }

p + p { margin-top: var(--s-4); }

/* Default flow spacing after a heading. Component classes override it. */
h1 + *, h2 + *, h3 + *, h4 + * { margin-top: var(--s-4); }

ul + p, ol + p { margin-top: var(--s-4); }

a { color: var(--link); }

.prose a,
p a,
li a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}

.prose a:hover,
p a:hover,
li a:hover { color: var(--c-black); }

strong { font-weight: 700; color: var(--heading); }

.eyebrow {
  display: block;
  margin-bottom: var(--s-3);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-sky-text);
}

.lede {
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--text);
}

.block { display: block; }

/* ==========================================================================
   4. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0.875rem 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

/* Black text on sky, not white: white on #33C5E0 is 1.9:1. Black is 12:1. */
.btn--primary {
  background: var(--c-sky);
  color: var(--c-black);
}
.btn--primary:hover { background: var(--c-sky-hover); color: var(--c-black); }

.btn--secondary {
  background: var(--c-black);
  color: var(--c-white);
}
.btn--secondary:hover { background: var(--c-black-hover); color: var(--c-white); }

.btn--accent {
  background: var(--c-yellow);
  color: var(--c-black);
}
.btn--accent:hover { background: var(--c-yellow-hover); color: var(--c-black); }

.btn--outline {
  background: transparent;
  border-color: var(--c-black);
  color: var(--c-black);
}
.btn--outline:hover { background: var(--c-black); color: var(--c-white); }

/* Leading icons say what kind of action it is (download, mail, send, support);
   trailing icons say where it goes (onward, or out to another site). */
.btn__icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-top: var(--s-8);
}

/* ==========================================================================
   5. Layout primitives
   ========================================================================== */

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

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }

.section--alt { background: var(--bg-alt); }

.section--dark {
  background: var(--c-black);
  color: var(--c-grey-100);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--c-white); }

/* On black, the darkened link blue drops to 3.9:1 — use full sky (9.9:1). */
.section--dark .eyebrow { color: var(--c-sky); }

.section__head { margin-bottom: var(--s-12); }

.section__head .lede { margin-top: var(--s-4); }

.grid {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.split {
  display: grid;
  gap: var(--s-8);
  align-items: center;
}

.card {
  padding: var(--s-6);
  background: var(--c-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.notice {
  padding: var(--s-4) var(--s-6);
  background: var(--c-ice);
  border-left: 4px solid var(--c-yellow);
  border-radius: var(--radius-sm);
}

.notice > p { max-width: none; }

@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s-12); }
  .split--img-right .split__media { order: 2; }
}

/* ==========================================================================
   6. Motion / reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-group > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.reveal-group.is-visible > * {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   7. Header & mobile nav
   ========================================================================== */

/* --- Topbar ---
   Sits above the sticky header and scrolls away with the page, so the sticky
   offsets below (--header-h-scrolled, .subnav, scroll-margin) are unaffected. */
.topbar {
  background: var(--c-black);
  color: var(--c-grey-100);
  font-size: var(--fs-xs);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 44px;
}

.topbar ul {
  display: flex;
  align-items: center;
  list-style: none;
  min-width: 0;
}

.topbar__contact { gap: var(--s-6); min-width: 0; }

.topbar__social { gap: var(--s-1); flex-shrink: 0; }

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  color: var(--c-grey-100);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.topbar a:hover { color: var(--c-sky); }

.topbar svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.topbar__social a {
  justify-content: center;
  width: 44px;
}

.topbar__social svg { width: 17px; height: 17px; }

.topbar__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Below 30rem the email would crowd the icons — keep the mail icon as the
   target and move the address to the accessible name only. */
@media (max-width: 29.99em) {
  .topbar__label {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .topbar__contact a { width: 44px; justify-content: center; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled { box-shadow: 0 2px 16px rgba(6, 6, 6, 0.08); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  min-height: var(--header-h);
  padding-block: var(--s-3);
  transition: min-height var(--dur) var(--ease);
}

.site-header.is-scrolled .site-header__inner { min-height: 4.75rem; }

.site-header__logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  border-radius: var(--radius-sm);
}

.site-header__logo img {
  height: 48px;
  width: auto;
  transition: height var(--dur) var(--ease);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  min-width: 44px;
  padding: var(--s-2) var(--s-3);
  background: transparent;
  border: 2px solid var(--c-black);
  border-radius: var(--radius-sm);
  color: var(--c-black);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  list-style: none;
}

.primary-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.primary-nav__link:hover { border-bottom-color: var(--c-grey-100); }

.primary-nav__link[aria-current="page"] { border-bottom-color: var(--c-sky); }

.site-header__cta { display: none; }

/* --- Mobile drawer (< 1024px) --- */
@media (max-width: 1023.98px) {
  .site-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: var(--s-4) var(--gutter) var(--s-8);
    background: var(--c-white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(6, 6, 6, 0.1);
  }

  body.nav-open .site-header__nav { display: block; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav__link {
    display: flex;
    min-height: 52px;
    padding-block: var(--s-3);
    font-size: var(--fs-lg);
    border-bottom: 1px solid var(--border);
  }

  .primary-nav__link[aria-current="page"] {
    border-bottom-color: var(--border);
    color: var(--c-sky-text);
  }

  .site-header__nav .btn {
    width: 100%;
    margin-top: var(--s-6);
  }
}

/* --- Desktop (>= 1024px) --- */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .site-header__logo img { height: 64px; }

  .site-header.is-scrolled .site-header__logo img { height: 56px; }

  .site-header__nav {
    display: flex;
    align-items: center;
    gap: var(--s-8);
  }

  .site-header__nav .btn--primary { display: inline-flex; }
}

/* ==========================================================================
   8. Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(70vh, 760px);
  /* Extra foot padding on mobile keeps the copy clear of the photo band. */
  padding-block: var(--s-12) var(--s-24);
  background: var(--c-ice);
  overflow: hidden;
}

/* The hero is a flex container, so its .container child would otherwise
   shrink-wrap its content instead of filling the line. */
.hero > .container { width: 100%; }

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img,
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Mobile framing: hold the skates in the band the gradient opens up. */
  object-position: 72% 78%;
}

/* The video sits over the still and fades in only once it is actually
   playing, so a blocked autoplay or reduced-motion just leaves the still. */
.hero__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
}

.hero__media.is-playing .hero__video { opacity: 1; }

/* Mobile: vertical. The wash stays effectively solid across the text column —
   the rink boards are Skate Canada red, and the eyebrow only reaches 4.4:1 over
   them even at a 0.95 wash — then opens up at the foot to show the skates. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(240, 247, 249, 0.99) 0%,
    rgba(240, 247, 249, 0.99) 64%,
    rgba(240, 247, 249, 0.55) 84%,
    rgba(240, 247, 249, 0.28) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

/* Each sentence gets its own line (spec §6.1), so the h1 is capped at the size
   that keeps the longest line inside the 36rem column. `balance` is off here —
   it would re-wrap the explicit .block spans into two ragged lines. */
.hero h1 {
  margin-bottom: var(--s-6);
  font-size: clamp(2rem, 1.25rem + 3.2vw, 3.5rem);
  text-wrap: initial;
}

.hero .lede { max-width: 34rem; }

/* The side-by-side treatment only works once the viewport is wide enough that
   the 36rem copy column clears the skater. Measured: at 768px the crop puts the
   skater's leg at x≈606 and the copy ends at x≈607 — the h1 drops to 3.1:1
   there. By 1024px there is ~110px of clearance, so that is the switch point. */
@media (min-width: 1024px) {
  .hero {
    padding-block: var(--s-16);
    /* Right edge of the copy column: half the viewport, back to the container's
       left edge, in by the gutter, out by the column's 36rem max-width. */
    --hero-fade: calc(50% - min(var(--container), 100vw) / 2 + var(--gutter) + 36rem);
  }

  .hero__media img,
  .hero__video { object-position: center 40%; }

  /* Anchored to the copy column rather than to viewport percentages. The rink
     boards are Skate Canada red and the eyebrow only reaches 4.4:1 over them
     even at a 0.97 wash, so the copy column stays effectively solid and the
     photo opens up immediately to the right of it. */
  .hero__media::after {
    background: linear-gradient(
      90deg,
      rgba(240, 247, 249, 0.99) 0px,
      rgba(240, 247, 249, 0.99) calc(var(--hero-fade) + 1rem),
      rgba(240, 247, 249, 0.18) calc(var(--hero-fade) + 10rem),
      rgba(240, 247, 249, 0.06) 100%
    );
  }
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

.site-footer {
  background: var(--c-black);
  color: var(--c-grey-500);
  font-size: var(--fs-sm);
}

.site-footer a {
  color: var(--c-grey-100);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.site-footer a:hover { color: var(--c-sky); }

.site-footer p { max-width: 34ch; }

.site-footer__grid {
  display: grid;
  gap: var(--s-12);
  padding-block: var(--s-16) var(--s-12);
}

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.1fr 1fr 1.1fr 0.7fr;
    gap: var(--s-8);
  }
}

.site-footer__title {
  margin-bottom: var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-white);
}

* + .site-footer__title { margin-top: var(--s-8); }

.footer-tile {
  display: inline-block;
  padding: var(--s-3);
  background: var(--c-white);
  border-radius: var(--radius);
}

.footer-tile img {
  height: 72px;
  width: auto;
}

.footer-tile--sc img { height: 88px; }

.site-footer__blurb { margin-top: var(--s-6); }

.site-footer__list {
  list-style: none;
  display: grid;
}

/* 44px minimum tap target (spec §8) for the stacked footer links. */
.site-footer__list a,
.site-footer__email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Grid items default to min-width:auto, so the unbreakable email address would
   otherwise set the column's min-content width and overflow at 200% zoom. */
.site-footer__grid > * { min-width: 0; }

.site-footer__email { overflow-wrap: anywhere; }

.site-footer address {
  font-style: normal;
  line-height: 1.5;
}


.social-links {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-4);
  list-style: none;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-grey-700);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.social-links a:hover { border-color: var(--c-sky); }

.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.land-ack {
  padding-block: var(--s-8);
  border-top: 1px solid var(--c-grey-700);
}

.land-ack p {
  max-width: none;
  color: var(--c-grey-100);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-6);
  border-top: 1px solid var(--c-grey-700);
  font-size: var(--fs-xs);
}

/* ==========================================================================
   10. Home page components
   ========================================================================== */

/* --- Media --- */
.media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-ice);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--portrait { aspect-ratio: 4 / 5; }

/* Coach headshots are full-length portraits — anchor the crop to the face. */
.coach-card .media img { object-position: center top; }

/* --- Stat chips --- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--s-2) var(--s-4);
  background: var(--c-ice);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--heading);
}

.section--alt .chip { background: var(--c-white); }

/* Standalone section CTAs — these were text links until they became buttons. */
.chips + .btn,
.dates + .btn { margin-top: var(--s-8); }

.board-cta { margin-top: var(--s-6); }

/* --- Coach cards (compact; full bio opens in a dialog) --- */

/* Explicit columns rather than auto-fit: the cards are wide-and-short, so a
   column narrower than ~21rem wraps the coach's name onto two lines. */
.coach-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .coach-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1180px) {
  .coach-grid { grid-template-columns: repeat(3, 1fr); }
}

.coach-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4);
}

/* A 4:5 thumbnail rather than a circle: these are full-length portraits, so a
   square crop leaves the head small and jammed against the top edge. */
.coach-card__thumb {
  flex-shrink: 0;
  width: 4rem;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--c-ice);
}

.coach-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.coach-card__body {
  flex: 1;
  min-width: 0;
}

/* .card.coach-card, not .coach-card: the generic `.card h3` rule further down
   has the same specificity and would otherwise win on source order. */
.card.coach-card h3 {
  margin-top: 0;
  margin-bottom: 0;
  /* Scales down just enough that the longest name stays on one line at 360px. */
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: initial;
}

.coach-card__role {
  margin-top: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-sky-text);
}

.coach-card p { max-width: none; }

/* The chevron is the visible affordance; its ::after stretches the hit area
   over the whole card, so the card reads and behaves as one target. */
.coach-card__open {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--c-ice);
  border: 0;
  border-radius: 50%;
  color: var(--c-sky-text);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

/* -1px so the overlay also covers the card's 1px border, not just its
   padding box, leaving no dead sliver at the edges. */
.coach-card__open::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
}

.coach-card__open svg {
  width: 18px;
  height: 18px;
}

.coach-card--linked { cursor: pointer; }

.coach-card--linked:hover {
  border-color: var(--c-sky);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(6, 6, 6, 0.12);
}

.coach-card--linked:hover .coach-card__open {
  background: var(--c-sky);
  color: var(--c-black);
  transform: translateX(2px);
}

/* Focus belongs on the card, since the card is what activates. */
.coach-card__open:focus-visible { outline: none; }

.coach-card:has(.coach-card__open:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Fallback for engines without :has() — ring the chevron itself. */
@supports not selector(:has(*)) {
  .coach-card__open:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }
}

.coach-card__intro { font-style: italic; }

/* --- Bio modal --- */
.bio-modal {
  width: min(56rem, calc(100vw - 2 * var(--gutter)));
  max-height: min(90vh, 48rem);
  padding: 0;
  background: var(--c-white);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(6, 6, 6, 0.28);
  color: var(--text);
  overflow: hidden;
}

.bio-modal::backdrop { background: rgba(6, 6, 6, 0.7); }

.bio-modal__inner {
  position: relative;
  display: grid;
  max-height: inherit;
}

.bio-modal__media { background: var(--c-ice); }

.bio-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.bio-modal__body {
  padding: var(--s-8);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bio-modal__body h2 {
  margin-top: 0;
  font-size: var(--fs-h3);
}

.bio-modal__body p { max-width: 62ch; }

.bio-modal__body .coach-card__role { margin-bottom: var(--s-6); }

.bio-modal__close {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--c-white);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(6, 6, 6, 0.15);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--heading);
  transition: background var(--dur-fast) var(--ease);
}

.bio-modal__close:hover { background: var(--c-grey-100); }

@media (min-width: 720px) {
  .bio-modal__inner { grid-template-columns: 5fr 7fr; }

  .bio-modal__media { height: 100%; }
}

/* Under 720px the photo becomes a banner above the scrolling text. */
@media (max-width: 719.98px) {
  .bio-modal__inner { grid-template-rows: auto 1fr; }

  .bio-modal__media { height: 13rem; }

  .bio-modal__body { padding: var(--s-6); }
}

body.modal-open { overflow: hidden; }

/* --- Program Assistants block --- */
.pa-block {
  margin-top: var(--s-8);
  padding: var(--s-8);
  background: var(--c-white);
  border-left: 4px solid var(--c-sky);
  border-radius: var(--radius);
}

.section--alt .pa-block { background: var(--c-white); }

.pa-block h3 { margin-bottom: var(--s-4); font-size: var(--fs-h4); }

.pa-block p { max-width: none; }

/* --- Schedule --- */
.schedule-section { position: relative; isolation: isolate; }

.schedule-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/photos/icetexture1.jpg") center / cover no-repeat;
  opacity: 0.08;
}

.schedule__tablist {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-8);
}

.schedule__trigger {
  min-height: 44px;
  padding: var(--s-3) var(--s-6);
  background: var(--c-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--heading);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.schedule__trigger:hover { border-color: var(--c-sky); }

.schedule__trigger[aria-selected="true"] {
  background: var(--c-sky);
  border-color: var(--c-sky);
  color: var(--c-black);
}

/* Accordion mode (< 768px): trigger sits above its own panel. */
.schedule__day + .schedule__day { margin-top: var(--s-2); }

.schedule.is-accordion .schedule__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
}

.schedule.is-accordion .schedule__trigger::after {
  content: "+";
  font-size: 1.25em;
  line-height: 1;
}

.schedule.is-accordion .schedule__trigger[aria-expanded="true"]::after { content: "–"; }

.schedule.is-accordion .schedule__panel { margin-top: var(--s-4); }

.schedule__panel { animation: fade var(--dur-fast) var(--ease); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.table-scroll {
  margin-top: var(--s-6);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.schedule__panel > .table-scroll { margin-top: 0; }

.schedule table,
.data-table {
  background: var(--c-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: var(--fs-sm);
}

.schedule th,
.schedule td,
.data-table th,
.data-table td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.schedule thead th,
.data-table thead th {
  background: var(--c-ice);
  font-weight: 600;
  color: var(--heading);
}

.schedule tbody tr:last-child td,
.data-table tbody tr:last-child td { border-bottom: 0; }

.schedule td:nth-child(2),
.data-table td:first-child {
  font-weight: 600;
  color: var(--heading);
  white-space: normal;
}

/* Flood rows read as muted through the tinted row and regular weight — not
   through a lighter grey: --c-grey-500 on ice is only 3.02:1. */
.row--flood td {
  background: var(--c-ice);
  color: var(--text);
  font-weight: 400;
}

.row--flood td:nth-child(2) { color: var(--text); font-weight: 400; }

.table-note {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--text);
}

.schedule__foot { margin-top: var(--s-8); }

.schedule__foot .notice { margin-bottom: var(--s-6); }

/* Home badge on the host-club competition row */
.badge {
  display: inline-block;
  margin-left: var(--s-2);
  padding: 2px var(--s-2);
  background: var(--c-sky);
  border-radius: 100px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-black);
}

.row--home td { background: var(--c-ice); }

/* --- Important dates --- */
.dates {
  display: grid;
  gap: var(--s-2);
  list-style: none;
  counter-reset: none;
}

.dates li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--s-4);
  align-items: baseline;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border);
}

.dates li:last-child { border-bottom: 0; }

.dates__date {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--heading);
}

.dates__label { color: var(--text); }

@media (min-width: 768px) {
  .dates { grid-template-columns: 1fr 1fr; gap: 0 var(--s-12); }
}

/* --- Board of directors --- */
/* A grid rather than a wrapping flex row: with ten members of very different
   name and role lengths, flex leaves ragged rows of mismatched widths. */
.person-chips {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
  margin-bottom: var(--s-8);
  list-style: none;
}

@media (min-width: 40em) {
  .person-chips { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 72em) {
  .person-chips { grid-template-columns: repeat(3, 1fr); }
}

.person-chip {
  padding: var(--s-4) var(--s-6);
  background: var(--c-ice);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.person-chip__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-h4);
  color: var(--heading);
}

.person-chip__role {
  margin-top: var(--s-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-sky-text);
}

/* --- CTA band --- */
.cta-band {
  position: relative;
  isolation: isolate;
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/photos/icetexture2.jpg") center / cover no-repeat;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 6, 6, 0.82);
}

.cta-band p {
  max-width: 48ch;
  margin-inline: auto;
  color: var(--c-grey-100);
}

.cta-band h2 { margin-bottom: var(--s-4); }

.cta-band .btn-row { justify-content: center; }

/* ==========================================================================
   11. Programs & Registration
   ========================================================================== */

/* --- Interior page header banner ---
   Same treatment as the home hero, shorter. The image is a CSS background
   because it is decorative, and it is supplied per page as a custom property
   (`--page-hero-image`), so a missing file degrades to flat ice rather than a
   broken <img>. */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(13rem, 9rem + 14vw, 21rem);
  padding-block: var(--s-12);
  background: var(--c-ice);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.page-hero > .container { width: 100%; }

.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--c-ice);
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
}

/* Per-page art. Paths are relative to this stylesheet. Until a file exists the
   banner simply shows flat ice, so the pages work without the art.

   The banner is a wide, shallow band, so `cover` only ever shows a horizontal
   slice of the source — roughly the middle 56% of it at desktop. Each image
   therefore sets its own vertical anchor: the children need their helmets kept,
   the skater needs both skates, the rink shot sits mid-frame. */
.page-hero--registration .page-hero__media {
  background-image: url("../images/headers/registration.jpg");
  background-position: center 20%;
}

.page-hero--events .page-hero__media {
  background-image: url("../images/headers/events.jpg");
  background-position: center 100%;
}

.page-hero--contact .page-hero__media {
  background-image: url("../images/headers/contact.jpg");
  background-position: center 42%;
}

/* Mobile: near-solid across the copy, opening up at the foot. */
.page-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(240, 247, 249, 0.99) 0%,
    rgba(240, 247, 249, 0.97) 62%,
    rgba(240, 247, 249, 0.6) 85%,
    rgba(240, 247, 249, 0.35) 100%
  );
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.page-hero h1 { margin-top: 0; }

@media (min-width: 1024px) {
  .page-hero {
    --hero-fade: calc(50% - min(var(--container), 100vw) / 2 + var(--gutter) + 34rem);
  }

  .page-hero__media::after {
    background: linear-gradient(
      90deg,
      rgba(240, 247, 249, 0.99) 0px,
      rgba(240, 247, 249, 0.99) calc(var(--hero-fade) + 1rem),
      rgba(240, 247, 249, 0.22) calc(var(--hero-fade) + 10rem),
      rgba(240, 247, 249, 0.08) 100%
    );
  }
}

/* The intro now follows a header, so it needs less top padding. */
.page-intro { padding-block: var(--s-12) var(--section-y); }

/* The intro runs the full container width. Both caps have to go: the wrapper's
   own max-width, and the global 65ch measure on <p> (which computes to ~750px
   and would still bind on its own). */
.page-intro__inner p { max-width: none; }

.page-intro .lede { margin-top: var(--s-6); }

.page-intro .btn-row + .notice { margin-top: var(--s-8); }

.page-intro__note {
  margin-top: var(--s-6);
  font-weight: 600;
  color: var(--heading);
}

/* --- Sticky programs sub-nav --- */
.subnav {
  position: relative;
  z-index: 50;
  background: var(--c-white);
  border-block: 1px solid var(--border);
}

.subnav__list {
  display: flex;
  gap: var(--s-2);
  padding-block: var(--s-3);
  overflow-x: auto;
  scrollbar-width: thin;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.subnav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  color: var(--heading);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.subnav__link:hover { border-color: var(--c-sky); }

.subnav__link[aria-current="true"] {
  background: var(--c-sky);
  border-color: var(--c-sky);
  color: var(--c-black);
}

@media (min-width: 1024px) {
  .subnav {
    position: sticky;
    top: var(--header-h-scrolled);
  }
}

/* --- Program blocks --- */
.program__media { margin-bottom: var(--s-8); }

.program h2 { margin-bottom: var(--s-6); }

.program h3 {
  margin-top: var(--s-8);
  font-size: var(--fs-h4);
  font-family: var(--font-body);
}

.program ul {
  margin-top: var(--s-4);
  padding-left: var(--s-6);
}

.program li { margin-top: var(--s-2); }

.program .btn-row { margin-top: var(--s-8); }

.program .notice { margin-top: var(--s-6); }

@media (min-width: 900px) {
  .program__inner {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: var(--s-12);
    align-items: start;
  }

  .program__media {
    position: sticky;
    top: calc(var(--header-h-scrolled) + var(--subnav-h) + var(--s-8));
    margin-bottom: 0;
  }
}

/* Small inset image (Senior STAR) */
.inset-media {
  float: none;
  margin: var(--s-6) 0;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 16rem;
}

@media (min-width: 600px) {
  .inset-media {
    float: right;
    margin: 0 0 var(--s-6) var(--s-8);
  }
}

.subsection {
  margin-top: var(--s-12);
  padding-top: var(--s-8);
  border-top: 1px solid var(--border);
}

.subsection::after {
  content: "";
  display: block;
  clear: both;
}

.subsection h3 { margin-top: 0; }

/* --- Sicamous list --- */
.program-list {
  margin-top: var(--s-6);
  padding-left: 0;
  list-style: none;
}

.program-list li {
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
}

.program-list li:last-child { border-bottom: 0; }

.program-list a {
  font-weight: 700;
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.program-list a:hover { color: var(--c-black); }

/* --- Funding / resource cards --- */
.card h3 { margin-bottom: var(--s-3); font-size: var(--fs-h4); }

.card p { max-width: none; }

.card .btn { margin-top: var(--s-6); }

.card__thumb {
  margin-bottom: var(--s-6);
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   12. Events
   ========================================================================== */

.show-band {
  position: relative;
  isolation: isolate;
}

.show-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/photos/skates2.jpg") center / cover no-repeat;
  filter: grayscale(1);
}

.show-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 6, 6, 0.7);
}

/* The card sits inside .section--dark but has a white background, so it has to
   opt back out of the dark-section text colours. */
.show-card {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  color: var(--text);
}

.show-card h2,
.show-card h3 { color: var(--heading); }

.show-card .eyebrow { color: var(--c-sky-text); }

.show-card p { max-width: none; }

.show-card__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-6);
  list-style: none;
  font-weight: 600;
  color: var(--heading);
}

.show-card__details li {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.show-card__details li + li::before {
  content: "·";
  color: var(--c-grey-500);
}

.show-card .btn { margin-top: var(--s-8); }

.show-card__sub {
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--text);   /* grey-500 on white is 3.27:1 */
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ==========================================================================
   13. Contact
   ========================================================================== */

.contact-layout {
  display: grid;
  gap: var(--s-12);
  margin-top: var(--s-12);
}

/* Secondary to the page h1 — don't let it compete. */
.contact-details h2 { font-size: var(--fs-h3); }

@media (min-width: 900px) {
  .contact-layout { grid-template-columns: 7fr 5fr; }
}

.contact-form { max-width: 34rem; }

.field { margin-bottom: var(--s-6); }

.field label {
  display: block;
  margin-bottom: var(--s-2);
  font-weight: 600;
  color: var(--heading);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--s-3) var(--s-4);
  background: var(--c-white);
  border: 2px solid var(--c-grey-100);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: var(--heading);
  transition: border-color var(--dur-fast) var(--ease);
}

.field textarea { resize: vertical; }

.field input:hover,
.field textarea:hover { border-color: var(--c-grey-500); }

.field input:focus,
.field textarea:focus { border-color: var(--c-sky); }

.field__optional {
  font-weight: 400;
  color: var(--c-grey-700);
}

.field__error {
  display: none;
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #B3261E;
}

.field.has-error input,
.field.has-error textarea { border-color: #B3261E; }

.field.has-error .field__error { display: block; }

/* Honeypot — off-screen, never shown, never announced. */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status {
  margin-top: var(--s-4);
  font-weight: 600;
}

.form-status:empty { margin-top: 0; }

.form-status--ok { color: #1B5E20; }

.form-status--error { color: #B3261E; }

.contact-details address {
  font-style: normal;
  line-height: 1.6;
}

.contact-details h3 {
  margin-top: var(--s-8);
  margin-bottom: var(--s-2);
  font-size: var(--fs-xs);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-sky-text);
}

.contact-details h3:first-of-type { margin-top: var(--s-6); }

.contact-details .social-links a {
  border-color: var(--border);
  color: var(--heading);
}

.contact-details .social-links a:hover { border-color: var(--c-sky); }

.map-block {
  margin-top: var(--s-8);
  padding: var(--s-8);
  background: var(--c-ice);
  border-radius: var(--radius);
  text-align: center;
}

/* Direct child only — otherwise this also blows up the icon inside the
   "Open in Google Maps" button sitting in this block. */
.map-block > svg {
  width: 40px;
  height: 40px;
  margin-inline: auto;
  fill: var(--c-sky-text);
}

.map-block address { margin-block: var(--s-4) var(--s-6); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@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;
  }

  .reveal,
  .reveal-group > * {
    opacity: 1;
    transform: none;
  }
}
