@import url("fonts.css");

/* ==========================================================================
   Design tokens. Every colour, font and spacing value used anywhere on the
   site resolves to one of these. To restyle the site, edit here — not in the
   component rules below.
   ========================================================================== */

:root {
  /* Brand */
  --blue: #1565e0;
  --blue-dark: #0e4db5;
  --blue-light: #5e96f2;

  /* Ink */
  --ink: #15171c;
  --body: #1b1d22;
  --grey-700: #3b4048;
  --grey-600: #4a505a;
  --grey-500: #69707c;
  --grey-400: #6f7684; /* darkened from #8A919E: 3.17:1 failed WCAG AA */
  --grey-300: #aeb4bf; /* only used on dark backgrounds, where it passes */

  /* Surfaces */
  --white: #fff;
  --surface: #f4f6fa;
  --surface-alt: #edf0f5;
  --border: #e7e9ee;
  --input-border: #d6dae2;
  --placeholder: #6b7280; /* darkened from #9AA1AC: 2.61:1 failed WCAG AA */

  /* Type */
  --font-body: "Barlow", system-ui, -apple-system, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  /* Layout */
  --max-width: 1440px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 6px;
  --radius-lg: 12px;

  /* Motion */
  --hero-cycle: 26s;
  --marquee-cycle: 280s;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--body);
  -webkit-font-smoothing: antialiased;
}

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

/* The browser's own [hidden] rule is display:none, but any class that sets an
   explicit display (.athlete is display:flex) outranks it — which silently
   broke the athlete filter: the attribute was set and nothing disappeared. */
[hidden] {
  display: none !important;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

/* A single visible focus treatment everywhere. The mockup set outline:none on
   inputs with no replacement, which left keyboard users with no indicator. */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: var(--white);
  padding: 12px 20px;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
  color: var(--white);
}

/* Anchor targets clear the sticky header instead of hiding beneath it. */
:target,
#main {
  scroll-margin-top: 90px;
}

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

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

/* ==========================================================================
   Typography
   ========================================================================== */

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--blue);
  text-transform: uppercase;
  margin: 0;
}

.h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 8.4vw, 76px);
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  margin: 0;
}

.lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--grey-600);
  max-width: 62ch;
  text-wrap: pretty;
  margin: 0;
}

.prose {
  font-size: 16px;
  line-height: 1.7;
  color: var(--grey-600);
  max-width: 72ch;
}

.prose h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
  margin: 2em 0 0.5em;
}

.prose a {
  text-decoration: underline;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 13px 32px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-dark);
  color: var(--white);
}

.btn--outline {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--white);
}

.btn--invert {
  background: var(--white);
  color: var(--blue);
}

.btn--invert:hover {
  background: var(--surface-alt);
  color: var(--blue-dark);
}

.btn--sm {
  padding: 11px 24px;
  font-size: 15px;
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  max-width: var(--max-width);
  margin-inline: auto;
}

.header__logo img {
  height: 44px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-weight: 600;
  font-size: 15px;
  color: var(--grey-700);
}

.nav__link:hover {
  color: var(--blue);
}

.nav__link[aria-current="page"] {
  color: var(--blue);
}

.nav__social {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 0 6px;
  margin: 0;
  list-style: none;
  border-left: 1px solid var(--border);
}

.nav__social a {
  color: var(--grey-500);
  display: flex;
  align-items: center;
  /* 2.5.8 target size: keep the visual icon small but the hit area 24px+ */
  min-width: 24px;
  min-height: 24px;
  justify-content: center;
}

.nav__social a:hover {
  color: var(--blue);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
  }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 84vw);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 88px 24px 24px;
    box-shadow: -8px 0 32px rgb(21 23 28 / 18%);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }

  .nav[data-open="true"] {
    transform: translateX(0);
  }

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

  .nav__link {
    display: block;
    padding: 14px 0;
    font-size: 18px;
    border-bottom: 1px solid var(--border);
  }

  .nav__social {
    border-left: 0;
    padding: 20px 0;
    gap: 20px;
  }

  .nav .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav {
    transition: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
  align-items: center;
  padding-block: clamp(32px, 6vw, 64px) clamp(28px, 5vw, 56px);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__media {
  position: relative;
  width: 100%;
  max-width: 600px;
  justify-self: center;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-alt);
}

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
}

/* Crossfade only when the visitor hasn't asked for reduced motion. Without it,
   the first image simply stays put — which is why it carries no animation. */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img {
    opacity: 0;
    animation: hero-fade var(--hero-cycle) linear infinite;
  }

  .hero__media img:nth-child(1) { animation-delay: 0s; }
  .hero__media img:nth-child(2) { animation-delay: 6.5s; }
  .hero__media img:nth-child(3) { animation-delay: 13s; }
  .hero__media img:nth-child(4) { animation-delay: 19.5s; }
}

@keyframes hero-fade {
  0%    { opacity: 0; }
  2.5%  { opacity: 1; }
  22.5% { opacity: 1; }
  25%   { opacity: 0; }
  100%  { opacity: 0; }
}

/* ==========================================================================
   Stat band
   ========================================================================== */

.stats {
  background: var(--ink);
  color: var(--white);
}

.stats__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 24px 32px;
  padding: 36px var(--gutter);
  margin: 0;
  list-style: none;
  max-width: var(--max-width);
  margin-inline: auto;
}

.stats__item {
  text-align: center;
}

.stats__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  color: var(--blue-light);
}

.stats__label {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-300);
  margin-top: 4px;
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

.section {
  padding-block: clamp(40px, 6vw, 64px);
}

.section--tint {
  background: var(--surface);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 28px;
}

.section__more {
  font-weight: 700;
  font-size: 15px;
  color: var(--blue);
}

.section__more:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Marquee (athlete strip)
   ========================================================================== */

.marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.marquee__track {
  display: flex;
  width: max-content;
  align-items: flex-start;
  gap: 24px;
  padding-right: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  .marquee__track {
    animation: marquee var(--marquee-cycle) linear infinite;
  }

  .marquee__track:hover {
    animation-play-state: paused;
  }

  /* WCAG 2.2.2 — hover is not a mechanism for keyboard or touch users, so the
     pause button drives this state and works for everyone. */
  .marquee[data-paused="true"] .marquee__track {
    animation-play-state: paused;
  }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee__pause {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  background: var(--white);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  padding: 9px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--grey-700);
  cursor: pointer;
}

.marquee__pause:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* No animation to control means no control to show. */
@media (prefers-reduced-motion: reduce) {
  .marquee__pause {
    display: none;
  }

  .marquee {
    overflow-x: auto;
  }
}

/* ==========================================================================
   Athlete cards
   ========================================================================== */

.athlete {
  flex: none;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.athlete__photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-alt);
}

.athlete__name {
  font-weight: 700;
  font-size: 16px;
  color: var(--body);
}

.athlete__title {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.35;
  color: var(--grey-500);
}

.athlete-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 28px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.athlete-grid .athlete {
  width: auto;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  padding: 0;
  border: 0;
}

.filters__btn {
  background: var(--white);
  border: 1.5px solid var(--input-border);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--grey-700);
  cursor: pointer;
}

.filters__btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.filters__btn[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.card__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey-600);
  margin: 0;
}

/* News cards are text-first: press photography belongs to the outlets that
   own it, so we link out rather than reproduce it. */
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgb(21 23 28 / 8%);
  color: inherit;
}

.news-card__meta {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--blue);
  text-transform: uppercase;
}

.news-card__title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
}

.news-card__excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey-600);
  margin: 0;
}

.news-card__cta {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--blue);
}

.news-card--featured {
  border-color: var(--blue);
  border-width: 2px;
}

/* ==========================================================================
   Video cards (News page)
   ========================================================================== */

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.video {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
}

.video img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.92;
  transition: opacity 0.15s ease, transform 0.3s ease;
}

.video:hover img,
.video:focus-visible img {
  opacity: 1;
  transform: scale(1.03);
}

.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 44px;
  background: rgb(21 23 28 / 75%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video:hover .video__play {
  background: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  .video img {
    transition: none;
  }

  .video:hover img,
  .video:focus-visible img {
    transform: none;
  }
}

/* ==========================================================================
   Team
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 32px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.team__photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-alt);
  margin-bottom: 12px;
}

.team__name {
  font-weight: 700;
  font-size: 17px;
  color: var(--body);
}

.team__role {
  font-weight: 600;
  font-size: 14px;
  color: var(--blue);
  margin-top: 2px;
}

.team__bio {
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey-500);
  margin-top: 4px;
}

/* ==========================================================================
   Partners
   ========================================================================== */

.partners {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px 56px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.partners__item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--grey-500);
  max-width: 170px;
  text-align: center;
}

.partners__item a:hover {
  color: var(--blue);
}

.partners__item img {
  height: 130px;
  width: 130px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--white);
}

.partners__name {
  font-weight: 600;
  font-size: 14px;
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: clamp(32px, 6vw, 64px) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.cta .h2 {
  color: var(--white);
  font-size: clamp(34px, 6vw, 52px);
}

.cta__text {
  font-size: 17px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
  color: rgb(255 255 255 / 92%);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form {
  display: grid;
  gap: 18px;
  max-width: 620px;
}

.form__row {
  display: grid;
  gap: 6px;
}

.form__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--grey-700);
}

.form__hint {
  font-weight: 400;
  color: var(--grey-500);
}

.form__control {
  background: var(--white);
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  width: 100%;
}

.form__control:focus-visible {
  border-color: var(--blue);
}

.form__control::placeholder {
  color: var(--placeholder);
}

textarea.form__control {
  min-height: 150px;
  resize: vertical;
}

/* Honeypot: hidden from people, visible to naive bots. */
.form__trap {
  position: absolute;
  left: -9999px;
}

.contact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 48px;
  align-items: start;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--ink);
  color: var(--grey-300);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  padding: 20px var(--gutter);
  max-width: var(--max-width);
  margin-inline: auto;
  font-size: 13px;
}

.footer a {
  color: var(--grey-300);
}

.footer a:hover {
  color: var(--white);
}

.footer__legal a {
  text-decoration: underline;
}

.footer__social {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__social a {
  display: flex;
  align-items: center;
  min-width: 24px;
  min-height: 24px;
  justify-content: center;
}

/* ==========================================================================
   Cookie notice
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--ink);
  color: var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  padding: 16px var(--gutter);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 -2px 12px rgb(0 0 0 / 25%);
}

.cookie-banner__text {
  margin: 0;
  max-width: 68ch;
}

.cookie-banner__text a {
  color: #8fb6f5;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner__text a:hover {
  color: var(--white);
}

.cookie-banner__btn {
  flex: none;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 28px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.cookie-banner__btn--accept {
  background: var(--blue);
  color: var(--white);
}

.cookie-banner__btn--accept:hover {
  background: var(--blue-dark);
}

.cookie-banner :focus-visible {
  outline-color: var(--white);
}

/* ==========================================================================
   Utility
   ========================================================================== */

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-head {
  padding-block: clamp(32px, 5vw, 56px) clamp(20px, 3vw, 32px);
}

.center {
  text-align: center;
}

/* ==========================================================================
   Small layout helpers.

   These exist because the Content-Security-Policy in netlify.toml forbids
   inline styles (`style-src 'self'` with no 'unsafe-inline'). A `style="…"`
   attribute is silently dropped by the browser on the live site while still
   working in local dev, which makes it a genuinely invisible class of bug.
   Use these instead of a style attribute.
   ========================================================================== */

.u-mt-16 { margin-top: 16px; }
.u-mt-20 { margin-top: 20px; }
.u-mt-28 { margin-top: 28px; }
.u-mb-28 { margin-bottom: 28px; }
.u-mb-32 { margin-bottom: 32px; }
.u-mb-36 { margin-bottom: 36px; }

/* Section that follows a page-head, so it needs no top padding of its own. */
.section--flush { padding-top: 0; }

/* Short pages (404, thanks) that would otherwise leave the footer high. */
.page-head--tall { min-height: 46vh; }

.u-accent { color: var(--blue); }

.news-card__title--lead { font-size: 24px; }
