/*
 * The NBRH marketing pages (players, clubs, goals, club triage) — shared styles.
 *
 * These pages are static files served from app.thenbrh.co.uk/embed/ and iframed into the Squarespace site
 * (docs/embed-pages.md). Rules that keep them working inside an iframe:
 *   - No vh/dvh units anywhere. The iframe is resized to its content height (embed.js), so anything sized from the
 *     viewport height would grow the page, which would grow the iframe, which would grow the page.
 *   - No position: fixed or sticky. An auto-height iframe never scrolls itself, so neither can work.
 *   - Fonts are the same self-hosted files the app uses (public/embed/fonts). Nothing loads from a third party; the
 *     privacy policy lists third-party loads and these pages add none.
 *   - Motion respects prefers-reduced-motion.
 */

@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("fonts/dm-sans-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("fonts/dm-sans-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/young-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/young-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #1B1B1B;
  --bg-2: #232323;
  --bg-3: #2C2C2C;
  --ink: #F5F1EA;
  --dim: #B5B1AB;
  --faint: #8F8B85;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --nbrh-pink: #FF1B6E;
  --pos-pink: #FF006E;
  --chos-blue: #3A86FF;
  /* Per page: body.t-players / t-clubs / t-goals set these three. */
  --accent: #FF1B6E;
  --accent-text: #FF5C97;   /* the accent for small text on dark: 5.9:1 on --bg (the fill colour alone is 4.5:1) */
  --on-accent: #111111;     /* text on an accent fill: 4.9:1 or better on all three accents */
  --radius: 4px;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
body.t-players { --accent: #FF006E; --accent-text: #FF5C97; }
body.t-clubs   { --accent: #3A86FF; --accent-text: #6FA3FF; }
body.t-goals   { --accent: #FF1B6E; --accent-text: #FF5C97; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.04; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
.sec { padding: 96px 0; position: relative; }
.sec--tight { padding: 64px 0; }
.sec--alt { background: var(--bg-2); }
@media (max-width: 720px) { .sec { padding: 64px 0; } .sec--tight { padding: 44px 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); }
.eyebrow + h2, .eyebrow + h3 { margin-top: 14px; }
.h-xl { font-size: clamp(44px, 9.5vw, 116px); line-height: 0.98; }
.h-lg { font-size: clamp(34px, 6vw, 68px); }
.h-md { font-size: clamp(26px, 3.6vw, 40px); }
.lede { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; color: var(--dim); max-width: 38em; }
.lede strong { color: var(--ink); font-weight: 600; }
.accent { color: var(--accent); }
.dim { color: var(--dim); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px; border-radius: var(--radius); border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px; text-decoration: none;
  letter-spacing: 0.01em; transition: transform 0.18s var(--ease), background 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 0 -4px rgba(0, 0, 0, 0.5); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { min-height: 60px; padding: 16px 32px; font-size: 18px; }
.btn .arr { transition: transform 0.2s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
@media (max-width: 480px) { .btn-row > .btn { width: 100%; } }

/* Chips */
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: var(--radius);
  background: transparent; border: 2px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 15px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cards and badges */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; background: var(--accent); color: var(--on-accent);
}
.badge--soon { background: transparent; color: var(--accent-text); border: 1.5px solid var(--accent-text); }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); position: relative; }
.live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

/* Ticker */
.ticker { background: var(--accent); color: var(--on-accent); overflow: hidden; white-space: nowrap; border-block: 2px solid var(--bg); }
.ticker-track { display: inline-flex; animation: ticker 38s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { font-family: var(--serif); font-size: clamp(22px, 3.4vw, 34px); padding: 12px 0; display: inline-flex; align-items: center; }
.ticker-item::after { content: ""; width: 12px; height: 12px; background: var(--on-accent); margin: 0 28px; transform: rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Scroll reveal. Hidden only once embed.js has added .js and confirmed it can show them again. */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv-l { transform: translateX(-36px); }
.js .rv-r { transform: translateX(36px); }
.js .rv-s { transform: scale(0.94); }

@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .live-dot::after { animation: none; }
  .btn, .chip { transition: none; }
}

/* Live numbers (players and goals pages) */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--line-strong); }
.stat { padding: 28px 22px 8px 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 24px; }
.stat:last-child { border-right: 0; }
.stat .n { font-family: var(--serif); font-size: clamp(44px, 7vw, 84px); line-height: 1; color: var(--ink); display: block; }
.stat .l { display: block; margin-top: 8px; font-weight: 600; color: var(--dim); }
.stats-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; color: var(--dim); }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 0; padding: 22px 12px 8px 0; border-bottom: 1px solid var(--line); }
  .stat + .stat { padding-left: 0; }
  .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
}

/* Back link used on pages reached from another embed page */
.backlink { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 0; min-height: 44px; }
.backlink:hover { color: var(--ink); }

/* Footer line on every page */
.foot { padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.foot a { color: var(--dim); }
