/* =========================================================
   A2H Badminton & Indoor Sports — styles
   Mobile-first: base styles are for phones; @media (min-width)
   blocks add layout for bigger screens.
   ========================================================= */

/* ---------- 1. Design tokens (change brand colours here) ---------- */
:root {
  --green-900: #0B3B2C;   /* dark sections, headings */
  --green-700: #0E6B47;   /* primary buttons */
  --green-600: #128257;   /* hover */
  --green-100: #DCEFE4;
  --green-50:  #F0F8F3;   /* tinted section background */
  --yellow:    #FFD23F;   /* accent: the TT bat in the logo */
  --ink:       #12251D;   /* body text */
  --muted:     #4B5E56;   /* secondary text */
  --line:      #D5E3DB;
  --white:     #FFFFFF;

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 59, 44, .06), 0 8px 24px rgba(11, 59, 44, .08);
  --container: 1120px;
  --header-h: 64px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  padding-bottom: 76px; /* room for the mobile action bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green-600); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0 0 .5em; color: var(--green-900); letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); font-weight: 800; text-transform: uppercase; }
h2 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; text-transform: uppercase; }
h3 { font-size: 1.45rem; font-weight: 700; }
p { margin: 0 0 1em; }
address { font-style: normal; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 780px; }

.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
.icon-lg { width: 32px; height: 32px; color: var(--green-700); }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; /* comfortable tap target */
  padding: .7em 1.2em;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .95rem; }
.btn-lg { min-height: 54px; padding: .8em 1.5em; font-size: 1.05rem; }

.btn-wa { background: var(--green-700); color: var(--white); }
.btn-wa:hover { background: var(--green-600); color: var(--white); }

.btn-outline { background: transparent; color: var(--green-900); border-color: var(--green-900); }
.btn-outline:hover { background: var(--green-900); color: var(--white); }

.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { background: var(--white); color: var(--green-900); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

/* Logo files: images/logo-wide.svg (header) and images/logo-on-dark.svg (footer). Made from Logo/source. */
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; height: 44px; width: auto; }

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--white); color: var(--green-900); cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; }

/* Mobile menu: hidden until toggled */
.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: var(--header-h);
  flex-direction: column; gap: 4px;
  padding: 12px 16px 20px;
  background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav.is-open { display: flex; }
.site-nav a:not(.btn) {
  padding: 12px 4px; text-decoration: none; color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--green-50);
}
.site-nav .btn { margin-top: 10px; }

/* ---------- 5. Hero ---------- */
.hero { padding: 32px 0 8px; background: linear-gradient(180deg, var(--green-50) 0%, var(--white) 100%); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 14px; padding: 6px 12px; border-radius: 999px;
  background: var(--green-100); color: var(--green-900); font-weight: 600; font-size: .92rem;
}
.hl { color: var(--green-700); position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .2em;
  background: var(--yellow); z-index: -1; border-radius: 3px;
}
h1 { position: relative; z-index: 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; }
.lead strong { color: var(--ink); font-weight: 600; }

.open-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--green-900); margin: 0;
}
.open-status .dot { width: 10px; height: 10px; border-radius: 50%; background: #9AA8A1; }
.open-status.is-open .dot { background: #1DB45A; box-shadow: 0 0 0 4px rgba(29,180,90,.18); }

.hero-photo { margin: 0 10px 10px 0; position: relative; isolation: isolate; }
.hero-photo img {
  border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 4 / 4.2; object-fit: cover; object-position: center 45%; width: 100%;
}
.hero-photo::before { /* yellow accent block behind the photo */
  content: ""; position: absolute; inset: 18px -10px -10px 18px;
  background: var(--yellow); border-radius: var(--radius); z-index: -1;
}

.facts {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.facts li {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--line);
  font-weight: 600; font-size: .95rem;
}
.facts .icon { color: var(--green-700); }

/* ---------- 6. Generic sections ---------- */
.section { padding: 64px 0; }
.section-tint { background: var(--green-50); }
.section-dark { background: var(--green-900); color: #E6F2EC; }
.section-dark h2 { color: var(--white); }
.kicker {
  font: 700 .85rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .14em;
  color: var(--green-700); margin-bottom: .8rem;
}
.kicker::before { content: ""; display: inline-block; width: 22px; height: 3px; background: var(--yellow); vertical-align: middle; margin-right: 10px; border-radius: 2px; }
.kicker-light { color: var(--yellow); }
.section-lead { font-size: 1.08rem; color: var(--muted); max-width: 40em; margin-bottom: 2rem; }

/* ---------- 7. The court ---------- */
.feature-grid { display: grid; gap: 16px; margin-top: 1.5rem; }
.feature {
  padding: 22px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
}
.feature h3 { margin-top: 12px; }
.feature p { color: var(--muted); margin: 0; }
.wide-photo { margin: 28px 0 0; }
.wide-photo img { border-radius: var(--radius); width: 100%; }

/* ---------- 8. Book & play ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 14px; counter-reset: none; }
.steps li {
  position: relative; padding: 22px 22px 18px 76px;
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--line);
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); }
.step-num {
  position: absolute; left: 20px; top: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--yellow); color: var(--green-900);
  font: 800 1.4rem/1 var(--font-display);
}

.offer-grid { display: grid; gap: 16px; }
.offer {
  padding: 26px; border-radius: var(--radius);
  background: var(--green-900); color: #E6F2EC;
  display: flex; flex-direction: column; align-items: flex-start;
}
.offer h3 { color: var(--white); font-size: 2rem; text-transform: uppercase; }
.offer .price-note {
  font-weight: 600; color: var(--yellow);
  border-left: 3px solid var(--yellow); padding-left: 10px;
}
.offer .btn { margin-top: auto; background: var(--yellow); color: var(--green-900); }
.offer .btn:hover { background: #FFE27A; }

/* Booking form (builds a WhatsApp message; logic in js/main.js) */
.booking {
  display: grid; gap: 24px; margin-top: 2.5rem;
  padding: 24px 16px; border-radius: 20px; background: var(--green-100);
}
.booking-info { padding: 0 4px; }
.booking-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
  padding: 5px 12px; border-radius: 999px; background: var(--white);
  color: var(--green-700); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.booking-title { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; text-transform: uppercase; }
.booking-intro { color: var(--muted); font-size: 1.05rem; }
.booking-where { color: var(--muted); font-size: .95rem; margin-bottom: .6em; }
.booking-where strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 2px; }
.booking-hours { color: var(--muted); font-size: .95rem; }
.booking-link { font-weight: 600; }

.booking-form {
  background: var(--white); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow);
}
.form-grid { display: grid; gap: 16px; margin-bottom: 22px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; color: var(--ink); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 10px 14px;
  font: 400 1rem/1.3 var(--font-body); /* 16px stops iPhones zooming in */
  color: var(--ink); background-color: var(--white);
  border: 1px solid #B9CEC3; border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230B3B2C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.field input::placeholder { color: #7D8F87; }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(14, 107, 71, .18);
}
.field [aria-invalid="true"] { border-color: #B42318; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .15); }
.field-error { margin: 6px 0 0; color: #B42318; font-size: .88rem; font-weight: 500; }
.booking-submit { width: 100%; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }

/* ---------- 9. Coaching ---------- */
.program-grid { display: grid; gap: 16px; margin-bottom: 2rem; }
.program {
  position: relative; padding: 26px 22px 20px;
  border-radius: var(--radius); background: var(--green-50);
  border-top: 5px solid var(--green-700);
}
.program p { color: var(--muted); margin: 0; }
.badge {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--yellow); color: var(--green-900);
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}

/* ---------- 10. Gallery ---------- */
.gallery { display: grid; gap: 14px; margin-top: 1.5rem; }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-more {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 24px; border-radius: var(--radius);
  border: 2px dashed rgba(255,255,255,.35);
  color: var(--white); text-decoration: none; font-weight: 600; font-size: 1.1rem;
}
.gallery-more:hover { color: var(--yellow); border-color: var(--yellow); }
.gallery-more .icon { width: 28px; height: 28px; }

/* ---------- 11. FAQ ---------- */
.faq { display: grid; gap: 10px; margin-top: 1.5rem; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
}
.faq summary {
  list-style: none; cursor: pointer;
  padding: 16px 48px 16px 18px; position: relative;
  font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font: 700 1.5rem/1 var(--font-body); color: var(--green-700);
}
.faq details[open] summary::after { content: "–"; }
.faq details[open] { border-color: var(--green-700); }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

/* ---------- 12. Visit ---------- */
.visit-grid { display: grid; gap: 20px; margin-top: 1.5rem; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { width: 24px; height: 24px; color: var(--green-700); margin-top: 2px; }
.contact-list strong { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-list a { font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.qr { display: none; } /* shown on desktop only */
.map-wrap { border-radius: var(--radius); overflow: hidden; min-height: 320px; background: var(--green-100); box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--green-900); color: #C9DDD3; padding: 40px 0 20px; }
.footer-inner { display: grid; gap: 20px; }
.footer-brand { margin: 0 0 1em; }
.footer-logo { display: block; height: 120px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--white); }
.copyright { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: .88rem; }

/* ---------- 14. Mobile sticky action bar ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--green-900); box-shadow: 0 -6px 20px rgba(0,0,0,.15);
}
.mobile-bar .btn { width: 100%; }
.mobile-bar .btn-wa { background: var(--yellow); color: var(--green-900); }

/* =========================================================
   Larger screens
   ========================================================= */
@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .program-grid { grid-template-columns: repeat(3, 1fr); }
  .offer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .booking { padding: 32px; }
  .booking-form { padding: 28px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
}

@media (min-width: 900px) {
  :root { --header-h: 72px; }
  .brand-logo { height: 50px; }
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }

  .nav-toggle { display: none; }
  .site-nav {
    display: flex; position: static; flex-direction: row; align-items: center; gap: 26px;
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  .site-nav a:not(.btn) { padding: 6px 0; border: 0; font-size: .98rem; }
  .site-nav a:not(.btn):hover { color: var(--green-700); }
  .site-nav .btn { margin-top: 0; }

  .hero { padding: 64px 0 16px; }
  .hero-grid { grid-template-columns: 1.25fr .85fr; gap: 56px; }
  .hero-photo img { aspect-ratio: 4 / 4.6; }

  .section { padding: 96px 0; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .booking { grid-template-columns: .8fr 1.2fr; gap: 48px; padding: 40px; align-items: center; }
  .gallery { grid-template-columns: 2fr 1fr; }
  .gallery-item img { aspect-ratio: 16 / 9; }
  .gallery-more { flex-direction: column; justify-content: center; text-align: center; }

  .visit-grid { grid-template-columns: 1fr 1.2fr; }
  .map-wrap, .map-wrap iframe { min-height: 100%; }
  .qr { display: flex; align-items: center; gap: 16px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
  .qr img { width: 120px; height: auto; border-radius: 8px; border: 1px solid var(--line); }
  .qr p { margin: 0; color: var(--muted); font-size: .95rem; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
