/**
 * Torres Motorsport Engineering - Critical CSS
 * Estilos críticos para First Contentful Paint más rápido
 */

/* Reset crítico */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #0a0e17;
    color: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Loading spinner crítico */
#root:empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0a0e17;
}

#root:empty::before {
    content: 'Torres Motorsport';
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #00d4ff;
    position: absolute;
    margin-bottom: 80px;
    opacity: 0.8;
}

#root:empty::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #1e293b;
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Prevenir FOUC */
.dark {
    color-scheme: dark;
}
