/* ENKI — Cosmic Profile (v64) */

:root {
    --gold: #D4AF37;
    --gold-dim: #AA8C2C;
    --gold-glow: rgba(212, 175, 55, 0.45);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.14);
}

/* 1. BASE */
html { background-color: #000; height: 100%; }
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Montserrat', sans-serif;
    color: #f0f0f0;
    overflow-x: hidden;
    background: transparent !important;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    text-size-adjust: 100%;
}
body::before, body::after { content: none !important; display: none !important; }

/* 2. FONDO */
#universe-bg {
    position: fixed;
    top: -10vh;
    left: 0;
    width: 100%;
    height: 120vh;
    z-index: -100;
    background: radial-gradient(ellipse 80% 60% at 50% 35%, #1a0524 0%, #08020a 45%, #000 90%);
}
#universe-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 40%, rgba(75, 0, 130, 0.1), transparent 55%),
        radial-gradient(circle at 25% 75%, rgba(87, 10, 87, 0.08), transparent 50%);
    opacity: 0.6;
    animation: nebulaMove 32s infinite alternate ease-in-out;
    will-change: opacity;
}
@keyframes nebulaMove {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.7; }
}

/* 3. ESTRELLAS */
#stars-container {
    position: fixed;
    top: -10vh;
    left: 0;
    width: 100%;
    height: 120vh;
    z-index: -50;
    pointer-events: none;
}
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0.4;
    animation: twinkle infinite ease-in-out;
    will-change: opacity;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.75; }
}
.shooting-star {
    position: absolute;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
    opacity: 0;
    transform: rotate(-45deg);
    animation: shoot 4s ease-in-out forwards;
}
@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 0.7; }
    25% { transform: translateX(-200px) translateY(200px) rotate(-45deg); opacity: 0; }
    100% { opacity: 0; }
}

/* 4. LAYOUT */
.glass-container {
    position: relative;
    width: min(90%, 420px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding:
        max(1rem, env(safe-area-inset-top))
        0
        max(1rem, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

/* 5. LOGO + ÓRBITA SVG */
.logo-halo {
    --logo-size: 165px;
    --halo-size: 220px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: var(--halo-size);
    height: var(--halo-size);
    margin: 3cm 0 3.5rem;
    contain: layout style;
    filter: drop-shadow(0 0 18px var(--gold-glow));
}
html.perf-lite .logo-halo {
    filter: none;
}
.logo-halo > * { grid-area: 1 / 1; }

.orbit-svg {
    width: var(--halo-size);
    height: var(--halo-size);
    pointer-events: none;
    overflow: visible;
    contain: strict;
    transform: translateZ(0);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.35));
}

.orbit-halo {
    transform-origin: 110px 110px;
    transform-box: view-box;
    animation: orbitHaloBreath 3.2s ease-in-out infinite;
    will-change: opacity;
}
@keyframes orbitHaloBreath {
    0%, 100% { opacity: 0.18; }
    50% { opacity: 0.42; }
}

.orbit-ring {
    transform-origin: 110px 110px;
    transform-box: view-box;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}
.orbit-ring--outer { animation-name: orbitCW; animation-duration: 8s; }
.orbit-ring--mid { animation-name: orbitCCW; animation-duration: 11s; }
.orbit-ring--inner { animation-name: orbitCCW; animation-duration: 5.5s; }

.orbit-dot--bright {
    filter: drop-shadow(0 0 3px rgba(255, 248, 231, 0.9));
}

@keyframes orbitCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes orbitCCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.logo-inner {
    width: var(--logo-size);
    height: var(--logo-size);
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow:
        inset 0 0 28px rgba(0, 0, 0, 0.92),
        0 0 32px rgba(212, 175, 55, 0.12);
    background: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.artist-logo {
    width: 135%;
    height: 135%;
    object-fit: cover;
    transform: translateY(12px);
    padding: 0;
    border: none;
    box-shadow: none;
}

/* 6. ENLACES */
.links-grid {
    display: flex;
    flex-direction: column;
    gap: 13px;
    width: 100%;
}

@keyframes softShine {
    0% { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateX(220%) skewX(-12deg); opacity: 0; }
}
@keyframes softPulse {
    0%, 100% { border-color: var(--glass-border); }
    50% { border-color: rgba(212, 175, 55, 0.28); }
}

.link-btn {
    position: relative;
    overflow: hidden;
    background: var(--glass) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    min-height: 48px;
    padding: 16px 20px;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    animation: softPulse 8s infinite ease-in-out;
}

.link-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.06) 55%,
        transparent 65%
    );
    transform: translateX(-120%) skewX(-12deg);
    animation: softShine 7s infinite ease-in-out;
    pointer-events: none;
}

.link-btn:hover,
.link-btn:focus-visible {
    background: rgba(212, 175, 55, 0.08) !important;
    border-color: rgba(212, 175, 55, 0.55);
    color: #fff;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
    outline: none;
}
.link-btn i {
    font-size: 1.15rem;
    color: var(--gold);
    opacity: 0.95;
}

/* 7. FOOTER */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.footer-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}
.copyright {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* 8. EFECTOS */
.click-angel-pro {
    position: fixed;
    pointer-events: none;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.85rem;
    z-index: 9999;
    text-shadow: 0 0 15px var(--gold-glow), 0 0 28px rgba(212, 175, 55, 0.45);
    animation: floatUpFade 1.5s ease-out forwards;
}
@keyframes floatUpFade {
    0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
    20% { opacity: 1; transform: translate(-50%, -28px) scale(1.15); }
    100% { opacity: 0; transform: translate(-50%, -110px) scale(1); }
}

#cursor-tail {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 9990;
}
.trail-particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    box-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 0 10px rgba(255, 255, 255, 0.45);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: tailFade 0.55s ease-out forwards;
}
@keyframes tailFade {
    0% { opacity: 0.95; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
}

.dust-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    animation: floatDust linear forwards;
}
@keyframes floatDust {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 0.5; }
    85% { opacity: 0.35; }
    100% { transform: translateY(-80px); opacity: 0; }
}

/* MÓVIL + modo rendimiento */
@media (max-width: 600px) {
    .glass-container {
        width: min(92%, 400px);
        gap: 1.75rem;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
    .logo-halo {
        --halo-size: 200px;
        --logo-size: 150px;
        margin-top: max(2rem, 2.5cm);
        margin-bottom: 2.5rem;
    }
    .links-grid { gap: 11px; }
    .link-btn {
        min-height: 52px;
        padding: 16px 18px;
        font-size: 0.8rem;
        letter-spacing: 1.2px;
    }
    .link-btn i { font-size: 1.25rem; }
}

html.perf-lite #universe-bg::after {
    animation: none;
    opacity: 0.55;
}
html.perf-lite .orbit-svg {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.25));
}
html.perf-lite .orbit-halo {
    animation: orbitHaloBreath 4.5s ease-in-out infinite;
    opacity: 0.25;
}
html.perf-lite .orbit-ring--outer { animation-duration: 10s; }
html.perf-lite .orbit-ring--mid { animation-duration: 14s; }
html.perf-lite .orbit-ring--inner { animation-duration: 7.5s; }
html.perf-lite .orbit-dot--sm { display: none; }
html.perf-lite .orbit-spark { opacity: 0.35; }
html.perf-lite .star { animation: none; opacity: 0.45; }
html.perf-lite .link-btn { animation: none; }
html.perf-lite .link-btn::before { display: none; }
html.perf-lite .link-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.05) !important;
}
html.perf-lite .logo-halo { filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.2)); }
html.perf-lite .shooting-star,
html.perf-lite .dust-particle { display: none !important; }

html.perf-lite.paused *,
html.paused .orbit-ring,
html.paused .orbit-halo {
    animation-play-state: paused !important;
}

@media (hover: none) {
    #cursor-tail { display: none; }
}

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