/* ─── Contrast improvements — Light mode ─── */
:root {
  --ink-2:        #3D3D3D;
  --ink-3:        #5A5550;
  --terra-dark:   #B8441A;
}

/* ─── Dark Mode — scoped to html.dark only ─── */
html.dark {
  --bg:           #0C0C0C;
  --bg-warm:      #171615;
  --bg-white:     #1A1918;
  --ink:          #F0EBE5;
  --ink-2:        #C5BFBA;
  --ink-3:        #8A857F;
  --terra:        #E05A28;
  --terra-light:  rgba(224, 90, 40, 0.15);
  --terra-dark:   #FF6B3A;
  --border:       #2E2B28;
}

/* ─── Section inversions (dark theme) ─── */
html.dark .section-wrap.dark {
  background: #171615;
  color: #F0EBE5;
}
html.dark .section-wrap.dark .section-title { color: #F0EBE5; }
html.dark .section-wrap.dark .section-label { color: #E05A28; }
html.dark .section-wrap.dark .cta-btn {
  color: #F0EBE5;
  border-color: rgba(240, 235, 229, 0.3);
}
html.dark .section-wrap.dark .cta-btn:hover {
  background: rgba(240, 235, 229, 0.08);
  border-color: #F0EBE5;
}

/* Differentiators */
html.dark .diff-item { border-color: #2E2B28; }
html.dark .diff-title { color: #F0EBE5; }
html.dark .diff-desc { color: #8A857F; }

/* Offers */
html.dark .offer:hover { background: rgba(224, 90, 40, 0.06); }
html.dark .offer-name { color: #F0EBE5; }
html.dark .offer-desc { color: #C5BFBA; }

/* Metrics */
html.dark .metric-desc { color: #C5BFBA; }

/* Cases */
html.dark .cases-block p { color: #C5BFBA; }

/* Intro body */
html.dark .intro-body p { color: #C5BFBA; }
html.dark .intro-body em { color: #F0EBE5; }
html.dark .intro-pullquote blockquote { color: #F0EBE5; }

/* Situations */
html.dark .situation p, html.dark .situation-desc { color: #C5BFBA; }

/* Tools cards */
html.dark .tool-card { background: #1A1918; border-color: #2E2B28; }
html.dark .tool-card-title { color: #F0EBE5; }
html.dark .tool-card-sub { color: #C5BFBA; }
html.dark .tool-card-desc { color: #8A857F; }

/* FAQ */
html.dark .faq-question { color: #F0EBE5; }
html.dark .faq-answer, html.dark .faq-answer p { color: #C5BFBA; }
html.dark .faq-item { border-color: #2E2B28; }
html.dark .faq-list { border-color: #2E2B28; }
html.dark .faq-icon::before, html.dark .faq-icon::after { background: #8A857F; }

/* CTA section */
html.dark .cta-section p, html.dark .section-wrap p { color: #C5BFBA; }

/* Footer */
html.dark footer, html.dark .footer { color: #8A857F; }
html.dark footer a, html.dark .footer a { color: #C5BFBA; }

/* ─── Nav ─── */
html.dark nav.scrolled {
  background: rgba(12, 12, 12, 0.92);
  box-shadow: 0 1px 12px rgba(0,0,0,0.3);
}
html.dark .nav-brand span { color: #F0EBE5 !important; }
html.dark .nav-brand svg line { stroke: #F0EBE5; }
html.dark .nav-link { color: #C5BFBA; }
html.dark .nav-hamburger span { background: #F0EBE5; }

/* ─── Accessibility bar ─── */
html.dark .a11y-bar { background: #171615; border-color: #2E2B28; }
html.dark .a11y-bar button { border-color: #2E2B28; color: #C5BFBA; }
html.dark .a11y-bar .a11y-label { color: #8A857F; }

/* ─── Paper grain ─── */
html.dark body::after {
  opacity: 0.02;
  mix-blend-mode: overlay;
}

/* ─── Scrollbar ─── */
html.dark ::-webkit-scrollbar { width: 6px; }
html.dark ::-webkit-scrollbar-track { background: #0C0C0C; }
html.dark ::-webkit-scrollbar-thumb { background: #332F2C; border-radius: 3px; }

/* ─── Selection ─── */
html.dark ::selection {
  background: rgba(224, 90, 40, 0.3);
  color: #F0EBE5;
}

/* ─── Cards ─── */
html.dark .card { background: #1A1918; border-color: #2E2B28; }

/* ─── Tables ─── */
html.dark table { border-color: #2E2B28; }
html.dark th { background: #171615; color: #F0EBE5; border-color: #2E2B28; }
html.dark td { color: #C5BFBA; border-color: #2E2B28; }

/* ─── Generic overrides for dark sections (both themes) ─── */
/* Decorative numbers — keep original colors, just improve visibility */
/* All *-name titles inside dark sections */
.section-wrap.dark [class$="-name"],
.section-wrap.dark .section-title,
.section-wrap.dark h2, .section-wrap.dark h3 {
  color: #FAFAF8 !important;
}
/* All *-desc descriptions inside dark sections */
.section-wrap.dark [class$="-desc"],
.section-wrap.dark p,
.section-wrap.dark .approche-intro,
.section-wrap.dark .header-sub,
.section-wrap.dark .content-text p {
  color: rgba(255,255,255,0.88) !important;
}
/* Labels in dark sections */
.section-wrap.dark .section-label,
.section-wrap.dark [class$="-label"] {
  color: var(--terra) !important;
}
/* List items in dark sections */
.section-wrap.dark li {
  color: rgba(255,255,255,0.85) !important;
}
/* Borders in dark sections */
.section-wrap.dark [class$="-item"] {
  border-color: rgba(255,255,255,0.10) !important;
}
/* Links in dark sections */
.section-wrap.dark a:not(.cta-btn):not(.nav-cta) {
  color: var(--terra) !important;
}

/* ─── Dark theme specific overrides ─── */
/* Boost all terracotta-colored nums globally */
[class$="-num"] {
  opacity: 0.45 !important;
}
/* Dark theme: terracotta nums need more punch on dark bg */
html.dark [class$="-num"] {
  opacity: 0.6 !important;
  --terra-light: rgba(224, 90, 40, 0.55);
}
/* Dark sections: nums in terracotta instead of invisible white */
html.dark .section-wrap.dark [class$="-num"] {
  color: #E05A28 !important;
  opacity: 0.5 !important;
}
html.dark .section-wrap.dark [class$="-name"],
html.dark .section-wrap.dark .section-title,
html.dark .section-wrap.dark h2, html.dark .section-wrap.dark h3 {
  color: #F0EBE5 !important;
}
html.dark .section-wrap.dark [class$="-desc"],
html.dark .section-wrap.dark p {
  color: #C5BFBA !important;
}
html.dark .section-wrap.dark li {
  color: #C5BFBA !important;
}
html.dark .section-wrap.dark [class$="-item"] {
  border-color: #2E2B28 !important;
}
html.dark .header-sub {
  color: #8A857F !important;
}

/* ─── Theme toggle button ─── */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink-3);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
