/* Ironvale Athletic Club: one stylesheet for the public site and the staff dashboard.
   To rebrand, change the colours in :root. --accent is a light colour, so buttons use dark text. */
:root {
  --bg: #0c0e11;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --line: #2a2f38;
  --ink: #f3f5f6;
  --muted: #a6aeb7;
  --accent: #c9f231;
  --accent-ink: #101300;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Geeza Pro", Tahoma, Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue", Impact, var(--font);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.1; margin: 0 0 0.5em; }
h1, h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: -0.01em; }
[dir="rtl"] h1, [dir="rtl"] h2 { font-family: var(--font); font-weight: 800; letter-spacing: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Demo ribbon and notice bar */
.demo-ribbon { background: #000; color: var(--muted); font-size: 0.8rem; text-align: center; padding: 6px 16px; }
.notice { background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center; padding: 10px 16px; font-size: 0.95rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(12, 14, 17, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); text-transform: uppercase; font-size: 1.05rem; letter-spacing: 0.04em; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.menu-toggle { display: none; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 2px; background: currentColor; margin: 0 auto; position: relative; content: ""; }
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 14px 24px; border-radius: 999px; border: 2px solid var(--accent);
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-small { padding: 9px 16px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(201, 242, 49, 0.16), transparent 70%),
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.025) 46px 48px);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; margin-bottom: 14px; }
.hero h1 span { color: var(--accent); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 0.95rem; }
.hero-facts strong { color: var(--ink); }
.hero-art { aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.live strong { color: var(--accent); }
.live-visit { color: var(--muted); margin: -8px 0 20px; }
.live-visit strong { color: var(--ink); }
.open-now { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.open-now::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.open-now.is-open::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18); }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section-alt .card { background: var(--bg); }
.card p { color: var(--muted); margin: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(201, 242, 49, 0.12); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.card .icon svg { width: 24px; height: 24px; }

/* Timetable */
.tt-controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day-tab { flex: 0 0 auto; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; font: inherit; font-size: 0.9rem; cursor: pointer; text-align: center; line-height: 1.25; }
.day-tab small { display: block; color: var(--muted); font-size: 0.75rem; }
.day-tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day-tab[aria-selected="true"] small { color: var(--accent-ink); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.sessions { display: grid; gap: 10px; }
.session { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.session time { font-family: var(--display); font-size: 1.25rem; }
[dir="rtl"] .session time { font-family: var(--font); font-weight: 800; }
.session .meta { color: var(--muted); font-size: 0.9rem; }
.session h3 { margin: 0 0 2px; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--ink); margin-inline-start: 6px; vertical-align: middle; }
.tag-ladies { background: rgba(244, 114, 182, 0.18); color: #f9a8d4; }
.tag-full { background: rgba(255, 107, 107, 0.15); color: var(--danger); }
.spots { font-size: 0.85rem; color: var(--muted); text-align: end; margin-bottom: 6px; }
.spots.low { color: #fbbf24; }
.session-side { text-align: end; }
.tt-empty, .tt-status { color: var(--muted); padding: 24px; text-align: center; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Membership */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); position: relative; }
.plan .badge { position: absolute; top: -12px; inset-inline-start: 20px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.price { font-family: var(--display); font-size: 2.3rem; color: var(--ink); line-height: 1; margin: 8px 0 4px; }
.price small { font-family: var(--font); font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; color: var(--muted); font-size: 0.95rem; flex: 1; }
.plan li { padding: 5px 0; padding-inline-start: 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--accent); font-weight: 800; }
.pay-note { margin-top: 22px; color: var(--muted); font-size: 0.95rem; }

/* Coaches */
.coach .avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #6b8a00); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--display); font-size: 1.4rem; margin-bottom: 14px; }
.coach .role { color: var(--accent); font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }

/* Forms */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
label .opt { color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(201, 242, 49, 0.2); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-status { min-height: 1.4em; font-weight: 600; margin: 0; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }
.perks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.perks li { padding-inline-start: 28px; position: relative; }
.perks li::before { content: "→"; position: absolute; inset-inline-start: 0; color: var(--accent); font-weight: 800; }
[dir="rtl"] .perks li::before { content: "←"; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.section-alt .faq details { background: var(--bg); }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Visit */
.hours { border-collapse: collapse; width: 100%; margin: 12px 0 20px; }
.hours th, .hours td { text-align: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours th { color: var(--muted); }
.hours tr.today th, .hours tr.today td { color: var(--accent); font-weight: 700; }
.map { width: 100%; min-height: 360px; border: 0; border-radius: var(--radius); background: var(--surface-2); }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer */
.site-footer { padding: 40px 0 110px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px 30px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); }

/* Sticky action bar on phones */
.action-bar { display: none; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); padding: 0; width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.dialog-body { padding: 26px; display: grid; gap: 14px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.dialog-head h3 { margin: 0; font-size: 1.3rem; }
.close-x { background: transparent; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.summary { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--muted); }
.summary strong { color: var(--ink); display: block; font-size: 1.05rem; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Simple page (privacy, booking, 404) */
.page { padding: 60px 0 80px; max-width: 760px; }
.page h2 { font-size: 1.4rem; margin-top: 1.6em; }
.page li { color: var(--muted); }

@media (max-width: 960px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header-actions .btn { display: none; }
  .hero { padding: 44px 0 48px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .action-bar {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(12, 14, 17, 0.96); border-top: 1px solid var(--line);
  }
  .action-bar .btn { padding: 12px 8px; font-size: 0.9rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .plans, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .session { grid-template-columns: 1fr auto; gap: 6px 14px; padding: 14px; }
  .session time { grid-column: 1 / -1; font-size: 1.05rem; color: var(--accent); }
  .logo .logo-word { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
