/*
    MyCarCare Critical CSS — "Obsidian & Gold" Design System
    ---
    Above-the-fold essentials: design tokens, navbar, hero, buttons.
    Loaded synchronously in <head> for fast initial paint.
    Full style.css is loaded asynchronously.
*/

/* ===================================================================
   1. DESIGN TOKENS
   =================================================================== */
:root {
    /* --- Brand Colors --- */
    --mcc-gold: #D4A843;
    --mcc-gold-hover: #BF9530;
    --mcc-gold-glow: rgba(212, 168, 67, 0.15);
    --mcc-gold-subtle: rgba(212, 168, 67, 0.08);

    /* --- Background Hierarchy (Defaults to Slate Grey) --- */
    --mcc-bg-primary: #212529;
    --mcc-bg-elevated: #1c1c1e;
    --mcc-bg-surface: #2c2c2e;
    --mcc-bg-surface-hover: #3a3a3c;

    /* --- Text Colors --- */
    --mcc-text-primary: #F5F5F7;
    --mcc-text-secondary: #B0B0B5;
    --mcc-text-tertiary: #8E8E93;
    --mcc-text-on-gold: #0a0a0a;

    /* Override Bootstrap text-muted for dark backgrounds */
    --bs-secondary-color: var(--mcc-text-secondary);

    /* --- Borders --- */
    --mcc-border: rgba(255, 255, 255, 0.08);
    --mcc-border-hover: rgba(255, 255, 255, 0.15);
    --mcc-border-gold: rgba(212, 168, 67, 0.3);

    /* --- Semantic Colors --- */
    --mcc-accent-blue: #2997FF;
    --mcc-success: #30D158;
    --mcc-danger: #FF453A;
    --mcc-warning: #FFD60A;

    /* --- Shadows & Elevation --- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px var(--mcc-gold-glow);
    --shadow-glow-lg: 0 0 40px var(--mcc-gold-glow), 0 0 80px rgba(212, 168, 67, 0.05);

    /* --- Spacing --- */
    --spacing-section: clamp(4rem, 8vw, 8rem);
    --spacing-card: 2rem;

    /* --- Radius --- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;

    /* --- Typography --- */
    --font-display: 'Racing Sans One', cursive;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    /* --- Layout --- */
    --navbar-height: 70px;

    /* --- Animation --- */
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* --- Legacy Compat (maps old tokens to new) --- */
    --mycar-primary: var(--mcc-gold);
    --mycar-primary-darker: var(--mcc-gold-hover);
    --mycar-accent: var(--mcc-accent-blue);
    --mycar-accent-darker: #1a7fe0;
    --mycar-dark-text: var(--mcc-text-primary);
    --mycar-dark-bg: var(--mcc-bg-elevated);
}

/* --- Theme Overrides (Obsidian Black for Index and Products) --- */
body.homepage, body.products-page {
    --mcc-bg-primary: #0a0a0a;
    --mcc-bg-elevated: #141414;
    --mcc-bg-surface: #1c1c1e;
    --mcc-bg-surface-hover: #2c2c2e;
}

/* ===================================================================
   2. GLOBAL RESETS
   =================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--mcc-text-primary);
    background-color: var(--mcc-bg-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Override Bootstrap Utilities */
.bg-dark {
    background-color: var(--mcc-bg-primary) !important;
}

a {
    transition: color var(--duration-fast) ease-in-out;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--mcc-text-primary);
}

/* ===================================================================
   3. NAVBAR — Glassmorphism Premium
   =================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1050;
    background: rgba(10, 10, 10, 0.75);
    /* blur removed for fps */
    /* blur removed for fps */
    /* blur removed for fps */
    border-bottom: 1px solid var(--mcc-border);
    box-shadow: none;
    transition: background var(--duration-normal) ease,
                padding var(--duration-normal) ease,
                box-shadow var(--duration-normal) ease,
                border-color var(--duration-normal) ease;
    padding: 0.6rem 1rem;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-decoration: none !important;
    color: var(--mcc-text-primary) !important;
    transition: opacity var(--duration-fast);
}

.navbar-brand:hover {
    opacity: 0.85;
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    color: var(--mcc-text-secondary) !important;
    transition: color var(--duration-fast);
    position: relative;
    padding: 0.5rem 1rem !important;
}

.navbar .nav-link:hover {
    color: var(--mcc-text-primary) !important;
}

.navbar .nav-link.active {
    color: var(--mcc-gold) !important;
}

/* Active link underline indicator */
.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--mcc-gold);
    border-radius: 1px;
}

/* Scrolled state: more opaque, subtle shadow */
.navbar.scrolled {
    background: #0a0a0a;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
    border-bottom-color: transparent;
    padding: 0.4rem 1rem;
}

/* Override Bootstrap dark background */
.navbar.bg-dark {
    background-color: transparent !important;
}

/* ===================================================================
   4. PAGE CONTENT SPACING
   =================================================================== */
#page-content,
#page-content > main,
#page-content > section,
#page-content .container {
    padding-top: var(--navbar-height);
}

/* ===================================================================
   5. HERO SECTION
   =================================================================== */
.hero-section {
    position: relative;
    background: url('../img/hero-background.webp') no-repeat center center;
    background-size: cover;
    background-color: var(--mcc-bg-primary);
    z-index: 1;
    min-height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.webp .hero-section {
    background-image: url('../img/hero-background.webp');
}

/* Dark gradient overlay for text readability */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: -1;
}

/* Hero heading animation-ready */
.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* Authorised dealer brand strip with SVG logos */
.hero-dealer-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0.5rem 1.4rem;
    margin-bottom: 1.25rem;
    background: rgba(20, 20, 20, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 163, 82, 0.3);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    max-width: 100%;
}

.hero-dealer-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.hero-dealer-logos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.15rem;
}

.hero-brand-svg {
    width: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.95;
}

.hero-brand-svg:hover {
    transform: scale(1.08);
    opacity: 1;
}

.hero-brand-svg.logo-bridgestone {
    height: 14px;
    max-width: 130px;
}

.hero-brand-svg.logo-goodyear {
    height: 18px;
    max-width: 110px;
}

.hero-brand-svg.logo-mrf {
    height: 16px;
    max-width: 85px;
}

.hero-brand-svg.logo-ceat {
    height: 15px;
    max-width: 65px;
}

.hero-brand-svg.logo-amaron {
    height: 16px;
    max-width: 85px;
}

@media (max-width: 768px) {
    .hero-dealer-line {
        padding: 0.6rem 1rem;
        border-radius: 20px;
        gap: 0.5rem 0.85rem;
    }
    .hero-dealer-logos {
        gap: 0.75rem;
    }
    .hero-brand-svg.logo-bridgestone { height: 12px; }
    .hero-brand-svg.logo-goodyear { height: 15px; }
    .hero-brand-svg.logo-mrf { height: 14px; }
    .hero-brand-svg.logo-ceat { height: 13px; }
    .hero-brand-svg.logo-amaron { height: 14px; }
}

.hero-section p.lead {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.usp-content {
    margin-top: 4rem;
}

/* Glassmorphic USP cards */
.hero-section .card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: none;
    /* blur removed for fps */
    /* blur removed for fps */
    /* blur removed for fps */
    transition: background-color var(--duration-fast) ease,
                border-color var(--duration-fast) ease,
                transform var(--duration-fast) ease;
}

.hero-section .card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.hero-section .card .card-title {
    color: var(--mcc-gold);
    font-size: 1.15rem;
    font-weight: 700;
}

/* ===================================================================
   6. BUTTONS — Premium Style
   =================================================================== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out-quint);
    letter-spacing: 0.3px;
}

/* Primary gold CTA */
.hero-section .btn-accent,
.hero-section .btn:first-of-type {
    background: var(--mcc-gold);
    color: var(--mcc-text-on-gold);
    border: 2px solid var(--mcc-gold);
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}

.hero-section .btn-accent:hover,
.hero-section .btn:first-of-type:hover {
    background: var(--mcc-gold-hover);
    border-color: var(--mcc-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 168, 67, 0.4);
}

/* Secondary ghost CTA */
.hero-section .btn-primary,
.hero-section .btn:nth-of-type(2) {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: none;
}

.hero-section .btn-primary:hover,
.hero-section .btn:nth-of-type(2):hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    transform: translateY(-2px);
}

/* ===================================================================
   7. UTILITY: Gold Text Accent
   =================================================================== */
.text-gold {
    color: var(--mcc-gold) !important;
}

.text-mcc-secondary {
    color: var(--mcc-text-secondary) !important;
}

/* Overline label style */
.overline {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--mcc-text-tertiary);
}

.overline-gold {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--mcc-gold);
}
.text-muted { color: var(--mcc-text-secondary) !important; }
