/* Beardy Cricket – site styles
   Brand colours sampled from the official logo. */
:root {
  --cream: #F4E5CA;
  --sand: #E9D5AE;
  --green: #184D38;        /* logo wordmark */
  --green-dark: #10372A;
  --olive: #A8B36A;
  --red: #B8322A;          /* ball – used for primary CTAs */
  --red-dark: #962520;
  --beard: #8B4A1C;
  --ink: #33240F;
  --white: #FFFFFF;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 10px 30px rgba(24, 77, 56, 0.18);
  --font-display: 'Baloo Chettan 2', system-ui, sans-serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--font-display); color: var(--green); line-height: 1.05; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
h3 { font-size: 24px; font-weight: 800; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--green { background: var(--green); color: var(--cream); }
.section--green h2, .section--green h3 { color: var(--cream); }
.section--sand { background: var(--sand); }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin-bottom: 32px; }
.section-head p { font-size: 18px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--beard); }
.section--green .eyebrow { color: var(--olive); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: 700 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); color: var(--white); }
.btn--outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn--outline:hover { background: var(--green); color: var(--cream); }
.btn--light { background: var(--cream); color: var(--green); }
.btn--light:hover { background: var(--white); color: var(--green); }
.btn--ghost-light { border-color: var(--cream); color: var(--cream); background: transparent; }
.btn--ghost-light:hover { background: var(--cream); color: var(--green); }
.btn--lg { min-height: 56px; padding: 16px 30px; font-size: 18px; }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn[aria-disabled="true"] { background: #9a8f7c; color: var(--white); pointer-events: none; }

/* Announcement + header */
.announce { background: var(--green); color: var(--cream); text-align: center; font-size: 14px; font-weight: 600; padding: 9px 16px; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 1px solid rgba(24,77,56,.08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 46px; height: auto; }
.brand__word { width: 120px; height: auto; }
.nav { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--green); cursor: pointer; }

/* Hero */
.hero { padding: 48px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 20px; }
.hero__lede { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; color: var(--beard); line-height: 1.2; }
.hero__body { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; color: var(--green); line-height: 1.2; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; font-size: 14px; font-weight: 600; }
.chips li { background: var(--sand); padding: 7px 14px; border-radius: 999px; }
.hero__visual { position: relative; }
.photo {
  background: var(--olive); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--green-dark); font-weight: 600; padding: 24px;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo { aspect-ratio: 4 / 5; width: 100%; border-radius: var(--radius-lg); overflow: hidden; display: block; object-fit: cover; }
.next-games { position: absolute; left: -32px; right: 32px; bottom: -28px; display: grid; gap: 10px; }

/* Next-game card */
.next-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); color: var(--ink); text-decoration: none;
  border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow);
}
.next-card:hover { color: var(--ink); }
.next-card__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.next-card__title { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--green); line-height: 1.15; }
.next-card__meta { font-size: 13px; }
.next-card__go { font-weight: 800; font-size: 22px; color: var(--red); }

/* Story / why */
.story { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.why { background: var(--white); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.why h3 { font-size: 22px; }

/* Sessions */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab { font: 700 15px/1 var(--font-body); min-height: 44px; padding: 10px 18px; border-radius: 999px; cursor: pointer; border: 2px solid var(--cream); background: transparent; color: var(--cream); }
.tab[aria-selected="true"] { background: var(--cream); color: var(--green); }
.sessions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.session { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.session__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.session__kind { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--beard); }
.badge { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--sand); white-space: nowrap; }
.badge--low { background: #F6D2CC; color: var(--red-dark); }
.badge--full { background: #3a2f22; color: var(--white); }
.session__date { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--green); line-height: 1.1; }
.session__where { font-size: 15px; }
.session__foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.session__price { font-weight: 700; font-size: 20px; }
.sessions-note { margin-top: 22px; font-size: 15px; }
.sessions-note a { color: var(--cream); font-weight: 700; }
.notify-card { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.notify-card h3 { font-size: 28px; }
.empty { background: rgba(244,229,202,.12); border-radius: var(--radius); padding: 28px; }

/* First game */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { background: var(--white); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; counter-increment: step; }
.step::before { content: counter(step); font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--red); }
.step strong { font-size: 18px; }
.explainer { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; margin-top: 32px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); }
.video button { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; background: var(--ink) center / cover no-repeat; color: var(--cream); display: flex; align-items: center; justify-content: center; gap: 12px; font: 700 18px var(--font-body); }
.video button::before { content: ""; position: absolute; inset: 0; background: rgba(16,55,42,.45); }
.video button span { position: relative; display: flex; align-items: center; gap: 10px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.explainer__copy { display: flex; flex-direction: column; gap: 12px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--white); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.panel h3 { font-size: 22px; }
.panel__sub { font-size: 13px; color: #6b5a3e; }
.panel--beard { grid-column: span 5; background: var(--green); color: var(--cream); }
.panel--beard h3 { color: var(--cream); }
.panel--beard .panel__sub { color: var(--sand); }
.panel--pairs { grid-column: span 7; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.board li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; }
.board li:nth-child(odd) { background: rgba(0,0,0,.04); }
.panel--beard .board li:nth-child(odd) { background: rgba(255,255,255,.07); }
.board .rank { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.board .val { font-weight: 700; }
.board .sub { font-size: 12px; opacity: .8; }
.matches { display: flex; flex-direction: column; gap: 12px; }
.match { border: 1px solid var(--sand); border-radius: 14px; padding: 12px 14px; }
.match__head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--beard); margin-bottom: 6px; }
.match ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 14px; }
.match li { display: flex; justify-content: space-between; gap: 10px; }
.medal { display: inline-block; width: 38px; font-weight: 800; color: var(--red); }
.stats-foot { margin-top: 18px; font-size: 13px; }
.sample-flag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #F6D2CC; color: var(--red-dark); vertical-align: middle; }

/* Stats portal promo */
.portal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.portal__free, .portal__paid { border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.portal__free { background: var(--white); }
.portal__paid { background: var(--red); color: var(--white); }
.portal__paid h3 { color: var(--white); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.ticks li::before { content: "✓"; font-weight: 800; color: var(--green); }
.portal__paid .ticks li::before { color: var(--white); }
.portal .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

/* Venues */
.venues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.venue { background: var(--white); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.venue__tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.venue__links { display: flex; gap: 16px; margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 15px; }

/* Groups */
.groups { background: var(--red); color: var(--white); border-radius: var(--radius-lg); padding: 44px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.groups h2 { color: var(--white); }
.groups .btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* FAQ */
.faq { max-width: 880px; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--white); border-radius: 16px; padding: 18px 22px; }
.faq summary { font-weight: 700; font-size: 18px; cursor: pointer; }
.faq details p { margin-top: 10px; }

/* Sign-up form */
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select { font: 16px var(--font-body); padding: 13px 15px; border-radius: 12px; border: 2px solid transparent; background: var(--cream); color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: var(--olive); }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 20px; height: 20px; }
.form__msg { font-size: 15px; font-weight: 600; min-height: 1.4em; }
.form__small { font-size: 12px; opacity: .85; }
.notify-form { display: flex; gap: 10px; }
.notify-form input { flex: 1; font: 16px var(--font-body); padding: 13px 16px; border-radius: 999px; border: 2px solid var(--green); }

/* Footer */
.site-footer { background: var(--green-dark); color: var(--cream); padding: 48px 0 110px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.site-footer a { color: var(--cream); }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img:first-child { width: 54px; }
.footer__brand img:last-child { width: 140px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 600; font-size: 15px; }
.footer__legal { width: 100%; font-size: 13px; opacity: .8; }

/* Mobile sticky booking bar */
.book-bar { display: none; }

/* Responsive */
@media (max-width: 1000px) {
  .story, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sessions, .venues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel--beard, .panel--pairs { grid-column: span 12; }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--sand); }
  .nav .btn { margin-top: 12px; border-bottom: 0; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .hero { padding-top: 24px; }
  .hero .wrap, .explainer, .portal, .signup, .groups, .notify-card { grid-template-columns: 1fr; }
  .hero__visual { display: flex; flex-direction: column; gap: 14px; }
  .next-games { position: static; order: -1; }
  .hero__photo { aspect-ratio: 16 / 9; }
  .announce { font-size: 12px; }
  .book-bar__txt { min-width: 0; flex: 1; }
  .book-bar__txt strong, .book-bar__txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .book-bar .btn { white-space: nowrap; flex-shrink: 0; padding: 12px 18px; }
  .groups { padding: 28px; }
  .groups .btns { justify-content: flex-start; }
  .section { padding: 56px 0; }
  .book-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--white); box-shadow: 0 -6px 20px rgba(24,77,56,.18);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px;
  }
  .book-bar__txt { display: flex; flex-direction: column; font-size: 13px; }
  .book-bar__txt strong { font-size: 15px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .story, .steps, .sessions, .venues, .form__row { grid-template-columns: 1fr; }
  .brand__word { width: 96px; }
  .notify-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* Form on a light background (new-area sign-up) */
.form--light .field input { background: var(--white); border-color: var(--sand); }
.form--light .field input:focus { border-color: var(--green); }

/* Email sign-up popup */
.popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.popup-overlay[hidden] { display: none; }
.popup { background: var(--cream); border-radius: 20px; max-width: 420px; width: 100%; position: relative; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.popup__head { background: var(--green); padding: 28px 28px 24px; }
.popup__head h2 { color: var(--cream); font-size: clamp(20px,4vw,26px); margin-bottom: 8px; }
.popup__head p { color: var(--cream); font-size: 14px; opacity: .85; margin: 0; }
.popup__body { padding: 24px 28px 28px; }
.popup__close { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.2); border: 0; color: var(--cream); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.popup__close:hover { background: rgba(255,255,255,.35); }
.popup .field input { background: var(--white); border: 2px solid #e0d4ba; }
.popup .field input:focus { border-color: var(--green); outline: none; }
.popup .btn--primary { width: 100%; margin-top: 4px; }
.popup-tab { position: fixed; bottom: 24px; right: 24px; z-index: 199; background: var(--green); color: var(--cream); border: 0; border-radius: 50px; padding: 12px 18px; font: 600 14px var(--font-body); cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.25); transition: transform .15s, background .15s; }
.popup-tab[hidden] { display: none; }
.popup-tab:hover { background: var(--green-dark); transform: translateY(-2px); }
