/*
Theme Name: Medvinci Storefront
Theme URI: https://medvinciresearch.com
Description: Lightweight Storefront child theme for Medvinci Research. Zero visual opinions — Helix Architect drives all aesthetics. Overrides header/footer with clean semantic HTML.
Author: Medvinci Research LLC
Author URI: https://medvinciresearch.com
Template: storefront
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: medvinci-storefront
*/

/* === DESIGN TOKENS ===
   Defines --mv-* custom properties for both themes.
   Consumed by layout-fixes.php, page-overrides.php, and all component CSS.
   Primary brand: blue (#0691fa dark, #0681e1 light). */

html[data-theme="dark"],
html:not([data-theme]) {
    /* Surfaces */
    --mv-bg: #0a1520;
    --mv-surface: rgba(13,29,48,0.84);
    --mv-surface-alt: rgba(15,35,56,0.94);
    --mv-card: rgba(13,29,48,0.84);
    --mv-muted: rgba(255,255,255,0.06);
    /* Text */
    --mv-foreground: #ffffff;
    --mv-text-dim: rgba(255,255,255,0.5);
    --mv-text-muted: rgba(255,255,255,0.7);
    --mv-muted-fg: rgba(255,255,255,0.5);
    /* Borders */
    --mv-border: rgba(255,255,255,0.08);
    --mv-input-border: rgba(255,255,255,0.12);
    /* Brand */
    --mv-primary: #0691fa;
    --mv-primary-border: rgba(6,145,250,0.18);
    --mv-primary-glow: rgba(6,145,250,0.15);
    --mv-accent: #31b4d7;
    --mv-accent-border: rgba(49,180,215,0.18);
    --mv-secondary: #7acb7e;
    --mv-charcoal: #3d3d47;
    /* Status */
    --mv-success: #7acb7e;
    --mv-warning: #FFD700;
    --mv-error: #ef4444;
    --mv-info: #31b4d7;
    /* Glass */
    --mv-glass-bg: rgba(13,29,48,0.72);
    --mv-glass-bg-strong: rgba(13,29,48,0.92);
    --mv-glass-border: rgba(255,255,255,0.07);
    /* Typography & Radius */
    --mv-font-body: 'DM Sans', sans-serif;
    --mv-font-display: 'Outfit', sans-serif;
    --mv-radius: 12px;
    --mv-radius-sm: 8px;
    --mv-radius-lg: 16px;
}

html[data-theme="light"] {
    /* Surfaces */
    --mv-bg: #f5f6f8;
    --mv-surface: #ffffff;
    --mv-surface-alt: #e8eaef;
    --mv-card: #ffffff;
    --mv-muted: #ecedf1;
    /* Text */
    --mv-foreground: #17171c;
    --mv-text-dim: #6b7180;
    --mv-text-muted: #6b7180;
    --mv-muted-fg: #6b7180;
    /* Borders */
    --mv-border: #d3d6dd;
    --mv-input-border: #cacdd5;
    /* Brand */
    --mv-primary: #0681e1;
    --mv-primary-border: rgba(6,129,225,0.3);
    --mv-primary-glow: rgba(6,129,225,0.15);
    --mv-accent: #239fb6;
    --mv-accent-border: rgba(35,159,182,0.2);
    --mv-secondary: #7acb7e;
    --mv-charcoal: #3d3d47;
    /* Status */
    --mv-success: #389f3e;
    --mv-warning: #f59e0b;
    --mv-error: #dc3232;
    --mv-info: #239fb6;
    /* Glass */
    --mv-glass-bg: rgba(255,255,255,0.72);
    --mv-glass-bg-strong: rgba(255,255,255,0.92);
    --mv-glass-border: rgba(0,0,0,0.07);
    /* Typography & Radius */
    --mv-font-body: 'DM Sans', sans-serif;
    --mv-font-display: 'Outfit', sans-serif;
    --mv-radius: 12px;
    --mv-radius-sm: 8px;
    --mv-radius-lg: 16px;
}

/* === STOREFRONT VISUAL RESET ===
   Kill Storefront's Customizer-injected inline styles.
   The theme outputs transparent structure; Helix paints it. */

/* Remove Storefront's forced backgrounds */
body,
#page,
.hfeed,
.site-content,
#content,
.content-area,
#primary,
.site-main {
    background: transparent !important;
    background-image: none !important;
}

/* Remove Storefront header/footer forced colors */
#masthead,
#masthead.site-header,
.site-header {
    background: transparent !important;
    background-image: none !important;
    border-bottom: none !important;
}
.site-footer {
    background: transparent !important;
    background-image: none !important;
    border-top: none !important;
}

/* Kill Storefront's .col-full max-width cap */
.col-full {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Kill Storefront's Customizer typography injection */
body,
.site-header,
.main-navigation ul li a,
.site-footer,
h1, h2, h3, h4, h5, h6,
button, input, select, textarea {
    font-family: inherit !important;
}

/* Kill Storefront Customizer link/accent colors */
a { color: inherit; }

/* Remove Storefront's dark bar wrapper */
.storefront-primary-navigation {
    display: contents !important;
    background: transparent !important;
}

/* Sidebar — hidden by default (Helix controls layout) */
#secondary {
    display: none;
}

/* === DARK MODE FORCE === */
html[data-theme="dark"] body,
html[data-theme="dark"] #page,
html[data-theme="dark"] .hfeed {
    background: var(--mv-bg) !important;
    color: var(--mv-foreground) !important;
}
html[data-theme="dark"] #masthead,
html[data-theme="dark"] .site-header {
    background: #0a1628 !important;
}
html[data-theme="dark"] .site-footer {
    background: #060f18 !important;
}

/* === LIGHT MODE FORCE === */
html[data-theme="light"] body,
html[data-theme="light"] #page,
html[data-theme="light"] .hfeed {
    background: var(--mv-bg) !important;
    color: var(--mv-foreground) !important;
}
html[data-theme="light"] #masthead,
html[data-theme="light"] .site-header {
    background: var(--mv-surface) !important;
    border-bottom: 1px solid var(--mv-glass-border) !important;
}
html[data-theme="light"] .site-footer {
    background: var(--mv-surface-alt) !important;
    border-top: 1px solid var(--mv-glass-border) !important;
}
html[data-theme="light"] a {
    color: var(--mv-primary);
}
html[data-theme="light"] .site-header a,
html[data-theme="light"] .main-navigation a {
    color: var(--mv-foreground) !important;
}
html[data-theme="light"] .site-header a:hover,
html[data-theme="light"] .main-navigation a:hover {
    color: var(--mv-primary) !important;
}
html[data-theme="light"] .site-footer a {
    color: var(--mv-text-dim) !important;
}
html[data-theme="light"] .site-footer a:hover {
    color: var(--mv-primary) !important;
}
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6 {
    color: var(--mv-foreground) !important;
}
html[data-theme="light"] .menu-toggle,
html[data-theme="light"] .menu-toggle span {
    color: var(--mv-foreground) !important;
}

/* Kill dark bar wrapper */
.storefront-primary-navigation,
.storefront-primary-navigation .col-full {
    background: transparent !important;
}

/* Handheld menu toggle (dark mode default) */
html[data-theme="dark"] .menu-toggle,
html[data-theme="dark"] .menu-toggle span,
.menu-toggle, .menu-toggle span {
    color: rgba(255,255,255,0.8) !important;
}
