/* ====================================
   Variables de Marca - El Crujío
   ==================================== */
:root {
    /* Colores Primarios */
    --marron-crujiente: #882A1E;
    --amarillo-crujiente: #FE9902;
    --crema-cremosa: #f7f1e5;
    
    /* Colores Secundarios */
    --negro-carbon: #1c1c1c;
    --rojo-solera: #ec1d2f;
}

/* ====================================
   Reset y Base
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--crema-cremosa);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ====================================
   Container Principal
   ==================================== */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.content {
    text-align: center;
    animation: fadeInUp 1.2s ease-out;
}

/* ====================================
   Logo
   ==================================== */
.logo-wrapper {
    margin-bottom: 3rem;
    animation: crujirPulse 3s ease-in-out infinite;
}

.logo {
    width: 100%;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(28, 28, 28, 0.08));
}

/* ====================================
   Paleta de Colores
   ==================================== */
.color-palette {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.color-box {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    animation: colorReveal 0.6s ease-out backwards;
}

.color-box:nth-child(1) {
    animation-delay: 0.3s;
}

.color-box:nth-child(2) {
    animation-delay: 0.5s;
}

.color-box:nth-child(3) {
    animation-delay: 0.7s;
}

.color-box:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.marron {
    background-color: var(--marron-crujiente);
}

.amarillo {
    background-color: var(--amarillo-crujiente);
}

.crema {
    background-color: var(--crema-cremosa);
    border: 2px solid var(--marron-crujiente);
}

/* ====================================
   Créditos
   ==================================== */
.credits {
    animation: fadeIn 1.5s ease-out 1s backwards;
}

.credits p {
    font-size: 1rem;
    color: var(--negro-carbon);
    font-weight: 400;
    line-height: 1.6;
}

.credits a {
    color: var(--marron-crujiente);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.credits a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--amarillo-crujiente);
    transition: width 0.3s ease;
}

.credits a:hover {
    color: var(--rojo-solera);
}

.credits a:hover::after {
    width: 100%;
}

/* ====================================
   Decoración de Fondo
   ==================================== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: 
        radial-gradient(circle at 20% 30%, var(--marron-crujiente) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, var(--amarillo-crujiente) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, var(--marron-crujiente) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 100px 100px;
    animation: bgMove 20s linear infinite;
}

/* ====================================
   Animaciones
   ==================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes crujirPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes colorReveal {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes bgMove {
    from {
        background-position: 0 0, 0 0, 0 0;
    }
    to {
        background-position: 50px 50px, -80px -80px, 100px 100px;
    }
}

/* ====================================
   Responsive
   ==================================== */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    .logo {
        max-width: 450px;
    }
    
    .color-box {
        width: 60px;
        height: 60px;
    }
    
    .credits p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 320px;
    }
    
    .color-palette {
        gap: 1rem;
    }
    
    .color-box {
        width: 50px;
        height: 50px;
    }
}

/* ====================================
   Prefers Reduced Motion
   ==================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}