/* Importación de fuentes desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Forum&family=Share+Tech+Mono&family=Inter:wght@300;400;600&display=swap');

:root {
    /* Fondos y Estructura Dominante (Obsidiana y Vacío) */
    --bg-main: #000000;            /* Negro absoluto */
    --bg-surface: #111111;         /* Gris Obsidiana puro para las tarjetas */
    --border-subtle: #222222;      /* Borde fino gris oscuro */
    
    /* Textos */
    --text-white: #FFFFFF;         /* Blanco Puro para el logotipo e itztI */
    --text-muted: #8E989C;         /* Gris mineral desaturado para lectura cómoda */
    
    /* Contrastes */
    --color-crystal: #00D2FF;      /* Azul Cristal para energía, subtítulos y hovers */
    --color-expedition: #E6A817;   /* Dorado Ámbar para badges, códigos o alertas */
    --color-breathe: #007FAE;      /* Resplandor imagen principal (Azul Cristal) */
    --color-breathe-jade: #00A86B; /* Destello único de cierre de ciclo (Verde Jade) */
}

/* Estilos Globales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tipografías con Identidad */
h1, h2, h3, .font-ancient {
    font-family: 'Forum', serif;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.font-tech {
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.1em;
}

/* Contenedor Principal */
.wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    position: relative;
    z-index: 2;
}

/* --- SECCIÓN HERO (Encabezado principal) --- */
header {
    text-align: center;
    padding: 0 0 20px 0;
    position: relative;
}

.logo-container {
    display: grid;
    place-items: center;
    width: 242.46px;
    height: 242.46px;
    margin: 0 auto 30px;
    perspective: 900px;
}

.logo-img {
    display: block;
    width: 187.36px;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    animation: logo-spin 18.980s linear infinite,
               logo-glow-xiuhmolpilli 18.980s ease-in-out infinite;
    will-change: transform, filter;
}

@keyframes logo-spin {
    from {
        transform: translateZ(8px) rotateZ(0deg);
    }
    to {
        transform: translateZ(8px) rotateZ(360deg);
    }
}

/* Tres Tlalpilli azules y el cuarto, verde jade, como Fuego Nuevo. */
@keyframes logo-glow-xiuhmolpilli {
    0%, 25%, 50%, 75%, 100% {
        filter: drop-shadow(0 0 0 transparent);
    }
    12.5% {
        filter: drop-shadow(0 0 12px var(--color-breathe))
                drop-shadow(0 0 28px var(--color-breathe));
    }
    37.5% {
        filter: drop-shadow(0 0 12px var(--color-breathe))
                drop-shadow(0 0 28px var(--color-breathe));
    }
    62.5% {
        filter: drop-shadow(0 0 12px var(--color-breathe))
                drop-shadow(0 0 28px var(--color-breathe));
    }
    87.513% {
        filter: drop-shadow(0 0 14px #7cff9b)
                drop-shadow(0 0 32px var(--color-breathe-jade));
    }
}

@keyframes title-top-reflection {
    0%, 25%, 50%, 75%, 100% {
        filter: drop-shadow(0 -1px 2px rgba(255, 255, 255, 0.12))
                drop-shadow(0 -2px 4px rgba(0, 210, 255, 0.18));
    }
    12.5%, 37.5%, 62.5% {
        filter: drop-shadow(0 -1px 3px rgba(255, 255, 255, 0.72))
                drop-shadow(0 -2px 6px rgba(0, 210, 255, 0.62));
    }
    87.513% {
        filter: drop-shadow(0 -1px 3px rgba(255, 255, 255, 0.92))
                drop-shadow(0 -2px 6px rgba(124, 255, 155, 0.72))
                drop-shadow(0 -3px 8px rgba(0, 168, 107, 0.48));
    }
}

@keyframes title-floor-reflection {
    0%, 25%, 50%, 75%, 100% {
        opacity: 0.14;
        text-shadow: 0 5px 4px rgba(0, 127, 174, 0.42);
    }
    12.5%, 37.5%, 62.5% {
        opacity: 0.38;
        text-shadow: 0 6px 7px rgba(0, 210, 255, 0.82);
    }
    87.513% {
        opacity: 0.46;
        text-shadow: 0 6px 8px rgba(124, 255, 155, 0.88);
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-img {
        animation: none;
        will-change: auto;
    }

    header h1 {
        animation: none;
    }

    header h1::before,
    header h1::after {
        animation: none;
    }
}

header h1 {
    font-size: 2.6rem;
    font-weight: bold;
    position: relative;
    z-index: 2;
    margin-top: -38px;
    margin-bottom: 10px;
    line-height: 1;
}

header h1::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    clip-path: inset(0 0 93% 0);
    color: #dffaff;
    mix-blend-mode: screen;
    pointer-events: none;
    animation: title-top-reflection 18.980s ease-in-out infinite;
}

header h1::after {
    content: attr(data-text);
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    width: 100%;
    color: transparent;
    transform: scaleY(-0.12);
    transform-origin: top;
    filter: blur(1px);
    opacity: 0.14;
    pointer-events: none;
    animation: title-floor-reflection 18.980s ease-in-out infinite;
}

.tagline {
    color: var(--color-crystal);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.divider {
    width: 80px;
    height: 1px;
    background-color: var(--color-crystal);
    margin: 25px auto;
    opacity: 0.6;
}

/* --- SECCIONES DE CONTENIDO DE PRUEBA --- */
.grid-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 20px;
}

.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 35px;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 210, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card h2 {
    color: var(--color-crystal);
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

/* Componentes Técnicos (Badges y Enlaces) */
.badge-tech {
    display: inline-block;
    color: var(--color-expedition);
    border: 1px solid rgba(230, 168, 23, 0.3);
    background-color: rgba(230, 168, 23, 0.03);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.link-action {
    color: var(--color-crystal);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    display: inline-block;
    border-bottom: 1px dashed transparent;
}

.link-action:hover {
    opacity: 0.8;
    border-bottom-color: var(--color-crystal);
}

footer {
    text-align: center;
    margin-top: 80px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    color: rgba(192, 168, 142, 0.7);
    font-size: 0.85rem;
}

/* --- Ajustes específicos para el Monolito de Lore Único --- */
.card.monolith {
    text-align: left;
    max-width: 700px;
    margin: 0 auto; /* Centra la tarjeta si el grid crece */
}

.card.monolith h2 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
}

.card.monolith .badge-tech {
    order: -1;
    margin-left: auto;
}

.card.monolith .title-text {
    margin-right: 0;
}

.lore-text {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-top: 20px;
    margin-bottom: 20px;
}

.status-frequency {
    color: var(--color-expedition);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    margin-top: 30px;
}

/* --- Estilos para iconos de redes sociales en el footer --- */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 1.35rem;
    text-decoration: none;
    background: transparent;
    transition: color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.footer-social a:hover,
.footer-social a:focus-visible {
    color: var(--text-white);
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0,210,255,0.12);
}

@media (max-width: 480px) {
    .footer-social { gap: 8px; }
    .footer-social a { width: 32px; height: 32px; }
}