/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:     #0d0d0b;
  --off-black: #141412;
  --surface:   #1a1a17;
  --surface-2: #222220;
  --surface-3: #2a2a27;
  --border:    rgba(255,255,255,0.08);
  --border-2:  rgba(255,255,255,0.14);
  --text:      #f0ede6;
  --text-2:    #9a9890;
  --text-3:    #5a5a56;
  --push:      #4a9eff;
  --pull:      #72b84a;
  --legs:      #e8643a;
  --rest:      #888680;
  --cardio:    #e8a030;
  --accent:    #f0c040;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--off-black);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
  overflow: hidden;
  position: relative;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--push), var(--pull), var(--legs), var(--cardio));
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1.5rem 2rem;
  align-items: end;
}

.header-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-divider {
  width: 20px;
  height: 1px;
  background: var(--border-2);
  display: inline-block;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: var(--text);
}

.header-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.25rem;
}

.stat {
  text-align: right;
}

.stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Nav ──────────────────────────────────────────────────── */
.main-nav {
  background: var(--off-black);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}

.nav-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-btn:hover { color: var(--text); }

.nav-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

/* ── Main layout ──────────────────────────────────────────── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.section { display: none; }
.section.active { display: block; }

/* ── Day cards ────────────────────────────────────────────── */
.day-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.day-card:hover { border-color: var(--border-2); }

.day-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  border-right: 1px solid var(--border);
}

.day-label.push  { color: var(--push);  background: rgba(74,158,255,0.06); }
.day-label.pull  { color: var(--pull);  background: rgba(114,184,74,0.06); }
.day-label.legs  { color: var(--legs);  background: rgba(232,100,58,0.06); }
.day-label.rest  { color: var(--rest);  background: rgba(136,134,128,0.04); }
.day-label.cardio { color: var(--cardio); background: rgba(232,160,48,0.06); }

.day-body {
  padding: 1.25rem 1.5rem;
}

.day-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.day-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.day-muscles {
  font-weight: 300;
  font-size: 13px;
  color: var(--text-2);
  margin-left: 0.5rem;
}

.day-duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.sub-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 8px;
  margin-top: 4px;
}

.circuit-note {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
  line-height: 1.5;
}

.day-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  line-height: 1.6;
}

/* ── Tables ───────────────────────────────────────────────── */
.workout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.workout-table th {
  text-align: left;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--border);
}

.workout-table td {
  padding: 7px 8px 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
  line-height: 1.5;
}

.workout-table tr:last-child td { border-bottom: none; }

.workout-table td:last-child { color: var(--text-2); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Nutrition ────────────────────────────────────────────── */
.nutrition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  margin-bottom: 1rem;
}

.macro-list { display: flex; flex-direction: column; gap: 12px; }

.macro-item { display: flex; flex-direction: column; gap: 5px; }

.macro-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}

.macro-name { font-weight: 500; color: var(--text); }
.macro-val { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }

.macro-bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.macro-fill { height: 100%; border-radius: 2px; }

.macro-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}

.card-note {
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin-top: 1rem;
  line-height: 1.6;
}

.tier {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.tier-1 { background: rgba(114,184,74,0.15); color: #8ed460; }
.tier-2 { background: rgba(232,160,48,0.12); color: #d4a040; }

/* ── Rules ────────────────────────────────────────────────── */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.rule-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rule-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.push-title::before { background: var(--push); }
.pull-title::before { background: var(--pull); }
.legs-title::before { background: var(--legs); }

.rule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rule-list li {
  font-size: 13px;
  color: var(--text);
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}

.rule-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 17px;
  width: 5px;
  height: 1px;
  background: var(--text-3);
}

.rule-list li:last-child { border-bottom: none; }

/* ── Progression ──────────────────────────────────────────── */
.progression-list { display: flex; flex-direction: column; gap: 16px; }

.phase-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.phase-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0.75rem;
  gap: 6px;
  border-right: 1px solid var(--border);
}

.push-bg  { background: rgba(74,158,255,0.08); }
.pull-bg  { background: rgba(114,184,74,0.08); }
.legs-bg  { background: rgba(232,100,58,0.08); }
.rest-bg  { background: rgba(136,134,128,0.05); }

.phase-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-3);
}

.phase-weeks {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-align: center;
}

.phase-body { padding: 1.25rem 1.5rem; }

.phase-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.phase-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.phase-progress {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.phase-bar { height: 100%; border-radius: 2px; }

.phase-target {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.after-card .phase-body { padding-bottom: 1.5rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .site-title { font-size: clamp(3.5rem, 16vw, 6rem); }
  .header-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
  }
  .stat { text-align: left; }
  .nutrition-grid,
  .rules-grid { grid-template-columns: 1fr; }
  .day-card { grid-template-columns: 52px 1fr; }
  .day-label { font-size: 0.9rem; padding: 1rem 0 0.75rem; }
  .phase-card { grid-template-columns: 80px 1fr; }
  .phase-num { font-size: 2rem; }
  .nav-btn { padding: 0.875rem 0.875rem; font-size: 12px; }
  .workout-table th:nth-child(3),
  .workout-table td:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  .main-content { padding: 1.5rem 1rem 3rem; }
  .day-body { padding: 1rem; }
  .content-card { padding: 1rem; }
  .nav-inner { padding: 0 1rem; }
  .header-inner { padding: 0 1rem; }
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section.active .day-card,
.section.active .content-card,
.section.active .phase-card,
.section.active .content-card {
  animation: fadeUp 0.3s ease both;
}

.section.active .day-card:nth-child(1) { animation-delay: 0.02s; }
.section.active .day-card:nth-child(2) { animation-delay: 0.06s; }
.section.active .day-card:nth-child(3) { animation-delay: 0.10s; }
.section.active .day-card:nth-child(4) { animation-delay: 0.14s; }
.section.active .day-card:nth-child(5) { animation-delay: 0.18s; }
.section.active .day-card:nth-child(6) { animation-delay: 0.22s; }
.section.active .day-card:nth-child(7) { animation-delay: 0.26s; }
