/* Club Finder. AU Ballerz palette: navy and gold, plus black. Fonts: Anton (headings), Figtree (body). */

@font-face { font-family: "Anton"; src: url("/fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy-darkest: #050B1C;
  --navy-dark: #0A1430;
  --navy-mid: #101D42;
  --gold: #F5B921;
  --gold-deep: #D99A0B;
  --mist: #AAB6D6;
  --white: #FFFFFF;
  --black: #000000;
  --open: #5BD38A;
  --closed: #FF9B8F;
  --radius: 12px;
  --gap: 1rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy-darkest);
  color: var(--white);
  font: 400 1rem/1.55 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--gold); color: var(--navy-darkest); padding: .75rem 1rem; z-index: 10; font-weight: 700; }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* Header and footer */
.site-header { background: var(--black); border-bottom: 2px solid var(--gold); }
.brand { display: flex; align-items: center; gap: .75rem; max-width: 44rem; margin: 0 auto; padding: .75rem 1rem; color: var(--white); text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: "Anton", Impact, sans-serif; font-size: 1.35rem; letter-spacing: .03em; text-transform: uppercase; }
.brand-by { color: var(--gold); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.site-footer { background: var(--black); color: var(--mist); padding: 1.5rem 1rem 2rem; text-align: center; font-size: .95rem; }
.site-footer p { margin: .35rem auto; max-width: 40rem; }
.small { font-size: .8rem; }

/* Type */
h1, h2, h3 { font-family: "Anton", Impact, sans-serif; font-weight: 400; letter-spacing: .02em; line-height: 1.1; text-transform: uppercase; }
h1 { font-size: clamp(2rem, 8vw, 3rem); margin: .5rem 0 .75rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1.3rem; margin: 0 0 .25rem; }
.lead { color: var(--mist); font-size: 1.1rem; margin: 0 0 1.5rem; }
.meta { color: var(--mist); margin: 0 0 .5rem; }
.detail { color: var(--mist); margin: .25rem 0; font-size: .95rem; }
.hint { color: var(--mist); margin: .35rem 0 0; font-size: .875rem; }
.disclaimer { color: var(--mist); font-size: .875rem; margin-top: 2rem; }

/* Search form */
.search { background: var(--navy-dark); border: 1px solid var(--navy-mid); border-radius: var(--radius); padding: 1.25rem 1rem; display: grid; gap: 1.1rem; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; font-weight: 700; margin-bottom: .4rem; padding: 0; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit; font-size: 1rem;
  color: var(--white); background: var(--navy-darkest); border: 2px solid var(--mist); border-radius: 8px;
}
input[type=text]::placeholder, input[type=email]::placeholder { color: #8C99BC; }
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(245, 185, 33, .35); }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label {
  margin: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 2px solid var(--mist); border-radius: 8px; cursor: pointer; font-weight: 600; background: var(--navy-darkest);
}
.segmented input:checked + label { background: var(--gold); border-color: var(--gold); color: var(--navy-darkest); }
.segmented input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .7rem 1.2rem;
  border: 0; border-radius: 8px; background: var(--gold); color: var(--navy-darkest);
  font: 700 1rem/1.2 "Figtree", system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--gold-deep); color: var(--navy-darkest); }
.button:disabled { opacity: .6; cursor: progress; }
.button-wide { width: 100%; font-size: 1.05rem; }
.button-secondary { background: transparent; color: var(--white); border: 2px solid var(--mist); }
.button-secondary:hover { background: var(--navy-mid); color: var(--white); }

/* Results */
#results { margin-top: 1.5rem; }
.results-title { margin: 0 0 .25rem; }
.results-title:focus { outline: none; }
.cards { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: var(--gap); }
.card { background: var(--navy-dark); border: 1px solid var(--navy-mid); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 1rem; }
.card-title a { color: var(--white); text-decoration: none; }
.card-title a:hover, .card-title a:focus-visible { color: var(--gold); text-decoration: underline; }
.programs { list-style: none; margin: .75rem 0; padding: 0; display: grid; gap: .6rem; }
.program { background: var(--navy-darkest); border-radius: 8px; padding: .75rem; }
.program-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.program-name { font-weight: 700; }
.fee { font-size: 1.25rem; font-weight: 700; margin: .35rem 0 .15rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0; }
.actions .button { flex: 1 1 12rem; }
.source { color: var(--mist); font-size: .85rem; margin: .5rem 0 0; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; border: 1.5px solid currentColor; }
.badge-open { color: var(--open); }
.badge-soon { color: var(--gold); }
.badge-closed { color: var(--closed); }

.notice { background: var(--navy-dark); border-left: 4px solid var(--gold); border-radius: 8px; padding: 1rem; margin: 0; }
.notice p { margin: 0 0 .5rem; }
.notice p:last-child { margin-bottom: 0; }
.notice.error { border-left-color: var(--closed); }
.chips { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { min-height: 44px; padding: .5rem 1rem; border-radius: 999px; border: 2px solid var(--gold); background: transparent; color: var(--white); font: 600 1rem "Figtree", system-ui, sans-serif; cursor: pointer; }
.chip:hover { background: var(--gold); color: var(--navy-darkest); }

/* Club page */
.back { display: inline-block; padding: .5rem 0; font-weight: 600; }
.season h2 { margin-top: 1.5rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--navy-mid); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--navy-mid); vertical-align: top; }
thead th { background: var(--navy-mid); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
tbody th { font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.prose p, .prose li { max-width: 38rem; }
.prose h2 { font-size: 1.3rem; }

@media (min-width: 40rem) {
  .search { padding: 1.5rem; }
}

/* On phones, each team becomes its own stacked block instead of a wide table. */
@media (max-width: 39.99rem) {
  .table-wrap { overflow: visible; border: 0; }
  table, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { background: var(--navy-dark); border: 1px solid var(--navy-mid); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: .5rem .25rem; margin-bottom: .75rem; }
  tbody th { font-size: 1.1rem; border: 0; padding: .4rem .75rem; }
  tbody td { border: 0; padding: .3rem .75rem; display: grid; grid-template-columns: 6rem 1fr; gap: .5rem; }
  tbody td::before { content: attr(data-label); color: var(--mist); font-size: .85rem; font-weight: 600; }
  tbody td .badge { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Admin */
.admin-bar { justify-content: space-between; padding: 0; }
.admin-bar > .brand { padding: .75rem 1rem; margin: 0; }
.who { display: flex; align-items: center; gap: .5rem; padding-right: 1rem; color: var(--mist); font-size: .85rem; flex-wrap: wrap; justify-content: flex-end; }
.admin-form h3 { margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 30rem) { .row2 { grid-template-columns: 2fr 1fr; } }
input[type=date], input[type=email] {
  width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit; color: var(--white);
  background: var(--navy-darkest); border: 2px solid var(--mist); border-radius: 8px;
}
input[type=email]:focus, input[type=date]:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(245, 185, 33, .35); }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check label { margin: 0; min-height: 44px; min-width: 3.5rem; display: inline-flex; align-items: center; justify-content: center; padding: .4rem .8rem; border: 2px solid var(--mist); border-radius: 8px; cursor: pointer; font-weight: 600; }
.check input:checked + label { background: var(--gold); border-color: var(--gold); color: var(--navy-darkest); }
.check input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 3px; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--navy-darkest); }
.status-box { margin: 1rem 0; }
.steps { padding-left: 1.25rem; display: grid; gap: .75rem; }
.qr { display: block; background: var(--white); padding: .5rem; border-radius: 8px; margin-top: .5rem; }
.secret { word-break: break-all; background: var(--navy-darkest); padding: .15rem .4rem; border-radius: 4px; }
.log { list-style: none; padding: 0; display: grid; gap: .5rem; }
.log li { background: var(--navy-dark); padding: .6rem .8rem; border-radius: 8px; }

/* Rego alerts and unsubscribe */
.alert-box { margin-top: 2rem; }
.alert-box h2 { margin-top: 0; }
.consent { display: flex; gap: .75rem; align-items: flex-start; }
.consent input { width: 24px; height: 24px; margin: .1rem 0 0; flex: none; accent-color: var(--gold); }
.consent label { font-weight: 400; margin: 0; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { min-height: 65px; }
.notice.ok { border-left-color: var(--open); }
.bcc { width: 100%; min-height: 8rem; font: inherit; font-size: .9rem; color: var(--white); background: var(--navy-darkest); border: 2px solid var(--mist); border-radius: 8px; padding: .65rem .8rem; }

/* Club corrections */
input[type=url], textarea {
  width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit; font-size: 1rem;
  color: var(--white); background: var(--navy-darkest); border: 2px solid var(--mist); border-radius: 8px;
}
textarea { min-height: 7rem; resize: vertical; }
input[type=url]::placeholder, textarea::placeholder { color: #8C99BC; }
input[type=url]:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(245, 185, 33, .35); }
.claim-message { white-space: pre-wrap; background: var(--navy-dark); padding: .75rem .9rem; border-radius: 8px; }
.url-text { word-break: break-all; }
.actions-row { display: flex; flex-wrap: wrap; gap: .75rem; }
