@import url('fonts.css');

/* ==========================================================================
   Chillee Racing – site styles
   ========================================================================== */

:root {
  /* Brand red, matched to the Chillee Racing logo (#c11011), lifted slightly for screens */
  --color-primary: #d3141a;
  --color-primary-bright: #f0393e; /* hovers, glows and red text on dark backgrounds */
  --color-primary-deep: #9e0d11;

  --color-bg: #121619;
  --color-surface: #1a2024;
  --color-surface-2: #232b30;
  --color-text: #d8dcdf;
  --color-muted: #a3abb0;
  --color-white: #fff;
  --color-black: #000;
  --color-gold: #ffc629;
  --color-line: rgba(255, 255, 255, 0.12);
  --color-edge: rgba(255, 255, 255, 0.07);

  --font-heading: 'Road Rage', system-ui, sans-serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;

  --section-width: 1120px;
  --section-pad-y: clamp(64px, 9vw, 110px);
  --section-pad-x: 20px;
  --radius: 1rem;
  --shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 34px 70px -14px rgba(0, 0, 0, 0.75);
  --shadow-red: 0 12px 28px -6px rgba(211, 20, 26, 0.55);
  --header-height: 88px;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --transition: 250ms var(--ease-out);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  scrollbar-color: var(--color-primary) var(--color-bg);
  accent-color: var(--color-primary);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--color-primary);
  color: var(--color-white);
}

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

img {
  height: auto;
}

a {
  color: var(--color-primary-bright);
  text-underline-offset: 3px;
  transition: color var(--transition);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

h1 { font-size: clamp(3.4rem, 8vw, 6rem); line-height: 1.05; }
h2 { font-size: clamp(2.8rem, 6vw, 4rem); }
h3 { font-size: clamp(2.4rem, 4.5vw, 3.2rem); }
h4,
h5,
h6 { font-size: 2.4rem; }

/* A heading that should look smaller than its level */
.h3 { font-size: clamp(2.4rem, 4.5vw, 3.2rem); }

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--color-white);
  font-weight: 600;
}

a strong {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 300;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--color-white);
  color: var(--color-black);
}

.skip-link:focus {
  top: 1rem;
}

main:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

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

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

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

.section--surface {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(211, 20, 26, 0.08), transparent 70%),
    var(--color-surface);
}

.section--flush-top {
  padding-top: 0;
}

.container {
  width: 100%;
  max-width: var(--section-width);
  margin: 0 auto;
}

.stack-l > * + * { margin-top: 3rem; }
.stack-m > * + * { margin-top: 2rem; }
.stack-s > * + * { margin-top: 1rem; }

.centre {
  text-align: center;
}

.narrow {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.text-l {
  font-size: 1.2rem;
  font-weight: 600;
}

.text-s {
  font-size: 15px;
}

.mini-heading {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: none;
  transition: background-color var(--transition), transform var(--transition);
}

a.mini-heading:hover {
  background: var(--color-primary-bright);
  color: var(--color-white);
  transform: translateY(-2px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background-color var(--transition),
    background-position 600ms var(--ease-out),
    color var(--transition),
    border-color var(--transition);
}

.button::after {
  content: "";
  width: 0.9em;
  height: 0.9em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button:hover::after {
  transform: translateX(4px);
}

.button:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 80ms;
}

/* Solid red, with a light sweep across it on hover */
.button--primary {
  background: linear-gradient(110deg, var(--color-primary) 35%, var(--color-primary-bright) 50%, var(--color-primary) 65%) 100% 0 / 260% 100%;
  color: var(--color-white);
}

.button--primary:hover {
  background-position: 0 0;
  color: var(--color-white);
  box-shadow: var(--shadow-red);
}

.button--outline {
  border-color: rgba(255, 255, 255, 0.75);
  background: transparent;
  color: var(--color-white);
}

.button--outline:hover {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.5);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ---------- Trophy divider (under headings) ---------- */

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 200px;
  color: var(--color-gold);
}

.centre .divider,
.divider--centre {
  margin-left: auto;
  margin-right: auto;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  transition: transform 800ms var(--ease-out) 200ms;
}

.divider::before {
  background: linear-gradient(to right, transparent, var(--color-primary));
  transform-origin: right;
}

.divider::after {
  background: linear-gradient(to left, transparent, var(--color-primary));
  transform-origin: left;
}

.divider svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  filter: drop-shadow(0 0 6px rgba(255, 198, 41, 0.35));
  transition: transform 500ms var(--ease-out) 150ms;
}

.heading-group > * + * {
  margin-top: 0.75rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 22, 25, 0.88);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color var(--transition);
}

.site-header.is-scrolled {
  background: rgba(18, 22, 25, 0.96);
}

/* Thin gold bar along the bottom of the header that fills as you scroll (set by script.js) */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--color-gold), #fff2b3);
  transform: scaleX(var(--scroll, 0));
  transform-origin: left;
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1440px;
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
  transition: min-height var(--transition);
}

.is-scrolled .site-header__inner {
  min-height: 70px;
}

/* The logo hangs below the header like a badge, then tucks in once you scroll */
.site-logo {
  position: absolute;
  top: 26px;
  left: 50%;
  width: 96px;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
  transition: top 350ms var(--ease-out), width 350ms var(--ease-out), transform 350ms var(--ease-out);
}

.is-scrolled .site-logo {
  top: 6px;
  width: 52px;
}

.site-logo:hover {
  transform: translateX(-50%) scale(1.08) rotate(-3deg);
}

.site-logo img {
  width: 100%;
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary-bright);
  transform: scaleX(0);
  transition: transform 300ms var(--ease-out);
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.main-nav a[aria-current="page"] {
  color: var(--color-white);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  display: flex;
  padding: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.social-icons a:hover {
  background: var(--color-primary);
  box-shadow: var(--shadow-red);
  transform: translateY(-2px) scale(1.08);
}

.social-icons svg {
  width: 18px;
  height: 18px;
  fill: var(--color-white);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--color-white);
  cursor: pointer;
  transition: background-color var(--transition);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle__lines,
.menu-toggle__lines::before,
.menu-toggle__lines::after {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 300ms var(--ease-out), background-color 200ms;
}

.menu-toggle__lines {
  position: relative;
}

.menu-toggle__lines::before,
.menu-toggle__lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle__lines::before { top: -7px; }
.menu-toggle__lines::after { top: 7px; }

.menu-toggle[aria-expanded="true"] .menu-toggle__lines {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines::after {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1119px) {
  :root {
    --header-height: 76px;
  }

  .site-logo {
    top: 18px;
    width: 78px;
  }

  .is-scrolled .site-header__inner {
    min-height: 64px;
  }

  .is-scrolled .site-logo {
    top: 6px;
    width: 46px;
  }

  .js .menu-toggle {
    display: flex;
  }

  .js .main-nav {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    background: rgba(18, 22, 25, 0.98);
    border-bottom: 2px solid var(--color-primary);
    box-shadow: var(--shadow);
    transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), visibility 0s 250ms;
  }

  .js .main-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), visibility 0s;
  }

  .js .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

  .js .main-nav a {
    padding: 0.9rem var(--section-pad-x);
    border-radius: 0;
    font-size: 1.05rem;
  }

  .js .main-nav a::after {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    transform: scaleY(0);
  }

  .js .main-nav a:hover::after,
  .js .main-nav a[aria-current="page"]::after {
    transform: scaleY(1);
  }

  .js .main-nav a[aria-current="page"] {
    background: var(--color-surface);
  }

  /* Without JavaScript the menu simply wraps instead of collapsing */
  html:not(.js) .main-nav a {
    padding: 0.5rem 0.6rem;
  }
}

@media (max-width: 767px) {
  .header-actions .social-icons {
    display: none;
  }
}

/* Small phones: a compact Contact button so it clears the centred logo */
@media (max-width: 479px) {
  .header-actions .button {
    padding: 9px 14px;
    font-size: 0.75rem;
  }

  .header-actions .button::after {
    display: none;
  }
}

/* ---------- Heroes ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 150px var(--section-pad-x) 80px;
  overflow: hidden;
  isolation: isolate; /* keep the tint layers inside the banner, so overlapping content sits on top */
  background: var(--color-surface);
  color: var(--color-white);
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* Red brand tint that fades into the page colour at the bottom */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(193, 16, 17, 0.62) 0%, rgba(193, 16, 17, 0.5) 55%, rgba(18, 22, 25, 0.92) 100%);
}

.hero > :not(.hero__video):not(.hero__bg):not(.hero__scroll) {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: var(--color-white);
}

.hero--page {
  min-height: 440px;
}

.hero--home {
  min-height: 85vh;
  padding-top: 140px;
}

.hero__video,
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__intro {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 600;
  line-height: 1.45;
}

.hero__sponsors {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

/* Sponsor logos sit on a frosted strip so every logo is readable over the red */
.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2.25rem;
  margin: 0;
  padding: 1rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.25rem;
  background: rgba(10, 12, 14, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  list-style: none;
}

.sponsor-logos a {
  display: block;
  transition: transform 300ms var(--ease-out), opacity 300ms, filter 300ms;
}

.sponsor-logos:hover a {
  opacity: 0.55;
}

.sponsor-logos a:hover,
.sponsor-logos a:focus-visible {
  opacity: 1;
  transform: scale(1.12);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.sponsor-logos img {
  width: auto;
  height: 50px;
}

/* Bouncing "scroll down" cue at the bottom of the home banner */
.hero__scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(3rem + 24px); /* clear of the photos that overlap the bottom of the banner */
  width: 30px;
  height: 48px;
  margin-left: -15px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  transition: border-color var(--transition), transform var(--transition);
}

.hero__scroll span {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 4px;
  height: 9px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--color-white);
}

.hero__scroll:hover {
  border-color: var(--color-white);
  transform: translateY(3px);
}

@media (max-width: 767px) {
  .hero {
    padding-top: 100px;
    padding-bottom: 50px;
  }

  .hero--page {
    min-height: 320px;
  }

  .hero--home {
    padding-top: 120px;
    padding-bottom: 100px;
  }

  .sponsor-logos {
    padding: 1rem 1.25rem;
  }

  .sponsor-logos img {
    max-height: 40px;
  }
}

/* ---------- Cards (rounded panels with a shadow) ---------- */

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out), border-color 400ms;
}

.card__body {
  padding: 2rem;
}

/* Two-column card: photo on one side, text on the other */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface));
}

.split:hover {
  border-color: rgba(211, 20, 26, 0.35);
  box-shadow: var(--shadow-lift);
}

.split__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  overflow: hidden;
  background: var(--color-surface);
}

.split__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.split:hover .split__img {
  transform: scale(1.06);
}

.split__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--tint, transparent);
  transition: opacity 400ms;
}

.split__media > :not(.split__img) {
  position: relative;
  z-index: 2;
}

.split__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.75rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  font-size: 15px;
  line-height: 1.7;
}

.split__body ul {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.split__body li {
  position: relative;
  margin-bottom: 0.6em;
  padding-left: 1.4em;
}

.split__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55em;
  height: 0.55em;
  border-radius: 2px;
  background: var(--color-primary);
  transform: rotate(45deg);
}

.split__body .button {
  align-self: flex-start;
}

.split__body a:not(.button) {
  color: var(--color-primary-bright);
}

.split__body a:not(.button):hover {
  color: var(--color-white);
}

.split--reverse .split__media {
  order: 2;
}

@media (max-width: 1023px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split__media {
    min-height: 300px;
  }

  .split--reverse .split__media {
    order: 0;
  }
}

/* ---------- Home: photo mosaic ---------- */

.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: -3rem;
  background: var(--color-bg);
}

.mosaic__tile {
  overflow: hidden;
}

.mosaic__tile img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 900ms var(--ease-out), filter 400ms;
}

.mosaic__tile:hover img {
  transform: scale(1.08);
}

.mosaic:hover .mosaic__tile:not(:hover) img {
  filter: brightness(0.65) saturate(0.8);
}

.mosaic__tile:nth-child(2) {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 767px) {
  .mosaic {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -2rem;
  }

  .mosaic__tile:nth-child(2) {
    order: -1;
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* ---------- Home: driver profile ---------- */

.profile {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.profile .split__body {
  background: transparent;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.facts dl {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 0.75rem;
}

.facts dt,
.facts dd {
  margin: 0;
  padding: 8px 14px;
}

.facts dt {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
}

.facts dd {
  color: var(--color-white);
}

.facts dt:not(:last-of-type),
.facts dd:not(:last-of-type) {
  border-bottom: 1px solid var(--color-line);
}

@media (max-width: 1023px) {
  .profile {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 479px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Home: social cards ---------- */

.social-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.social-card {
  background: linear-gradient(160deg, var(--color-primary), var(--color-primary-deep));
  color: var(--color-white);
  text-align: center;
}

.social-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift), var(--shadow-red);
}

.social-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}

.social-card:hover img {
  transform: scale(1.05);
}

.social-card .card__body {
  position: relative;
}

.social-card .card__body > * + * {
  margin-top: 1rem;
}

@media (max-width: 767px) {
  .social-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Call to action band (red) ---------- */

.cta {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4rem) 2rem;
  overflow: hidden;
  background:
    repeating-linear-gradient(-55deg, rgba(255, 255, 255, 0.035) 0 18px, transparent 18px 36px),
    radial-gradient(ellipse 70% 120% at 85% 50%, rgba(255, 255, 255, 0.12), transparent 60%),
    linear-gradient(120deg, var(--color-primary-deep), var(--color-primary) 55%);
  color: var(--color-white);
}

.cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  max-width: var(--section-width);
  margin: 0 auto;
}

.cta__text {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
}

.cta__text > img {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
  transition: transform 500ms var(--ease-out);
}

.cta:hover .cta__text > img {
  transform: rotate(-6deg) scale(1.05);
}

.cta h2,
.cta h3 {
  color: var(--color-white);
}

.cta strong {
  color: var(--color-white);
}

.cta__photo {
  justify-self: center;
  width: 400px;
  max-width: 100%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  transform: rotate(-4deg);
  transition: transform 500ms var(--ease-out);
}

.cta__photo:hover {
  transform: rotate(0deg) scale(1.03);
}

.cta__photo img {
  width: 100%;
}

@media (max-width: 1023px) {
  .cta__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .cta__text {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .cta__text > img {
    width: 72px;
  }
}

/* ---------- Sponsors: scrolling logo strip ---------- */

.logo-strip {
  position: relative;
  overflow: hidden;
  padding: 0.75rem 0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.logo-strip::before,
.logo-strip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 40px;
  pointer-events: none;
}

.logo-strip::before {
  left: 0;
  background: linear-gradient(to right, var(--color-surface-2), transparent);
}

.logo-strip::after {
  right: 0;
  background: linear-gradient(to left, var(--color-surface), transparent);
}

/* The track holds four identical groups of logos and slides one group's width, then repeats */
.logo-strip__track {
  display: flex;
  width: max-content;
  animation: logo-scroll 30s linear infinite;
}

.logo-strip:hover .logo-strip__track {
  animation-play-state: paused;
}

.logo-strip__group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 60px;
  padding-right: 60px;
}

.logo-strip__group img {
  width: auto;
  height: 40px;
}

@keyframes logo-scroll {
  to { transform: translateX(-25%); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-strip__track {
    width: auto;
    animation: none;
  }

  .logo-strip__group {
    flex-wrap: wrap;
    flex: 1;
    gap: 1.5rem 60px;
    padding: 0 1rem;
  }

  .logo-strip__group[aria-hidden="true"] {
    display: none;
  }
}

/* ---------- Sponsors page: logo over photo ---------- */

.sponsor-logo {
  width: auto;
  max-width: 80%;
  height: var(--logo-height, 100px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.45));
  transition: transform 600ms var(--ease-out);
}

.split:hover .sponsor-logo {
  transform: scale(1.08);
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
  margin: -3rem 0 0;
  padding: 0;
  list-style: none;
}

.gallery a {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--color-edge);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.6);
  transition: transform 350ms var(--ease-out), box-shadow 350ms var(--ease-out);
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 700ms var(--ease-out);
}

/* Red wash and a magnifier appear on hover */
.gallery a::before,
.gallery a::after {
  content: "";
  position: absolute;
  opacity: 0;
  transition: opacity 300ms, transform 350ms var(--ease-out);
}

.gallery a::before {
  inset: 0;
  background: linear-gradient(to top, rgba(158, 13, 17, 0.75), rgba(211, 20, 26, 0.15));
}

.gallery a::after {
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d3141a' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 22px no-repeat,
    var(--color-white);
  transform: scale(0.6);
}

.gallery a:hover,
.gallery a:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px -12px rgba(0, 0, 0, 0.8);
}

.gallery a:hover img,
.gallery a:focus-visible img {
  transform: scale(1.08);
}

.gallery a:hover::before,
.gallery a:hover::after,
.gallery a:focus-visible::before,
.gallery a:focus-visible::after {
  opacity: 1;
}

.gallery a:hover::after,
.gallery a:focus-visible::after {
  transform: scale(1);
}

@media (max-width: 1119px) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: -2rem; }
}

@media (max-width: 479px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lightbox (built by script.js) */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 10, 12, 0.94);
}

.lightbox[open] {
  animation: fade-in 250ms ease-out;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.lightbox__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 3.5rem 4rem;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox__figure img.is-changing {
  animation: photo-in 350ms var(--ease-out);
}

.lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}

.lightbox button:hover {
  background: var(--color-primary);
}

.lightbox button:active {
  transform: scale(0.92);
}

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { top: 50%; left: 0.75rem; margin-top: -24px; }
.lightbox__next { top: 50%; right: 0.75rem; margin-top: -24px; }

.lightbox__count {
  position: absolute;
  top: 1.6rem;
  left: 1.25rem;
  color: var(--color-muted);
  font-size: 14px;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes photo-in {
  from { opacity: 0; transform: scale(0.96); }
}

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

.contact-panel {
  background: rgba(0, 0, 0, 0.2);
}

.contact-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.05rem;
}

.contact-list li {
  margin: 0;
  padding: 0;
}

.contact-list li::before {
  display: none;
}

.split__body .contact-list a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-white);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform var(--transition), border-color var(--transition), background-color var(--transition);
}

.split__body .contact-list a:hover {
  border-color: var(--color-primary);
  background: rgba(211, 20, 26, 0.1);
  color: var(--color-white);
  transform: translateX(4px);
}

.contact-list .icon {
  display: flex;
  flex: none;
  padding: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-list a:hover .icon {
  transform: scale(1.1) rotate(-6deg);
  box-shadow: var(--shadow-red);
}

.contact-list svg {
  width: 18px;
  height: 18px;
  fill: var(--color-white);
}

/* ---------- Plain text pages (privacy policy) ---------- */

.prose {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.75;
}

.prose h2 {
  margin: 2.5rem 0 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-line);
  font-size: 2.2rem;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose ul {
  margin: 0 0 1em;
  padding-inline-start: 1.25em;
}

.prose li::marker {
  color: var(--color-primary);
}

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

.site-footer {
  position: relative;
  padding: 4rem var(--section-pad-x) 2.5rem;
  border-top: 2px solid var(--color-primary);
  background: linear-gradient(180deg, #0e1215, var(--color-bg));
  color: var(--color-text);
  font-size: 14px;
}

/* Faint chequered-flag band along the top edge */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: conic-gradient(rgba(255, 255, 255, 0.07) 25%, transparent 0 50%, rgba(255, 255, 255, 0.07) 0 75%, transparent 0) 0 0 / 16px 16px;
  -webkit-mask: linear-gradient(to bottom, #000, transparent);
  mask: linear-gradient(to bottom, #000, transparent);
}

.site-footer a {
  color: var(--color-text);
}

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

.site-footer h2 {
  margin-bottom: 1rem;
  color: var(--color-white);
  font-size: 2.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 2.5rem;
}

.footer-about {
  display: grid;
  grid-template-columns: 18% minmax(0, 1fr);
  gap: 32px;
}

.footer-about img {
  max-width: 150px;
  margin: 0 auto;
  transition: transform 500ms var(--ease-out);
}

.footer-about img:hover {
  transform: rotate(-4deg) scale(1.05);
}

.footer-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.icon-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.icon-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--transition), transform var(--transition);
}

.icon-list a:hover {
  transform: translateX(4px);
}

.icon-list svg {
  flex: none;
  width: 7px;
  height: 7px;
  fill: var(--color-primary);
  transition: transform var(--transition), fill var(--transition);
}

.icon-list a:hover svg {
  fill: var(--color-primary-bright);
  transform: scale(1.4);
}

.icon-list--contact svg {
  width: 16px;
  height: 16px;
}

.icon-list--contact a:hover svg {
  transform: none;
}

.site-footer .social-icons {
  gap: 14px;
  margin-top: 1.25rem;
}

.site-footer .social-icons a {
  padding: 10px;
  background: var(--color-primary);
}

.site-footer .social-icons a:hover {
  background: var(--color-primary-bright);
}

.site-footer .social-icons svg {
  width: 22px;
  height: 22px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 2em;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
}

.footer-bottom ul {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom a {
  color: var(--color-muted);
}

@media (max-width: 1119px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .footer-about,
  .footer-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-about img {
    max-width: 110px;
    margin: 0;
  }
}

/* ---------- Back to top button (added by script.js) ---------- */

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: var(--shadow-red);
  color: var(--color-white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 300ms, transform 300ms var(--ease-out), visibility 0s 300ms, background-color var(--transition);
}

.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 300ms, transform 300ms var(--ease-out), visibility 0s, background-color var(--transition);
}

.to-top:hover {
  background: var(--color-primary-bright);
  transform: translateY(-3px);
}

.to-top:active {
  transform: scale(0.92);
}

.to-top svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------- Not found page ---------- */

.not-found {
  min-height: 60vh;
}

/* ==========================================================================
   Animations – only for visitors who haven't asked for reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  /* Soft cross-fade between pages in browsers that support it */
  @view-transition {
    navigation: auto;
  }

  /* Banner text rises in when the page opens */
  .hero h1,
  .hero__intro,
  .hero__sponsors,
  .hero .button {
    animation: rise-in 900ms var(--ease-out) both;
  }

  .hero h1 { animation-delay: 100ms; }
  .hero__intro { animation-delay: 250ms; }
  .hero__sponsors { animation-delay: 400ms; }
  .hero .button { animation-delay: 400ms; }

  /* Banner photos drift slowly towards their resting size */
  .hero__bg {
    animation: settle 14s var(--ease-out) both;
  }

  .hero__scroll {
    animation: fade-in 800ms 1s both;
  }

  .hero__scroll span {
    animation: scroll-cue 1.8s ease-in-out infinite;
  }

  /* Scroll-in reveals: script.js adds .reveal to elements below the fold, then .is-visible as they scroll in */
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity 800ms var(--ease-out) var(--reveal-delay, 0ms),
      transform 800ms var(--ease-out) var(--reveal-delay, 0ms);
  }

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

  .reveal .divider::before,
  .reveal .divider::after {
    transform: scaleX(0);
  }

  .reveal .divider svg {
    transform: scale(0) rotate(-30deg);
  }

  .reveal.is-visible .divider::before,
  .reveal.is-visible .divider::after {
    transform: none;
  }

  .reveal.is-visible .divider svg {
    transform: none;
  }

  /* Mobile menu links slide in one after another */
  .js .main-nav.is-open li {
    animation: slide-in 400ms var(--ease-out) both;
  }

  .js .main-nav.is-open li:nth-child(2) { animation-delay: 40ms; }
  .js .main-nav.is-open li:nth-child(3) { animation-delay: 80ms; }
  .js .main-nav.is-open li:nth-child(4) { animation-delay: 120ms; }
  .js .main-nav.is-open li:nth-child(5) { animation-delay: 160ms; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(28px); }
}

@keyframes settle {
  from { transform: scale(1.12); }
}

@keyframes scroll-cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(14px); }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(-16px); }
}

@media (min-width: 1120px) {
  .js .main-nav.is-open li {
    animation: none;
  }
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
