/* ==========================================================================
   Base / variables
   ========================================================================== */
:root {
  --green: #007a4d;
  --green-dark: #00512f;
  --gold: #ffb612;
  --red: #de3831;
  --blue: #001489;
  --ink: #0e1b16;
  --paper: #f6f8f5;
  --card: #ffffff;
  --muted: #5c6b63;
  --border: #e1e7e0;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(14, 27, 22, 0.08);
  --shadow-lg: 0 12px 32px rgba(14, 27, 22, 0.14);
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 56px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(0, 122, 77, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: var(--shadow);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn-gold:hover { box-shadow: var(--shadow-lg); }
.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn-block { width: 100%; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: white;
}
.navbar {
  display: flex;
  align-items: center;
  padding: 14px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: white;
  margin-right: auto;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn.active {
  background: var(--gold);
  color: var(--ink);
}
.lang-btn:not(.active):hover { color: white; }
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--gold));
  font-size: 1.3rem;
}
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
}
.nav-links {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.nav-links.open { max-height: 400px; }
.nav-links a {
  padding: 14px 20px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}
.nav-links a.active,
.nav-links a:hover { color: var(--gold); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static;
    flex-direction: row;
    max-height: none;
    background: none;
    gap: 8px;
    margin-left: 12px;
  }
  .nav-links a { border-top: none; padding: 8px 14px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 182, 18, 0.25), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(0, 122, 77, 0.35), transparent 50%),
    linear-gradient(160deg, var(--ink), #142a20 70%);
  color: white;
  padding: 64px 0 56px;
}
.hero .container { display: grid; gap: 32px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.hero h1 span { color: var(--gold); }
.hero p.lead { color: rgba(255, 255, 255, 0.82); font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}
.hero-stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.hero-stat strong { display: block; font-size: 1.6rem; color: var(--gold); }
.hero-stat span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); }

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.sport-card,
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: left;
}

.sport-tile {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.sport-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}
.sport-tile .icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.sport-tile h3 { margin-bottom: 6px; color: var(--ink); }
.sport-tile p { font-size: 0.9rem; margin-bottom: 0; }

.info-card .icon { font-size: 1.8rem; margin-bottom: 10px; display: block; }
.info-card h3 { color: var(--ink); }
.info-card p { margin-bottom: 0; font-size: 0.95rem; }

.callout {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.callout h2 { color: white; }
.callout p { color: rgba(255, 255, 255, 0.88); }

.band-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.band-chip {
  flex: 1 1 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.band-chip strong { display: block; color: var(--green); margin-bottom: 4px; }
.band-chip p { margin: 0; font-size: 0.9rem; }

/* ==========================================================================
   Program generator (program.html)
   ========================================================================== */
.generator-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.form-step { margin-bottom: 28px; }
.form-step:last-of-type { margin-bottom: 0; }
.form-step label,
.form-step legend {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 0;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 0.8rem;
  margin-right: 8px;
}

#sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.sport-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
}
.sport-card-icon { font-size: 1.8rem; }
.sport-card.active {
  border-color: var(--green);
  background: rgba(0, 122, 77, 0.08);
  box-shadow: 0 0 0 2px var(--green) inset;
}

select,
input[type="number"] {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  color: var(--ink);
}
select:disabled { opacity: 0.55; }

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
  height: 6px;
}
.age-readout {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.age-readout strong { font-size: 2rem; color: var(--green); }
.age-readout span { color: var(--muted); font-size: 0.9rem; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.hidden { display: none !important; }

.results-header { margin-bottom: 24px; }
.band-note {
  background: rgba(255, 182, 18, 0.18);
  border: 1px solid rgba(255, 182, 18, 0.4);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 0.92rem;
}
.results-tip { font-size: 0.85rem; }

.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.day-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.day-card h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 14px; }
.day-rest { background: rgba(0, 20, 137, 0.05); }
.day-match { background: rgba(255, 182, 18, 0.12); }

.exercise-block { margin-bottom: 16px; }
.exercise-block:last-child { margin-bottom: 0; }
.exercise-block h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 8px;
}
.exercise-list { display: flex; flex-direction: column; gap: 10px; }
.exercise-row {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 12px;
}
.exercise-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
}
button.exercise-name {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
button.exercise-name:hover,
button.exercise-name:focus-visible {
  color: var(--green);
  text-decoration-color: var(--green);
}
.exercise-reps { color: var(--green); white-space: nowrap; }
.exercise-cue { font-size: 0.82rem; margin: 2px 0 4px; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 20, 137, 0.08);
  color: var(--blue);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
}

/* ==========================================================================
   Exercise detail modal (program.html)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 27, 22, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--paper);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { background: var(--border); }
.modal-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 6px;
}
#modal-body h2 { font-size: 1.4rem; color: var(--ink); padding-right: 30px; }
#modal-body h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 20px 0 10px;
}
/* Exercise demo clip (shown only when a video/<id>.mp4 exists) */
.modal-video {
  margin: 6px 0 4px;
  border-radius: 12px;
  overflow: hidden;
  background: #0e1b16;
  box-shadow: var(--shadow);
}
.modal-video video {
  display: block;
  width: 100%;
  max-height: 48vh;
  object-fit: contain;
  background: #0e1b16;
}
.modal-video-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green);
  margin: 4px 0 12px;
}

.modal-steps { list-style: decimal; padding-left: 1.3em; color: var(--ink); }
.modal-steps li { margin-bottom: 8px; }
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.modal-grid p { margin: 0; color: var(--ink); font-size: 0.92rem; }
.modal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-chips li {
  background: rgba(0, 122, 77, 0.1);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.modal-mistake {
  margin-top: 20px;
  background: rgba(222, 56, 49, 0.08);
  border: 1px solid rgba(222, 56, 49, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--ink);
}
@media (max-width: 480px) {
  .modal-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Equipment page
   ========================================================================== */
.equipment-item {
  scroll-margin-top: 90px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  display: grid;
  gap: 18px;
}
@media (min-width: 720px) {
  .equipment-item { grid-template-columns: 1fr 1.4fr; align-items: start; }
}
.equipment-item .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 122, 77, 0.12);
  color: var(--green);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.equipment-item h3 { color: var(--ink); font-size: 1.3rem; }
.equipment-item ol,
.equipment-item ul { list-style: decimal; padding-left: 1.2em; color: var(--muted); }
.equipment-item ul { list-style: disc; }
.equipment-item li { margin-bottom: 6px; }
.equipment-item .materials {
  background: var(--paper);
  border-radius: 10px;
  padding: 14px 16px;
}
.equipment-item .materials strong { display: block; margin-bottom: 6px; color: var(--ink); }

.safety-box {
  background: rgba(222, 56, 49, 0.08);
  border: 1px solid rgba(222, 56, 49, 0.35);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
}
.safety-box h3 { color: var(--red); }
.safety-box p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0 28px;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
.site-footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-note { font-size: 0.8rem; width: 100%; margin-top: 18px; color: rgba(255, 255, 255, 0.45); }
.footer-credit { font-size: 0.75rem; width: 100%; margin-top: 6px; color: rgba(255, 255, 255, 0.35); }
.footer-credit a { color: rgba(255, 255, 255, 0.55); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); }
.footer-credit a:hover { color: var(--gold); text-decoration-color: var(--gold); }
.footer-sister { font-size: 0.8rem; width: 100%; margin-top: 10px; color: rgba(255, 255, 255, 0.45); }
.footer-sister a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(255, 182, 18, 0.4); font-weight: 600; }
.footer-sister a:hover { text-decoration-color: var(--gold); }

/* ==========================================================================
   Print (program.html results)
   ========================================================================== */
.print-header { display: none; }

@media print {
  .no-print,
  .site-header,
  .site-footer,
  .modal-overlay {
    display: none !important;
  }
  body { background: white; color: black; }
  .container { padding: 0; max-width: 100%; }
  section { padding: 0; }
  .print-header { display: block; margin-bottom: 18px; }
  .print-header h2 { color: black; }
  .print-header p { color: #333; }
  .day-grid { display: block; column-count: 2; column-gap: 18px; }
  .day-card {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 14px;
    display: inline-block;
    width: 100%;
  }
  .day-rest, .day-match { background: #f4f4f4; }
  .exercise-row { border-left-color: #999; }
  .exercise-cue, .exercise-reps, p { color: #333; }
  button.exercise-name { color: black; text-decoration: none; cursor: default; }
  .badge { background: none; border: 1px solid #999; color: black; }
}
