/* anticiPLAYiq: site styles. Colours and type live in tokens below. */
:root {
  --bg: #0f1420;
  --surface: #171e2e;
  --frame: #0b0f19;
  --border: #2a3450;
  --text: #e6ebf5;
  --text-strong: #ffffff;
  --text-muted: #b8c3da;
  --text-faint: #8792ad;
  --accent: #4c8dff;
  --accent-hover: #7aa9ff;
  --green: #2fb27a;
  --amber: #ffb020;
  --on-accent: #0f1420;
  --brand: #0f1420;
  --on-brand: #ffffff;
  --error: #ff8a8a;
  --success: #2fb27a;

  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Barlow", sans-serif;

  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}

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

h1, h2, h3 { margin: 0; color: var(--text-strong); }
h1, h2 { font-family: var(--font-display); font-weight: 700; line-height: 1; }
h1 { font-size: clamp(48px, 7vw, 72px); line-height: 0.98; letter-spacing: -1px; }
h2 { font-size: clamp(36px, 5vw, 48px); }
h3 { font-size: 22px; }
p { margin: 0; }

.container { max-width: var(--max-width); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.stack { display: flex; flex-direction: column; gap: 40px; }
.section { padding-top: 88px; padding-bottom: 88px; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band > .container { padding-top: 88px; padding-bottom: 88px; }

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

/* Logo */
.logo-link { text-decoration: none; }
.logo {
  display: inline-flex; align-items: flex-start;
  font-family: var(--font-display); font-size: 36px; line-height: 1; letter-spacing: -0.5px;
}
.logo-lead { font-weight: 500; color: var(--text-muted); }
.logo-play { display: inline-flex; flex-direction: column; gap: 3px; }
.logo-play-word { font-weight: 800; font-style: italic; color: var(--text-strong); padding-right: 2px; }
.logo-arrow { display: flex; align-items: center; margin-right: -14px; color: var(--accent); }
.logo-arrow-bar { flex: 1; height: 3px; border-radius: 2px; background: currentColor; }
.logo-arrow svg { width: 10px; height: 10px; margin-left: -2px; }
.logo-tail { font-weight: 600; color: var(--accent); }

/* Header and nav */
.site-header { border-bottom: 1px solid var(--border); }
.nav {
  padding-top: 18px; padding-bottom: 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
}
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.nav-links a:not(.btn) { color: var(--text-muted); text-decoration: none; font-weight: 500; padding: 10px 0; }
.nav-links a:not(.btn):hover { color: var(--text-strong); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-outline { border-color: var(--border); color: var(--text-strong); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--text-strong); }
.btn-small { min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm); }

/* Hero */
.hero { padding-top: 88px; padding-bottom: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
}
.lead { font-size: 20px; color: var(--text-muted); max-width: 520px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; }

.clip-card {
  flex: 1 1 460px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; display: flex; flex-direction: column; gap: 16px;
}
.clip-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  background: var(--frame); border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
}
.clip-placeholder { color: var(--text-faint); font-size: 15px; }
.pill {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-strong); font-size: 13px; font-weight: 600; padding: 6px 12px;
}
.pill svg { color: var(--amber); }
.clip-question { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--text-strong); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.choice {
  font: inherit; font-weight: 600; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; min-height: 48px; cursor: pointer;
}
.choice:hover { border-color: var(--accent); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card p, .audience p, .sports-copy p, .join p { color: var(--text-muted); }
.step { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 44px; line-height: 1; color: var(--accent); }

.audience { border-top: 3px solid var(--accent); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.audience-green { border-top-color: var(--green); }
.audience-amber { border-top-color: var(--amber); }

/* Sports */
.sports-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.band > .sports-row { padding-top: 72px; padding-bottom: 72px; }
.sports-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sports-copy h2 { font-size: 40px; line-height: 1.05; }
.sport-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sport { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); font-weight: 500; }
.sport-live { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Join */
.join { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.join h2 { font-size: clamp(40px, 6vw, 56px); }
.join > p { max-width: 520px; }
.join-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; max-width: 520px; padding-top: 8px; }
.join-form input {
  flex: 1 1 260px; min-width: 0; min-height: 48px;
  font: inherit; color: var(--text-strong); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px;
}
.join-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.notice { color: var(--success); font-weight: 600; margin: 0; }
.error { color: var(--error); font-weight: 600; margin: 4px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-row { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--text-faint); font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-faint); }
.footer-links a:hover { color: var(--text-strong); }

/* ---------------------------------------------------------------------------
   Signed-in pages: forms, panels, dashboard, team colours
   ------------------------------------------------------------------------- */
.messages { padding-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.notice-error { color: var(--error); }

.page { padding-top: 48px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 20px; }
.page-narrow { max-width: 640px; }
.page h1 { font-size: clamp(40px, 6vw, 56px); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-foot { color: var(--text-muted); }
.muted { color: var(--text-muted); margin: 0; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.panel-title { font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }

.form { display: flex; flex-direction: column; gap: 18px; }
.inline-form { display: inline; margin: 0; }
.form > button { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 600; color: var(--text-strong); padding: 0; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .field select {
  font: inherit; color: var(--text-strong); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; min-height: 48px; width: 100%;
}
.field select:disabled { opacity: 0.55; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.field input[type="color"] {
  width: 100%; height: 56px; padding: 4px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.help, .field .help { color: var(--text-muted); font-size: 15px; margin: 0; }
.help ul { margin: 4px 0 0; padding-left: 18px; }
.field-check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field-check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.field-check label { font-weight: 500; color: var(--text); }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
  color: var(--text); font-weight: 500; cursor: pointer;
}
.radio input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field-row-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.has-error input, .has-error select { border-color: var(--error) !important; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; align-items: start; }
.join-code {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1;
  letter-spacing: 6px; color: var(--accent);
}
.join-link { margin: 0; word-break: break-all; font-size: 15px; }
.roster { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.roster li { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); }
.swatches { display: flex; gap: 6px; }
.swatch { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); display: block; }

/* Team colours page */
.colour-layout { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.colour-layout > .panel:first-of-type { flex: 999 1 520px; }
.jersey-preview { flex: 1 1 300px; position: sticky; top: 24px; }
.jerseys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.jersey { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.jersey svg { width: 100%; height: auto; }
.jersey figcaption { font-weight: 600; color: var(--text-muted); }
.jersey .j-outline { stroke: var(--text-faint); }
.jersey-home .j-body { fill: var(--home-body, #1D4F91); }
.jersey-home .j-band-a { fill: var(--home-band-a, #FFFFFF); }
.jersey-home .j-band-b { fill: var(--home-band-b, #A2AAAD); }
.jersey-home .j-collar { stroke: var(--home-band-a, #FFFFFF); }
.jersey-away .j-body { fill: var(--away-body, #FFFFFF); }
.jersey-away .j-band-a { fill: var(--away-band-a, #1D4F91); }
.jersey-away .j-band-b { fill: var(--away-band-b, #FFFFFF); }
.jersey-away .j-collar { stroke: var(--away-band-a, #1D4F91); }

/* Team theme: header wears the jersey */
.jersey-stripe { display: flex; flex-direction: column; }
.jersey-stripe span { height: 4px; }
.jersey-stripe span:nth-child(1) { background: var(--stripe-1); }
.jersey-stripe span:nth-child(2) { background: var(--stripe-2); }
.themed .site-header { background: var(--brand); border-bottom: 0; }
.theme-home .site-header .logo-lead,
.theme-home .site-header .logo-play-word,
.theme-home .site-header .logo-tail,
.theme-home .site-header .logo-arrow,
.theme-home .site-header .nav-links a:not(.btn) { color: var(--on-brand); }
.theme-home .site-header .btn-outline { color: var(--on-brand); border-color: var(--on-brand); }
.theme-away .site-header { border-bottom: 1px solid var(--border); }

/* ---------------------------------------------------------------------------
   Game videos and clips
--------------------------------------------------------------------------- */
.player { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 70vh; background: var(--frame); border: 1px solid var(--border); border-radius: var(--radius); }
.video-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.video-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.video-list .error { flex-basis: 100%; }
.status { font-size: 14px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.status-ready { border-color: var(--success); color: var(--success); }
.status-failed { border-color: var(--error); color: var(--error); }
.status-processing, .status-queued { border-color: var(--amber); color: var(--amber); }
.clip-stage { position: relative; }
.clip-pause {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: color-mix(in srgb, var(--frame) 75%, transparent); border-radius: var(--radius); text-align: center; padding: 16px;
}
.clip-pause[hidden] { display: none; }
.roster-row { width: 100%; border-radius: var(--radius-sm); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
