/* ---------------------------------------------------------------
   Velo Club Bridgford — shared foundation
   Fonts, reset and brand tokens. Concept stylesheets build on top.
   Palette and type per brand/docs/VCB-brand-design-spec.md
   --------------------------------------------------------------- */

@font-face {
  font-family: "Anton";
  src: url("../fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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";
  src: url("../fonts/anton-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  /* Brand palette — the only palette. */
  --royal: #2a4fae;
  --sky: #6fafe0;
  --pink: #e94590;
  --navy: #10295a;
  --bone: #f5f1e8;
  --charcoal: #1f2328;
  --slate: #6b7480;

  /* Tints derived from the palette above.
     Bridgford Pink at #E94590 only reaches 3.25:1 on Bone and 3.67:1 under
     white, so it is an accent — rules, gauges, large display numerals — never
     small text. These two tints carry the same pink identity at AA:
       --pink-ink  on light grounds (5.3:1 under white, 4.7:1 on Bone)
       --pink-lift on Navy          (5.0:1)
     Slate likewise fails at small sizes on Bone (4.2:1); --slate-ink is the
     text-safe version at 5.0:1. */
  --pink-ink: #c8256f;
  --pink-lift: #f26aa5;
  --slate-ink: #5f6875;

  --royal-dark: #1e3a85;
  --bone-warm: #fbf9f4;
  --hairline: color-mix(in srgb, var(--charcoal) 14%, transparent);

  --font-display: "Anton", "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --page: 1240px;
}

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

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--charcoal);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

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

/* Anton is display-only and must never be synthesised. */
.display,
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.005em;
  line-height: 0.95;
  text-wrap: balance;
}

h3,
h4 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.2;
}

/* All ride data — distances, paces, elevation — lines up in columns. */
.num,
table,
time,
.stat {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0.5rem;
}

/* ---------------------------------------------------------------
   Mobile nav — CSS-only disclosure, shared by every concept.
   The toggle is a real checkbox so it works without JavaScript and
   stays keyboard operable; concepts set --nav-ink / --nav-panel.
   --------------------------------------------------------------- */

.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.nav-toggle-label {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle-label .bars,
.nav-toggle-label .bars::before,
.nav-toggle-label .bars::after {
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--nav-ink, currentColor);
  border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle-label .bars::before,
.nav-toggle-label .bars::after {
  content: "";
  left: 0;
}
.nav-toggle-label .bars::before {
  transform: translateY(-7px);
}
.nav-toggle-label .bars::after {
  transform: translateY(7px);
}
.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 780px) {
  .nav-toggle-label {
    display: flex;
  }
  /* Panel drops below the header bar and pushes nothing around. */
  .nav-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    /* !important: each concept sets its own `nav ul { display: flex }`, which
       outranks this class selector and would leave the panel permanently open. */
    display: none !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--nav-panel, var(--navy));
    border-top: 1px solid color-mix(in srgb, var(--sky) 25%, transparent);
    box-shadow: 0 16px 32px rgb(16 41 90 / 0.25);
  }
  .nav-toggle:checked ~ nav .nav-panel,
  .nav-toggle:checked ~ .nav-panel {
    display: flex !important;
  }
  .nav-panel li {
    width: 100%;
  }
  .nav-panel a {
    display: block;
    padding: 0.85rem 0 !important;
    font-size: 1rem !important;
    border-bottom: 1px solid color-mix(in srgb, var(--sky) 18%, transparent);
    text-align: left;
    /* Concepts that sit their nav over a photo shadow the links; inside the
       solid panel that shadow just muddies them. */
    text-shadow: none;
  }
  .nav-panel li:last-child a {
    border-bottom: 0;
    margin-top: 0.75rem;
    text-align: center;
  }
  /* Toggle turns into a cross while the panel is open. */
  .nav-toggle:checked + .nav-toggle-label .bars {
    background: transparent;
  }
  .nav-toggle:checked + .nav-toggle-label .bars::before {
    transform: rotate(45deg);
  }
  .nav-toggle:checked + .nav-toggle-label .bars::after {
    transform: rotate(-45deg);
  }
}

@media (min-width: 781px) {
  .nav-toggle,
  .nav-toggle-label {
    display: none;
  }
}

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