/* ===================================================================
   Dark-mode overrides for the public site (Home page + CMS pages).

   landing.css / footer-enhanced.css use their own local, fixed design
   tokens (--white, --black, --gray-*) which several rules reuse with
   dual meaning (e.g. the footer's already-permanently-dark gradient
   also reads --gray-900/--black) -- blindly redefining those tokens
   under [data-theme="dark"] would break the footer. Instead this file
   targets each surface/text rule explicitly and pulls from the
   Console/Partner-matching tokens in theme-variables.css (--bg-base,
   --bg-layer-1/2, --text-primary, --text-muted, --border-color), so
   nothing here can surprise-break a rule it doesn't intend to touch.

   The hero section and the footer band are deliberately left alone in
   both themes -- they're already permanently dark/vivid by design, not
   part of the light/dark surface system.
   =================================================================== */

[data-theme="dark"] body {
    background-color: var(--bg-layer-1);
    color: var(--text-primary);
}

/* ===== Header ===== */
[data-theme="dark"] .top-header {
    background: var(--bg-base);
    border-bottom-color: var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .header-nav-modern a {
    color: var(--text-secondary);
}

[data-theme="dark"] .contact-info small {
    color: var(--text-muted);
}

[data-theme="dark"] .contact-info strong {
    color: var(--text-primary);
}

[data-theme="dark"] .contact-divider {
    background: var(--border-color);
}

[data-theme="dark"] .header-logo-wrap {
    background: color-mix(in srgb, var(--tenant-primary) 20%, var(--bg-layer-2));
}

[data-theme="dark"] .theme-toggle-track {
    background: var(--bg-layer-2);
    border-color: var(--border-color);
}

[data-theme="dark"] .theme-toggle-btn:hover .theme-toggle-track {
    background: var(--bg-layer-3);
}

/* ===== Wave separators -- must match the dark bg of whichever section they sit against,
   otherwise a near-white wave "bleeds" over a dark section. ===== */
[data-theme="dark"] .wave-separator-clean svg path {
    fill: var(--bg-layer-1);
}

/* The SVG's own fill="#ffffff" (Views/Home/Index.cshtml) is the light-mode fallback baked into
   the markup -- fine on its own, but once light mode's .features-section became --bg-layer-1
   (landing.css, 2026-09-17 depth fix) that pure white wave no longer matched the section it's
   separating into. Same fix as .footer-wave: match --bg-layer-1 explicitly once data-theme="light"
   is set, instead of leaving it on the hardcoded white. */
[data-theme="light"] .wave-separator-clean svg path {
    fill: var(--bg-layer-1);
}

[data-theme="dark"] .footer-wave {
    color: var(--bg-layer-1);
}

/* ===== Features section ===== */
[data-theme="dark"] .features-section {
    background: var(--bg-layer-1);
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

[data-theme="dark"] .section-subtitle {
    color: var(--text-muted);
}

[data-theme="dark"] .feature-card {
    background: var(--bg-base);
    border-color: var(--border-color);
}

[data-theme="dark"] .feature-card h5 {
    color: var(--text-primary);
}

[data-theme="dark"] .feature-card p {
    color: var(--text-muted);
}

/* ===== Trust section -- a visually distinct dark band from Features, not the same flat
   color, so adjacent sections read as separate layers instead of bleeding together. ===== */
[data-theme="dark"] .trust-section {
    background: var(--bg-layer-2);
}

[data-theme="dark"] .trust-card {
    background: var(--bg-base);
    box-shadow: var(--surface-shadow-md);
}

[data-theme="dark"] .trust-card h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .trust-card p {
    color: var(--text-muted);
}

/* ===== Floating stat cards over the hero image (hero band itself stays vivid/unthemed) ===== */
[data-theme="dark"] .floating-card {
    background: var(--bg-base);
    box-shadow: var(--surface-shadow-lg);
}

[data-theme="dark"] .floating-card small {
    color: var(--text-muted);
}

[data-theme="dark"] .floating-card strong {
    color: var(--text-primary);
}
