/* ============================================
   Vitality Theme Documentation — Stylesheet
   ============================================ */

:root {
  --color-primary: #2D6A4F;
  --color-primary-dark: #1B4332;
  --color-primary-light: #40916C;
  --color-accent: #95D5B2;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8F9FA;
  --color-bg-code: #F1F3F5;
  --color-text: #212529;
  --color-text-muted: #6C757D;
  --color-border: #DEE2E6;
  --color-border-light: #E9ECEF;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  --max-width: 1200px;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary-dark);
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; padding-top: 2rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; padding-top: 1.25rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; padding-top: 1rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--color-primary-dark);
}

pre {
  background: var(--color-bg-code);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 2rem 0;
}

strong { font-weight: 600; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary-dark);
  color: #fff;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
}

.header-brand:hover { color: var(--color-accent); text-decoration: none; }

.header-brand svg { flex-shrink: 0; }

.header-nav { display: flex; gap: 1.5rem; align-items: center; }

.header-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.header-nav a:hover,
.header-nav a.active { color: #fff; text-decoration: none; }

.header-nav a.active { border-bottom: 2px solid var(--color-accent); padding-bottom: 2px; }

/* ---- Layout ---- */
.layout {
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: calc(100vh - var(--header-height));
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--color-border-light);
  padding: 2rem 1.5rem 2rem 2rem;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  font-size: 0.875rem;
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  padding-top: 1.25rem;
}

.sidebar-title:first-child { padding-top: 0; }

.sidebar-nav { list-style: none; padding: 0; margin: 0 0 0.5rem 0; }

.sidebar-nav li { margin-bottom: 0.15rem; }

.sidebar-nav a {
  display: block;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  color: var(--color-text);
  font-weight: 450;
  transition: background var(--transition), color var(--transition);
}

.sidebar-nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: rgba(45,106,79,0.08);
  color: var(--color-primary);
  font-weight: 600;
}

/* ---- Main content ---- */
.main {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem 4rem 3rem;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 3.5rem 2rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---- Cards / Feature Grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.card h4 {
  padding-top: 0;
  margin-bottom: 0.35rem;
  color: var(--color-primary-dark);
}

.card p { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 0; }

/* ---- Preset Swatches ---- */
.preset-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.preset-card {
  flex: 1;
  min-width: 240px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.preset-swatch {
  height: 80px;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.preset-swatch.clinical { background: #1B4332; color: #fff; }
.preset-swatch.botanical { background: #DDA15E; color: #3A2D1A; }
.preset-swatch.performance { background: #0D1117; color: #39FF14; }

.preset-body { padding: 1rem 1.25rem; }
.preset-body p { font-size: 0.9rem; margin-bottom: 0.35rem; }

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  text-align: left;
  font-weight: 600;
  padding: 0.75rem 1rem;
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-border);
  color: var(--color-primary-dark);
}

tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
}

tbody tr:hover { background: var(--color-bg-alt); }

/* ---- Callouts ---- */
.callout {
  border-left: 4px solid var(--color-primary);
  background: rgba(45,106,79,0.04);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
  font-size: 0.925rem;
}

.callout-title {
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.25rem;
}

.callout.warning {
  border-left-color: #E9A820;
  background: rgba(233,168,32,0.06);
}

.callout.warning .callout-title { color: #946300; }

/* ---- Steps / Numbered List ---- */
.steps { counter-reset: step-counter; list-style: none; padding: 0; }

.steps li {
  counter-increment: step-counter;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1rem;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-light);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer a { color: var(--color-primary); }

/* ---- Support Page ---- */
.support-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.support-layout h1 { text-align: center; margin-bottom: 0.5rem; }
.support-lead { text-align: center; color: var(--color-text-muted); margin-bottom: 2.5rem; font-size: 1.05rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-info-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-info-card h3 { padding-top: 0; margin-bottom: 0.5rem; }
.contact-info-card p { font-size: 0.925rem; color: var(--color-text-muted); margin-bottom: 0.25rem; }

.form-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--color-primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover { background: var(--color-primary-dark); transform: translateY(-1px); }

/* ---- Hamburger (mobile) ---- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle svg { display: block; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .layout { flex-direction: column; }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
    padding: 1.25rem 2rem;
    display: none;
  }

  .sidebar.open { display: block; }

  .main { padding: 2rem; }

  .menu-toggle { display: block; }

  .contact-grid { grid-template-columns: 1fr; }

  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 2.5rem 1.5rem; }
}

@media (max-width: 600px) {
  .main { padding: 1.5rem 1rem; }
  .preset-row { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 1rem; }
  .header-nav { gap: 1rem; }
}
