/* ==========================================================================
   SITE STYLES — Raj Maru Spin Cricket
   Every colour and type value comes from tokens.css. No hex values here.

   Structure:
     1. Reset and base
     2. Layout primitives
     3. Header and footer
     4. Type
     5. Buttons and links
     6. The drift line (signature device, guidelines §6)
     7. Components
     8. Forms
     9. Utilities
   ========================================================================== */

/* --- 1. Reset and base ---------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--whites);
  color: var(--ink);
  font-family: var(--face-body);
  font-size: var(--size-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

/* Base link colour lives here, before any component, so component
   rules (nav, footer, buttons) win on source order rather than
   needing escalating specificity. */
a:not(.btn) { color: var(--red); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.band--navy a:not(.btn) { color: var(--gold); }


/* --- 2. Layout primitives ------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {                       /* a full-bleed section */
  padding-block: var(--space-7);
}
.band--navy {
  background: var(--navy);
  color: var(--whites);
}
.band--tight { padding-block: var(--space-6); }

@media (min-width: 800px) {
  .band { padding-block: var(--space-9); }
  .band--tight { padding-block: var(--space-7); }
}

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

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

/* --- 3. Header ------------------------------------------------------------ */

a.skip-link {
  position: absolute; left: var(--space-2); top: -100px;
  background: var(--gold); color: var(--navy);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-family: var(--face-display); font-weight: 700;
  z-index: 100;
}
a.skip-link:focus { top: var(--space-2); }

.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
}

/* The logo needs a light background — the silver gradient collapses on navy
   (guidelines §3), so it sits in its own Whites panel inside the navy bar. */
.logo-panel {
  background: var(--whites);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  display: inline-flex; align-items: center;
  margin-block: var(--space-2);
}
.logo-panel img { width: 88px; height: auto; }

/* Two actions in the sticky bar: enquire and call. Stacked on a phone so
   both fit beside the logo without shrinking below the tap-target minimum. */
.header-actions {
  display: flex; flex-direction: column; gap: var(--space-2);
  align-items: stretch;
}
@media (min-width: 480px) {
  .header-actions { flex-direction: row; align-items: center; }
}

a.header-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: var(--space-2) var(--space-3);
  color: var(--whites); text-decoration: none;
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-small); letter-spacing: var(--track-label);
  text-transform: uppercase; white-space: nowrap;
  border: 2px solid var(--white-70); border-radius: var(--radius);
}
a.header-btn:hover { border-color: var(--gold); color: var(--gold); }
a.header-btn--primary {
  background: var(--gold); color: var(--navy); border-color: var(--gold);
}
a.header-btn--primary:hover { background: var(--whites); border-color: var(--whites); color: var(--navy); }
a.header-btn--primary:focus-visible { outline-color: var(--navy); }

@media (min-width: 480px) {
  a.header-btn { min-height: var(--tap-min); font-size: var(--size-label); padding-inline: var(--space-4); }
}


/* Navigation. Stacked disclosure menu on a phone, horizontal bar from 720px.
   Two rows of wrapped links looked clunky and cost a third of the first
   screen; a single Menu button costs one tap and gives the page back. */
.site-nav {
  background: var(--navy);
  border-top: 1px solid rgba(247, 245, 241, 0.14);
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0 0 var(--space-2);
  display: flex; flex-direction: column;
}

.site-nav a {
  display: flex; align-items: center;
  min-height: var(--tap-min); padding-inline: var(--space-3);
  color: var(--whites); text-decoration: none;
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-label); letter-spacing: var(--track-label);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(247, 245, 241, 0.16);
  border-left: 3px solid transparent;
}
.site-nav a:hover { color: var(--gold); }
.site-nav a[aria-current="page"] { border-left-color: var(--gold); color: var(--gold); }

@media (min-width: 1024px) {
  .site-nav ul {
    display: flex; flex-direction: row; gap: var(--space-1);
    padding-bottom: 0;
  }
  .site-nav a {
    padding-inline: var(--space-3);
    border-bottom: 3px solid transparent;
    border-left: 0;
    white-space: nowrap;
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}

/* Collapsible menu button. Hidden until JS reveals it. */
.nav-toggle {
  align-items: center; gap: var(--space-3);
  width: 100%; min-height: var(--tap-min);
  padding: var(--space-2) 0;
  background: none; border: 0; cursor: pointer;
  color: var(--whites);
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-label); letter-spacing: var(--track-label);
  text-transform: uppercase;
}
/* No JS: no button, full menu. With JS: button on, menu collapsed. */
.nav-toggle { display: none; }
.js .nav-toggle { display: flex; }
@media (min-width: 1024px) { .js .nav-toggle { display: none; } }
@media (max-width: 1023px) {
  .js .site-nav ul { display: none; }
  .js .site-nav ul.is-open { display: flex; }
}
.nav-toggle__bars {
  position: relative; display: block; width: 22px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

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

h1, h2, h3 {
  font-family: var(--face-display);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: var(--size-headline); line-height: var(--lh-headline);
  font-weight: 800; letter-spacing: var(--track-headline);
}
h2 { font-size: var(--size-section); line-height: var(--lh-section); }
h3 { font-size: var(--size-subhead); line-height: var(--lh-subhead); }

p { margin: 0; }
p + p { margin-top: var(--space-4); }

.lede { font-size: calc(var(--size-body) + 2px); }

.eyebrow {
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-small); line-height: var(--lh-label);
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--overcast);
  margin: 0 0 var(--space-3);
}
.band--navy .eyebrow,
.site-footer .eyebrow { color: var(--gold); }

.small { font-size: var(--size-small); line-height: var(--lh-small); color: var(--overcast); }
.band--navy .small,
.site-footer .small { color: var(--white-70); }

/* Numbers get the display face — a career record should read like a
   scoreboard, which is the whole reason Archivo is the display choice. */
.figure {
  font-family: var(--face-display); font-weight: 800;
  font-size: var(--size-section); line-height: 1;
  letter-spacing: var(--track-headline);
  color: var(--navy);          /* gold is never text on a light background */
  display: block;
}
.band--navy .figure { color: var(--gold); }

/* --- 5. Buttons and links -------------------------------------------------- */


:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}
.band--navy :focus-visible, .site-header :focus-visible, .site-nav :focus-visible {
  outline-color: var(--gold);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap-min);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-label); line-height: var(--lh-label);
  letter-spacing: var(--track-label); text-transform: uppercase;
  text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
  width: 100%;
}
@media (min-width: 560px) { .btn { width: auto; } }

/* Primary: navy text on gold — the strongest combination available (§4). */
.btn--primary { background: var(--gold); color: var(--navy); }
.btn--primary:hover { background: var(--navy); color: var(--gold); border-color: var(--gold); }

/* Secondary: navy outline, transparent fill (§10). */
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--whites); }
.band--navy .btn--secondary { color: var(--whites); border-color: var(--white-70); }
.band--navy .btn--secondary:hover { background: var(--whites); color: var(--navy); border-color: var(--whites); }

/* Focus ring contrasts with the button's own fill, not the section behind it. */
.btn--primary:focus-visible { outline-color: var(--navy); }
a.skip-link:focus-visible { outline-color: var(--navy); }

.btn-row { display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 560px) { .btn-row { flex-direction: row; flex-wrap: wrap; } }

/* Tap-to-call number shown as text — always a link, every instance (§10). */
.tel {
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-subhead);
  color: var(--red); text-decoration: none;
  display: inline-block; min-height: var(--tap-min); line-height: var(--tap-min);
}
.band--navy .tel,
.site-footer .tel { color: var(--gold); }
.tel:hover { text-decoration: underline; }

/* --- 6. The drift line (guidelines §6) ------------------------------------ */
/*
   A spinner's ball drifts in the air before it turns. This is that flight
   path, drawn once at a change of question. Thin red arc, never straight,
   alternating direction down the page, never carrying content, maximum
   three per page. It draws itself once on scroll and respects
   prefers-reduced-motion.
*/

.drift {
  display: block; width: 100%; height: 48px;
  margin: 0; overflow: hidden;
  color: var(--red);
}
.drift svg { display: block; width: 100%; height: 100%; }
.drift path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0.6;                       /* 60% on light backgrounds */
  vector-effect: non-scaling-stroke;
}
.band--navy + .drift path, .drift--on-navy path { opacity: 1; }

/* Draw-on-scroll. Only applied when JS adds .drift--ready, so with JS off
   or motion reduced the line is simply present and static. */
.drift--ready path {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
}
.drift--ready.is-drawn path {
  transition: stroke-dashoffset 1100ms cubic-bezier(0.22, 0.61, 0.36, 1);
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .drift--ready path { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* --- 7. Components -------------------------------------------------------- */

/* Hero. The portrait is a tight headshot, so it sits as its own block rather
   than as a full-bleed image with text over it — no overlay needed, and no
   pretending we have photography we don't have. */
/* .hero also carries .band--navy so on-navy variants apply. */
.hero { background: var(--navy); color: var(--whites); }
.hero__inner { padding-block: var(--space-5) var(--space-6); }
.hero h1 { color: var(--whites); }
.hero .lede { margin-top: var(--space-3); }

/* Portrait floats so the summary starts level with the top of the image and
   then runs full width beneath it — one continuous bio rather than a narrow
   column beside a tall picture. */
.hero__credential { margin-top: var(--space-5); }
.hero__credential::after { content: ""; display: block; clear: both; }
.hero__credential p + p { margin-top: var(--space-4); }

.hero__portrait {
  float: left;
  width: 128px;
  margin: 0 var(--space-4) var(--space-3) 0;
}
.hero__portrait picture {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border-bottom: 4px solid var(--gold);
}
/* The route to the full biography sits directly under his face, where the
   eye already is, rather than at the end of the summary. */
.hero__portrait figcaption { margin-top: var(--space-2); }
.hero__portrait figcaption a {
  display: flex; flex-direction: column; justify-content: center;
  min-height: var(--tap-min);
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-small); line-height: 1.3;
  text-decoration: none;
}
/* Name reads as a label, the second line carries the affordance — so the
   caption never breaks mid-phrase at a narrow width. */
.hero__portrait figcaption .name { color: var(--whites); }
.hero__portrait figcaption .go {
  text-decoration: underline; text-underline-offset: 3px;
}
.hero__portrait figcaption a:hover .name { color: var(--gold); }

.hero__quals {
  font-size: var(--size-small); line-height: var(--lh-small);
  color: var(--white-70);
}
.hero .btn-row { margin-top: var(--space-5); clear: both; }

@media (min-width: 800px) {
  .hero__inner { padding-block: var(--space-8); }
  .hero__credential { max-width: calc(var(--measure) + 200px + var(--space-5)); }
  .hero__portrait { width: 200px; margin-right: var(--space-5); }
}

/* Named-player strip — proof sits above the offer, deliberately. */
.names {
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-subhead); line-height: 1.4;
  color: var(--whites);
}
.names span { white-space: nowrap; }
.names .sep { color: var(--gold); padding-inline: var(--space-1); }

/* Cards */
.cards { display: grid; gap: var(--space-4); list-style: none; margin: 0; padding: 0; }
@media (min-width: 720px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .cards--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 620px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--navy-16);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.card h3 { margin-bottom: var(--space-2); }
.card .price {
  font-family: var(--face-display); font-weight: 800;
  font-size: var(--size-subhead); color: var(--navy);
  display: block; margin-bottom: var(--space-2);
}
.card__link { display: inline-block; margin-top: var(--space-3); font-weight: 600;
  /* Guidelines §10: 48px minimum tap target. These sit on their own
     in a card rather than inline in a sentence, so they are a target a
     thumb aims at and the rule applies. */
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
}

/* Q&A blocks — used on the safeguarding page, where the structure IS the
   content: the questions government guidance tells parents to ask. */
.qa { border-top: 1px solid var(--navy-16); padding-top: var(--space-5); margin-top: var(--space-5); }
.qa:first-of-type { border-top: 0; margin-top: 0; }
.qa h3 { margin-bottom: var(--space-3); }

/* Qualifications — two visually and semantically separate groups. A parent
   scanning for child-safety credentials must not have to read past coaching
   badges to find them. */
.quals { display: grid; gap: var(--space-5); }
@media (min-width: 720px) { .quals { grid-template-columns: 1fr 1fr; gap: var(--space-6); } }
.quals__group { border-top: 4px solid var(--gold); padding-top: var(--space-4); }
.quals__group--safety { border-top-color: var(--red); }
.quals ul { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.quals li { padding-block: var(--space-2); border-bottom: 1px solid var(--navy-08); }
.band--navy .quals li { border-bottom-color: rgba(247, 245, 241, 0.16); }

/* Photo credit. Required by the licence, so it is part of the component,
   not an afterthought that can be forgotten. */
.credit {
  font-size: var(--size-small); line-height: var(--lh-small);
  color: var(--ink);
  margin-top: var(--space-2);
  max-width: 100%;
}

/* Career figures — the display face doing the job it was chosen for. */
.figures {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5) var(--space-4);
  list-style: none; margin: 0; padding: 0;
}
.figures li { border-top: 3px solid var(--gold); padding-top: var(--space-3); }
.figures .figure { margin-bottom: var(--space-1); }
.figures span:last-child {
  display: block;
  font-size: var(--size-small); line-height: var(--lh-small);
}
.band--navy .figures span:last-child { color: var(--white-70); }
@media (min-width: 720px) { .figures { grid-template-columns: repeat(4, 1fr); } }

/* Biography intro — portrait beside the summary, same idea as the hero:
   face and credentials making one claim. */
.bio-intro { display: grid; gap: var(--space-4); margin-bottom: var(--space-6); }
.bio-intro__photo {
  width: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  border-bottom: 4px solid var(--gold);
}
.bio-intro__text { max-width: var(--measure); }
@media (min-width: 620px) {
  .bio-intro { grid-template-columns: 200px 1fr; gap: var(--space-6); align-items: start; }
  .bio-intro__photo { width: 100%; }
}

/* Player blocks — photo beside the biography. The photo slot keeps its
   space whether or not an image is in yet, so the layout does not jump when
   the photographs arrive. */
.players > * + * { margin-top: var(--space-6); }

.player {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  border-top: 2px solid var(--navy-16);
  padding-top: var(--space-5);
}
.player:first-child { border-top: 0; padding-top: 0; }

.player__photo { width: 116px; }

.player__photo picture,
.player__photo > .awaiting {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  border-bottom: 3px solid var(--gold);
  overflow: hidden;
}
.player__photo picture { background: var(--navy-08); }
.player__photo img { width: 100%; height: 100%; object-fit: cover; }
.player__photo > .awaiting {
  background: var(--gold);
  font-size: var(--size-small); line-height: 1.25;
  text-align: center; padding: var(--space-2);
}
.player__photo--none { background: none; border-bottom: 0; }

.player__body h2 { margin-bottom: var(--space-2); }
.player__meta {
  font-size: var(--size-small); color: var(--overcast);
  margin-bottom: var(--space-3);
}
.player__raj { margin-top: var(--space-3); }
.player__raj strong { font-family: var(--face-display); font-weight: 700; }

@media (min-width: 620px) {
  .player { grid-template-columns: 168px 1fr; gap: var(--space-5); }
  .player__photo { width: 100%; }
}

blockquote {
  margin: var(--space-4) 0 0;
  padding-left: var(--space-4);
  border-left: 3px solid var(--red);
  font-size: calc(var(--size-body) + 1px);
}

/* Player quotes. The red rule on its own did not say "a person said this"
   clearly enough — a reader scanning the page could take the quote for more
   of our own copy. Quotation marks in the text and a named attribution
   underneath do that work now.

   Where a quote runs to several paragraphs, each one opens with a quotation
   mark and only the last one closes. That is the British convention for
   continuous speech and it keeps the reader on the same speaker.

   No new colours or sizes — every value here is already in tokens.css. */
.quote { margin: var(--space-4) 0 0; }
.quote blockquote { margin-top: 0; }
.quote figcaption {
  margin-top: var(--space-3);
  /* The blockquote's 3px rule plus its padding, so the attribution starts
     under the first letter of the quote rather than under the rule. */
  padding-left: calc(var(--space-4) + 3px);
  font-family: var(--face-display);
  font-weight: 700;
  font-size: var(--size-small);
  color: var(--overcast);
}

/* Awaiting markers — visible in staging, impossible to miss, easy to grep. */
.awaiting {
  display: inline-block;
  background: var(--gold); color: var(--navy);
  font-family: var(--face-display); font-weight: 700;
  font-size: var(--size-small); letter-spacing: 0.02em;
  padding: 2px var(--space-2); border-radius: 4px;
}

/* Empty state — an invitation to act, not an apology. */
.empty {
  border: 2px dashed var(--navy-16);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-align: center;
}

/* --- 8. Forms -------------------------------------------------------------- */

.field { display: block; margin-bottom: var(--space-5); }
.field > label {
  display: block; margin-bottom: var(--space-2);
  font-family: var(--face-display); font-weight: 700; font-size: var(--size-label);
}
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--tap-min);
  padding: var(--space-3);
  font-family: var(--face-body); font-size: var(--size-body);
  color: var(--ink); background: var(--surface);
  border: 2px solid var(--navy-16); border-radius: var(--radius);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); }
.field .hint { font-size: var(--size-small); color: var(--overcast); margin-top: var(--space-2); }

.check {
  display: flex; gap: var(--space-3); align-items: flex-start;
  margin-bottom: var(--space-5);
  min-height: var(--tap-min);
}
/* Guidelines §10 asks for 48px tap targets. A 48px checkbox looks wrong, so
   the box is 32px and the associated label extends the real target across the
   whole sentence — clicking anywhere in it toggles the box. */
.check input { width: 32px; height: 32px; margin-top: 0; flex: 0 0 auto; }
.check label { font-size: var(--size-body); padding-block: var(--space-1); }
/* Inline link inside the consent sentence: vertical padding overflows the
   line box, so the hit area grows to ~48px without moving any text. */
.check label a { padding-block: 12px; }

/* Honeypot — hidden from people, visible to bots. Not display:none, which
   some bots skip; off-canvas and removed from the tab order. */
.pot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* --- 9. Footer and utilities ---------------------------------------------- */

.site-footer { background: var(--navy); color: var(--whites); padding-block: var(--space-7); }
/* The gradient wordmark cannot be reversed onto navy (§3), so the footer
   sets the name in type instead of using the logo image. */
.footer-mark {
  font-family: var(--face-display); font-weight: 800;
  font-size: var(--size-subhead); letter-spacing: var(--track-headline);
  color: var(--whites); margin: 0;
}
.footer-mark span { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding-block: 0; }
.site-footer li a {
  display: flex; align-items: center;
  min-height: 44px;              /* real tap target, not a line of text */
}
.site-footer a:not(.btn) { color: var(--whites); }
.footer-grid { display: grid; gap: var(--space-6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.cta-block { text-align: left; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
