/* ══════════════════════════════════════════════════════════════════
   FITNESS CALCULATORS — Stylesheet
   Theme: Bold athletic orange/red (energy, performance)
══════════════════════════════════════════════════════════════════ */

:root {
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --c-bg: #faf7f5;
  --c-card: #ffffff;
  --c-border: rgba(40,25,15,0.08);
  --c-border-strong: rgba(40,25,15,0.15);
  --c-text: #1f1410;
  --c-text-muted: #6a5a52;
  --c-text-light: #968276;

  /* Brand — Athletic orange */
  --c-primary: #e85d04;
  --c-primary-dark: #b8430a;
  --c-primary-light: #fff4ec;
  --c-accent: #d62828;
  --c-accent-light: #ffe9e9;

  --c-success: #0a7c4a;
  --c-warning: #d97706;
  --c-danger: #c0392b;
  --c-info: #1e5a8a;

  /* Macro colors */
  --c-protein: #d62828;
  --c-carbs: #f4a261;
  --c-fat: #6a994e;

  --grad-hero: linear-gradient(135deg, #1f0e08 0%, #6a2700 50%, #e85d04 100%);
  --grad-primary: linear-gradient(135deg, #e85d04 0%, #ff8c42 100%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --shadow-hover: 0 16px 40px rgba(232,93,4,0.15);
}

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

body {
  font-family: var(--font-body);
  color: var(--c-text);
  line-height: 1.6;
  background: var(--c-bg);
  font-feature-settings: 'tnum';
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   TOP NAV (unified across all 5 sites)
══════════════════════════════════════════ */
.site-nav {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.03);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-hub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #f8f5e8, #fdf6e3);
  border: 1px solid #d4a017;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  color: #7a5a08;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-hub:hover {
  background: linear-gradient(135deg, #fdf6e3, #f4d47f);
  transform: translateY(-1px);
  text-decoration: none;
  color: #5a4006;
}

.nav-hub-icon { font-size: 16px; }

.nav-sites {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-site {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-muted);
  background: transparent;
  text-decoration: none;
  transition: all 0.15s;
}

.nav-site:hover {
  background: var(--c-primary-light);
  color: var(--c-primary);
  text-decoration: none;
}

.nav-site.active {
  background: var(--c-primary);
  color: white;
}

.nav-site.active:hover {
  background: var(--c-primary-dark);
  color: white;
}

.nav-site-icon { font-size: 14px; }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  background: var(--grad-hero);
  color: white;
  padding: 64px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(255,140,66,0.25), transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(214,40,40,0.25), transparent 50%);
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,140,66,0.2);
  border: 1px solid rgba(255,140,66,0.4);
  color: #ffc090;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: #ffc090;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   MAIN
══════════════════════════════════════════ */
.main { max-width: 1100px; margin: 0 auto; padding: 48px 20px; }

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

/* ══════════════════════════════════════════
   CALCULATOR GRID
══════════════════════════════════════════ */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.calc-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.calc-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.calc-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.calc-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--c-text);
}

.calc-card p {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   CALCULATOR SECTIONS
══════════════════════════════════════════ */
.calculator {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 36px;
  margin: 32px 0;
  box-shadow: var(--shadow-md);
  scroll-margin-top: 80px;
}

.calc-header {
  margin-bottom: 28px;
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--c-border);
}

.calc-tag {
  display: inline-block;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.calc-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.calc-header p {
  color: var(--c-text-muted);
  font-size: 15px;
}

.calc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 768px) {
  .calc-body { grid-template-columns: 1fr; gap: 24px; }
  .calculator { padding: 24px 18px; }
}

/* ── INPUTS ── */
.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-muted);
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(232,93,4,0.1);
}

.input-group select { font-family: var(--font-body); cursor: pointer; }

.inline-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.time-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.time-inputs input {
  text-align: center;
}

/* ── RESULTS ── */
.calc-results {
  background: linear-gradient(135deg, #fcfaf8 0%, #fdf0e6 100%);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 28px 24px;
}

.result-main {
  text-align: center;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--c-border);
}

.result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--c-text-muted);
  margin-bottom: 10px;
}

.result-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.result-item {
  background: white;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
}

.result-sublabel {
  font-size: 11px;
  color: var(--c-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.result-subvalue {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}

.result-subvalue.earnings { color: var(--c-success); }
.result-subvalue.warning { color: var(--c-warning); }
.result-subvalue.danger { color: var(--c-danger); }

.result-message {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--c-primary-light);
  border-left: 3px solid var(--c-primary);
  border-radius: 8px;
  font-size: 14px;
  color: var(--c-primary-dark);
}

.result-message:empty { display: none; }

.result-breakdown {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

.result-breakdown h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
  margin-bottom: 12px;
  font-weight: 700;
}

/* 1RM percentages */
.percent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 6px;
}

.percent-item {
  background: white;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  text-align: center;
}

.percent-item-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-muted);
  letter-spacing: 0.05em;
}

.percent-item-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary);
  margin-top: 2px;
}

.percent-item-reps {
  font-size: 10px;
  color: var(--c-text-light);
  margin-top: 2px;
}

/* Macro bars */
.macro-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.macro-bar {
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
}

.macro-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.macro-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
}

.macro-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

.macro-bar-track {
  height: 8px;
  background: rgba(40,25,15,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.macro-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.macro-bar-fill.protein { background: var(--c-protein); }
.macro-bar-fill.carbs { background: var(--c-carbs); }
.macro-bar-fill.fat { background: var(--c-fat); }

.macro-sub {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--c-text-muted);
}

/* Splits grid */
.splits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.split-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid var(--c-border);
  font-size: 13px;
  font-family: var(--font-mono);
}

.split-row strong { font-weight: 700; color: var(--c-primary); }

/* Volume grid */
.volume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.volume-item {
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
}

.volume-muscle {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 4px;
}

.volume-sets {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
}

.volume-detail {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* Plate visual */
.plate-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 18px 12px;
  background: white;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  margin: 12px 0;
  min-height: 80px;
  flex-wrap: wrap;
}

.plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  min-width: 18px;
}

.plate-25, .plate-55 { background: #c0392b; height: 60px; min-width: 20px; }
.plate-20, .plate-45 { background: #2c3e50; height: 56px; min-width: 18px; }
.plate-15, .plate-35 { background: #d4a017; height: 52px; min-width: 16px; color: #1f1410; text-shadow: none; }
.plate-10, .plate-25b { background: #16a085; height: 44px; min-width: 14px; }
.plate-5 { background: #4a90e2; height: 36px; min-width: 12px; }
.plate-2-5, .plate-10b { background: #7f8c8d; height: 28px; min-width: 10px; }
.plate-1-25, .plate-5b { background: #e8c170; height: 22px; min-width: 10px; color: #1f1410; text-shadow: none; }
.plate-bar {
  background: #5a4a3a;
  height: 6px;
  width: 100px;
  border-radius: 2px;
  margin: 0 4px;
}

/* Zones */
.zones {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.zone {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 4px solid;
  background: white;
}

.zone-1 { border-color: #94a3b8; }
.zone-2 { border-color: #4a90e2; }
.zone-3 { border-color: #0a7c4a; }
.zone-4 { border-color: #d97706; }
.zone-5 { border-color: #d62828; }
.zone-6 { border-color: #6b1414; }

.zone-name { font-size: 13px; font-weight: 700; }
.zone-range { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--c-primary); }
.zone-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-text-muted);
  background: rgba(0,0,0,0.04);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── CALC INFO ── */
.calc-info {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
}

.calc-info summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-info summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.2s;
  font-size: 11px;
}

.calc-info[open] summary::before { transform: rotate(90deg); }
.calc-info summary::-webkit-details-marker { display: none; }

.calc-info p, .calc-info ul {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-text-muted);
}

.calc-info ul { padding-left: 20px; }
.calc-info li { margin-bottom: 4px; }
.calc-info strong { color: var(--c-text); }

/* ══════════════════════════════════════════
   AD SLOTS
══════════════════════════════════════════ */
.ad-slot {
  background: rgba(250,247,245,0.6);
  border: 1px dashed var(--c-border-strong);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  margin: 32px 0;
  color: var(--c-text-light);
  font-size: 13px;
}

.ad-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: var(--c-text-light);
  font-weight: 600;
}

/* ══════════════════════════════════════════
   BOTTOM CTA
══════════════════════════════════════════ */
.bottom-cta {
  text-align: center;
  padding: 48px 20px;
  margin: 48px 0 0;
}

.bottom-cta h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.bottom-cta > p {
  color: var(--c-text-muted);
  margin-bottom: 28px;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}

.cta-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: all 0.2s;
}

.cta-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--c-primary);
  text-decoration: none;
}

.cta-icon { font-size: 32px; flex-shrink: 0; }
.cta-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.cta-card p { font-size: 12px; color: var(--c-text-muted); line-height: 1.4; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  background: #1f1410;
  color: rgba(255,255,255,0.7);
  padding: 48px 20px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}

.footer-section p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
}

.footer-section a {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  display: inline-block;
  margin: 2px 0;
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a { color: rgba(255,255,255,0.7); text-decoration: underline; }
.footer-bottom a:hover { color: white; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero { padding: 48px 20px 60px; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 24px; }
  .calc-card { padding: 18px 16px; }
  .result-grid { grid-template-columns: 1fr; }
  .calc-results { padding: 20px 18px; }
  .calc-header h2 { font-size: 22px; }
  .nav-inner { padding: 10px 14px; flex-direction: column; align-items: stretch; gap: 10px; }
  .nav-hub { justify-content: center; }
  .nav-sites { justify-content: center; gap: 2px; }
  .nav-site { padding: 6px 9px; font-size: 12px; }
  .nav-site-icon { font-size: 13px; }
  .zone { grid-template-columns: 1fr; gap: 4px; }
  .volume-grid { grid-template-columns: 1fr; }
}
