/* Court and Racket Club — clean professional, light theme. Palette: club green, warm clay accent, off-white. */
:root {
  --green: #1f4d3a;
  --green-dark: #163a2c;
  --green-soft: #e4efe9;
  --gold: #f2b632;
  --clay: #9a4522;
  --ink: #1b2420;
  --muted: #5a6b62;
  --line: #dfe5e1;
  --paper: #f7f8f6;
  --white: #ffffff;
  --danger: #b3261e;
  --ok: #1e7a4d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 8px 24px rgba(20, 40, 30, .06);
  --space: 1rem;
  --maxw: 1120px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, system-ui, sans-serif; line-height: 1.55;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; line-height: 1.12; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 700; color: var(--clay); margin-bottom: .75rem; }
.price, .money { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { margin-bottom: 2rem; max-width: 60ch; }
.section-head p { font-size: 1.1rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ── Icons (SVG sprite) ──────────────────────────────── */
.icon { width: 1em; height: 1em; display: inline-block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.125em; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(247, 248, 246, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand img { height: 40px; width: auto; }
.nav-links { display: none; gap: .25rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink); padding: .65rem .85rem; border-radius: 10px; font-weight: 600; font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:hover, .nav-links a:focus-visible { background: var(--green-soft); outline: none; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.menu-btn span { width: 18px; height: 2px; background: var(--ink); position: relative; display: block; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.mobile-menu { display: grid; gap: .25rem; padding: .5rem 0 1rem; border-top: 1px solid var(--line); }
.mobile-menu a { text-decoration: none; color: var(--ink); padding: .8rem .75rem; border-radius: 10px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.mobile-menu a:hover { background: var(--green-soft); }
@media (min-width: 900px) { .nav-links { display: flex; } .menu-btn { display: none; } .mobile-menu { display: none !important; } }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .7rem 1.2rem;
  border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: .98rem; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(31, 77, 58, .35); outline-offset: 2px; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-accent { background: var(--gold); color: var(--ink); }
.btn-accent:hover { background: #e2a721; }
.btn-ghost { background: var(--white); color: var(--green); border-color: var(--line); }
.btn-ghost:hover { background: var(--green-soft); }
.btn-danger { background: var(--white); color: var(--danger); border-color: #f1c9c5; }
.btn-danger:hover { background: #fdf1ef; }
.btn-sm { min-height: 40px; padding: .45rem .9rem; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative; color: var(--white); isolation: isolate; min-height: 78vh; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(14, 34, 25, .35) 0%, rgba(14, 34, 25, .78) 75%), url("/assets/hero-generated.webp") center / cover no-repeat;
}
.hero .wrap { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { max-width: 16ch; color: var(--white); text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero p.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 52ch; color: rgba(255,255,255,.9); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.25); }
.hero-stats strong { display: block; font-size: 1.5rem; font-family: Georgia, serif; }
.hero-stats span { color: rgba(255,255,255,.8); font-size: .9rem; }
@media (min-width: 720px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── Cards / grids ───────────────────────────────────── */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .75rem; height: 100%; min-width: 0;
}
.card:hover { box-shadow: 0 2px 4px rgba(20,40,30,.06), 0 14px 34px rgba(20,40,30,.1); }
.card-head { display: flex; flex-direction: column; gap: .35rem; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.card-title-row h3 { margin: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.card-title-row .price { flex: 0 0 auto; font-size: 1.15rem; color: var(--green); }
.card .desc { color: var(--muted); flex: 1 1 auto; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.tag.clay { background: #f7e6df; color: var(--clay); }
.tag.gold { background: #fdf0d0; color: #7a5a10; }
.tag.grey { background: #eef0ee; color: var(--muted); }
.tag.ok { background: #e2f3ea; color: var(--ok); }
.tag.danger { background: #fdecea; color: var(--danger); }
.meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; color: var(--muted); font-size: .9rem; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.perks li { padding-left: 1.5rem; position: relative; font-size: .95rem; }
.perks li::before { content: ""; position: absolute; left: .2rem; top: .28em; width: .4em; height: .75em; border-right: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(45deg); }
.price-block { display: flex; align-items: baseline; gap: .35rem; margin-top: .25rem; }
.price-block .price { font-size: 2rem; color: var(--green); font-family: Georgia, serif; }
.price-block .per { color: var(--muted); font-size: .9rem; }
.tier.featured { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: .55rem .8rem; min-height: 44px; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink);
}
.chip:hover { border-color: var(--green); }
.chip.active { background: var(--green); color: var(--white); border-color: var(--green); }

/* ── Steps / value ───────────────────────────────────── */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.5rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; font-weight: 700; font-family: Georgia, serif; }
.band { background: var(--green); color: var(--white); }
.band h2, .band h3 { color: var(--white); }
.band .muted { color: rgba(255,255,255,.75); }

/* ── Forms ───────────────────────────────────────────── */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); min-height: 46px; width: 100%; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(31,77,58,.25); border-color: var(--green); }
.field .hint { font-size: .82rem; color: var(--muted); }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.notice { padding: .9rem 1rem; border-radius: 10px; font-size: .95rem; border: 1px solid; }
.notice.info { background: #eef4f1; border-color: #cfe0d6; color: var(--green-dark); }
.notice.ok { background: #e6f5ec; border-color: #bfe3cc; color: #14532d; }
.notice.warn { background: #fff7e6; border-color: #f5dea3; color: #6b4d00; }
.notice.error { background: #fdecea; border-color: #f3c1bc; color: var(--danger); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.25rem; cursor: pointer; color: var(--green); }
.qty output { min-width: 2.5rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Panels / app screens ────────────────────────────── */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
.two-col { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .two-col .sticky { position: sticky; top: 88px; } }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.summary-row:last-child { border-bottom: 0; font-size: 1.15rem; }
.list { display: grid; gap: .75rem; }
.row-card { display: grid; gap: .5rem; grid-template-columns: 1fr; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
@media (min-width: 720px) { .row-card { grid-template-columns: minmax(0, 1fr) auto auto; } }
.row-card .title { font-weight: 700; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: .8rem .9rem; border-bottom: 1px solid var(--line); font-size: .93rem; vertical-align: top; }
th { background: var(--paper); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem; }
.kpi strong { display: block; font-size: 1.7rem; font-family: Georgia, serif; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .85rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: .4rem; background: #c9d0cc; }
.status-dot.on { background: var(--ok); } .status-dot.off { background: var(--danger); }
.confirm-hero { text-align: center; padding: 2rem 1rem; }
.confirm-hero .check { width: 72px; height: 72px; border-radius: 50%; background: var(--green-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 1rem; }
.confirm-hero .check .icon { width: 36px; height: 36px; stroke-width: 2.5; }
.assistant { display: grid; gap: .75rem; }
.bubble { padding: .9rem 1rem; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.bubble.me { background: var(--green-soft); }

/* ── Dialog (confirmations) ──────────────────────────── */
.dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: min(92vw, 440px); width: 100%; box-shadow: 0 24px 64px rgba(20,40,30,.25); color: var(--ink); background: var(--white); }
.dialog::backdrop { background: rgba(27, 36, 32, .55); }
.dialog form { padding: 1.5rem; display: grid; gap: .75rem; }
.dialog h3 { margin: 0; }
.dialog .actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }

/* ── Footer ──────────────────────────────────────────── */
.footer { background: var(--white); border-top: 1px solid var(--line); padding: 3rem 0 2rem; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h4 { font-family: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink); margin-bottom: .75rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer a { color: var(--muted); text-decoration: none; } .footer a:hover { color: var(--green); }
.trust { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.trust span { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; }
.trust .icon { color: var(--green); }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .82rem; }

/* ── App (hash-routed screens) ───────────────────────── */
.screen { padding: clamp(2rem, 5vw, 3.5rem) 0; min-height: 60vh; }
.screen-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, #eef1ef 25%, #f6f8f6 50%, #eef1ef 75%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--white); }
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: .8rem 1.1rem; border-radius: 12px; z-index: 100; max-width: calc(100vw - 2rem); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
