/* ==========================================================================
   NUTRIMATRIX - 24 CSS DESIGN SYSTEM
   Namespace: .nm-*
   Topic: Men's Micronutrient, Hydration & Pelvic Vitality Matrix Calculator
   ========================================================================== */

:root {
  --nm-primary: #059669;
  --nm-primary-dark: #047857;
  --nm-primary-light: #10b981;
  --nm-primary-subtle: #ecfdf5;
  --nm-accent: #0284c7;
  --nm-accent-subtle: #e0f2fe;
  --nm-warning: #f59e0b;
  --nm-warning-subtle: #fef3c7;
  --nm-dark: #0f172a;
  --nm-slate-800: #1e293b;
  --nm-slate-600: #475569;
  --nm-slate-400: #94a3b8;
  --nm-slate-200: #e2e8f0;
  --nm-slate-100: #f1f5f9;
  --nm-slate-50: #f8fafc;
  --nm-white: #ffffff;
  --nm-border: #e2e8f0;
  --nm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --nm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --nm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --nm-radius-sm: 8px;
  --nm-radius-md: 12px;
  --nm-radius-lg: 16px;
  --nm-radius-full: 9999px;
  --nm-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.nm-body {
  font-family: var(--nm-font);
  background-color: var(--nm-slate-50);
  color: var(--nm-slate-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* NAVBAR */
.nm-header {
  background: var(--nm-white);
  border-bottom: 1px solid var(--nm-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nm-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nm-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--nm-radius-md);
  background: linear-gradient(135deg, var(--nm-primary), var(--nm-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nm-white);
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--nm-shadow-sm);
}

.nm-brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nm-dark);
}

.nm-brand-tagline {
  font-size: 11px;
  color: var(--nm-slate-600);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nm-nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nm-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--nm-slate-600);
  transition: color 0.15s ease;
}

.nm-nav-link:hover,
.nm-nav-link.nm-active {
  color: var(--nm-primary);
}

.nm-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--nm-primary-subtle);
  color: var(--nm-primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--nm-radius-full);
}

.nm-badge-status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--nm-primary);
  border-radius: 50%;
}

/* MAIN LAYOUT */
.nm-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* HERO PANEL */
.nm-hero-section {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 60%, #047857 100%);
  border-radius: var(--nm-radius-lg);
  padding: 36px 40px;
  color: var(--nm-white);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--nm-shadow-lg);
}

.nm-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}

.nm-hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.nm-hero-desc {
  font-size: 15px;
  color: #d1fae5;
  line-height: 1.6;
  margin-bottom: 20px;
}

.nm-hero-highlights {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nm-hero-tag {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: var(--nm-radius-full);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nm-hero-img-wrap {
  text-align: right;
}

.nm-hero-img {
  max-width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--nm-radius-md);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--nm-shadow);
}

/* INTERACTIVE CALCULATOR GRID */
.nm-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  margin-bottom: 40px;
}

.nm-card {
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-lg);
  padding: 28px;
  box-shadow: var(--nm-shadow);
}

.nm-card-header {
  margin-bottom: 24px;
}

.nm-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nm-primary);
  background: var(--nm-primary-subtle);
  padding: 4px 10px;
  border-radius: var(--nm-radius-sm);
  margin-bottom: 8px;
}

.nm-card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--nm-dark);
  letter-spacing: -0.01em;
}

.nm-card-subtitle {
  font-size: 13px;
  color: var(--nm-slate-600);
  margin-top: 4px;
}

/* FORM CONTROLS & SLIDERS */
.nm-control-group {
  margin-bottom: 22px;
}

.nm-control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.nm-control-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--nm-slate-800);
}

.nm-control-val-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--nm-primary-dark);
  background: var(--nm-primary-subtle);
  padding: 2px 10px;
  border-radius: var(--nm-radius-full);
}

.nm-range-input {
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: var(--nm-slate-200);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.nm-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--nm-primary);
  cursor: pointer;
  border: 2px solid var(--nm-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.1s ease;
}

.nm-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.nm-range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--nm-slate-400);
  margin-top: 4px;
}

/* RADIO BUTTON CARDS (ACTIVITY) */
.nm-activity-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.nm-activity-opt {
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  background: var(--nm-slate-50);
  transition: all 0.15s ease;
}

.nm-activity-opt:hover {
  border-color: var(--nm-primary-light);
}

.nm-activity-opt.nm-selected {
  border-color: var(--nm-primary);
  background: var(--nm-primary-subtle);
}

.nm-activity-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--nm-dark);
}

.nm-activity-sub {
  font-size: 10px;
  color: var(--nm-slate-600);
  margin-top: 2px;
}

/* RESULTS DASHBOARD */
.nm-metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.nm-metric-card {
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-md);
  padding: 16px;
  background: var(--nm-slate-50);
  position: relative;
  overflow: hidden;
}

.nm-metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.nm-metric-card.nm-metric-water::before { background-color: var(--nm-accent); }
.nm-metric-card.nm-metric-lycopene::before { background-color: #ef4444; }
.nm-metric-card.nm-metric-zinc::before { background-color: #8b5cf6; }
.nm-metric-card.nm-metric-circulation::before { background-color: var(--nm-primary); }

.nm-metric-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--nm-slate-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nm-metric-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--nm-dark);
  margin: 6px 0 2px;
}

.nm-metric-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--nm-slate-400);
}

.nm-metric-hint {
  font-size: 11px;
  color: var(--nm-slate-600);
  line-height: 1.4;
}

/* TARGET BREAKDOWN PROGRESS BARS */
.nm-progress-block {
  margin-bottom: 16px;
}

.nm-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.nm-progress-bar-bg {
  height: 8px;
  background-color: var(--nm-slate-200);
  border-radius: var(--nm-radius-full);
  overflow: hidden;
}

.nm-progress-bar-fill {
  height: 100%;
  border-radius: var(--nm-radius-full);
  transition: width 0.3s ease;
}

.nm-progress-fill-blue { background-color: var(--nm-accent); }
.nm-progress-fill-red { background-color: #ef4444; }
.nm-progress-fill-purple { background-color: #8b5cf6; }
.nm-progress-fill-green { background-color: var(--nm-primary); }

/* HOURLY HYDRATION SCHEDULE */
.nm-schedule-timeline {
  background: var(--nm-slate-50);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-md);
  padding: 20px;
  margin-top: 24px;
}

.nm-schedule-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--nm-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nm-hourly-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.nm-slot-box {
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.nm-slot-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--nm-slate-600);
}

.nm-slot-vol {
  font-size: 13px;
  font-weight: 800;
  color: var(--nm-accent);
  margin: 3px 0;
}

.nm-slot-label {
  font-size: 10px;
  color: var(--nm-slate-400);
}

/* FOOD SOURCES COMPASS */
.nm-food-compass-section {
  margin-bottom: 40px;
}

.nm-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 32px;
}

.nm-section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--nm-dark);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.nm-section-desc {
  font-size: 14px;
  color: var(--nm-slate-600);
}

.nm-food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.nm-food-card {
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-lg);
  padding: 24px;
  box-shadow: var(--nm-shadow);
  display: flex;
  flex-direction: column;
}

.nm-food-card-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--nm-primary);
  margin-bottom: 8px;
}

.nm-food-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--nm-dark);
  margin-bottom: 8px;
}

.nm-food-card-p {
  font-size: 13px;
  color: var(--nm-slate-600);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.nm-food-card-list {
  list-style: none;
  font-size: 12px;
  border-top: 1px dashed var(--nm-border);
  padding-top: 12px;
}

.nm-food-card-list li {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--nm-slate-800);
  font-weight: 600;
}

.nm-food-card-list li::before {
  content: "✓";
  color: var(--nm-primary);
  font-weight: 800;
}

/* AUTHOR STRIP */
.nm-author-strip {
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--nm-shadow);
  margin-bottom: 40px;
}

.nm-author-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--nm-primary-subtle);
  flex-shrink: 0;
}

.nm-author-info h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--nm-dark);
  margin-bottom: 4px;
}

.nm-author-role {
  font-size: 13px;
  font-weight: 700;
  color: var(--nm-primary);
  margin-bottom: 8px;
}

.nm-author-bio {
  font-size: 13px;
  color: var(--nm-slate-600);
  line-height: 1.6;
}

/* SUBPAGE CONTENT CARD */
.nm-subpage-card {
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-lg);
  padding: 36px 40px;
  box-shadow: var(--nm-shadow);
  max-width: 860px;
  margin: 0 auto;
}

.nm-subpage-card h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--nm-dark);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.nm-subpage-card h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--nm-dark);
  margin: 28px 0 12px;
}

.nm-subpage-card p {
  font-size: 14px;
  color: var(--nm-slate-600);
  line-height: 1.7;
  margin-bottom: 16px;
}

.nm-subpage-card ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.nm-subpage-card li {
  font-size: 14px;
  color: var(--nm-slate-600);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* FOOTER */
.nm-footer {
  background: var(--nm-white);
  border-top: 1px solid var(--nm-border);
  padding: 32px 24px;
}

.nm-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.nm-footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.nm-footer-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--nm-slate-600);
  transition: color 0.15s ease;
}

.nm-footer-link:hover {
  color: var(--nm-primary);
}

.nm-footer-copy {
  font-size: 12px;
  color: var(--nm-slate-400);
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .nm-hero-grid {
    grid-template-columns: 1fr;
  }
  .nm-hero-img-wrap {
    text-align: center;
  }
  .nm-calc-grid {
    grid-template-columns: 1fr;
  }
  .nm-food-grid {
    grid-template-columns: 1fr;
  }
  .nm-author-strip {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nm-header-inner {
    flex-direction: column;
    gap: 12px;
  }
  .nm-nav-menu {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .nm-hero-section {
    padding: 24px 20px;
  }
  .nm-hero-title {
    font-size: 24px;
  }
  .nm-metric-cards-grid {
    grid-template-columns: 1fr;
  }
  .nm-hourly-slots {
    grid-template-columns: repeat(2, 1fr);
  }
  .nm-subpage-card {
    padding: 24px 20px;
  }
}
