/* ==========================================================================
   IBC Group — design system
   Palette per redesign guide: navy / teal / green / lime, warm off-white base.
   ========================================================================== */

:root {
  --brand-navy: #0c295b;
  --brand-teal: #1e564d;
  --brand-green: #31a438;
  --brand-lime: #3bcc31;
  --brand-deep-green: #1d663e;

  --ink: #17211c;
  --muted: #56635c;
  --surface: #f7f9f7;
  --white: #ffffff;
  --border: #dfe7e1;

  --shadow-sm: 0 1px 2px rgba(12, 41, 91, 0.06), 0 1px 1px rgba(12, 41, 91, 0.04);
  --shadow-md: 0 8px 24px rgba(12, 41, 91, 0.10);
  --shadow-lg: 0 20px 48px rgba(12, 41, 91, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --nav-h: 72px;
  --container: min(1200px, calc(100% - 40px));
  --container-narrow: min(880px, calc(100% - 40px));

  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.container-narrow {
  width: var(--container-narrow);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand-navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 2000;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--brand-lime);
  outline-offset: 2px;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-deep-green);
  margin: 0 0 12px;
}

.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  color: var(--brand-navy);
}

.section-lede {
  max-width: 60ch;
  font-size: 17px;
}

.section {
  padding: 88px 0;
}

.section--tight {
  padding: 56px 0;
}

.section--alt {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 48px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .venue-card, .site-header {
    transition: none !important;
  }
}

.btn-primary {
  background: var(--brand-deep-green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brand-teal);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background: var(--brand-lime);
  color: var(--brand-navy);
}

.btn-accent:hover {
  filter: brightness(0.95);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--brand-navy);
}

.btn-outline:hover {
  background: rgba(12, 41, 91, 0.06);
}

.btn-outline-invert {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--white);
}

.btn-outline-invert:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
  min-height: 38px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- External link marker ---- */
.ext::after {
  content: "\2197";
  display: inline-block;
  margin-left: 6px;
  font-weight: 700;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(247, 249, 247, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  height: 42px;
  width: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover {
  color: var(--brand-deep-green);
  border-bottom-color: var(--brand-lime);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile menu: native <details>/<summary> disclosure — works with JS disabled. */
.nav-details {
  display: none;
}

summary.nav-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  list-style: none;
}

summary.nav-toggle::-webkit-details-marker {
  display: none;
}

summary.nav-toggle span,
summary.nav-toggle::before,
summary.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--brand-navy);
}

.mobile-nav {
  display: none;
}

@media (min-width: 881px) {
  .mobile-actions {
    display: none;
  }
}

@media (max-width: 880px) {
  .brand img {
    height: 34px;
  }

  .primary-nav {
    display: none;
  }

  .nav-details {
    display: block;
  }

  .header-actions .btn-outline {
    display: none;
  }

  /* .mobile-nav lives outside <header> entirely: header has backdrop-filter, which
     creates a containing block for position:fixed descendants and would collapse
     this panel to the header's own height if nested inside it. :has() drives
     visibility from the toggle's open state instead of DOM nesting. */
  body:has(.nav-details[open]) .mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--white);
    padding: 12px 20px 24px;
    overflow-y: auto;
    z-index: 999;
  }

  .mobile-nav a {
    text-decoration: none;
    font-weight: 700;
    color: var(--ink);
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 17px;
  }

  .mobile-nav .mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: min(640px, calc(100vh - var(--nav-h)));
  display: flex;
  align-items: center;
  position: relative;
  color: var(--white);
  background: linear-gradient(120deg, var(--brand-navy) 0%, var(--brand-teal) 55%, var(--brand-deep-green) 100%);
  overflow: hidden;
}

.hero::after {
  content: "PHOTO PLACEHOLDER \2014 real court / match photo to replace this gradient";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px 20px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  border: 2px dashed rgba(255, 255, 255, 0.25);
  margin: 12px;
  border-radius: var(--radius-md);
  pointer-events: none;
}

/* Real photo variant: an <img class="hero-media"> + <div class="hero-scrim"> pair,
   placed inside .hero before .hero-inner, with .hero carrying "has-photo" too. */
.hero.has-photo {
  background: var(--brand-navy);
}

.hero.has-photo::after {
  display: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(12, 41, 91, 0.88) 0%, rgba(30, 86, 77, 0.72) 48%, rgba(29, 102, 62, 0.5) 100%);
}

.hero-inner {
  width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-inner .kicker {
  color: var(--brand-lime);
}

.hero-inner h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 800;
}

.hero-inner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  max-width: 46ch;
}

/* ==========================================================================
   Placeholder image block (used until real photography is supplied)
   ========================================================================== */

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(
    135deg,
    rgba(12, 41, 91, 0.06),
    rgba(12, 41, 91, 0.06) 10px,
    rgba(12, 41, 91, 0.03) 10px,
    rgba(12, 41, 91, 0.03) 20px
  );
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 12px;
  min-height: 180px;
}

/* ==========================================================================
   Venue cards
   ========================================================================== */

.venue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

/* ---- Coming-soon venue banner (deliberately distinct from a live venue card) ---- */
.coming-soon-banner {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(255, 255, 255, 0.35);
  background: linear-gradient(120deg, var(--brand-navy) 0%, var(--brand-teal) 100%);
  color: var(--white);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.coming-soon-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-navy);
  background: var(--brand-lime);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.coming-soon-banner h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--white);
}

.coming-soon-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  max-width: 46ch;
}

@media (max-width: 560px) {
  .coming-soon-banner {
    padding: 24px;
  }
}

.venue-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.venue-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.venue-card .img-placeholder {
  border-radius: 0;
  border-width: 0 0 1px 0;
  min-height: 220px;
}

.venue-card .venue-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

/* Real photo grid item, same box as .img-placeholder for the Gallery section */
.gallery-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.venue-card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.venue-card-body h3 {
  color: var(--brand-navy);
  font-size: 22px;
  margin-bottom: 4px;
}

.venue-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.venue-meta .todo {
  color: #9a6b00;
}

.venue-card-body .btn-row {
  margin-top: auto;
  padding-top: 12px;
}

.badge-todo {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a6b00;
  background: #fff2cf;
  border: 1px solid #f0d896;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

/* ==========================================================================
   Services grid
   ========================================================================== */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}

.service-card h3 {
  font-size: 18px;
  color: var(--brand-navy);
  margin-bottom: 8px;
}

.service-card p {
  font-size: 14.5px;
  margin: 0;
}

/* ==========================================================================
   Why IBC stats
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 20px 12px;
}

.stat-card .icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.stat-card h4 {
  font-size: 15px;
  color: var(--brand-navy);
  margin-bottom: 6px;
}

.stat-card p {
  font-size: 13.5px;
  margin: 0;
}

/* ==========================================================================
   Contact blocks
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.contact-card h3 {
  color: var(--brand-navy);
}

.contact-card dl {
  margin: 0 0 20px;
}

.contact-card dt {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 12px;
}

.contact-card dd {
  margin: 2px 0 0;
  font-size: 15px;
}

.contact-card .img-placeholder {
  margin-top: 18px;
  min-height: 200px;
}

.map-embed {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Venue confirm banner (used on booking/shop redirect pages)
   ========================================================================== */

.confirm-banner {
  background: var(--brand-navy);
  color: var(--white);
  padding: 14px 0;
  text-align: center;
  font-size: 14.5px;
}

.confirm-banner strong {
  color: var(--brand-lime);
}

/* ==========================================================================
   Notice bar (only render if there is real content)
   ========================================================================== */

.notice-bar {
  background: var(--brand-deep-green);
  color: var(--white);
  text-align: center;
  font-size: 13.5px;
  padding: 8px 16px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--brand-navy);
  color: rgba(255, 255, 255, 0.82);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-brand img {
  height: 34px;
  margin-bottom: 14px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  max-width: 32ch;
}

.footer-col h4 {
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14.5px;
}

.footer-col a:hover {
  color: var(--brand-lime);
}

.footer-col li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-col a.footer-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-col a.footer-sub:hover {
  color: var(--brand-lime);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--white);
}

.footer-legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Legal page prose
   ========================================================================== */

.legal-list {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--muted);
}

.legal-list li {
  margin-bottom: 12px;
  line-height: 1.7;
}

/* ---- Checkmark highlight list (e.g. Long-Term Court Booking features) ---- */
.highlight-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.highlight-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

.highlight-list li::before {
  content: "\2713";
  color: var(--brand-deep-green);
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   Holiday Camp promo
   ========================================================================== */

.holiday-camp-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  align-items: start;
}

.holiday-camp-copy h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-navy);
  margin: 28px 0 14px;
}

.holiday-camp-schedule {
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  line-height: 1.8;
}

.holiday-camp-enrol {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.holiday-camp-qr {
  display: block;
  width: 100%;
  height: auto;
  max-width: 220px;
  margin: 0 auto 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.camp-poster-link {
  display: block;
  margin: 0 0 20px;
  overflow: hidden;
  color: var(--brand-navy);
  background: #fff8e7;
  border: 1px solid #ead8ad;
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
}

.camp-poster-link img {
  display: block;
  width: 100%;
  height: auto;
}

.camp-poster-link span {
  display: block;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
}

.holiday-camp-enrol p {
  font-size: 14px;
  margin-bottom: 16px;
}

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

  .holiday-camp-enrol {
    position: static;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-navy);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin-top: 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .section {
    padding: 64px 0;
  }

  .venue-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .service-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-inner h1 {
    font-size: 34px;
  }
}
