/* DC Velo — dcveloracing.com
   Palette and structure carried over from the 2021–2025 dcvelo.com:
   velo red on white, black footer, fixed menu rail on the right. */

/* Red Hat Display and Red Hat Text, self-hosted (SIL OFL, see /fonts/OFL.txt) */
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/red-hat-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/red-hat-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("/fonts/red-hat-display-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/red-hat-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/red-hat-text-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/red-hat-text-latin-700-normal.woff2") format("woff2"); }

:root {
  --red: #ce1f25;
  --red-deep: #a3161b;
  --ink: #000;
  --paper: #fff;
  --text: #2b2b2b;
  --muted: #666;
  --rule: #ebebeb;
  --mist: #f6f6f6;

  --display: "Red Hat Display", "Helvetica Neue", Arial, sans-serif;
  --body: "Red Hat Text", "Helvetica Neue", Arial, sans-serif;

  --rail: 120px;
  --gutter: clamp(1.25rem, 5vw, 6rem);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Page frame ---------- */

.page { padding-right: var(--rail); }

/* Menu rail: fixed on the right on wide screens, a top bar on small ones */
.rail {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: var(--rail);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 2.25rem 0 2rem;
  background: var(--paper);
  border-left: 1px solid var(--rule);
}
.rail__logo { display: none; }
.menu-button {
  width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-content: center; gap: 7px;
}
.menu-button span { display: block; height: 3px; width: 30px; background: var(--ink); transition: transform .25s, opacity .2s, width .25s; }
.menu-button span:nth-child(3) { width: 18px; justify-self: end; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { width: 30px; transform: translateY(-10px) rotate(-45deg); }

/* Scroll progress: the red block rides down a grey track as you read */
.progress { position: relative; width: 7px; height: 38vh; background: var(--rule); overflow: hidden; }
.progress__bar {
  position: absolute; left: 0; top: 0; width: 7px; height: 56px; background: var(--red);
  transform: translateY(calc(var(--p, 0) * (38vh - 56px)));
}

.social { display: flex; flex-direction: column; gap: 1.1rem; }
.social a { color: var(--ink); display: block; transition: color .2s; }
.social a:hover { color: var(--red); }
.social svg { width: 22px; height: 22px; }

/* ---------- Menu overlay ---------- */

.menu {
  position: fixed; inset: 0 var(--rail) 0 0; z-index: 39;
  background: var(--paper);
  display: grid; align-content: center;
  padding: 4rem var(--gutter);
  visibility: hidden; opacity: 0; transform: translateX(2rem);
  transition: opacity .3s, transform .3s, visibility 0s .3s;
}
.menu.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .3s, transform .3s; }
.menu__logo { width: 164px; margin-bottom: 3.5rem; }
.menu__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2.5rem 4rem; max-width: 64rem; }
.menu h2 { font-size: 1rem; font-weight: 800; color: var(--muted); margin-bottom: 1rem; letter-spacing: .02em; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li + li { margin-top: .4rem; }
.menu a {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.25rem);
  color: var(--ink); text-decoration: none; line-height: 1.2;
  background: linear-gradient(var(--red), var(--red)) 0 100% / 0 4px no-repeat;
  transition: background-size .25s;
}
.menu a:hover, .menu a[aria-current="page"] { background-size: 100% 4px; }
body.menu-open { overflow: hidden; }

/* ---------- Shared pieces ---------- */

.wrap { padding-inline: var(--gutter); max-width: 84rem; }
.section { padding-block: clamp(4rem, 10vw, 8rem); }
.section + .section { border-top: 1px solid var(--rule); }

.title { position: relative; display: inline-block; padding-bottom: 1.4rem; }
.title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: min(30%, 9rem); height: 8px; background: var(--red);
}
.h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.05; }
.lede { font-size: 1.2rem; line-height: 1.55; max-width: var(--measure); color: var(--ink); }
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.6rem; font-weight: 800; margin: 2.5em 0 .7em; }
.prose h3 { font-size: 1.2rem; font-weight: 700; margin: 2em 0 .5em; }
.prose a { color: var(--red); text-underline-offset: 3px; }

.go {
  display: inline-flex; align-items: center; gap: .9rem;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--ink);
  text-decoration: none; margin-top: 1.5rem;
}
.go img { width: 33px; transition: transform .25s; }
.go:hover { color: var(--red); }
.go:hover img { transform: translateX(6px); }

.button {
  display: inline-block; background: var(--ink); color: var(--paper);
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  padding: .95rem 1.6rem; text-decoration: none; border: 0; cursor: pointer;
  transition: background .2s;
}
.button:hover { background: var(--red); }

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

.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 2.5rem 0 0;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero { position: relative; isolation: isolate; }
.hero__photo {
  position: absolute; z-index: -1; top: 0; right: 0; width: 58%; height: 100%;
  object-fit: cover; filter: grayscale(1); opacity: .5;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
          mask-image: linear-gradient(to right, transparent, #000 35%);
}
.hero__logo { width: 195px; margin-left: var(--gutter); }
.hero__body { align-self: center; padding: 3rem var(--gutter); }
.hero h1 { font-size: clamp(3rem, 8.4vw, 8.75rem); font-weight: 900; line-height: .92; letter-spacing: -0.035em; max-width: 12ch; }
.hero .lede { margin-top: 2.2rem; }

/* The paceline: eight red lines, staggered like riders rolling through */
.paceline { width: 100%; height: auto; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.paceline line { stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .paceline line { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: roll 1.4s cubic-bezier(.2,.7,.2,1) forwards; }
  .paceline line:nth-child(2) { animation-delay: .08s; }
  .paceline line:nth-child(3) { animation-delay: .16s; }
  .paceline line:nth-child(4) { animation-delay: .24s; }
  .paceline line:nth-child(5) { animation-delay: .32s; }
  .paceline line:nth-child(6) { animation-delay: .40s; }
  .paceline line:nth-child(7) { animation-delay: .48s; }
  .paceline line:nth-child(8) { animation-delay: .56s; }
}
@keyframes roll { to { stroke-dashoffset: 0; } }

.page-head { padding: 2.5rem 0 clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--rule); }
.page-head__logo { width: 150px; margin-left: var(--gutter); margin-bottom: clamp(3rem, 8vw, 6rem); }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 900; line-height: 1; letter-spacing: -0.025em; }
.page-head .crumb { font-family: var(--display); font-weight: 700; color: var(--red); margin-bottom: 1rem; display: block; text-decoration: none; }
.page-head .lede { margin-top: 2rem; }

/* ---------- Home sections ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.split > * { min-width: 0; }

.record { margin: 0; border-top: 2px solid var(--ink); }
.record div { display: grid; grid-template-columns: 7rem 1fr; align-items: baseline; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.record dt { font-family: var(--display); font-weight: 900; font-size: 2.4rem; color: var(--red); line-height: 1; }
.record dd { margin: 0; font-size: 1.05rem; color: var(--ink); }

.race { background: var(--ink); color: #d9d9d9; }
.race h2, .race .h2 { color: var(--paper); }
.race .go { color: var(--paper); }
.race .go:hover { color: #ff6b6f; }
.race .lede { color: var(--paper); }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,.22); }
.facts div { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.22); display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.facts dt { font-family: var(--display); font-weight: 700; color: var(--paper); }
.facts dd { margin: 0; }
.section.race + .section { border-top: 0; }

.contact-band { background: var(--mist); }
.contact-band p.big { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.15; color: var(--ink); max-width: 22ch; margin-bottom: 2rem; }

/* ---------- Team / list pages ---------- */

.wins { columns: 2 18rem; column-gap: 4rem; padding: 0; margin: 0; list-style: none; counter-reset: win; }
.wins li { break-inside: avoid; padding: .7rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 2.2rem 1fr; }
.wins li::before { counter-increment: win; content: counter(win); font-family: var(--display); font-weight: 800; color: var(--red); }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2.5rem 2rem; margin-top: 3rem; }
.rider__photo { aspect-ratio: 4 / 5; background: var(--mist); display: grid; place-items: center; margin-bottom: 1rem; overflow: hidden; }
.rider__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .3s; }
.rider:hover .rider__photo img { filter: none; }
.rider__photo .initials { font-family: var(--display); font-weight: 900; font-size: 3rem; color: #d6d6d6; }
.rider h3 { font-size: 1.25rem; font-weight: 800; }
.rider p { color: var(--muted); margin: .2rem 0 0; font-size: .98rem; }

.note { border-left: 4px solid var(--red); padding: .2rem 0 .2rem 1.2rem; color: var(--muted); max-width: var(--measure); }

figure.photo { margin: 2.5rem 0; }
figure.photo img { width: 100%; filter: grayscale(1); }
figure.photo figcaption { font-size: .9rem; color: var(--muted); margin-top: .6rem; }

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

.footer { background: var(--ink); color: #bdbdbd; padding: clamp(3.5rem, 8vw, 6.5rem) 0 2.5rem; }
.footer__top { display: grid; grid-template-columns: minmax(12rem, 1fr) 3fr; gap: 3rem; }
.footer__logo { width: 170px; }
.footer__social { display: flex; gap: 1.2rem; margin-top: 2rem; }
.footer__social a { color: var(--paper); }
.footer__social a:hover { color: var(--red); }
.footer__social svg { width: 22px; height: 22px; }
.footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 2rem; }
.footer h2 { color: var(--paper); font-size: 1rem; font-weight: 800; margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: .45rem; }
.footer a { color: #bdbdbd; text-decoration: none; }
.footer a:hover { color: var(--paper); }
.footer__base { margin-top: 4rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.19); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .9rem; }

/* ---------- Small screens ---------- */

@media (max-width: 991px) {
  :root { --rail: 0px; }
  .page { padding-right: 0; padding-top: 72px; }
  .rail {
    left: 0; bottom: auto; width: auto; height: 72px;
    flex-direction: row; padding: 0 1rem 0 var(--gutter);
    border-left: 0; border-bottom: 1px solid var(--rule);
  }
  .rail__logo { display: block; width: 104px; }
  .rail__logo img { width: 104px; }
  .progress { position: absolute; left: 0; right: 0; bottom: -1px; width: auto; height: 3px; background: transparent; }
  .progress__bar { height: 3px; width: 100%; transform-origin: 0 0; transform: scaleX(var(--p, 0)); }
  .social { display: none; }
  .menu { inset: 72px 0 0 0; align-content: start; padding-top: 2.5rem; overflow-y: auto; }
  .menu__logo { display: none; }
  .hero { padding-top: 1rem; min-height: 0; }
  .hero__photo { width: 100%; opacity: .14; }
  .paceline { height: 44px; }
  .hero__logo, .page-head__logo { display: none; }
  .page-head { padding-top: 3.5rem; }
  .split { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .facts div { grid-template-columns: 1fr; gap: .2rem; }
  .record div { grid-template-columns: 5.5rem 1fr; }
  .record dt { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* Spacing helpers (inline styles are blocked by the content security policy) */
.mt-0 { margin-top: 0 !important; }
.mt-m { margin-top: 1.5rem; }
.mt-l { margin-top: 2rem; }
.mt-xl { margin-top: 2.5rem; }
a.red { color: var(--red); }
.record dt.small { font-size: 1.1rem; }

/* Full-width event photo under a page header (shown in colour: the kit and banners are the brand red) */
.feature-photo { margin: 0; }
.feature-photo img { width: 100%; height: auto; aspect-ratio: 16 / 8.5; max-height: 82vh; object-fit: cover; object-position: 48% 70%; }
@media (max-width: 991px) { .feature-photo img { aspect-ratio: 4 / 3; object-position: 45% 50%; } }
.feature-photo--cx img { object-position: 55% 30%; }
@media (max-width: 991px) { .feature-photo--cx img { object-position: 52% 58%; } }

/* Archive photos on the History page: small originals, shown at or below their native size */
.photo-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  max-width: 64rem; margin-block: 2.5rem 3rem;
}
.photo-strip figure, .photo-single { margin: 0; }
.photo-strip img { width: 100%; height: auto; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 50% 35%; }
.photo-strip__note { grid-column: 1 / -1; margin: 0; font-size: .9rem; color: var(--muted); }
.photo-single { margin: 2rem 0 2rem; max-width: 30rem; }
.photo-strip .crop-top img { object-position: 50% 0%; }
.photo-single img { width: 100%; height: auto; }
@media (max-width: 640px) {
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip figure:first-child { grid-column: 1 / -1; }
}
