/* TIRA site styles, shared by every page.
   Look: a community sports field. Turf green with chalk lines for the big
   moments, a light "chalk" page for reading, and Archivo throughout: its
   condensed widths for headings (like a fixture board or a jersey), its
   normal width for reading. Archivo is under the SIL Open Font License. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/assets/fonts/archivo-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/assets/fonts/archivo-latin.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 {
  /* Colour */
  --turf:      #1a3a2a;   /* brand green, the field */
  --turf-deep: #11291c;   /* footer, pressed states */
  --turf-lift: #24503a;   /* hover on turf */
  --mint:      #52b788;   /* brand mint: on turf only, or decoration */
  --mint-ink:  #1f6b45;   /* mint you can read on chalk (6.4:1) */
  --mint-wash: #e3f2e9;
  --chalk:     #f4f6f2;   /* page */
  --paper:     #ffffff;   /* raised surfaces */
  --ink:       #17221c;   /* body text */
  --slate:     #4c5a52;   /* secondary text (7:1 on chalk) */
  --line:      #d9e0da;   /* rules and borders */
  --bib:       #dcf25a;   /* hi-vis training bib: on turf only */
  --amber-ink: #8a5300;
  --amber-wash:#fdf0d8;

  /* Type */
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --step--1: .875rem;
  --step-0:  1.0625rem;
  --step-1:  1.3125rem;
  --step-2:  1.625rem;
  --step-3:  clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.6rem + 3.6vw, 3.6rem);
  --step-5:  clamp(3rem, 1.6rem + 6vw, 5.6rem);

  /* Space */
  --gutter: clamp(16px, 4vw, 32px);
  --wrap: 1120px;
  --measure: 68ch;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --header-h: 64px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--chalk);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: var(--mint-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--turf); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 3px; border-radius: 4px; }
.on-turf :focus-visible, .site-footer :focus-visible { outline-color: var(--bib); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--turf); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* Display type: condensed, heavy, tight. Used for h1 and big headings. */
.display {
  font-stretch: 72%;
  font-weight: 850;
  line-height: .95;
  letter-spacing: -.005em;
  text-wrap: balance;
}
h1, h2, h3 { color: var(--turf); text-wrap: balance; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,246,242,.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-stretch: 112%; font-weight: 900; font-size: 1.35rem; letter-spacing: .18em;
  color: var(--turf); text-decoration: none; flex-shrink: 0; line-height: 1;
}
/* The TIRA app icon, with the rounded corners it has on a phone's home screen. */
.wordmark img { width: 44px; height: 44px; border-radius: 22.5%; flex-shrink: 0; }
.wordmark:hover { color: var(--turf); }
.wordmark i { font-style: normal; color: var(--mint-ink); }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--slate); text-decoration: none; font-weight: 550; font-size: .95rem;
  padding: 8px 12px; border-radius: var(--radius-s);
}
.site-nav a:hover { color: var(--turf); background: rgba(26,58,42,.06); }
.site-nav a[aria-current="page"] { color: var(--turf); box-shadow: inset 0 -2px 0 var(--mint-ink); border-radius: 0; }
.site-nav .btn { margin-left: 12px; color: #fff; }
.site-nav .btn:hover { color: #fff; background: var(--turf-lift); }

.menu-btn {
  display: none; margin-left: auto; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 8px 12px; font-weight: 650; color: var(--turf); cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--chalk); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    box-shadow: 0 18px 30px -18px rgba(17,41,28,.35);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--mint-ink); padding-left: 14px; }
  .site-nav .btn { margin: 16px 0 0; justify-content: center; border-bottom: 0; border-radius: var(--radius-s); }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 10px 20px;
  border-radius: var(--radius-s); border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  background: var(--turf); color: #fff;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--turf-lift); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--turf); border-color: var(--turf); }
.btn-outline:hover { background: var(--turf); color: #fff; }
.on-turf .btn { background: var(--paper); color: var(--turf); }
.on-turf .btn:hover { background: var(--mint-wash); color: var(--turf); }
.on-turf .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.on-turf .btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }

/* App store buttons: same size and shape everywhere. */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 11px;
  min-width: 178px; padding: 9px 18px 9px 14px;
  background: #000; color: #fff; border-radius: 10px; border: 1px solid rgba(255,255,255,.28);
  text-decoration: none; line-height: 1.1;
}
.store:hover { background: #1d1d1d; color: #fff; }
.store svg { width: 24px; height: 24px; flex-shrink: 0; }
.store small { display: block; font-size: .72rem; font-weight: 500; opacity: .85; }
.store strong { display: block; font-size: 1.1rem; font-weight: 650; font-stretch: 95%; }

/* ── Turf band (hero on the home page, title band on other pages) ── */
.turf {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--turf); color: #e9f1ec;
}
/* Mowing stripes and chalk lines, drawn in CSS so no image is needed. */
.turf::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.028) 0 90px, transparent 90px 180px);
}
.chalk-lines { position: absolute; inset: 0; z-index: -1; pointer-events: none; color: rgba(255,255,255,.16); }
.chalk-lines svg { width: 100%; height: 100%; }

.page-head { padding: clamp(40px, 7vw, 76px) 0 clamp(36px, 6vw, 60px); }
.page-head h1 { color: #fff; font-size: var(--step-4); }
.page-head .lede { margin-top: 14px; max-width: 54ch; font-size: var(--step-1); line-height: 1.45; color: #cfe3d7; }
.page-head .actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── Reading pages ──────────────────────────────────────── */
.prose { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.prose > * + * { margin-top: 1em; }
.prose h2 {
  font-size: var(--step-2); font-stretch: 85%; font-weight: 800; line-height: 1.15;
  margin-top: 2.1em; padding-top: .9em; border-top: 2px solid var(--turf);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.3; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--mint-ink); }
.prose strong { font-weight: 680; color: var(--turf); }
.prose .updated { color: var(--slate); font-size: var(--step--1); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--mint-wash); color: var(--turf); font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); }
.table-scroll table { min-width: 560px; }
.table-scroll tr:last-child td { border-bottom: 0; }

/* The one-paragraph summary at the top of a long page. */
.summary {
  background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--mint-ink);
  border-radius: var(--radius-s); padding: 18px 22px;
}
.summary > * + * { margin-top: .7em; }

/* A thing to do: a box with one clear action. */
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 22px 24px;
}
.panel > * + * { margin-top: .7em; }
.panel h3 { margin-top: 0; }
.panel .btn { margin-top: 1em; }

.notice {
  background: var(--amber-wash); color: #3d2a00; border-radius: var(--radius-s);
  padding: 16px 20px; border-left: 6px solid var(--amber-ink);
}

/* Lists of short items in a grid (partner spots, team features). */
.grid-2, .grid-3 { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.grid-2 > *, .grid-3 > * { margin-top: 0; }

/* Questions and answers that open in place. */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 40px 16px 0; position: relative;
  font-weight: 650; color: var(--turf); font-size: 1.05rem; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px; margin-top: -8px;
  border-right: 2px solid var(--mint-ink); border-bottom: 2px solid var(--mint-ink);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq summary:hover { color: var(--mint-ink); }
.faq .answer { padding: 0 0 20px; color: var(--ink); }
.faq .answer > * + * { margin-top: .7em; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--turf-deep); color: #c3d4ca; padding: 56px 0 32px; font-size: .95rem; }
.site-footer .cols { display: grid; gap: 36px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark i { color: var(--mint); }
.site-footer .wordmark img { box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.site-footer .about p { margin-top: 12px; max-width: 30ch; }
.site-footer h2 { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: #c3d4ca; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: #a9bfb2; font-size: .875rem;
}
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }
@media (max-width: 420px) { .site-footer .cols { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .site-header, .site-footer, .skip-link, .actions, .stores { display: none !important; }
  .turf { background: none; color: var(--ink); }
  .page-head h1, .page-head .lede { color: var(--ink); }
  body { background: #fff; }
}

/* On phones the boundary line would run through the headline. */
@media (max-width: 860px) { .hero .chalk-lines { display: none; } }

/* Reading pages line up with the page title on the left, at a readable width. */
.prose > * { max-width: 760px; }
