/* Theme Name: fix-my.site Master - ELITE EDITION
   Version: 31.22 | SOT-CORE: V8.8 | Sync Status: 100%
   Zero-Removal Mandate: ACTIVE
*/

/* --- SOT: LOCAL TYPOGRAPHY (SORA) --- */
/* Rule 10: Local fonts only. No Google Calls. */
@font-face {
    font-family: 'Sora';
    src: url('./fonts/Sora-VariableFont_wght.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root { 
    /* --- COLOR PALETTE --- */
    --bg-primary: #0b1120; 
    --text-primary: #ffffff; 
    /* SOT FIX: Secondary Text for Straplines (Slate 400) */
    --text-secondary: #94a3b8; 
    
    --border-primary: rgba(255, 255, 255, 0.08); 
    --toggle-track: #1e293b;
    --toggle-handle: #ffffff;
    --glass-blur: blur(12px);
    --gold-grad: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
    --elite-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

    /* --- FLUID TYPOGRAPHY ENGINE --- */
    --step-0: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
    --step-1: clamp(1.25rem, 1.16rem + 0.43vw, 1.5rem);
    --step-2: clamp(1.56rem, 1.41rem + 0.76vw, 2rem);
    --step-3: clamp(1.95rem, 1.71rem + 1.22vw, 2.66rem);
    --step-4: clamp(2.44rem, 2.06rem + 1.88vw, 3.55rem);
    --step-5: clamp(3.05rem, 2.48rem + 2.85vw, 4.73rem);
    --step-6: clamp(3.81rem, 2.99rem + 4.13vw, 6.31rem);
}

[data-theme="light"] { 
    --bg-primary: #ffffff; 
    --text-primary: #0f172a; 
    /* SOT FIX: Secondary Text for Straplines (Slate 600 - Readable on White) */
    --text-secondary: #475569; 
    
    --border-primary: rgba(15, 23, 42, 0.08); 
    --toggle-track: #e2e8f0;
    --toggle-handle: #0b1120;
    --elite-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.15);
}

/* --- GRADUAL THEME FADE ENGINE --- */
body { 
    background-color: var(--bg-primary) !important; 
    color: var(--text-primary) !important; 
    /* Slick 0.8s transition for gradual theme bleeding */
    transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out; 
    margin: 0; 
    font-family: 'Sora', system-ui, -apple-system, sans-serif; 
    font-size: var(--step-0);
    line-height: 1.6;
}

/* --- MASTER STACKING ORDER --- */
header.fixed { 
    z-index: 9000 !important; 
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-primary);
    background-color: rgba(11, 17, 32, 0.85);
    /* Header background and border fade sync */
    transition: background-color 0.8s ease-in-out, border-color 0.8s ease-in-out;
}

[data-theme="light"] header.fixed {
    background-color: rgba(255, 255, 255, 0.85);
}

header .font-extrabold {
    color: var(--text-primary) !important;
    transition: color 0.8s ease-in-out;
}

/* --- SOT: PILL TOGGLE ENGINE (V31.07 FINAL) --- */
/* Replaces legacy toggle logic */

/* 1. The Track (Container) */
.theme-toggle {
    width: 56px;
    height: 32px;
    border-radius: 99px;
    position: relative;
    cursor: pointer;
    border: 1px solid #94a3b8; /* Slate 400 */
    padding: 0; 
    margin: 0;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    
    /* DEFAULT (Light Mode): Dark Grey Track */
    background-color: #cbd5e1 !important; 
    transition: background-color 0.3s ease, border-color 0.3s ease;
    
    /* Layout for the handle */
    display: flex;
    align-items: center;
    /* This padding acts as the "gap" from the left edge */
    padding-left: 3px; 
}

/* 2. The Sliding Handle */
.theme-toggle-handle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ffffff !important; /* Force White in Light Mode */
    
    /* MOVEMENT ENGINE */
    transform: translateX(0) !important; 
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.3s ease !important;
    
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* 3. DARK MODE STATE */
html[data-theme="dark"] .theme-toggle {
    background-color: #0f172a !important; /* Dark Slate Track */
    border-color: #334155;
}

html[data-theme="dark"] .theme-toggle-handle {
    /* Slide Distance: Container(56) - Handle(24) - LeftPad(3) - RightPad(3) = 26px */
    transform: translateX(24px) !important; 
    background-color: #1e293b !important; /* Dark Handle */
}

/* 4. Icon Logic */
html[data-theme="dark"] .icon-sun { opacity: 0; }
html[data-theme="dark"] .icon-moon { opacity: 1; }

html[data-theme="light"] .icon-sun { opacity: 1; }
html[data-theme="light"] .icon-moon { opacity: 0; }

/* --- CINEMATIC SLIDE NAVIGATION --- */
#mobileMenuOverlay { 
    position: fixed; inset: 0; z-index: 10000; 
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); 
    opacity: 0; visibility: hidden; 
    pointer-events: none; 
    transition: opacity 0.8s ease, visibility 0.8s ease; 
}

#mobileMenuOverlay.visible { 
    opacity: 1 !important; 
    visibility: visible !important; 
    pointer-events: auto; 
}

#mobileMenu { 
    position: fixed; top: 0; left: 0; width: 320px; height: 100vh; z-index: 10001; 
    background: var(--bg-primary) !important; 
    box-shadow: var(--elite-shadow);
    border-right: 1px solid var(--border-primary);
    transform: translateX(-100%); 
    /* 0.85s duration for a luxury, heavy feel */
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.8s ease-in-out;
}

#mobileMenu.visible { transform: translateX(0) !important; }

.mobile-menu-header span,
.mobile-nav-list li a {
    color: var(--text-primary) !important;
    transition: color 0.8s ease-in-out;
}

/* --- CLEAN ACCORDION (NO BORDERS / NO GAPS) --- */
.sub-menu-wrapper { 
    display: grid; 
    grid-template-rows: 0fr; 
    transition: grid-template-rows 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease; 
    overflow: hidden; 
    opacity: 0; 
    padding: 0 !important; 
}

.menu-item-has-children.open > .sub-menu-wrapper { 
    grid-template-rows: 1fr; 
    opacity: 1; 
}

.sub-menu-wrapper > .mobile-nav-list {
    min-height: 0; 
    padding-left: 1.5rem; 
    border-left: none !important; 
    margin-bottom: 0 !important; 
}

/* List Item Reset */
.mobile-nav-list li {
    list-style: none !important;
}

.menu-item-has-children.open > .menu-item-row .submenu-toggle-btn svg {
    transform: rotate(90deg);
}

/* --- TRIGGER SAFETY PROTOCOL --- */
#hamburgerBtn *, #closeMenuBtn *, #themeToggle *, .submenu-toggle-btn * { 
    pointer-events: none !important; 
}

/* --- PREMIUM CTA --- */
.gold-gradient { 
    background: var(--gold-grad) !important; color: #020617 !important; 
    border-radius: 8px; font-weight: 800; text-transform: uppercase; 
    padding: 1rem 1.5rem; text-decoration: none; text-align: center;
    box-shadow: 0 4px 14px 0 rgba(250, 204, 21, 0.3);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.8s ease-in-out;
}

.logo-container svg { width: 100% !important; height: 100% !important; stroke: currentColor !important; }