/* ==========================================================================
   MOTOR HATCH - DESIGN SYSTEM & GLOBAL STYLES
   Dark obsidian, brushed chrome steel, crimson red accents, mesh textures
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Crimson Red & Silver Performance Theme */
    --bg-primary: #08090c;
    --bg-secondary: #0f1116;
    --bg-obsidian: #050608;
    --surface: #161820;
    --surface-light: #1f222e;
    --surface-glass: rgba(22, 24, 32, 0.85);
    --border: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(230, 28, 36, 0.4);

    /* Typography & Accents */
    --text-primary: #ffffff;
    --text-secondary: #a4ab7;
    --text-muted: #6f7785;
    --accent: #e61c24;           /* Motor Hatch Crimson Red */
    --accent-hover: #ff2a32;
    --accent-glow: rgba(230, 28, 36, 0.35);
    --silver-metal: #e0e4eb;
    --silver-dark: #8a95a5;

    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Spacing & Structure */
    --container-max: 1360px;
    --header-height: 90px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: auto;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
    background-color: var(--bg-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.text-accent {
    color: var(--accent);
}

.text-silver {
    color: var(--silver-metal);
}

.section-subtitle {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 680px;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 7rem 0;
    position: relative;
}

.section-dark {
    background-color: var(--bg-secondary);
}

.section-obsidian {
    background-color: var(--bg-obsidian);
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-header.center {
    text-align: center;
}

.section-header.center .section-description {
    margin: 0 auto;
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-obsidian);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo-img {
    height: 110px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 0 20px rgba(230, 28, 36, 0.4));
}

.preloader-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: #fff;
    margin-bottom: 0.4rem;
}

.preloader-tagline {
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 700;
}

.preloader-bar-wrapper {
    width: 220px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
}

.preloader-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: preloaderAnimation 1.8s ease-in-out infinite;
}

@keyframes preloaderAnimation {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==========================================================================
   TRANSPARENT TO FROSTED GLASS NAVBAR
   ========================================================================== */

.navbar-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color var(--transition-smooth), border-color var(--transition-smooth), backdrop-filter var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.navbar-header.scrolled {
    background-color: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}

.navbar-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

.logo-brand-img {
    height: 54px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.logo-brand:hover .logo-brand-img {
    transform: scale(1.05);
}

.nav-menu-desktop {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    list-style: none;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    text-transform: uppercase;
    position: relative;
    padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-action-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.nav-action-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1002;
}

.mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Navigation Overlay Drawer */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-obsidian);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    color: var(--accent);
    transform: translateX(10px);
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 0 22px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(230, 28, 36, 0.08);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.75rem;
}

.btn-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-icon-action:hover, .btn-icon-action.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(230, 28, 36, 0.12);
}

/* ==========================================================================
   CUSTOM MAGNETIC CURSOR
   ========================================================================== */

.custom-cursor {
    position: fixed;
    top: -20px;
    left: -20px;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s ease, 
                opacity 0.3s ease;
}

.custom-cursor .cursor-text {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fff;
    display: none;
    text-transform: uppercase;
}

.custom-cursor.cursor-hover {
    width: 44px;
    height: 44px;
    background: rgba(230, 28, 36, 0.2);
}

.custom-cursor.cursor-view,
.custom-cursor.cursor-explore,
.custom-cursor.cursor-drag {
    width: 64px;
    height: 64px;
    background: var(--accent);
    border-color: var(--accent);
}

.custom-cursor.cursor-view .cursor-text,
.custom-cursor.cursor-explore .cursor-text,
.custom-cursor.cursor-drag .cursor-text {
    display: block;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 380px;
}

.toast-item.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-item.toast-success {
    border-left-color: #2e7d32;
}

.toast-item.toast-warning {
    border-left-color: #ed6c02;
}

.toast-close {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.toast-close:hover {
    color: #fff;
}

/* ==========================================================================
   MODAL OVERLAY & DIALOG
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 4, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    width: 100%;
    max-width: 580px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-dialog {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    font-size: 1.8rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--accent);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent);
}

.modal-success-state {
    text-align: center;
    padding: 2rem 0;
}

.success-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(230, 28, 36, 0.1);
    border: 1px solid var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: var(--bg-obsidian);
    border-top: 1px solid var(--border);
    padding: 5rem 0 2rem 0;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand-col p {
    color: var(--text-secondary);
    margin: 1rem 0 1.5rem 0;
    max-width: 340px;
    font-size: 0.95rem;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.8rem;
}

.footer-heading {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1.4rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-links a:hover {
    color: var(--text-secondary);
}
