
.hero {
    position: relative;
    width: 100%;
    height: 360px;
    overflow: hidden;
    isolation: isolate;
    background: #0b1d2b;
}

/* Identidad central */

.hero__identity {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: min(90%, 700px);
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    pointer-events: none;
}

.hero__logo {
    margin: 0;
    font-size: clamp(42px, 8vw, 88px);
    font-weight: 900;
    letter-spacing: 3px;
}

.hero__subtitle {
    margin-top: 12px;
    font-size: clamp(12px, 2vw, 19px);
    letter-spacing: 3px;
    font-weight: 600;
}

/* Tiles */

.tile {
    position: absolute;
    z-index: 1;
    width: var(--size);
    height: var(--size);
    border: 2px solid #183447;
    background: #666;
    opacity: 0;
    transform-origin: center;

    animation:
        grow var(--duration) ease-in-out forwards,
        borderCycle 12s linear infinite;
}

/* Fondo blanco y centrado de la imagen */

.tile__image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #666;
    overflow: hidden;
}

.tile__image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;

    opacity: 0.78;
    filter: brightness(0.78) saturate(0.72) contrast(0.92);
}

/* Crecimiento */


/* Reducción */

.tile.shrink {
    animation:
        shrink var(--duration) ease-in-out forwards,
        borderCycle 7s linear infinite;
}

@keyframes grow {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }

    12% {
        opacity: 0.85;
    }

    65% {
        opacity: 0.75;
    }

    85% {
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(1)
                   rotate(var(--rotation));
        opacity: 0;
    }
}

@keyframes shrink {
    0% {
        transform: translate(-50%, -50%) scale(1)
                   rotate(var(--rotation));
        opacity: 0;
    }

    12% {
        opacity: 0.85;
    }

    65% {
        opacity: 0.75;
    }

    85% {
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
}

/* Borde de colores */

@keyframes borderCycle {
    0%   { border-color: #183447; }
    25%  { border-color: #294355; }
    50%  { border-color: #344d5d; }
    75%  { border-color: #20394a; }
    100% { border-color: #183447; }
}

@media (max-width: 700px) {
    .hero {
        min-height: 480px;
    }

    .hero__subtitle {
        letter-spacing: 1.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tile {
        display: none;
    }
}