/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f5f2ed;
    --bg-secondary: #eae6df;
    --text-primary: #2c2c2c;
    --text-secondary: #6b6b6b;
    --accent: #8a8a8a;
    --accent-hover: #4a4a4a;
    --border-light: #d4d0c8;
    --shadow-soft: rgba(0, 0, 0, 0.06);
    --font-main: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', 'Courier', monospace;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* ============================================
   TEXTURA DE GRANO (NOISE OVERLAY)
   ============================================ */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER / PRESENTACIÓN
   ============================================ */
.header {
    text-align: center;
    padding: 4rem 1rem 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 300;
}

.divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 2rem auto 0;
    opacity: 0.4;
}

/* ============================================
   GRID DE BOTONES
   ============================================ */
.grid-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    padding: 2rem 0 4rem;
    flex: 1;
}

/* ============================================
   CADA BOTÓN
   ============================================ */
.grid-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 2rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
}

/* Textura interna sutil en cada botón */
.grid-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 128px 128px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.grid-btn:hover::before {
    opacity: 1;
}

/* Número central */
.btn-number {
    font-family: var(--font-mono);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.35;
    transition: all 0.35s ease;
    line-height: 1;
    margin-bottom: 0.8rem;
}

/* Etiqueta de texto */
.btn-label {
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    text-align: center;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.5;
    transition: color 0.35s ease;
}

/* Hover effects */
.grid-btn:hover {
    background: #fff;
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow:
        0 8px 30px var(--shadow-soft),
        0 2px 8px var(--shadow-soft);
}

.grid-btn:hover .btn-number {
    opacity: 0.7;
    color: var(--accent-hover);
}

.grid-btn:hover .btn-label {
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.footer-copyright span {
    font-weight: 500;
    color: var(--text-primary);
}

.footer-ia {
    font-size: 0.8rem;
    color: var(--accent);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.footer-studio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.studio-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    font-weight: 400;
}

/* ============================================
   ESTILOS PARA EL LOGO PNG
   ============================================ */

.footer-logo {
    /* Tamaño máximo para que no sea gigante en pantallas grandes */
    max-width: 350px; 
    
    /* Ocupa el 100% del ancho disponible hasta llegar al max-width */
    width: 100%; 
    
    /* Altura automática para mantener la proporción original */
    height: auto; 
    
    /* Centrado horizontal */
    display: block;
    margin: 0.5rem auto 0;
    
    /* Por si la imagen tiene un fondo negro y quieres que sea transparente */
    /* (Descomenta la siguiente línea si tu PNG tiene fondo negro sólido) */
    /* mix-blend-mode: screen; */ 
}

/* Ajuste para móviles muy pequeños */
@media (max-width: 480px) {
    .footer-logo {
        max-width: 260px; /* El logo se hace un poco más pequeño en móviles */
    }
}


/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: 2 columnas */
@media (max-width: 1024px) {
    .grid-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .grid-btn {
        min-height: 160px;
        padding: 1.5rem 1rem;
    }

    .btn-number {
        font-size: 2.4rem;
    }
}

/* Mólarge: 2 columnas */
@media (max-width: 768px) {
    .grid-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 1.5rem 0 3rem;
    }

    .grid-btn {
        min-height: 140px;
        padding: 1.2rem 0.8rem;
        border-radius: 3px;
    }

    .btn-number {
        font-size: 2rem;
    }

    .btn-label {
        font-size: 0.75rem;
    }

    .header {
        padding: 3rem 1rem 2rem;
    }
}

/* Móvil pequeño: 1 columna */
@media (max-width: 480px) {
    .grid-section {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .grid-btn {
        min-height: 120px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 1rem 1.2rem;
        gap: 1rem;
    }

    .btn-number {
        font-size: 1.8rem;
        margin-bottom: 0;
        opacity: 0.25;
    }

    .btn-label {
        font-size: 0.85rem;
        text-align: left;
    }

    .container {
        padding: 0 1rem;
    }
}
