/* Hit n Run Arena
   Palette from the client badge: black, gold, silver. Type: Big Shoulders Display + Figtree. */

:root {
  --black: #000000;          /* matches the badge background exactly */
  --gold: #f3b704;           /* sampled from the badge "N" */
  --gold-hi: #ffc928;
  --gold-text: #806000;      /* gold dark enough for text on light backgrounds */
  --silver: #c9cbcf;
  --ink: #141414;
  --court: #f4f4f1;
  --paper: #ffffff;
  --net: #dddcd7;
  --muted: #5c5c57;
  --loss: #b3202a;           /* the cricket ball red */
  --line-dark: #2a2a2a;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

*, *::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 { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--court);
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
h3 { font-size: 1.6rem; font-weight: 800; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { background: var(--black); color: #fff; position: relative; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.site-header .wrap { min-height: 76px; }
/* The badge hangs below the header bar into the black hero, like a club crest */
.brand { position: relative; z-index: 1; align-self: flex-start; display: block; width: 124px; height: 60px; margin-top: 8px; }
.brand img { width: 124px; height: auto; display: block; }
.page-home .site-header .brand { visibility: hidden; }  /* the home hero shows the full-size badge */
@media (max-width: 860px) {
  .site-header .wrap { min-height: 64px; }
  .brand { width: 88px; height: 52px; margin-top: 6px; }
  .brand img { width: 88px; }
}

.nav-toggle { display: none; background: none; border: 2px solid rgba(255,255,255,.4); color: #fff; font: 600 .95rem var(--body); padding: .45rem .8rem; border-radius: var(--radius); cursor: pointer; }
.site-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; align-items: center; }
.site-nav a { color: #e8e8e3; text-decoration: none; font-weight: 600; padding: .5rem .75rem; border-radius: var(--radius); display: block; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.site-nav .nav-cta a { background: var(--gold); color: var(--ink); margin-left: .5rem; border-radius: var(--radius); box-shadow: none; }
.site-nav .nav-cta a:hover { background: var(--gold-hi); color: var(--ink); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 2; background: var(--black); border-top: 1px solid var(--line-dark); display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
  .site-nav .nav-cta a { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; font: 700 1rem var(--body); text-decoration: none; padding: .8rem 1.3rem; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-ball { background: var(--gold); color: var(--ink); }
.btn-ball:hover { background: var(--gold-hi); color: var(--ink); }
.btn-line { border-color: currentColor; color: inherit; background: transparent; }
.btn-line:hover { background: rgba(255,255,255,.1); color: inherit; }
.btn-turf { background: var(--ink); color: #fff; }
.btn-turf:hover { background: var(--black); color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Hero with netting ---------- */
.hero {
  position: relative;
  color: #fff;
  background-color: var(--black);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.055) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.055) 0 1px, transparent 1px 22px),
    radial-gradient(70% 80% at 80% 30%, #262626 0%, var(--black) 70%);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .2em; }
.hero .lede { font-size: 1.25rem; color: #e6e6e1; max-width: 34ch; }
.hero-badge { width: min(100%, 440px); margin: 0 0 1.25rem -12px; }
.hero-badge img { width: 100%; height: auto; }
/* The badge artwork sits on pure black; 'lighten' lets the netting show through that black so there's no visible square */
.hero-badge img, .brand img { mix-blend-mode: lighten; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

.page-hero { padding: clamp(4rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem); }
.page-hero .wrap { display: block; }
.page-hero h1 { font-size: clamp(2.8rem, 7vw, 4.75rem); }
.page-hero .lede { max-width: 52ch; }

/* ---------- Scoreboard (hero panel) ---------- */
.board { background: #121212; border: 1px solid #3a3a3a; border-top: 3px solid var(--gold); border-radius: 10px; padding: 1.25rem 1.25rem 1rem; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line-dark); padding-bottom: .6rem; margin-bottom: .4rem; }
.board-head h2 { font-size: 1.7rem; margin: 0; color: var(--gold); }
.board-head small { color: var(--silver); font-size: .9rem; }
.board-row { display: grid; grid-template-columns: 4.2rem 1fr; gap: .2rem 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--line-dark); }
.board-row:last-child { border-bottom: 0; }
.board-time { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.board-teams { font-weight: 700; color: #fff; line-height: 1.3; }
.board-teams a { color: #fff; text-decoration: none; }
.board-teams a:hover { text-decoration: underline; color: #fff; }
.board-teams .v { color: #8f8f89; font-weight: 500; padding: 0 .3em; }
.board-meta { grid-column: 2; color: #a9a9a3; font-size: .88rem; }
.board-foot { margin-top: .6rem; font-size: .92rem; }
.board-foot a { color: var(--gold); }
.board .state { color: #cfcfca; padding: 1rem 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--net); border-bottom: 1px solid var(--net); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .25rem 0 0; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split-wide { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 860px) { .split, .split-wide { grid-template-columns: 1fr; } }

/* ---------- Result / fixture rows ---------- */
.day { margin-bottom: 1.75rem; }
.day h3 { font-size: 1.35rem; border-bottom: 2px solid var(--ink); padding-bottom: .3rem; margin-bottom: 0; }
.match { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 10rem) auto; gap: .25rem 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--net); }
.match-time { font-family: var(--display); font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.match-teams { font-weight: 700; min-width: 0; }
.match-teams a { color: var(--ink); text-decoration: none; }
.match-teams a:hover { text-decoration: underline; color: var(--gold-text); }
.match-teams .won { color: var(--ink); }
.match-teams .lost { color: var(--muted); font-weight: 500; }
.match-teams .verb { color: var(--muted); font-weight: 500; padding: 0 .35em; font-size: .92rem; }
.match-league { color: var(--muted); font-size: .92rem; }
.match-link { font-weight: 700; font-size: .92rem; white-space: nowrap; }
@media (max-width: 680px) {
  .match { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .match-league, .match-link { grid-column: 2; }
  .match-link { justify-self: start; }
}
.match-date { display: block; font-size: .8rem; font-family: var(--body); color: var(--muted); font-weight: 600; }

.state { color: var(--muted); padding: 1rem 0; }
.state-error { color: var(--loss); }

/* ---------- Logs ---------- */
.logs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.25rem; }
.log { background: var(--paper); border: 1px solid var(--net); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 1rem 1.1rem; }
.log h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.log-links { display: flex; gap: 1rem; margin-top: .75rem; font-weight: 700; font-size: .95rem; }

table.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: .5rem .45rem; text-align: right; border-bottom: 1px solid var(--net); }
.table th:first-child, .table td:first-child, .table th.th-team { text-align: left; }
.table thead th { font-size: .85rem; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td.pos { color: var(--muted); width: 2rem; text-align: left; }
.table td.team { text-align: left; font-weight: 600; }
.table td.team a { color: var(--ink); text-decoration: none; }
.table td.team a:hover { color: var(--gold-text); text-decoration: underline; }
.table td.total { font-weight: 800; font-size: 1.05rem; }
.table tbody tr:first-child td.total { color: var(--gold-text); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table th button { all: unset; cursor: pointer; padding: .1rem .15rem; border-radius: 3px; }
.table th button:focus-visible { outline: 3px solid var(--gold); }
.table th[aria-sort="ascending"] button::after { content: " ▲"; font-size: .7em; }
.table th[aria-sort="descending"] button::after { content: " ▼"; font-size: .7em; }
.table th[aria-sort] { color: var(--ink); }
.table caption { text-align: left; color: var(--muted); font-size: .9rem; caption-side: bottom; padding-top: .6rem; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--ink); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs button { font: 800 1.35rem var(--display); background: none; border: 0; padding: .55rem 1rem .45rem; color: var(--muted); cursor: pointer; border-radius: var(--radius) var(--radius) 0 0; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--gold); }

.view-bar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.view-bar select { font: 600 1rem var(--body); padding: .55rem .7rem; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); max-width: 100%; }
.back-link { display: inline-block; font-weight: 700; margin-bottom: 1rem; }
.record { display: flex; gap: 2rem; margin: .5rem 0 2rem; flex-wrap: wrap; }
.record div { font-family: var(--display); font-size: 2.6rem; font-weight: 900; line-height: 1; }
.record span { display: block; font-family: var(--body); font-size: .9rem; font-weight: 600; color: var(--muted); margin-top: .3rem; }

/* ---------- Facts list ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0; margin: 0; border-top: 2px solid var(--ink); }
.facts div { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--net); }
.facts dt { color: var(--muted); font-size: .92rem; font-weight: 600; }
.facts dd { margin: .15rem 0 0; font-family: var(--display); font-size: 1.7rem; font-weight: 800; line-height: 1.1; }

/* ---------- Steps (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.4rem; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; font-family: var(--display); font-weight: 900; font-size: 3rem; line-height: 1; color: var(--gold); -webkit-text-stroke: 1px var(--ink); }
.steps h3 { font-size: 1.45rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Offer blocks (functions page) ---------- */
.offer { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(2rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--net); }
.offer:last-child { border-bottom: 0; }
.offer:nth-child(even) .offer-media { order: 2; }
.offer-price { font-weight: 700; color: var(--gold-text); }
.offer ul { padding-left: 1.2rem; margin: 0 0 1rem; }
@media (max-width: 800px) { .offer { grid-template-columns: 1fr; } .offer:nth-child(even) .offer-media { order: 0; } }

/* ---------- Photos ---------- */
.photo { border-radius: var(--radius); overflow: hidden; background: var(--net); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.strip { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .75rem; height: clamp(320px, 45vw, 520px); }
.strip .photo { aspect-ratio: auto; }
.strip .photo:first-child { grid-row: span 2; }
@media (max-width: 680px) { .strip { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; } .strip .photo { aspect-ratio: 4/3; } .strip .photo:first-child { grid-column: span 2; grid-row: auto; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .75rem; }
.gallery button { all: unset; cursor: zoom-in; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--net); }
.gallery button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); }
.lightbox::backdrop { background: rgba(10, 30, 20, .88); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lightbox p { color: #fff; text-align: center; margin: .75rem auto 0; }
.lightbox .close { position: fixed; top: 1rem; right: 1rem; font: 700 1rem var(--body); background: var(--gold); color: var(--ink); border: 0; border-radius: var(--radius); padding: .55rem .9rem; cursor: pointer; }

/* ---------- Price table ---------- */
.prices { width: 100%; border-collapse: collapse; }
.prices th, .prices td { text-align: left; padding: .8rem 0; border-bottom: 1px solid var(--net); vertical-align: top; }
.prices td:last-child { text-align: right; font-family: var(--display); font-weight: 800; font-size: 1.4rem; white-space: nowrap; padding-left: 1rem; }
.prices td small { display: block; color: var(--muted); font-size: .9rem; }

/* ---------- CTA band ---------- */
.band { background: var(--gold); color: var(--black); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.band h2 { margin: 0 0 .2em; }
.band p { margin: 0; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.contact-list li { padding: .8rem 0; border-bottom: 1px solid var(--net); display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; }
.contact-list strong { color: var(--muted); font-weight: 600; }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.hours td { padding: .45rem 0; border-bottom: 1px solid var(--net); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.map { aspect-ratio: 16 / 10; background: var(--net); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); text-align: center; padding: 1rem; overflow: hidden; }
.map iframe { width: 100%; height: 100%; border: 0; }

.form { background: var(--paper); border: 1px solid var(--net); border-radius: 10px; padding: clamp(1.25rem, 3vw, 2rem); }
.form h2 { font-size: 2.2rem; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; font-size: .95rem; }
.field label .opt { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; font: 1rem var(--body); padding: .7rem .8rem; border: 2px solid #bdbcb6; border-radius: var(--radius); background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(242, 194, 48, .55); }
.field textarea { min-height: 140px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--loss); }
.field .err { color: var(--loss); font-size: .9rem; margin-top: .25rem; display: none; }
.field [aria-invalid="true"] + .err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius); font-weight: 600; display: none; }
.form-status.ok { display: block; background: #e6f3e9; color: #1d5c33; }
.form-status.bad { display: block; background: #fbe7e5; color: var(--loss); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #c9c9c4; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1.3rem; color: #fff; margin-bottom: .6rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .footer-badge { display: block; width: 150px; }
.site-footer .footer-badge img { width: 100%; height: auto; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line-dark); padding-top: 1.25rem; margin-top: .5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; color: #8f8f89; }
.site-footer .legal a { color: #c9c9c4; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Placeholder marker: anything in [brackets] still needs real content */
.ph { background: rgba(242, 194, 48, .28); border-radius: 3px; padding: 0 .2em; }
.hero .ph, .band .ph { background: rgba(255, 255, 255, .18); }
