/* ============================================================
   ARGENTUM CdelU — Pixel-art moderno (dark retro-fantasy)
   Se inyecta en <head> de app/layout.tsx
   ============================================================ */

/* ---------- Paleta ---------- */
:root {
    --cdelu-bg-0: #070b15;
    --cdelu-bg-1: #0c1326;
    --cdelu-bg-2: #14203c;
    --cdelu-panel: #101a30;
    --cdelu-panel-2: #0c1526;
    --cdelu-gold: #d9a93c;
    --cdelu-gold-2: #f5c542;
    --cdelu-gold-3: #ffe9a8;
    --cdelu-steel: #3d7bbf;
    --cdelu-steel-2: #5fb0e8;
    --cdelu-red: #c0392b;
    --cdelu-cream: #ede6d6;
    --cdelu-muted: #8fa3c4;
    --cdelu-line: rgba(217, 169, 60, 0.35);
}

/* ---------- Tipografías pixel ---------- */
.font-pixel-display { font-family: "Press Start 2P", ui-monospace, monospace; }
.font-pixel-body { font-family: "VT323", ui-monospace, monospace; }

/* ---------- Fondo base ---------- */
.cdelu-page {
    position: relative;
    min-height: 100vh;
    color: var(--cdelu-cream);
    background:
        radial-gradient(120% 70% at 50% -10%, rgba(95, 176, 232, 0.10), transparent 55%),
        radial-gradient(90% 60% at 50% 115%, rgba(217, 169, 60, 0.12), transparent 55%),
        linear-gradient(180deg, var(--cdelu-bg-1) 0%, var(--cdelu-bg-0) 60%, #05080f 100%);
    overflow-x: hidden;
}

/* Starfield (canvas a full-bleed, detrás de todo el contenido) */
.cdelu-starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Grid de perspectiva "plano de batalla" en el suelo del hero */
.cdelu-battlegrid {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 220%;
    height: 46%;
    transform: translateX(-50%) perspective(340px) rotateX(64deg);
    transform-origin: center bottom;
    background-image:
        linear-gradient(rgba(95, 176, 232, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 176, 232, 0.16) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(60% 90% at 50% 100%, #000 0%, transparent 78%);
    mask-image: radial-gradient(60% 90% at 50% 100%, #000 0%, transparent 78%);
    animation: cdelu-grid-scroll 6s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes cdelu-grid-scroll {
    from { background-position: 0 0; }
    to { background-position: 0 46px; }
}

/* Scanlines + ruido sutil sobre toda la página */
.cdelu-page::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0px, rgba(0, 0, 0, 0.10) 1px, transparent 1px, transparent 3px);
    opacity: 0.5;
    mix-blend-mode: multiply;
}

/* Glow dorado pulsante detrás del escudo hero */
.cdelu-hero-glow {
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(70vw, 640px);
    height: min(70vw, 640px);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(245, 197, 66, 0.30) 0%, rgba(245, 197, 66, 0.10) 38%, transparent 70%);
    filter: blur(12px);
    animation: cdelu-pulse 4.5s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes cdelu-pulse {
    0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.08); }
}

/* ---------- Bordes pixel "chamfered" (esquinas recortadas) ---------- */
.cdelu-chamfer {
    clip-path: polygon(
        10px 0, calc(100% - 10px) 0, 100% 10px,
        100% calc(100% - 10px), calc(100% - 10px) 100%,
        10px 100%, 0 calc(100% - 10px), 0 10px
    );
}

.cdelu-chamfer-sm {
    clip-path: polygon(
        6px 0, calc(100% - 6px) 0, 100% 6px,
        100% calc(100% - 6px), calc(100% - 6px) 100%,
        6px 100%, 0 calc(100% - 6px), 0 6px
    );
}

/* Botón principal (dorado) con sombra dura pixel */
.cdelu-btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.7rem;
    font-family: "VT323", ui-monospace, monospace;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    color: #1a1205;
    background: linear-gradient(180deg, var(--cdelu-gold-2) 0%, var(--cdelu-gold) 100%);
    border: 2px solid var(--cdelu-gold-3);
    box-shadow:
        0 4px 0 0 #8a6a1f,
        0 6px 14px rgba(0, 0, 0, 0.5);
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
    cursor: pointer;
}
.cdelu-btn-primary:hover {
    filter: brightness(1.08);
    box-shadow:
        0 4px 0 0 #8a6a1f,
        0 8px 22px rgba(245, 197, 66, 0.35);
    transform: translateY(-1px);
}
.cdelu-btn-primary:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 0 #8a6a1f;
}

/* Botón secundario (azul acero outline) */
.cdelu-btn-secondary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    font-family: "VT323", ui-monospace, monospace;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: var(--cdelu-steel-2);
    background: rgba(61, 123, 191, 0.10);
    border: 2px solid var(--cdelu-steel);
    box-shadow: 0 4px 0 0 #1c3a5e;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
    cursor: pointer;
}
.cdelu-btn-secondary:hover {
    background: rgba(61, 123, 191, 0.20);
    transform: translateY(-1px);
    box-shadow: 0 4px 0 0 #1c3a5e, 0 6px 18px rgba(95, 176, 232, 0.25);
}
.cdelu-btn-secondary:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 0 #1c3a5e;
}

/* ---------- Tarjeta / panel ---------- */
.cdelu-panel {
    position: relative;
    background:
        linear-gradient(180deg, rgba(20, 32, 60, 0.72), rgba(10, 18, 34, 0.86));
    border: 2px solid var(--cdelu-line);
    box-shadow: inset 0 1px 0 rgba(255, 233, 168, 0.10), 0 10px 30px rgba(0, 0, 0, 0.45);
}
.cdelu-panel::before {
    /* chapa superior metálica */
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: -2px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--cdelu-gold-2), transparent);
    opacity: 0.7;
}

/* Tile de feature (tarjeta con asset pixel) */
.cdelu-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 1.6rem 1.2rem 1.8rem;
    text-decoration: none;
    color: var(--cdelu-cream);
    background: linear-gradient(180deg, rgba(20, 32, 60, 0.55), rgba(8, 14, 28, 0.8));
    border: 2px solid rgba(217, 169, 60, 0.22);
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}
.cdelu-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, rgba(245, 197, 66, 0.14), transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.cdelu-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 197, 66, 0.6);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 197, 66, 0.18);
}
.cdelu-tile:hover::after { opacity: 1; }

.cdelu-tile-art {
    width: 96px;
    height: 96px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
    transition: transform 0.15s ease;
}
.cdelu-tile:hover .cdelu-tile-art { transform: scale(1.08) translateY(-2px); }

.cdelu-tile-title {
    font-family: "Press Start 2P", ui-monospace, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--cdelu-gold-2);
}
.cdelu-tile-desc {
    font-family: "VT323", ui-monospace, monospace;
    font-size: 1.05rem;
    line-height: 1.1;
    color: var(--cdelu-muted);
    text-align: center;
}

/* ---------- Encabezados de sección ---------- */
.cdelu-eyebrow {
    font-family: "VT323", ui-monospace, monospace;
    font-size: 1rem;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--cdelu-steel-2);
}
.cdelu-section-title {
    font-family: "Press Start 2P", ui-monospace, monospace;
    font-size: clamp(1rem, 2.6vw, 1.6rem);
    line-height: 1.5;
    color: var(--cdelu-cream);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 22px rgba(245, 197, 66, 0.18);
}

/* ---------- Divisor con runa ---------- */
.cdelu-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--cdelu-gold);
}
.cdelu-divider::before,
.cdelu-divider::after {
    content: "";
    height: 2px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--cdelu-line), transparent);
}

/* ---------- Scroll reveal ---------- */
.cdelu-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.cdelu-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Indicador de scroll (hero) ---------- */
.cdelu-scroll-hint {
    position: absolute;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: "VT323", ui-monospace, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.3em;
    color: var(--cdelu-muted);
    text-decoration: none;
    animation: cdelu-bob 1.8s ease-in-out infinite;
}
@keyframes cdelu-bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 6px); }
}

/* ---------- Badge estado "EN LÍNEA" ---------- */
.cdelu-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "VT323", ui-monospace, monospace;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    color: #7ee787;
    border: 1px solid rgba(126, 231, 135, 0.4);
    background: rgba(126, 231, 135, 0.08);
    padding: 0.2rem 0.8rem;
}
.cdelu-status-dot {
    width: 9px;
    height: 9px;
    background: #7ee787;
    box-shadow: 0 0 10px #7ee787;
    animation: cdelu-blink 1.6s steps(2, start) infinite;
}
@keyframes cdelu-blink {
    0%, 60% { opacity: 1; }
    61%, 100% { opacity: 0.35; }
}

/* ---------- Footer ---------- */
.cdelu-footer {
    border-top: 2px solid var(--cdelu-line);
    background: rgba(5, 8, 15, 0.8);
}

/* ---------- Responsive: hero título ---------- */
.cdelu-hero-title {
    font-family: "Press Start 2P", ui-monospace, monospace;
    font-size: clamp(1.4rem, 5.4vw, 3.4rem);
    line-height: 1.35;
    color: var(--cdelu-gold-2);
    text-shadow:
        0 3px 0 #6b4e12,
        0 6px 0 rgba(0, 0, 0, 0.55),
        0 0 34px rgba(245, 197, 66, 0.35);
    letter-spacing: 0.02em;
}
.cdelu-hero-sub {
    font-family: "VT323", ui-monospace, monospace;
    font-size: clamp(1.2rem, 2.6vw, 1.7rem);
    letter-spacing: 0.14em;
    color: var(--cdelu-steel-2);
    text-transform: uppercase;
}

/* Hero art (escudo) */
.cdelu-hero-art {
    width: min(72vw, 360px);
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(245, 197, 66, 0.25));
    animation: cdelu-float 6s ease-in-out infinite;
    z-index: 2;
}
@keyframes cdelu-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Accesibilidad: respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .cdelu-starfield, .cdelu-battlegrid, .cdelu-hero-glow,
    .cdelu-hero-art, .cdelu-scroll-hint, .cdelu-status-dot {
        animation: none !important;
    }
    .cdelu-reveal { opacity: 1; transform: none; transition: none; }
}
