/* ============================================================
   REF COMMUNITY — STYLESHEET
   Brand colours are set once, here. Change them and the whole
   site follows.
   ============================================================ */

:root {
  --green:        #0f6b3f;
  --green-dark:   #0a4a2b;
  --green-light:  #e8f4ee;
  --gold:         #f2a71b;
  --ink:          #16211c;
  --body:         #414f48;
  --muted:        #6b7c74;
  --line:         #dde5e0;
  --bg:           #ffffff;
  --bg-soft:      #ffffff;   /* all page backgrounds are white */
  --hover:        #f4f9f6;   /* faint tint, used only for table row hover */
  --radius:       14px;
  --shadow:       0 2px 4px rgba(16,40,28,.05), 0 12px 28px rgba(16,40,28,.07);
  --max:          1120px;
  --font:         "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
a { color: var(--green); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
/* Backgrounds are all white, so a hairline keeps sections visually separate */
.section--soft { background: #fff; border-top: 1px solid var(--line); }
.section__head { max-width: 720px; margin-bottom: 40px; }
.section__head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--green); margin-bottom: .6rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 18px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 46px; height: 46px; flex: none; border-radius: 11px;
  background: var(--green); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .95rem; letter-spacing: .02em;
  overflow: hidden;
}
/* Once a real logo loads, drop the green tile so the artwork stands alone */
.brand__mark.has-logo { background: transparent; border-radius: 0; }
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__name { font-weight: 800; color: var(--ink); font-size: 1.06rem; line-height: 1.15; }
.brand__tag { font-size: .74rem; color: var(--muted); line-height: 1.2; }

.nav__links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 8px 11px; border-radius: 9px;
  text-decoration: none; color: var(--body); font-size: .9rem; font-weight: 500;
  white-space: nowrap;
}
.nav__links a:hover { background: var(--green-light); color: var(--green-dark); }
.nav__links a.is-active { color: var(--green-dark); font-weight: 700; background: var(--green-light); }
.nav__cta-inline { display: none; }

/* ---------- Dropdown menus ---------- */
.nav__group { position: relative; }
.nav__group-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 11px; border: 0; border-radius: 9px; background: none;
  font-family: inherit; font-size: .9rem; font-weight: 500; color: var(--body);
  cursor: pointer; white-space: nowrap;
}
.nav__group-btn:hover { background: var(--green-light); color: var(--green-dark); }
.nav__group-btn.is-active { color: var(--green-dark); font-weight: 700; background: var(--green-light); }
.nav__caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .55; transition: transform .15s ease;
}
.nav__group.is-open .nav__caret { transform: rotate(180deg); }

.nav__menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 232px; list-style: none; margin: 0; padding: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 6px 14px rgba(16,40,28,.06), 0 18px 40px rgba(16,40,28,.12);
  z-index: 60;
}
.nav__group.is-open .nav__menu { display: block; }
.nav__menu a { padding: 9px 12px; font-size: .9rem; white-space: normal; }
.nav__menu li:first-child a {
  font-weight: 650; color: var(--green-dark);
  border-bottom: 1px solid var(--line); border-radius: 9px 9px 0 0; margin-bottom: 4px;
}

@media (max-width: 1040px) {
  .nav__links a, .nav__group-btn { padding: 8px 8px; font-size: .86rem; }
  .nav__menu a { padding: 9px 12px; }
}

.nav__toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 9px; width: 42px; height: 40px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px; position: relative;
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after  { position: absolute; top:  6px; }

@media (max-width: 1100px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 14px 18px; display: none;
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 10px; }
  .nav__cta { display: none; }
  .nav__cta-inline { display: block; margin-top: 10px; }
  .nav__cta-inline .btn { width: 100%; }

  /* Dropdowns become inline accordions — no floating panel on a phone */
  .nav__group-btn { width: 100%; justify-content: space-between; padding: 12px 10px; font-size: .93rem; }
  .nav__menu {
    position: static; display: none; min-width: 0; box-shadow: none;
    border: 0; border-left: 2px solid var(--green-light); border-radius: 0;
    margin: 0 0 6px 12px; padding: 0;
  }
  .nav__group.is-open .nav__menu { display: block; }
  .nav__menu a { font-size: .89rem; }
  .nav__menu li:first-child a { border-bottom: 0; border-radius: 9px; margin-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer;
  font-family: inherit; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(15,107,63,.24); }
.btn--primary:hover { background: var(--green-dark); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--green); color: var(--green-dark); }
.btn--gold { background: var(--gold); color: #3a2600; }
.btn--sm { padding: 9px 16px; font-size: .87rem; }

/* ---------- Banner (homepage) ----------
   Composite strip: logo panel + three programme photos, built to 4:1 so the
   frame is half the height of the old 2:1 photo banner. The image is authored
   at exactly this ratio, so object-fit never crops anything away.          */
.banner { padding: 26px 0 0; background: #fff; }
.banner img {
  width: 100%; aspect-ratio: 4 / 1;
  object-fit: cover; object-position: center;
  border-radius: 14px; box-shadow: var(--shadow);
  display: block;
}
@media (max-width: 700px) {
  .banner { padding-top: 18px; }
  /* Mobile file is logo + two photos at 3.5:1 — half of the old 16:9 */
  .banner img { aspect-ratio: 3.5 / 1; border-radius: 12px; }
}

/* ---------- Hero ---------- */
.hero {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 56px 0 84px;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero__lede { font-size: 1.14rem; color: var(--body); max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__stats { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; }
.hero__stat b { display: block; font-size: 1.95rem; color: var(--green); line-height: 1; letter-spacing: -.03em; }
.hero__stat span { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.hero__card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 26px;
}
.hero__card h3 { font-size: 1rem; margin-bottom: 14px; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 42px; height: 42px; border-radius: 11px; background: var(--green-light);
  display: grid; place-items: center; margin-bottom: 16px; font-size: 1.25rem;
}

/* ---------- Events ---------- */
.event {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 22px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.event__date {
  text-align: center; background: var(--green-light); border-radius: 11px; padding: 10px 6px;
}
.event__date b { display: block; font-size: 1.6rem; color: var(--green-dark); line-height: 1; }
.event__date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--green); font-weight: 700; }
.event h3 { margin-bottom: .25em; font-size: 1.08rem; }
.event__meta { font-size: .88rem; color: var(--muted); margin: 0 0 .35em; }
.event p { margin: 0; font-size: .95rem; }
@media (max-width: 720px) {
  .event { grid-template-columns: 76px 1fr; }
  .event > .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Gallery ---------- */
.gallery-group { margin-bottom: 52px; }
.gallery-group__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.gallery-group__head h3 { margin: 0; font-size: 1.3rem; }
.gallery-group__date { font-size: .85rem; color: var(--muted); font-weight: 600; }
.gallery-group > p { color: var(--muted); margin-bottom: 18px; max-width: 66ch; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery figure {
  margin: 0; aspect-ratio: 4 / 3; border-radius: 11px; overflow: hidden;
  background: var(--green-light); position: relative; cursor: pointer;
  border: 1px solid var(--line);
}

/* Poster layout — designed portrait graphics. Taller tiles and `contain`
   so headlines and footer text are never cropped away.                   */
.gallery.gallery--poster { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gallery.gallery--poster figure { aspect-ratio: 4 / 5; background: #fff; }
.gallery.gallery--poster img { object-fit: contain; }
/* posters are already whole images — no zoom-on-hover */
.gallery.gallery--poster figure:hover img { transform: none; }
.gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease; position: relative; z-index: 1;
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figure::after {
  content: "Photo coming soon"; position: absolute; inset: 0;
  display: grid; place-items: center; font-size: .8rem; color: var(--green);
  font-weight: 600; z-index: 0;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,24,17,.92); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 18px; right: 22px; background: none; border: 0;
  color: #fff; font-size: 2.3rem; line-height: 1; cursor: pointer;
}

/* ---------- Members ---------- */
.member { text-align: center; }
.member__photo {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--green); color: #fff; display: grid; place-items: center;
  font-size: 1.9rem; font-weight: 800; overflow: hidden; letter-spacing: -.02em;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member h3 { margin-bottom: .1em; font-size: 1.08rem; }
.member__role { color: var(--green); font-weight: 650; font-size: .9rem; margin-bottom: .6em; }
.member p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Stats / chart ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.stat-card b { display: block; font-size: 2.1rem; color: var(--green); line-height: 1; letter-spacing: -.03em; }
.stat-card span { font-size: .84rem; color: var(--muted); }
@media (max-width: 780px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }

.chart {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.chart__bars { display: flex; align-items: flex-end; gap: 20px; height: 280px; margin-bottom: 12px; }
.chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.chart__stack { display: flex; flex-direction: column-reverse; border-radius: 7px 7px 0 0; overflow: hidden; }
.chart__seg { transition: height .6s cubic-bezier(.2,.7,.3,1); }
.chart__seg--juniors { background: var(--green); }
.chart__seg--adults  { background: #3fa06c; }
.chart__seg--seniors { background: var(--gold); }
.chart__total { text-align: center; font-weight: 700; color: var(--ink); font-size: .95rem; margin-bottom: 6px; }
.chart__labels { display: flex; gap: 20px; }
.chart__labels div { flex: 1; text-align: center; font-size: .88rem; color: var(--muted); font-weight: 600; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; font-size: .88rem; color: var(--muted); }
.legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; margin-right: 7px; vertical-align: -2px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
th {
  background: #fff; font-weight: 700; color: var(--ink); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 2px solid var(--line);   /* replaces the old grey fill */
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hover); }
td b { color: var(--ink); }
.tag {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .78rem;
  font-weight: 650; background: var(--green-light); color: var(--green-dark);
  white-space: nowrap;
}
.tag--pending { background: #f1efe8; color: #5f5e5a; }

/* Group codes read as identifiers, not prose */
.gcode {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; background: var(--green-light); color: var(--green-dark);
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
tbody tr.row--newday td { border-top: 2px solid var(--line); }

/* Sessions still awaiting a permit read as provisional, not cancelled */
tbody .row--pending td { color: var(--muted); }
tbody .row--today td { background: var(--green-light); }

/* ---------- Season / play dates ---------- */

.batches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.batch {
  background: var(--green-light); border-radius: var(--radius);
  padding: 18px 22px; display: flex; flex-direction: column; gap: 3px;
}
.batch__name { font-weight: 700; color: var(--green-dark); font-size: .95rem; }
.batch__time { font-size: 1.12rem; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }

.season__next {
  margin: 20px 0 0; padding: 14px 20px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold);
  font-size: .96rem; border-radius: 0 var(--radius) var(--radius) 0;
}

.daycols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.daycol {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.daycol__head { background: var(--green); color: #fff; padding: 18px 20px; }
.daycol__head h3 { color: #fff; margin: 0 0 4px; font-size: 1.22rem; }
.daycol__head p { margin: 0; font-size: .85rem; line-height: 1.45; color: rgba(255,255,255,.92); }
.daycol__head span { opacity: .8; font-style: italic; }

.daycol__list { list-style: none; margin: 0; padding: 6px 0; flex: 1; }
.daycol__list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 20px; font-size: .95rem; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.daycol__list li:last-child { border-bottom: 0; }
.daycol__list li.is-past { color: var(--muted); font-weight: 400; text-decoration: line-through; }
.daycol__list li.is-today { background: var(--green-light); }
.daycol__count {
  margin: 0; padding: 12px 20px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--muted); background: var(--bg-soft);
}

@media (max-width: 900px) {
  .daycols  { grid-template-columns: 1fr; }
  .batches  { grid-template-columns: 1fr; }
}

/* ---------- Forms ---------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 650; font-size: .92rem; color: var(--ink); margin-bottom: 7px; }
.field .req { color: #c0392b; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .97rem; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,107,63,.12);
}
.field textarea { min-height: 120px; resize: vertical; }
.field small { display: block; color: var(--muted); font-size: .84rem; margin-top: 6px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .field--row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: .93rem; margin-bottom: 14px; }
.check input { width: auto; margin-top: 4px; flex: none; }

/* ---------- Radio groups ---------- */
.field .label {
  display: block; font-weight: 650; font-size: .92rem; color: var(--ink); margin-bottom: 9px;
}
.radios { display: flex; flex-direction: column; gap: 9px; }
.radios--row { flex-direction: row; flex-wrap: wrap; gap: 9px 12px; }
.radio {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 10px 15px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: .93rem; background: #fff; transition: border-color .12s ease;
}
.radio:hover { border-color: var(--green); }
.radio input { width: auto; margin: 0; flex: none; accent-color: var(--green); }
.radio:has(input:checked) { border-color: var(--green); background: var(--green-light); }
.field.has-error .radio { border-color: #c0392b; }
.form__note {
  background: var(--green-light); border-radius: 10px; padding: 15px 18px;
  font-size: .89rem; color: var(--green-dark); margin-bottom: 26px;
}
.form-error { color: #c0392b; font-size: .87rem; margin-top: 6px; display: none; }
.field.has-error input, .field.has-error select { border-color: #c0392b; }
.field.has-error .form-error { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9c8c1; padding: 56px 0 26px; margin-top: 0; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer a { color: #b9c8c1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: .93rem; }
.footer__tag { font-style: italic; color: var(--gold); margin-top: 10px; font-size: .95rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .87rem;
}
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.lead { font-size: 1.1rem; }
.muted { color: var(--muted); }
.cta-band {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff; border-radius: 20px; padding: 48px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.86); max-width: 56ch; margin: 0 auto 26px; }
@media (max-width: 620px) { .cta-band { padding: 34px 24px; } }

.page-head {
  background: #fff;
  border-bottom: 1px solid var(--line); padding: 58px 0;
}
.page-head p { color: var(--muted); font-size: 1.06rem; max-width: 64ch; margin: 0; }
.page-head h1 { margin-bottom: .3em; }
