/* ============================================================
   Racing Club Savaneta
   One stylesheet: tokens, base, components, page compositions.
   ============================================================ */

/* ---------------------------------------------------------- *
   1. Tokens
 * ---------------------------------------------------------- */

:root {
  /* Surfaces. Not neutral black, a plum-tinted ink, lifted so photography
     and fuchsia sit in the same world instead of floating on a void. */
  --bg: #14101a;
  --bg-sunken: #0e0b13;
  --bg-raised: #1b1622;
  --surface: #1e1926;
  --surface-hi: #262031;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);

  /* Ink */
  --ink: #f7f3f6;
  --ink-muted: #c8bfcb;
  --ink-faint: #9a90a0;
  --ink-inverse: #14101a;

  /* Accent, used for emphasis, never for decoration alone.
     Three roles, split so each one clears WCAG AA on its own background:
     --accent      brand fuchsia, for fills and borders
     --accent-text lifted, for small text on dark (5.99:1)
     --accent-deep for fills that carry white text (5.04:1) */
  --accent: #ec008c;
  --accent-text: #ff45ad;
  --accent-lift: #ff45ad;
  --accent-deep: #a3005f;
  --accent-fill: #d6007f;
  --accent-soft: rgba(236, 0, 140, 0.14);

  /* Secondary light source. Warm gold plays against the fuchsia so the
     atmosphere reads as floodlit, not monochrome. */
  --glow-warm: #ff8a3d;
  --glow-cool: #7b3dff;

  /* Gradients */
  /* Runs light→deep but starts at --accent-fill so white labels stay legible
     across the whole sweep, not just at the dark end. */
  --grad-accent: linear-gradient(135deg, var(--accent-fill), #c00072 55%, var(--accent-deep));
  --grad-accent-vivid: linear-gradient(135deg, var(--accent-lift), var(--accent) 50%, var(--accent-deep));
  --grad-surface: linear-gradient(160deg, var(--surface-hi), var(--surface) 55%, var(--bg-raised));
  --grad-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 45%);

  /* Result states */
  --win: #3fbf5f;
  --draw: #e0a83b;
  --loss: #d0503c;

  /* Type */
  --font-display: "Anton", Impact, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, sans-serif;

  --text-xs: 0.6875rem; /* 11 */
  --text-sm: 0.8125rem; /* 13 */
  --text-base: 1rem;
  --text-lg: 1.0625rem; /* 17 */
  --text-h3: clamp(1.25rem, 2vw, 1.5rem);
  --text-h2: clamp(1.75rem, 4vw, 2.75rem);
  --text-h1: clamp(2.25rem, 6vw, 4rem);
  --text-hero: clamp(2.75rem, 7.5vw, 5.5rem);

  /* Space, 4pt scale */
  --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;

  --section: clamp(3.5rem, 7vw, 6.5rem);
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --measure: 60ch;
  --max: 1180px;

  /* Radii, two only */
  --r: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Motion */
  --fast: 140ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------- *
   2. Base
 * ---------------------------------------------------------- */

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

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

body {
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ---------- Atmosphere ----------
   Two fixed layers sit behind and in front of everything: ambient light
   pools (behind) and film grain (in front). They give the page depth
   without any single section having to carry a decorative background.
------------------------------------------------------------------- */

/* Behind: three soft light sources, fixed so they drift as you scroll. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 78% 0%, rgba(236, 0, 140, 0.26), transparent 70%),
    radial-gradient(45% 40% at 8% 12%, rgba(123, 61, 255, 0.18), transparent 70%),
    radial-gradient(55% 45% at 50% 100%, rgba(255, 138, 61, 0.12), transparent 70%);
}

/* In front: fine grain so the flat fields read as a surface, not a screen. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: var(--s-3) var(--s-4);
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------- *
   3. Layout
 * ---------------------------------------------------------- */

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

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

.section--tight {
  padding-block: calc(var(--section) * 0.55);
}

.section--sunken {
  position: relative;
  background:
    linear-gradient(180deg, rgba(236, 0, 140, 0.07), transparent 30%),
    linear-gradient(180deg, var(--bg-sunken), var(--bg-raised));
  border-block: 1px solid var(--line);
}

/* Hairline of light along the top edge, like a lit seam */
.section--sunken::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236, 0, 140, 0.7), transparent);
}

/* Auto-fitting grids. min() lets tracks shrink below their floor on phones. */
.grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

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

.grid--narrow {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.stack--lg {
  gap: var(--s-6);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* ---------------------------------------------------------- *
   4. Type
 * ---------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.title-page {
  font-size: var(--text-h1);
}

.title-section {
  font-size: var(--text-h2);
}

.title-sub {
  font-size: var(--text-h3);
}

.lead {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  max-width: 52ch;
}

.prose {
  color: var(--ink-muted);
  max-width: var(--measure);
}

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

/* Vertical flow. Headings and eyebrows earn space from what follows them,
   so pages don't need one-off margins sprinkled through the markup. */
:where(h1, h2, h3) + :where(.prose, .lead, p) {
  margin-top: var(--s-4);
}

:where(.eyebrow) + :where(h1, h2, h3) {
  margin-top: var(--s-3);
}

:where(h2, h3) + :where(.schedule, .fixture, .person, .listing, .table-scroll, .form-guide) {
  margin-top: var(--s-6);
}

:where(.title-sub) + * {
  margin-top: var(--s-6);
}

.note {
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

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

/* Section header: eyebrow → title → optional side note */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-6);
  flex-wrap: wrap;
  margin-bottom: var(--s-12);
}

.section-head__note {
  max-width: 34ch;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.section-head .eyebrow + * {
  margin-top: var(--s-3);
}

/* ---------------------------------------------------------- *
   5. Buttons
 * ---------------------------------------------------------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  padding: var(--s-4) var(--s-6);
  /* Explicit, or <button> elements inherit the browser's grey chrome */
  background: none;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  text-align: center;
  transition:
    background var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.btn--primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 8px 24px -10px rgba(236, 0, 140, 0.9);
}

.btn--primary:hover {
  filter: brightness(1.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 12px 32px -10px rgba(236, 0, 140, 1);
}

.btn--quiet {
  border-color: var(--line-strong);
  color: var(--ink);
}

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

.btn--inverse {
  background: var(--ink-inverse);
  color: #fff;
}

.btn--inverse:hover {
  background: #000;
}

.btn--block {
  display: block;
  width: 100%;
}

/* Text link with underline on hover only */
.link {
  color: var(--accent-text);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------------------------------------------------- *
   6. Card, one component, a few modifiers
 * ---------------------------------------------------------- */

.card {
  position: relative;
  background: var(--grad-surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s-6);
  overflow: hidden;
}

/* Top-edge sheen, the light that makes a panel read as a raised surface */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-sheen);
  pointer-events: none;
}

.card > * {
  position: relative;
}

.card--lg {
  border-radius: var(--r-lg);
  padding: var(--s-8);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card--link {
  transition:
    border-color var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.card--link:hover {
  border-color: rgba(236, 0, 140, 0.55);
  transform: translateY(-3px);
  box-shadow:
    0 18px 40px -18px rgba(0, 0, 0, 0.8),
    0 0 30px -12px rgba(236, 0, 140, 0.45);
}

/* Photo inside a card warms and lifts with the card */
.card--link .card__media img {
  transition:
    transform 500ms var(--ease),
    filter 500ms var(--ease);
}

.card--link:hover .card__media img {
  transform: scale(1.04);
  filter: saturate(1.12);
}

.card__title {
  font-size: var(--text-h3);
  margin-bottom: var(--s-2);
}

.card__body {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

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

/* Media inside a card */
.card__media {
  aspect-ratio: 16 / 10;
  background: var(--bg-sunken);
}

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

/* Small uppercase tag */
.tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.tag--chip {
  display: inline-block;
  background: var(--accent-soft);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
}

/* Stat pair */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.stat__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink);
}

.stat__value--lg {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.stat__label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
}

/* Divider above a group of stats inside a card */
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------- *
   7. Header & footer
 * ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 16, 26, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  max-width: var(--max);
  margin-inline: auto;
  padding: var(--s-3) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.brand img {
  height: 40px;
  width: auto;
}

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.brand__place {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--ink-muted);
}

.site-nav a:hover {
  color: var(--ink);
}

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

.site-nav .btn {
  color: #fff;
  padding: var(--s-2) var(--s-4);
}

/* Teams dropdown. Opens on hover and on keyboard focus; the wrapper's padding
   carries the pointer across the gap so the menu does not close on the way. */
.nav-drop {
  position: relative;
  padding-block: var(--s-3);
  margin-block: calc(-1 * var(--s-3));
}

.nav-drop > a::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
}

.nav-drop__menu {
  position: absolute;
  top: 100%;
  left: calc(-1 * var(--s-3));
  min-width: 13rem;
  display: grid;
  padding: var(--s-2);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    visibility var(--fast);
}

.nav-drop:hover .nav-drop__menu,
.nav-drop:focus-within .nav-drop__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-nav .nav-drop__menu a {
  padding: var(--s-2) var(--s-3);
  border-radius: calc(var(--r) - 4px);
  white-space: nowrap;
}

.site-nav .nav-drop__menu a:hover,
.site-nav .nav-drop__menu a:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
}

.site-nav .nav-drop__menu a[aria-current="page"] {
  color: var(--accent-text);
}

/* Language switcher. Stays visible at every width: on a bilingual island the
   language choice matters as much as the navigation itself. */
.header-tools {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.lang {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.lang__btn {
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: var(--s-2) var(--s-3);
  min-height: 36px;
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  transition:
    background var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.lang__btn:hover {
  color: var(--ink);
}

.lang__btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--s-2);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  padding: 0 var(--gutter) var(--s-4);
}

.mobile-nav[data-open="true"] {
  display: flex;
}

.mobile-nav a {
  padding: var(--s-4) 0;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
}

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

.mobile-nav .btn {
  color: #fff;
  border-bottom: none;
  margin-top: var(--s-4);
}

/* "Nos Teamnan" on mobile opens the squad list in place. */
.mobile-nav__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--s-4) 0;
  font: inherit;
  text-align: left;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.mobile-nav__group::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.25em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform var(--fast) var(--ease);
}

.mobile-nav__group[aria-expanded="true"] {
  color: var(--ink);
}

.mobile-nav__group[aria-expanded="true"]::after {
  transform: translateY(0.15em) rotate(-135deg);
}

.mobile-nav__sub {
  display: grid;
  padding-left: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.mobile-nav__sub[hidden] {
  display: none;
}

.mobile-nav .mobile-nav__sub a {
  border-bottom: none;
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

.site-footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--line);
}

.site-footer__grid {
  max-width: var(--max);
  margin-inline: auto;
  padding: var(--s-16) var(--gutter) var(--s-8);
  display: grid;
  gap: var(--s-8);
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s-4);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.site-footer__links a:hover {
  color: var(--accent);
}

.site-footer__legal {
  border-top: 1px solid var(--line);
  padding: var(--s-4) var(--gutter);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ---------------------------------------------------------- *
   8. Hero & page headers
 * ---------------------------------------------------------- */

.page-header {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding-block: calc(var(--section) * 0.7);
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(55% 100% at 85% 0%, rgba(236, 0, 140, 0.2), transparent 70%);
}

.page-header > * {
  position: relative;
}

.page-header .eyebrow + * {
  margin-top: var(--s-4);
}

.page-header .lead {
  margin-top: var(--s-6);
}

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Floodlight sweep across the top of the page */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 120%;
  pointer-events: none;
  background:
    radial-gradient(50% 50% at 72% 38%, rgba(236, 0, 140, 0.3), transparent 68%),
    radial-gradient(40% 40% at 20% 20%, rgba(123, 61, 255, 0.22), transparent 70%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: var(--s-12);
  align-items: center;
  padding-block: var(--section);
}

.hero__title {
  font-size: var(--text-hero);
  margin-block: var(--s-4) var(--s-6);
}


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

.hero__stats {
  margin-top: var(--s-12);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}

.hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    0 40px 80px -40px rgba(0, 0, 0, 0.9),
    0 0 60px -30px rgba(236, 0, 140, 0.5);
}

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

/* Colour wash so the photo belongs to the palette rather than fighting it */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(200deg, rgba(236, 0, 140, 0.22), transparent 45%),
    linear-gradient(0deg, rgba(20, 16, 26, 0.55), transparent 55%);
}

/* The club chant. Quiet band, not a shouting billboard. */
.chant {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding-block: var(--s-3);
  white-space: nowrap;
  background: linear-gradient(90deg, transparent, rgba(236, 0, 140, 0.1), transparent);
  /* Fade the ends so the loop slides in and out of the dark */
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.chant__track {
  display: inline-block;
  animation: marquee 40s linear infinite;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.chant__track span {
  padding-inline: var(--s-8);
}

.chant__track .accent {
  color: var(--accent);
}

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

/* ---------------------------------------------------------- *
   8b. Signpost, the three things visitors actually come for
 * ---------------------------------------------------------- */

.signpost__card {
  position: relative;
  display: grid;
  gap: var(--s-2);
  padding: var(--s-6);
  background: var(--grad-surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition:
    border-color var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.signpost__card:hover {
  border-color: rgba(236, 0, 140, 0.55);
  transform: translateY(-3px);
  box-shadow:
    0 18px 40px -18px rgba(0, 0, 0, 0.8),
    0 0 30px -12px rgba(236, 0, 140, 0.45);
}

.signpost__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.signpost__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  text-transform: uppercase;
  line-height: 1;
}

.signpost__note {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* The arrow is the affordance: it says "this whole card is a link" */
.signpost__go {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent-text);
  transition: transform var(--fast) var(--ease);
}

.signpost__card:hover .signpost__go {
  transform: translateX(4px);
}

/* ---------------------------------------------------------- *
   8c. Jump links, land below the sticky header, not behind it
 * ---------------------------------------------------------- */

.team {
  scroll-margin-top: 5.5rem;
}

.jump__title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s-3);
}

/* ---------------------------------------------------------- *
   9. Feature banner, the single loud moment per page
 * ---------------------------------------------------------- */

.banner {
  position: relative;
  overflow: hidden;
  background: var(--grad-accent);
  border-radius: var(--r-lg);
  padding: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  box-shadow: 0 30px 70px -30px rgba(236, 0, 140, 0.75);
}

/* Warm light from one corner, cool from the other, depth inside the block */
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 12% 0%, rgba(255, 138, 61, 0.5), transparent 62%),
    radial-gradient(55% 75% at 92% 100%, rgba(123, 61, 255, 0.4), transparent 62%);
}

.banner h2 {
  font-size: var(--text-h2);
  color: #fff;
}

.banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
  margin: var(--s-4) auto var(--s-8);
}

.banner .row {
  justify-content: center;
}

.banner > * {
  position: relative;
}

/* Image with text laid over it */
.overlay-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 21 / 9;
  min-height: 300px;
}

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

/* No photo yet: the crest on a quiet panel holds the space until one arrives. */
.overlay-media--empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 60%),
    var(--bg-raised);
  border: 1px dashed var(--line-strong);
}

.overlay-media--empty img {
  width: auto;
  height: 45%;
  object-fit: contain;
  opacity: 0.35;
}

.overlay-media__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 9, 16, 0.96) 8%, rgba(12, 9, 16, 0.55) 55%, rgba(12, 9, 16, 0.2));
}

.overlay-media__body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.overlay-media__body h1,
.overlay-media__body h2 {
  font-size: var(--text-h1);
  color: #fff;
  margin-block: var(--s-3) var(--s-2);
  max-width: 20ch;
}

/* Text over photography needs to hold up against a bright frame. */
.overlay-media__body p {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--text-sm);
  max-width: 50ch;
}

.overlay-media__body .tag,
.overlay-media__body .eyebrow {
  color: #ff6ec0;
}

/* A two-row group photo: taller, and only a light fade at the foot so the
   front row's faces are not lost in the shadow. */
.overlay-media--group {
  aspect-ratio: 16 / 9;
}

.overlay-media--group .overlay-media__scrim {
  background: linear-gradient(to top, rgba(12, 9, 16, 0.7), transparent 30%);
}

.overlay-media--tall {
  aspect-ratio: 21 / 8;
  min-height: 320px;
  border-radius: 0;
}

.overlay-media--tall .overlay-media__scrim {
  background:
    linear-gradient(to right, rgba(12, 9, 16, 0.95) 20%, rgba(12, 9, 16, 0.5) 60%, rgba(12, 9, 16, 0.25)),
    linear-gradient(to bottom, rgba(12, 9, 16, 0.5), transparent 40%);
}

.overlay-media--tall .overlay-media__body {
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0;
}

/* ---------------------------------------------------------- *
   10. Fixtures
 * ---------------------------------------------------------- */

.next-match {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(236, 0, 140, 0.55);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(236, 0, 140, 0.22), transparent 65%),
    var(--grad-surface);
  box-shadow: 0 24px 60px -30px rgba(236, 0, 140, 0.6);
}

.next-match > * {
  position: relative;
}

.next-match__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-block: var(--s-6);
}

.next-match__side {
  flex: 1;
  text-align: center;
}

.next-match__code {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.next-match__name {
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.next-match__vs {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

.next-match__when {
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 700;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}

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

.fixture {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.fixture:first-child {
  border-top: 1px solid var(--line);
}

.fixture__date {
  font-family: var(--font-display);
  font-size: var(--text-base);
}

.fixture__comp {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.fixture__match {
  font-size: var(--text-sm);
  font-weight: 600;
}

.fixture__score {
  font-family: var(--font-display);
  font-size: var(--text-base);
  padding: var(--s-1) var(--s-3);
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}

.fixture__score--win {
  border-color: var(--win);
  color: var(--win);
}

.fixture__score--draw {
  border-color: var(--draw);
  color: var(--draw);
}

.fixture__score--loss {
  border-color: var(--loss);
  color: var(--loss);
}

@media (max-width: 480px) {
  .fixture {
    grid-template-columns: 4.25rem 1fr auto;
    gap: var(--s-3);
  }
}

.table-scroll {
  overflow-x: auto;
}

.league-table {
  width: 100%;
  min-width: 26rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.league-table th {
  text-align: center;
  padding: var(--s-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}

.league-table td {
  text-align: center;
  padding: var(--s-3);
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
}

.league-table th:nth-child(2),
.league-table td:nth-child(2) {
  text-align: left;
}

.league-table td:last-child {
  font-family: var(--font-display);
  color: var(--ink);
}

.league-table tr[data-us] td {
  color: var(--ink);
}

.league-table tr[data-us] td:nth-child(2) {
  font-weight: 700;
  color: var(--accent-text);
}

.form-guide {
  display: flex;
  gap: var(--s-2);
}

.form-guide span {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  border: 1px solid;
}

.form-guide span[data-r="W"] {
  color: var(--win);
  border-color: var(--win);
}

.form-guide span[data-r="D"] {
  color: var(--draw);
  border-color: var(--draw);
}

.form-guide span[data-r="L"] {
  color: var(--loss);
  border-color: var(--loss);
}

/* ---------------------------------------------------------- *
   11. Teams
 * ---------------------------------------------------------- */

.team {
  display: grid;
  /* 380px floor keeps the row stacked on tablet, where a 2-up split would
     squeeze the copy into a column too narrow to read. */
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 0;
  align-items: center;
  border-top: 1px solid var(--line);
}

.team:last-child {
  border-bottom: 1px solid var(--line);
}

.team__media {
  aspect-ratio: 4 / 3;
}

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

.team--flip .team__media {
  order: 2;
}

.team__body {
  padding: var(--s-8) 0;
}

.team--flip .team__body {
  padding-inline: 0 var(--s-8);
}

.team:not(.team--flip) .team__body {
  padding-inline: var(--s-8) 0;
}

/* Stacked: drop the side padding and keep photo-above-copy in every row,
   so the alternating desktop rhythm doesn't become a random order on phones. */
@media (max-width: 820px) {
  .team__body,
  .team--flip .team__body,
  .team:not(.team--flip) .team__body {
    padding: var(--s-6) 0;
  }

  .team--flip .team__media {
    order: 0;
  }
}

.team__num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

.team h2 {
  font-size: var(--text-h2);
  margin-block: var(--s-3);
}

/* Schedule rows */
.schedule {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.schedule:first-child {
  border-top: 1px solid var(--line);
}

.schedule__team {
  font-weight: 600;
  font-size: var(--text-sm);
}

.schedule__days {
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.schedule__time {
  font-family: var(--font-display);
  color: var(--accent-text);
}

/* ---------------------------------------------------------- *
   12. Club
 * ---------------------------------------------------------- */

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

.photo-pair img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r);
}

.photo-pair img:last-child {
  margin-top: var(--s-8);
}

.person {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.person:first-child {
  border-top: 1px solid var(--line);
}

.person__initials {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.person__name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.person__role {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.listing {
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
}

.listing:first-child {
  border-top: 1px solid var(--line);
}

.listing__name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.listing__meta {
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ---------------------------------------------------------- *
   13. Forms
 * ---------------------------------------------------------- */

.field {
  display: block;
}

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

.field__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
  transition: border-color var(--fast) var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: var(--s-4);
}

/* Grid gap already spaces these; the stacked-field margin would skew the row. */
.field-grid .field + .field {
  margin-top: 0;
}

.field-grid + .field {
  margin-top: var(--s-4);
}

.form-status {
  margin-top: var(--s-4);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-align: center;
}

.inline-form {
  display: flex;
  gap: var(--s-2);
  max-width: 26rem;
}

.inline-form input {
  flex: 1;
  padding: var(--s-3) var(--s-4);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
}

.inline-form input:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 460px) {
  .inline-form {
    flex-direction: column;
  }
}

/* Filter chips */
.chip {
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--s-2) var(--s-4);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-faint);
  cursor: pointer;
  transition:
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.chip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chip[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--accent);
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------- *
   14. Tablet
 * ---------------------------------------------------------- */

@media (max-width: 1024px) {
  /* Two narrow columns read worse than one wide one at this size */
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }

  /* Photo becomes a landscape band rather than a full-height portrait */
  .hero__media {
    aspect-ratio: 16 / 10;
    max-height: 46vh;
  }

  .hero__media img {
    object-position: center 30%;
  }

  .section-head {
    margin-bottom: var(--s-8);
  }

  .overlay-media--tall {
    aspect-ratio: 16 / 10;
  }
}

/* ---------------------------------------------------------- *
   15. Mobile
 * ---------------------------------------------------------- */

@media (max-width: 860px) {
  :root {
    --section: 3rem;
  }

  /* Compact header so more of the page is visible on a short screen */
  .site-header__bar {
    padding-block: var(--s-2);
  }

  .brand img {
    height: 34px;
  }

  .brand__name {
    font-size: 0.75rem;
  }

  /* 44px minimum touch target, per WCAG 2.2 target size */
  .nav-toggle {
    width: 44px;
    height: 44px;
    justify-content: center;
  }

  /* The menu becomes a sheet: full-width, generous targets, its own surface */
  .mobile-nav {
    background: linear-gradient(180deg, var(--bg-raised), var(--bg));
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.9);
    padding-block: var(--s-2) var(--s-6);
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    animation: sheet-in 200ms var(--ease);
  }

  .mobile-nav a {
    min-height: 52px;
    display: flex;
    align-items: center;
    font-size: 1.0625rem;
    font-weight: 600;
  }

  .mobile-nav__group {
    min-height: 52px;
    font-size: 1.0625rem;
    font-weight: 600;
  }

  .mobile-nav .mobile-nav__sub a {
    min-height: 44px;
    font-size: 1rem;
    font-weight: 500;
  }

  .mobile-nav a[aria-current="page"] {
    color: var(--accent-text);
  }

  .mobile-nav .btn {
    justify-content: center;
    min-height: 52px;
  }

  /* Comfortable hit areas for the rest of the touch UI */
  .chip {
    min-height: 44px;
    padding-inline: var(--s-4);
  }

  .btn {
    min-height: 48px;
    padding-block: var(--s-3);
  }

  .site-footer__links a,
  .site-nav a {
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  /* Forms: 16px inputs stop iOS Safari zooming on focus */
  .field input,
  .field select,
  .field textarea,
  .inline-form input {
    font-size: 1rem;
    padding-block: var(--s-4);
  }

  .card--lg {
    padding: var(--s-6);
  }

  .hero__stats,
  .stat-row {
    gap: var(--s-6);
  }

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

  /* Full-bleed feature imagery reads better than an inset card on a phone */
  .overlay-media--tall {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .overlay-media--tall .overlay-media__scrim {
    background: linear-gradient(to top, rgba(12, 9, 16, 0.95) 12%, rgba(12, 9, 16, 0.35) 65%, rgba(12, 9, 16, 0.2));
  }

  .banner {
    padding: var(--s-8) var(--s-6);
  }

  .photo-pair img:last-child {
    margin-top: var(--s-4);
  }
}

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

/* Very small phones */
@media (max-width: 400px) {
  .brand__place {
    display: none;
  }

  .fixture {
    grid-template-columns: 1fr auto;
    row-gap: var(--s-1);
  }

  /* Date and competition move onto their own line above the match */
  .fixture > :first-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: var(--s-2);
  }

  .next-match,
  .card--lg {
    padding: var(--s-6) var(--s-4);
  }
}

/* Coarse pointers get the larger targets regardless of viewport width */
@media (pointer: coarse) {
  .chip,
  .btn {
    min-height: 44px;
  }
}

/* ---------------------------------------------------------- *
   16. Reduced motion
 * ---------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------- *
   17. Team pages
   The squad index, the masthead each squad page opens with, and
   the four blocks every squad page carries: standings, galleries
   and the roster. Fixtures reuse section 10.
 * ---------------------------------------------------------- */

/* ---------- Squad index ----------
   A photo card per squad, used on the home page, the /teams hub and the
   club page. The squad's own picture carries the recognition, the name sits
   on top of it, and the age line above tells a parent this is the one.
------------------------------------------------------------------- */

.team-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  isolation: isolate;
  transition:
    border-color var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.team-card__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.team-card__media--empty {
  display: grid;
  place-items: center;
  padding-bottom: 35%;
  background:
    radial-gradient(circle at 50% 35%, var(--accent-soft), transparent 65%),
    var(--bg-raised);
}

.team-card__media.team-card__media--empty img {
  width: auto;
  height: 28%;
  object-fit: contain;
  filter: none;
  opacity: 0.35;
}

.team-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Held back a little so white type stays readable over any photo, then
     brought forward on hover. */
  filter: saturate(0.85) brightness(0.75);
  transition:
    transform 500ms var(--ease),
    filter var(--fast) var(--ease);
}

/* Two stacked washes: a dark foot so the text always has ground to sit on,
   and a fuchsia cast so eight different photographs read as one set. */
.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 11, 19, 0) 30%, rgba(14, 11, 19, 0.92) 88%),
    linear-gradient(140deg, rgba(236, 0, 140, 0.34), transparent 62%);
  transition: opacity var(--fast) var(--ease);
}

.team-card__body {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: var(--s-1);
  padding: var(--s-6) var(--s-4) var(--s-4);
}

.team-card__age {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-lift);
}

.team-card__code {
  font-family: var(--font-display);
  /* Shrinks on the longer names so "Padushi League" does not wrap to three
     lines while "U5" sits alone on one. */
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--ink);
}

.team-card__note {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.team-card__meta {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}


/* The arrow is the affordance: it says "this whole card is a link" */
.team-card__go {
  margin-left: auto;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--accent-text);
  transition: transform var(--fast) var(--ease);
}

.team-card:hover {
  border-color: rgba(236, 0, 140, 0.55);
  transform: translateY(-4px);
  box-shadow:
    0 22px 46px -20px rgba(0, 0, 0, 0.85),
    0 0 34px -14px rgba(236, 0, 140, 0.5);
}

.team-card:hover .team-card__media img {
  transform: scale(1.05);
  filter: saturate(1) brightness(0.85);
}

.team-card:hover .team-card__go {
  transform: translateX(4px);
}

.team-card:focus-visible {
  outline: 2px solid var(--accent-lift);
  outline-offset: 3px;
}

/* Phones get one card per row, where a 4:5 crop would run most of the
   screen height. Let it sit wider and shorter instead. */
@media (max-width: 520px) {
  .team-card {
    aspect-ratio: 16 / 10;
  }
}

/* ---------- Squad masthead ---------- */

.team-mast {
  padding-block: var(--section) var(--s-8);
}

.team-mast__inner {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  align-items: end;
}

.team-mast__code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 9rem);
  line-height: 0.82;
  text-transform: uppercase;
  /* Clipped gradient: the one place per squad page the fuchsia goes loud. */
  background: var(--grad-accent-vivid);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.team-mast__lead {
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* Key facts under the masthead: coach, league, ground, age. */
.factlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 0;
  margin-top: var(--s-8);
  border-top: 1px solid var(--line);
}

.factlist > div {
  padding: var(--s-4) var(--s-4) var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}

.factlist dt {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s-1);
}

.factlist dd {
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ---------- Standings ----------
   Wide by nature. It scrolls inside its own box rather than pushing the
   page sideways, and the club's own row is marked so a parent can find it
   without reading every line.
------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 34rem;
}

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

.table th:first-child,
.table td:first-child,
.table th:nth-child(2),
.table td:nth-child(2) {
  text-align: left;
}

.table thead th {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--bg-raised);
}

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

.table__pos {
  font-family: var(--font-display);
  color: var(--ink-faint);
}

.table__pts {
  font-family: var(--font-display);
  color: var(--ink);
}

/* Our row, called out with a fuchsia edge rather than a fill so the table
   keeps one loud moment and not eleven. */
.table tbody tr[data-us="true"] {
  background: var(--accent-soft);
}

.table tbody tr[data-us="true"] td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.table tbody tr[data-us="true"] .table__pts {
  color: var(--accent-text);
}

/* ---------- Galleries ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: var(--s-4);
}

.gallery__item {
  position: relative;
  display: block;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 4 / 3;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform var(--fast) var(--ease),
    filter var(--fast) var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.04);
  filter: saturate(1.1);
}

/* Caption sits on the photo, on a scrim, so the grid keeps an even rhythm
   whether or not a given photo has one. */
.gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--s-6) var(--s-3) var(--s-3);
  font-size: var(--text-xs);
  color: var(--ink);
  background: linear-gradient(180deg, transparent, rgba(14, 11, 19, 0.92));
}

/* A video is a poster that links out: the CSP forbids third-party frames,
   and a poster loads in a fraction of what an embedded player costs. */
.gallery__item--video::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 3.25rem;
  height: 3.25rem;
  transform: translate(-50%, -50%);
  border-radius: var(--r-pill);
  background: var(--grad-accent-vivid);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.9);
  transition: transform var(--fast) var(--ease);
}

.gallery__item--video .gallery__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-42%, -50%);
  z-index: 1;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.5rem 0 0.5rem 0.85rem;
  border-color: transparent transparent transparent #fff;
  transition: transform var(--fast) var(--ease);
}

.gallery__item--video:hover::after {
  transform: translate(-50%, -50%) scale(1.08);
}

.gallery__item--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* An uploaded clip plays in place, so it must not wear the link chrome. */
.gallery__item--inline::after,
.gallery__item--inline .gallery__play {
  display: none;
}

/* ---------- Roster ---------- */

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 0 var(--s-6);
}

.roster__row {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
}

.roster__shirt {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--accent-text);
  min-width: 1.75rem;
}

.roster__name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.roster__pos {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ---------- Classification: cup and play-off rounds ---------- */

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

.phase__title,
.gallery-title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}

.gallery-title:not(:first-of-type) {
  margin-top: var(--s-12);
}

.phase .roster__row[data-us="true"] .roster__name {
  color: var(--accent-text);
}

.phase__outcome {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.phase__outcome--qualified {
  color: var(--win);
}

.phase__outcome--eliminated {
  color: var(--loss);
}

/* Nothing entered yet. Says so plainly instead of leaving a hole. */
.empty-note {
  padding: var(--s-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  font-size: var(--text-sm);
  color: var(--ink-faint);
  text-align: center;
}

@media (max-width: 820px) {
  .team-mast {
    padding-block: var(--s-12) var(--s-6);
  }

  .factlist > div {
    padding-right: 0;
  }
}
