/* =====================================================
   ACE TENNIS ACADEMY — design system
   Palette: chalk white bg, court green, hard-court blue,
   optic-yellow ball accent, white court lines.
   Type: heavy condensed-feel display, mono "line judge"
   labels, clean sans body. Signature: the court-line hero.
   ===================================================== */

:root {
  --bg:         #EFF3F0;
  --panel:      #FFFFFF;
  --ink:        #13251C;
  --muted:      #5C6B62;
  --court:      #1D5C41;
  --court-deep: #143D2C;
  --blue:       #2F5D8A;
  --clay:       #B4694A;
  --line:       #DEE6E1;
  --ball:       #D9E94F;
  --ball-ink:   #2A3010;
  --danger:     #B3402F;
  --radius:     14px;
  --shadow:     0 10px 24px rgba(19, 37, 28, .08);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.05rem; margin: 0 0 .4em; }

a { color: var(--court); }
p { margin: .4em 0 .9em; }

/* "Line judge" labels — mono, uppercase, tracked out */
.eyebrow, th, .badge, .chip, .foot-mono, .admin-nav a, label, .nav a {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.eyebrow { font-size: .74rem; color: var(--muted); display: block; margin-bottom: .7em; }

/* ---------- Header ---------- */
.site-head { background: var(--court-deep); color: #fff; }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.logo {
  color: #fff; text-decoration: none; font-weight: 800;
  text-transform: uppercase; letter-spacing: .02em; font-size: 1.05rem;
  display: inline-flex; align-items: center; gap: .5em;
}
.logo-mark { display: inline-block; vertical-align: middle; }
.ball-dot {
  width: .72em; height: .72em; border-radius: 50%;
  background: var(--ball); display: inline-block;
  box-shadow: inset -1px -2px 0 rgba(0,0,0,.18);
}
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #E8EFEA; text-decoration: none; font-size: .74rem;
  padding: 8px 10px; border-radius: 8px;
}
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,.12); }
.nav-cta { background: var(--ball); color: var(--ball-ink) !important; font-weight: 700; }
.nav-cta:hover { background: #E7F468; }
.nav-admin { outline: 1px solid rgba(255,255,255,.4); }
.nav-toggle { display: none; }

/* ---------- Signature: court-line hero ---------- */
.hero {
  position: relative;
  background: var(--court);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(28px, 6vw, 64px);
  margin: 26px 0 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::before {            /* outer boundary lines */
  content: "";
  position: absolute; inset: 14px;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 4px;
  pointer-events: none;
}
.hero::after {             /* centre service line */
  content: "";
  position: absolute; top: 14px; bottom: 14px; right: 26%;
  width: 2px; background: rgba(255,255,255,.45);
  pointer-events: none;
}
.hero .eyebrow { color: var(--ball); }
.hero h1 { max-width: 13em; }
.hero p { max-width: 34em; color: #DCE8E1; }
.hero-inner { position: relative; z-index: 1; }
.hero .bounce {
  display: inline-block; width: .35em; height: .35em; margin-left: .18em;
  border-radius: 50%; background: var(--ball); vertical-align: baseline;
  animation: bounce .9s ease-out 1;
}
@keyframes bounce {
  0% { transform: translateY(-1.6em); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-.5em); }
  100% { transform: translateY(0); }
}

/* Scoreboard chips */
.scoreline { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.chip {
  font-size: .72rem; color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  padding: 6px 10px; border-radius: 999px;
}
.chip strong { color: var(--ball); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--court); color: #fff;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em;
  font-size: .78rem; font-weight: 700;
  padding: 12px 18px; border-radius: 10px; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--court-deep); }
.btn-ball { background: var(--ball); color: var(--ball-ink); }
.btn-ball:hover, .btn-ball:focus-visible { background: #E7F468; }
.btn-danger { background: #fff; color: var(--danger); outline: 1.5px solid var(--danger); }
.btn-danger:hover, .btn-danger:focus-visible { background: #FBEAE6; }
.btn-small { padding: 7px 11px; font-size: .68rem; border-radius: 8px; }

/* ---------- Cards & panels ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card, .panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card { display: flex; flex-direction: column; gap: 8px; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--court); }
.card .meta { color: var(--muted); font-size: .9rem; margin: 0; }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; }
.price { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; }

.badge {
  display: inline-block; font-size: .66rem; font-weight: 700;
  padding: 4px 8px; border-radius: 6px; width: fit-content;
}
.badge-open, .badge-ongoing, .badge-active, .badge-paid, .badge-present, .badge-published
  { background: #DFEEE6; color: var(--court); }
.badge-pending, .badge-late, .badge-excused, .badge-draft
  { background: #FBF3D2; color: #7A621B; }
.badge-full, .badge-cancelled, .badge-failed, .badge-absent, .badge-refunded, .badge-completed, .badge-hidden
  { background: #EEE4E1; color: var(--danger); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
th { font-size: .68rem; color: var(--muted); background: #F7FAF8; }
tr:last-child td { border-bottom: 0; }

/* ---------- Forms ---------- */
form.stack { display: grid; gap: 14px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.two-col { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
label { font-size: .7rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink);
  padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--ball); outline-offset: 1px;
}
textarea { min-height: 110px; resize: vertical; }
.form-hint { font-size: .82rem; color: var(--muted); }

/* ---------- Flash messages ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin: 18px 0 0; font-size: .92rem; }
.flash-success { background: #DFEEE6; color: var(--court-deep); }
.flash-error   { background: #F6E2DD; color: var(--danger); }

/* ---------- Sections ---------- */
.section { margin: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.stars { color: #C99A17; letter-spacing: .1em; }
.review { border-top: 1px solid var(--line); padding: 14px 0; }
.review:first-of-type { border-top: 0; }
.review .who { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ---------- Admin ---------- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0; }
.admin-nav a {
  font-size: .7rem; text-decoration: none; color: var(--ink);
  background: var(--panel); padding: 8px 12px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.admin-nav a.on { background: var(--court); color: #fff; }
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 18px 0 8px; }
.stat { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat .n { font-family: var(--mono); font-weight: 700; font-size: 1.6rem; display: block; }
.stat .l { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.inline-form { display: inline; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-foot { background: var(--court-deep); color: #D6E2DA; margin-top: 60px; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px 20px; }
.foot-logo { font-size: .95rem; }
.foot-in p { color: #A9BFB2; max-width: 30em; }
.foot-mono { font-size: .72rem; line-height: 2; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .nav-toggle {
    display: block; background: transparent; color: #fff;
    border: 1px solid rgba(255,255,255,.4); border-radius: 8px;
    font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em;
    font-size: .7rem; padding: 8px 12px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 58px;
    background: var(--court-deep); flex-direction: column; align-items: stretch;
    padding: 10px 20px 16px; z-index: 20;
  }
  .site-head { position: relative; }
  .nav.open { display: flex; }
  .two-col { grid-template-columns: 1fr; }
  .foot-mono { text-align: left; }
  .hero::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Map embed on the contact page */
.map-embed {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line, #2c3238);
  margin: 10px 0 14px;
  line-height: 0;
}
.map-embed iframe { display: block; width: 100%; }
