/* =====================================================================
   Capel Cricket Club — site stylesheet
   Bright club green (#38A000) on white. Montserrat headings, Rubik body.
   ===================================================================== */

:root {
  --green:      #38A000;
  --green-mid:  #2F8A00;
  --green-deep: #236600;
  --green-tint: #EAF4E0;
  --green-line: #CFE6BB;

  --ink:    #1F252A;
  --body:   #3A4640;
  --muted:  #5F6F5C;
  --paper:  #FFFFFF;
  --wash:   #F5F8F1;
  --line:   #E3EADD;
  --danger: #B3261E;

  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(35,40,45,.05), 0 8px 22px rgba(35,40,45,.07);
  --shadow-md: 0 2px 6px rgba(35,40,45,.07), 0 22px 48px rgba(35,40,45,.13);

  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Rubik", Arial, Helvetica, sans-serif;
  --edge: clamp(1.1rem, 4vw, 3.5rem);
  --maxw: 1120px;
  --measure: 62ch;

  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  background: var(--wash);
  color: var(--body);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.02rem, .98rem + .25vw, 1.12rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.55rem); font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: 1.22rem; font-weight: 600; }
p { max-width: var(--measure); }
p + p { margin-top: 1.05em; }
a { color: var(--green-deep); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding-left: 1.3em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--edge); }

.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green);
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: currentColor; border-radius: 2px; }
.eyebrow.center { justify-content: center; }
.eyebrow.light { color: #EAF6E0; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  text-decoration: none; padding: .78rem 1.4rem; border-radius: 999px;
  background: var(--green); color: #fff; border: 2px solid var(--green);
  cursor: pointer;
  transition: background .2s var(--ease-out), border-color .2s, transform .25s var(--ease-spring), box-shadow .25s var(--ease-out);
}
.btn:hover { background: var(--green-mid); border-color: var(--green-mid); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(56,160,0,.28); }
.btn:active { transform: translateY(0); }
.btn.outline { background: transparent; color: var(--green-deep); }
.btn.outline:hover { background: var(--green-tint); box-shadow: var(--shadow-sm); }
.btn.white { background: #fff; border-color: #fff; color: var(--green-deep); }
.btn.white:hover { background: #F2F8EC; border-color: #F2F8EC; }

/* ---------- header ---------- */
.topbar { background: var(--green); display: flex; justify-content: center; padding: .85rem 1rem .75rem; }
.brand { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; }
.brand img { width: 48px; height: auto; }
.brand .name { font-family: var(--font-head); font-weight: 700; letter-spacing: .24em; text-transform: uppercase; font-size: .72rem; color: #fff; }

.mainnav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease-out);
}
.mainnav.scrolled { box-shadow: 0 8px 24px rgba(35,40,45,.08); }
.navbar { display: flex; justify-content: center; align-items: center; }
.menu-btn {
  display: none; font: 600 .9rem var(--font-head); background: none; border: 0; color: var(--ink);
  padding: .8rem .4rem; cursor: pointer; align-items: center; gap: .6rem;
}
.menu-btn .bars { width: 20px; height: 2px; background: currentColor; position: relative; display: inline-block; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; transition: transform .25s; }
.menu-btn .bars::before { top: -6px; } .menu-btn .bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after  { transform: translateY(-6px) rotate(-45deg); }

.menu { list-style: none; padding: .3rem 0; margin: 0; display: flex; gap: .2rem; flex-wrap: wrap; justify-content: center; }
.menu > li { position: relative; display: flex; align-items: center; }
.menu a {
  position: relative; display: block; font-family: var(--font-head); font-weight: 500; font-size: .92rem;
  text-decoration: none; color: var(--ink); padding: .75rem 1rem; transition: color .2s; white-space: nowrap;
}
.menu > li > a::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 4px; height: 3px; border-radius: 2px;
  background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out);
}
.menu > li > a:hover, .menu > li > a[aria-current="page"] { color: var(--green-deep); }
.menu > li > a:hover::after, .menu > li > a[aria-current="page"]::after, .menu > li:focus-within > a::after { transform: scaleX(1); }
.sub-toggle { background: none; border: 0; width: 26px; height: 26px; margin-left: -.5rem; cursor: pointer; position: relative; border-radius: 50%; }
.sub-toggle::after { content: ""; position: absolute; left: 9px; top: 7px; width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s; }
.sub-toggle[aria-expanded="true"]::after { transform: rotate(225deg); top: 11px; }
.sub {
  list-style: none; padding: .45rem; margin: 0;
  position: absolute; top: calc(100% - 2px); left: 0; min-width: 200px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease-spring);
}
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; transform: none; pointer-events: auto; }
.sub a { padding: .55rem .8rem; border-radius: 8px; font-size: .88rem; }
.sub a:hover, .sub a[aria-current="page"] { background: var(--green-tint); color: var(--green-deep); }

@media (max-width: 820px) {
  .navbar { justify-content: flex-start; flex-wrap: wrap; }
  .menu-btn { display: inline-flex; }
  .menu { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .6rem; border-top: 1px solid var(--line); }
  .menu.open { display: flex; }
  .menu > li { flex-wrap: wrap; }
  .menu > li > a { flex: 1; }
  .menu > li > a::after { display: none; }
  .sub-toggle { width: 44px; height: 44px; margin: 0; }
  .sub-toggle::after { left: 18px; top: 16px; }
  .sub { position: static; opacity: 1; transform: none; pointer-events: auto; display: none; box-shadow: none; border: 0; background: var(--wash); width: 100%; margin: 0 0 .4rem; }
  .has-sub.open .sub { display: block; }
}

/* ---------- home hero ---------- */
.hero { background: var(--green); padding-top: clamp(2rem, 6vw, 4rem); overflow: hidden; }
.hero .panel {
  min-width: 0;
  background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-md);
  padding: clamp(1.8rem, 5vw, 3.6rem);
  display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(1.5rem, 5vw, 3rem); align-items: center;
  transform: translateY(clamp(1.5rem, 5vw, 3rem));
  animation: panel-in .9s var(--ease-spring) both;
}
@keyframes panel-in { from { transform: translateY(calc(clamp(1.5rem, 5vw, 3rem) + 28px)); } to { transform: translateY(clamp(1.5rem, 5vw, 3rem)); } }
@keyframes crest-in { from { transform: translateY(6px) scale(.94); } to { transform: none; } }
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
.hero .body > * { animation: rise .8s var(--ease-spring) both; }
.hero .body > :nth-child(2) { animation-delay: .08s; }
.hero .body > :nth-child(3) { animation-delay: .16s; }
.hero .art img { width: min(300px, 74vw); margin-inline: auto; animation: crest-in 1s var(--ease-spring) .1s both; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 3.6vw, 3.4rem); }
.hero h1 span { color: var(--green); }
.hero .lede { margin-top: 1.1rem; color: var(--muted); font-size: 1.12rem; line-height: 1.65; }
.hero .cta { margin-top: 1.7rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-foot { background: var(--wash); height: clamp(1.5rem, 5vw, 3rem); }
@media (max-width: 760px) {
  .hero .panel { grid-template-columns: 1fr; text-align: center; }
  .hero .panel .art { order: -1; }
  .hero .cta { justify-content: center; }
}

/* ---------- inner page hero + sheet ---------- */
.page-hero { background: var(--green); color: #fff; padding: clamp(2.2rem, 6vw, 4rem) 0 clamp(4rem, 9vw, 6.5rem); }
.page-hero h1 { color: #fff; margin-top: .6rem; }
.page-hero .lede { margin-top: .8rem; color: rgba(255,255,255,.9); font-size: 1.1rem; max-width: 60ch; }
.sheet {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 4.5vw, 3.2rem);
  margin-top: calc(-1 * clamp(2.6rem, 6vw, 4.2rem));
  position: relative;
}
.sheet + .sheet, .sheet-gap { margin-top: 1.5rem; }

/* ---------- sections ---------- */
section { padding-block: clamp(3.4rem, 8vw, 6rem); scroll-margin-top: 64px; }
section.tight { padding-block: clamp(2rem, 5vw, 3.2rem); }
.sec-intro { max-width: var(--measure); margin-bottom: 2.6rem; }
.sec-intro h2 { margin: .7rem 0 .8rem; }
.sec-intro p { color: var(--muted); font-size: 1.06rem; }
.paper { background: var(--paper); border-block: 1px solid var(--line); }

/* ---------- prose (long-form pages) ---------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.9rem); margin: 2.2rem 0 .8rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8rem 0 .6rem; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { margin: 0 0 1.2em; }
.prose li + li { margin-top: .4em; }
.prose .byline { font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2rem; }
.prose blockquote { border-left: 4px solid var(--green); padding: .4rem 0 .4rem 1.2rem; margin: 1.6rem 0; color: var(--ink); font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.lead { font-size: 1.15rem; color: var(--ink); font-weight: 400; }

/* ---------- two-column feature ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.8rem, 5vw, 4rem); align-items: center; }
.split.top { align-items: start; }
.split > * { min-width: 0; }
.split .body h2 { margin: .7rem 0 1rem; }
.split .body .btn { margin-top: 1.7rem; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--paper); }
.frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .8s var(--ease-out); }
.frame.tall img { aspect-ratio: 3 / 4; }
.frame:hover img { transform: scale(1.03); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .cards, .cards.two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .cards.four { grid-template-columns: minmax(0, 1fr); } }
.card {
  min-width: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1rem 1.4rem; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .55rem;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out), border-color .2s;
}
a.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--green-line); }
.card .thumb { height: 150px; border-radius: 11px; overflow: hidden; background: var(--green-tint); display: grid; place-items: center; padding: 1rem; }
.card .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; width: auto; transition: transform .45s var(--ease-spring); }
.card .thumb.photo { padding: 0; height: 190px; }
.card .thumb.photo img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
a.card:hover .thumb img { transform: scale(1.06); }
.card h3 { color: var(--ink); margin-top: .3rem; padding-inline: .4rem; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; padding-inline: .4rem; }
.card .go { margin-top: auto; font-family: var(--font-head); font-weight: 600; font-size: .88rem; color: var(--green-deep); padding-inline: .4rem; transition: letter-spacing .2s; }
a.card:hover .go { letter-spacing: .02em; }
.card .tag { align-self: flex-start; margin: .2rem 0 0 .4rem; }

/* ---------- pills / tags ---------- */
.tag {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green-deep); background: var(--green-tint); padding: .22rem .6rem; border-radius: 999px;
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.6rem 0 2rem; }
.stat { background: var(--paper); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .15rem; }
.stat b { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; color: var(--green-deep); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .86rem; color: var(--muted); line-height: 1.35; }

/* ---------- team list (home) ---------- */
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.team { text-decoration: none; color: inherit; background: var(--paper); padding: 1.35rem 1.45rem; display: flex; flex-direction: column; gap: .3rem; transition: background .25s; }
.team:hover { background: var(--green-tint); }
.team .xi { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.08rem; }
.team .meta { font-size: .9rem; color: var(--muted); }
.team .tag { align-self: flex-start; margin-top: .5rem; transition: background .25s, color .25s; }
.team:hover .tag { background: var(--green); color: #fff; }

/* ---------- roles (About) ---------- */
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.role { background: var(--paper); padding: 1rem 1.2rem; }
.role .r { font-family: var(--font-head); font-weight: 600; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.role .n { color: var(--ink); font-weight: 500; margin-top: .15rem; }
.role .s { color: var(--muted); font-size: .88rem; }
.group-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin: 2.2rem 0 .8rem; }
.group-title:first-child { margin-top: 0; }

/* ---------- honours ---------- */
.honours { list-style: none; padding: 0; display: grid; gap: .6rem; }
.honours li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.honours .h { font-weight: 500; color: var(--ink); }
.honours .y { font-family: var(--font-head); font-weight: 700; color: var(--green-deep); white-space: nowrap; }

/* ---------- photo grid + lightbox ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.photo { display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 3 / 2; background: var(--green-tint); transition: transform .3s var(--ease-spring), box-shadow .3s; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.photo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.photo:hover img { transform: scale(1.05); }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(15,22,12,.94); display: grid; place-items: center; padding: 3rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(96vw, 1400px); max-height: 88vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 1rem; } .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; } }

/* ---------- gallery strip (home) ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 760px) { .gallery { grid-template-columns: minmax(0, 1fr); } }
.shot { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: block; transition: box-shadow .3s, transform .3s var(--ease-spring); }
.shot:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .7s var(--ease-out); }
.shot:hover img { transform: scale(1.05); }
.shot span { position: absolute; left: 0; right: 0; bottom: 0; font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: #fff; padding: 1.8rem .95rem .85rem; background: linear-gradient(transparent, rgba(20,30,15,.75)); }

/* ---------- teas (home) ---------- */
.teas { background: var(--green); color: #fff; }
.teas h2, .teas .quote { color: #fff; }
.teas p { color: rgba(255,255,255,.94); }
.teas .quote { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.45rem, 1.1rem + 1.9vw, 2.15rem); line-height: 1.25; letter-spacing: -.012em; margin: 1rem 0 1.3rem; max-width: 22ch; }
.teas .badge { display: inline-flex; align-items: baseline; gap: .55rem; margin-top: 1.6rem; font-family: var(--font-head); font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.teas .badge b { font-size: 2.1rem; letter-spacing: 0; color: #fff; font-variant-numeric: tabular-nums; }
.teas .frame { box-shadow: 0 24px 50px rgba(0,0,0,.3); }

/* ---------- green CTA band ---------- */
.band { background: var(--green); color: #fff; }
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.92); }
.band .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: center; }
@media (max-width: 760px) { .band .wrap { grid-template-columns: 1fr; } }

/* ---------- info panels ---------- */
.panel-note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 1.5rem 1.7rem; box-shadow: var(--shadow-sm); }
.panel-note .k { font-family: var(--font-head); font-weight: 600; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); display: block; margin-top: .9rem; }
.panel-note .k:first-child { margin-top: 0; }
.aside-stack { display: grid; gap: 1.2rem; align-content: start; }

/* ---------- pricing ---------- */
.prices { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 2px solid var(--ink); }
.prices li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.prices .n { color: var(--ink); font-weight: 500; }
.prices .d { color: var(--muted); font-size: .88rem; display: block; }
.prices .p { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--green-deep); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- rules ---------- */
.rules h2 { display: flex; align-items: center; gap: .8rem; }
.rules h2 .num { font-family: var(--font-head); font-weight: 800; font-size: .95rem; color: #fff; background: var(--green); width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.rules ul { list-style: none; padding: 0; }
.rules li { position: relative; padding-left: 1.6rem; }
.rules li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.rules .steps { counter-reset: step; }
.rules .steps li { padding-left: 2.2rem; }
.rules .steps li::before { counter-increment: step; content: counter(step); width: 22px; height: 22px; top: .35em; background: var(--green-tint); color: var(--green-deep); font: 700 .75rem var(--font-head); display: grid; place-items: center; }
.callout { background: var(--green-tint); border: 1px solid var(--green-line); border-radius: 12px; padding: 1rem 1.2rem; color: var(--ink); font-weight: 500; margin: 1.4rem 0; }
.callout.warn { background: #FFF6E5; border-color: #F2D9A6; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 5vw, 3rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.form { display: grid; gap: 1rem; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form .two { grid-template-columns: 1fr; } }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .82rem; letter-spacing: .04em; color: var(--ink); margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--wash); border: 1px solid var(--line); border-radius: 10px;
  padding: .75rem .9rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(56,160,0,.14); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.alert { border-radius: 12px; padding: 1rem 1.2rem; font-weight: 500; margin-bottom: 1.2rem; }
.alert.ok { background: var(--green-tint); border: 1px solid var(--green-line); color: var(--green-deep); }
.alert.err { background: #FDECEC; border: 1px solid #F3B9B5; color: var(--danger); }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--green-tint); }
.map iframe { display: block; width: 100%; height: 340px; border: 0; }
.socials { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.socials a { font-family: var(--font-head); font-weight: 600; font-size: .85rem; text-decoration: none; color: var(--green-deep); border: 1px solid var(--green-line); padding: .55rem 1rem; border-radius: 999px; transition: background .2s, transform .25s var(--ease-spring), border-color .2s; }
.socials a:hover { background: var(--green-tint); border-color: var(--green); transform: translateY(-2px); }

/* ---------- coaches list ---------- */
.contacts { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.contacts li { background: var(--paper); padding: 1rem 1.3rem; display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; align-items: center; }
.contacts .g { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.contacts .who { color: var(--muted); font-size: .92rem; }
.contacts a { font-family: var(--font-head); font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--green-deep); white-space: nowrap; }
.contacts a:hover { text-decoration: underline; }

/* ---------- logos row (Slam page) ---------- */
.logos { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }
.logos img { max-height: 110px; width: auto; }

/* ---------- pdf ---------- */
.pdf { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--paper); margin-top: 1.5rem; }
.pdf iframe, .pdf object { display: block; width: 100%; height: min(80vh, 1000px); border: 0; }

/* ---------- sponsors + footer ---------- */
.sponsors { text-align: center; background: var(--paper); border-top: 1px solid var(--line); padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.sponsors .row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.6rem 3rem; margin-top: 1.8rem; }
.sponsors .row a { display: inline-flex; }
.sponsors .row img { max-height: 46px; width: auto; object-fit: contain; opacity: .72; filter: grayscale(.15); transition: opacity .25s, filter .25s, transform .3s var(--ease-spring); }
.sponsors .row img.tall { max-height: 72px; }
.sponsors .row img:hover { opacity: 1; filter: none; transform: translateY(-3px); }

.site-footer { background: var(--green-deep); color: rgba(255,255,255,.82); font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding-block: 2.4rem 1.6rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { display: flex; gap: 1rem; align-items: flex-start; }
.foot-brand img { flex: none; }
.foot-brand strong { display: block; color: #fff; font-family: var(--font-head); letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; margin-bottom: .3rem; }
.foot-links, .foot-social { list-style: none; padding: 0; display: grid; gap: .35rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; padding-block: 1.2rem 1.8rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .82rem; }

/* ---------- back to top ---------- */
.totop { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(56,160,0,.32); cursor: pointer; display: grid; place-items: center; opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .3s, transform .35s var(--ease-spring), background .2s; }
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: var(--green-mid); }
.totop svg { width: 20px; height: 20px; }

/* ---------- scroll reveal ---------- */
html .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-spring); transition-delay: calc(var(--i, 0) * 70ms); will-change: opacity, transform; }
html .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   Season stats, results and league tables (from Play-Cricket)
   ===================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: .6rem .7rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.data th { font-family: var(--font-head); font-weight: 700; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--wash); position: sticky; top: 0; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data td:first-child { font-weight: 500; color: var(--ink); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--green-tint); }
table.data td.hi { font-family: var(--font-head); font-weight: 700; color: var(--green-deep); font-size: 1rem; }
table.data tr.capel td { background: var(--green-tint); font-weight: 500; }
table.data tr.capel td:first-child { color: var(--green-deep); font-weight: 700; }
table.data .pos { color: var(--muted); width: 2.5ch; }
table.data .name-col { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.stats-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
.stats-grid h3 { margin-bottom: .6rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.stats-grid h3 small { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--muted); }
.season-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .6rem 1.5rem; }
.season-head .updated { font-size: .82rem; color: var(--muted); }

/* results list */
.results { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.results li { background: var(--paper); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: center; padding: .85rem 1.1rem; }
.results li:hover { background: var(--wash); }
.results .rb { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: .95rem; color: #fff; grid-row: span 2; }
.rb.W { background: var(--green); } .rb.L { background: #B3261E; } .rb.T, .rb.D { background: #8A6D1F; } .rb.A, .rb.C { background: #8C9A87; }
.results .opp { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.results .opp small { font-family: var(--font-body); font-weight: 400; color: var(--muted); }
.results .meta { font-size: .86rem; color: var(--muted); grid-column: 2; }
.results .score { text-align: right; font-size: .9rem; color: var(--ink); grid-row: span 2; white-space: nowrap; }
.results .score b { display: block; font-family: var(--font-head); font-weight: 700; color: var(--green-deep); }
.results .score a { color: inherit; text-decoration: none; }
.results .score a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .results li { grid-template-columns: 38px minmax(0, 1fr); }
  .results .score { grid-column: 2; grid-row: auto; text-align: left; white-space: normal; }
}

/* fixtures list */
.fixtures { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fixtures li { background: var(--paper); display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: center; padding: .85rem 1.1rem; }
.fixtures .d { font-family: var(--font-head); font-weight: 700; color: var(--green-deep); font-size: .95rem; grid-row: span 2; }
.fixtures .d small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: .8rem; }
.fixtures .who { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.fixtures .meta { font-size: .86rem; color: var(--muted); grid-column: 2; }
.fixtures .ha { grid-row: span 2; }
.ha { font-family: var(--font-head); font-weight: 600; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--green-line); color: var(--green-deep); }
.ha.home { background: var(--green); border-color: var(--green); color: #fff; }

/* filter tabs */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.tabs button { font: 600 .85rem var(--font-head); background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: .5rem .95rem; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease-spring); }
.tabs button:hover { border-color: var(--green); transform: translateY(-1px); }
.tabs button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
[data-team][hidden] { display: none !important; }
.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }

/* collapsed previous-season review */
details.review { border: 1px solid var(--line); border-radius: var(--radius); background: var(--wash); padding: 0 1.4rem; margin-top: 2rem; }
details.review summary { cursor: pointer; padding: 1.1rem 0; font-family: var(--font-head); font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.review summary::-webkit-details-marker { display: none; }
details.review summary::after { content: "+"; font-size: 1.4rem; color: var(--green); transition: transform .25s; }
details.review[open] summary::after { transform: rotate(45deg); }
details.review .prose { padding-bottom: 1.4rem; }

/* =====================================================================
   Team panels, team switcher, "View all" buttons
   ===================================================================== */
.team-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 .4rem; }
.team-tabs button { font: 700 .88rem var(--font-head); background: var(--paper); color: var(--ink); border: 2px solid var(--line); padding: .6rem 1.1rem; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease-spring); }
.team-tabs button:hover { border-color: var(--green); transform: translateY(-1px); }
.team-tabs button[aria-selected="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.team-panel { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 3px solid var(--green); }
.team-panel[hidden] { display: none; }
.team-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.team-panel-head .rec { color: var(--muted); font-size: .92rem; }
.team-chip { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; background: var(--green); color: #fff; padding: .32rem .75rem; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.team-headline { margin: .7rem 0 0; }
.jump { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .2rem 0 .4rem; font-family: var(--font-head); font-weight: 600; font-size: .82rem; }
.jump a { text-decoration: none; color: var(--green-deep); border-bottom: 2px solid var(--green-line); padding-bottom: 1px; transition: border-color .2s; }
.jump a:hover { border-color: var(--green); }
.stat-section { margin-top: 1.7rem; scroll-margin-top: 80px; }
.stat-section h3 { margin-bottom: .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .8rem; }
.stat-section h3 small { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--muted); }
.stat-section h3 .team-chip { font-size: .68rem; }
.fielding { margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.fielding strong { color: var(--ink); }

.is-collapsed [data-extra] { display: none; }
.more-btn { display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem; font: 600 .85rem var(--font-head); background: var(--paper); color: var(--green-deep); border: 1px solid var(--green-line); padding: .55rem 1.05rem; border-radius: 999px; cursor: pointer; transition: background .2s, border-color .2s, transform .25s var(--ease-spring); }
.more-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s; }
.more-btn[aria-expanded="true"]::after { transform: rotate(225deg) translateY(-2px); }
.more-btn:hover { background: var(--green-tint); border-color: var(--green); transform: translateY(-1px); }

/* ---------- About page: later chapters in two columns under the intro split ---------- */
.history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; margin-top: 2.6rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .history-grid { grid-template-columns: minmax(0, 1fr); } }
.history-grid h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.6rem); margin: 0 0 .6rem; }
.history-grid p { margin: 0 0 1em; }

/* ---------- Gallery: albums, masonry grid, lightbox counter ---------- */
.photo-grid.masonry { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 170px; grid-auto-flow: dense; gap: .7rem; }
.photo-grid.masonry .photo { aspect-ratio: auto; height: 100%; }
.photo-grid.masonry .photo.tall { grid-row: span 2; }
.photo-grid.masonry .photo.wide { grid-column: span 2; }
@media (max-width: 640px) { .photo-grid.masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; gap: .5rem; } .photo-grid.masonry .photo.wide { grid-column: span 1; } }
.album { border-top-width: 3px; }
.album .team-panel-head { margin-bottom: 1rem; }
.lb-count { position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); color: rgba(255,255,255,.85); font: 600 .82rem var(--font-head); letter-spacing: .08em; background: rgba(0,0,0,.35); padding: .35rem .8rem; border-radius: 999px; pointer-events: none; }
.lightbox img { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
@media (max-width: 600px) { .lb-count { bottom: 4.6rem; } }
