/* SEMVOG palette: court navy, court blue, line white, yellow card, red card */
:root {
  --navy: #0F2340;
  --blue: #1E4F8F;
  --blue-soft: #E7EEF7;
  --paper: #F5F7FA;
  --ink: #17202C;
  --muted: #4A5667;
  --rule: #D3DBE6;
  --yellow: #F2C230;
  --red: #C8272D;
  --white: #FFFFFF;

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 72rem;
  --radius: 6px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
}

img, svg { max-width: 100%; }

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  color: var(--navy);
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.5rem; font-weight: 600; }

p { margin: 0 0 1em; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--yellow);
  color: var(--navy);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy);
}
.brand img { width: 60px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-short { font: 700 1.5rem/1 var(--display); letter-spacing: 0.04em; }
.brand-long { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

.nav-toggle {
  display: none;
  font: 600 1rem var(--body);
  background: var(--navy);
  color: var(--white);
  border: 0;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--yellow); color: var(--navy); }

@media (max-width: 1200px) {
  .brand-long { display: none; }
}
@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(15, 35, 64, 0.12);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0.5rem 1.25rem 1rem; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--rule); box-shadow: inset 4px 0 0 var(--yellow); padding-left: 0.75rem; }
}

/* Buttons */
.btn {
  display: inline-block;
  font: 600 1.05rem/1 var(--body);
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-card { background: var(--yellow); color: var(--navy); }
.btn-card:hover { background: #FFD659; color: var(--navy); }
.btn-solid { background: var(--navy); color: var(--white); }
.btn-solid:hover { background: var(--blue); color: var(--white); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.btn-small { padding: 0.6rem 1rem; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Hero */
.hero {
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 3rem;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero h1 {
  color: var(--white);
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.95;
  max-width: 9ch;
}
.hero .lede { color: #D7E0EC; max-width: 34rem; }

.court {
  width: 100%;
  height: auto;
  transform: rotate(-6deg);
  overflow: visible;
}
.court-zone { fill: #163460; }
.court-floor { fill: var(--blue); }
.court-lines rect, .court-lines line {
  fill: none;
  stroke: var(--white);
  stroke-width: 1.4;
}
.court-lines .dashed { stroke-dasharray: 3 3; opacity: 0.7; }
.court-net { stroke: var(--white); stroke-width: 3; }
.court-post { fill: var(--white); }

@media (prefers-reduced-motion: no-preference) {
  .court-lines rect, .court-lines line:not(.dashed), .court-net {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw 1.4s ease-out 0.2s forwards;
  }
  .court-net { animation-delay: 1s; animation-duration: 0.7s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.lede { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 40rem; }

/* Bands */
.band { padding-block: clamp(3rem, 7vw, 5rem); }
.band-alt { background: var(--white); border-block: 1px solid var(--rule); }
.band-dark { background: var(--navy); color: #D7E0EC; }
.band-dark h2 { color: var(--white); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem 4rem;
  align-items: start;
}
.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-head h2 { margin: 0; }
.text-link { font-weight: 600; }

/* Steps: a real sequence, so numbering carries meaning */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 1.75rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.1rem 3.25rem;
  min-height: 2.4rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--white);
  font: 700 1.3rem/1 var(--display);
  border-radius: 50%;
}

/* Events: scoreboard style date block */
.events { list-style: none; margin: 0; padding: 0; }
.event {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule);
}
.event:first-child { border-top: 0; padding-top: 0; }
.event-date {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  text-align: center;
  padding: 0.6rem 0 0.7rem;
  align-self: start;
  border-top: 5px solid var(--yellow);
}
.event-month { display: block; font: 600 1.1rem/1 var(--display); color: var(--yellow); }
.event-day { display: block; font: 700 2.6rem/1 var(--display); margin-top: 0.15rem; }
.event-body h3 { margin-bottom: 0.25rem; }
.event-body h3 a { color: var(--navy); text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.event-body h3 a:hover { color: var(--blue); }
.event-meta { color: var(--muted); }
.event-note { color: var(--muted); font-style: italic; margin: 0; }
.empty { color: var(--muted); }

.month-group + .month-group { margin-top: 3rem; }
.month-label {
  font-size: 1.6rem;
  color: var(--blue);
  padding-bottom: 0.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--navy);
}
.month-group .event { padding-block: 1.1rem; }
.month-group .event:first-child { padding-top: 0; }
.month-group .event-body h3 { margin-bottom: 0.15rem; }
.month-group .event-meta { margin-bottom: 0.5rem; }

/* Inner pages */
.page-head {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 4vw, 3rem);
  border-top: 6px solid var(--navy);
}
.page-head h1 { margin-bottom: 0.3em; }
.page-head .lede { margin: 0; }
.page-body { padding-block: clamp(2.5rem, 6vw, 4rem); }

.note {
  font-size: 1rem;
  color: var(--muted);
  border-left: 4px solid var(--yellow);
  padding-left: 1rem;
}

.faq { max-width: 46rem; }
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.85rem;
  font: 700 1.6rem/1 var(--display);
  color: var(--blue);
}
.faq details[open] summary::after { content: "\2212"; }
.faq-answer { padding-bottom: 1rem; }

.resource-list, .post-list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.resource-list li, .post-list li { padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.resource-list a { font: 700 1.5rem/1.2 var(--display); }
.resource-list p, .post-list p { margin: 0.35rem 0 0; color: var(--muted); }
.post-list time, .post-date { color: var(--muted); font-size: 0.95rem; }
.post-list h2 { font-size: 1.75rem; margin: 0.2rem 0 0; }
.post-list h2 a { color: var(--navy); text-decoration: none; }
.post-list h2 a:hover { color: var(--blue); text-decoration: underline; }
.back { margin-top: 2.5rem; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 3rem;
}
.contact-grid h2 { font-size: 1.5rem; margin-bottom: 0.2rem; }
.contact-grid h2 + p { margin-bottom: 1.5rem; }
.callout {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.callout ul { padding-left: 1.2rem; }

/* Event pages and registration */
.crumb { margin: 0 0 0.75rem; font-weight: 600; }
.crumb a { text-decoration: none; }
.crumb a::before { content: "\2039"; margin-right: 0.4rem; }
.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 3rem;
  align-items: start;
}
.register {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--yellow);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.register h2 { font-size: 2rem; }
.reg-form { display: grid; gap: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; margin: 0; }
.field label, .days legend { font-weight: 600; color: var(--navy); font-size: 1rem; }
.optional { font-weight: 400; color: var(--muted); }
.reg-form input:not([type=checkbox]), .reg-form textarea {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #AEB9C8;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.reg-form input:focus-visible, .reg-form textarea:focus-visible { border-color: var(--blue); }
.days { border: 0; padding: 0; }
.days legend { padding: 0; margin-bottom: 0.35rem; }
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 1rem;
  padding-block: 0.2rem;
  cursor: pointer;
}
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--navy); flex-shrink: 0; }
.field .check { font-weight: 400; color: var(--ink); }
.confirm { background: var(--blue-soft); border-radius: var(--radius); padding: 0.8rem 0.9rem; }
.reg-form .btn { justify-self: start; border: 0; cursor: pointer; font-size: 1.1rem; }
.hint { margin: 0; font-size: 0.95rem; color: var(--muted); }
.reg-form input[type=file] { font: inherit; font-size: 1rem; padding: 0.6rem; border: 1px dashed #AEB9C8; border-radius: var(--radius); background: var(--paper); width: 100%; }
.card-preview { max-width: 16rem; max-height: 11rem; object-fit: contain; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-error { margin: 0; padding: 0.8rem 0.9rem; border-left: 5px solid var(--red); background: #FBECEC; color: #7A1519; border-radius: var(--radius); }
.reg-form .btn:disabled { opacity: 0.7; cursor: progress; }
.register { position: relative; }
.reg-done { border-left: 5px solid var(--navy); padding-left: 1rem; }
.reg-done:focus { outline: none; }
.reg-done h3 { font-size: 1.6rem; }

/* Footer */
.site-footer {
  background: #0A1A31;
  color: #B9C6D8;
  padding-block: 2.5rem;
  font-size: 1rem;
}
.site-footer a { color: var(--white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.footer-name { color: var(--white); font: 600 1.25rem/1.2 var(--display); }
.footer-copy { font-size: 0.9rem; align-self: end; text-align: right; margin: 0; }

/* Small screens */
@media (max-width: 800px) {
  .hero-grid, .split, .contact-grid, .footer-grid, .event-layout, .field-row { grid-template-columns: 1fr; }
  .hero-grid { gap: 2rem; }
  .court { max-width: 30rem; }
  .footer-copy { text-align: left; }
  .event { grid-template-columns: 4.5rem 1fr; gap: 1rem; }
  .event-day { font-size: 2.1rem; }
}
