/* ═══════════════════════════════════════════════════════════════════════════
   VALIS - Intro CSS v1.1
   Flujo: Panel Portal → Expansión Cielo → Explicación I Ching
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('modules/variables.css');
@import url('base/animations.css');

/* Animación de fade in para el logo */
@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* --- Variables locales del intro --- */
:root {
    --panel-width: 920px;
    --panel-height: 575px;
    --charcoal: #2a2a2a;
    --charcoal-dark: #1a1a1a;
    --charcoal-deeper: #0a0a0a;
    --gray-light: #d0d0d0;
    --gray-glow: rgba(150, 150, 150, 0.3);
    --blur-amount: 15px;
    --reveal-radius: 200px;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO GLOBAL ÚNICO - Optimización de ~700KB
   ═══════════════════════════════════════════════════════════════════════════ */

.global-background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -10;
    opacity: 0.7;
}

/* Overlay para fases que necesitan oscurecer el video */
.background-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

/* Video passthrough para portal (clip visual dentro del panel) */
.video-passthrough {
    position: absolute;
    inset: 0;
    background: transparent;
    /* El video global se ve a través */
}

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

body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal) 100%);
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FASES
   ═══════════════════════════════════════════════════════════════════════════ */

.phase {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s var(--transition-smooth);
}

.phase.active {
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FASE 1: PORTAL (Panel original con nubes)
   ═══════════════════════════════════════════════════════════════════════════ */

#portal-phase {
    background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal) 100%);
}

#portal-panel {
    position: relative;
    width: var(--panel-width);
    height: var(--panel-height);
    max-width: 88vw;
    max-height: 72vh;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.8s var(--transition-smooth), 
                opacity 0.5s ease;
}

#portal-panel:hover {
    transform: scale(1.01);
}

#portal-panel:active {
    opacity: 0.95;
}

/* Logo dentro del panel - visible inicialmente */
.portal-logo {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20; /* Más alto que las capas del video */
    opacity: 0;
    animation: logoFadeIn 1.5s ease forwards 0.5s;
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none; /* Permitir clicks a través del logo */
}

.portal-logo.hiding {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
}

.portal-logo img {
    height: clamp(70px, 14vw, 140px);
    width: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4))
            drop-shadow(0 0 40px rgba(255, 255, 255, 0.2));
    animation: logoGlow 3s ease-in-out infinite;
}

/* Logo dentro del panel - LEGACY (mantener compatibilidad) */
#portal-phase .logo-container {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 0;
    animation: logoFadeIn 1.5s ease forwards 0.5s;
}



#portal-phase .logo {
    height: clamp(70px, 14vw, 140px);
    width: auto;
    filter: drop-shadow(0 0 15px var(--gray-glow))
            drop-shadow(0 0 30px var(--gray-glow));
    animation: logoGlow 3s ease-in-out infinite;
}



/* Capas del panel */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease;
}

/* Capa de Nubes */
.clouds-layer {
    object-fit: cover;
    filter: blur(var(--blur-amount)) brightness(1.1) grayscale(1);
    z-index: 2;
    opacity: 1;
    transition: all 0.4s ease;
}

/* Logo SIEMPRE sobre las nubes */
#portal-panel .portal-logo {
    z-index: 100 !important;
    position: absolute !important;
    pointer-events: none !important;
}

#portal-panel:hover .clouds-layer {
    filter: blur(10px) brightness(1.15) grayscale(1);
}

/* Capa de Glitch (Inferior) */
.glitch-layer {
    background-image: url('../assets/matrix_minimal.png');
    background-size: 100%;
    background-position: center;
    filter: invert(1) brightness(1.5) contrast(1.8) grayscale(0.6);
    z-index: 1;
    opacity: 0;
    animation: glitchScroll 25s linear infinite;
}

#portal-panel:hover .glitch-layer {
    opacity: 0.08;
}



/* Capa de Glitch Revelada (Spotlight) */
.glitch-revealed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/matrix_minimal.png');
    background-size: 100%;
    background-position: center;
    filter: invert(1) brightness(0.6) contrast(1.1) grayscale(0.8);
    z-index: 4;
    opacity: 0;
    animation: glitchScroll 25s linear infinite;
    -webkit-mask-image: radial-gradient(
        circle var(--reveal-radius) at var(--mouse-x, 50%) var(--mouse-y, 50%),
        black 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 60%, transparent 100%
    );
    mask-image: radial-gradient(
        circle var(--reveal-radius) at var(--mouse-x, 50%) var(--mouse-y, 50%),
        black 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 60%, transparent 100%
    );
    transition: opacity 0.3s ease;
}

#portal-panel:hover .glitch-revealed {
    opacity: 0.25;
}

/* Texto informativo */
.info-text {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(40, 40, 40, 0.85);
    font-size: clamp(12px, 2.2vw, 15px);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: lowercase;
    z-index: 5;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.6s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

#portal-panel:hover .info-text {
    opacity: 0;
}

/* Animación de expansión del panel */
#portal-panel.expanding {
    transform: scale(3);
    opacity: 0;
}

#portal-panel.expanding .clouds-layer {
    filter: blur(5px) brightness(1.5) grayscale(1);
}

#portal-panel.expanding .logo-container,
#portal-panel.expanding .info-text,
#portal-panel.expanding .glitch-layer,
#portal-panel.expanding .glitch-revealed {
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FASE 2: EXPANSIÓN
   ═══════════════════════════════════════════════════════════════════════════ */

#expansion-phase {
    background: var(--charcoal-deeper);
}

.expansion-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) grayscale(1) brightness(1.2);
    opacity: 0;
    transform: scale(1.1);
    animation: expansionReveal 2s ease forwards;
}



.expansion-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(10,10,10,0.5) 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FASE 3: EXPLICACIÓN
   ═══════════════════════════════════════════════════════════════════════════ */

#explanation-phase {
    background: var(--charcoal-deeper);
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) grayscale(1) brightness(0.9);
    opacity: 0.5;
    z-index: 1;
    transition: filter 1s, opacity 1s;
}

.glitch-layer-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/matrix_minimal.png');
    background-size: 200%;
    filter: invert(1) brightness(0.4) contrast(1.2) grayscale(0.8);
    opacity: 0.03;
    z-index: 2;
    animation: glitchScroll 40s linear infinite;
    pointer-events: none;
}

.explanation-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 700px;
    height: 80vh;
    padding: 40px 30px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.explanation-container::-webkit-scrollbar {
    display: none;
}

.explanation-section {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    scroll-snap-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.explanation-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.8;
    animation: iconFloat 4s ease-in-out infinite;
}



.section-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: lowercase;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.95);
}

.section-text {
    font-size: clamp(15px, 2.5vw, 18px);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    max-width: 550px;
    margin-bottom: 24px;
}

.section-text em {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.section-text strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.section-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.detail-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
}

.detail-text {
    font-size: 14px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
}

/* Trigramas */
.trigram-display {
    display: flex;
    gap: 60px;
    margin-top: 20px;
}

.trigram-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.trigram-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trigram-lines span {
    width: 50px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
}

.trigram-lines.yin span {
    position: relative;
}

.trigram-lines.yin span::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 10px;
    height: 100%;
    background: var(--charcoal-deeper);
    transform: translateX(-50%);
}

.trigram-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

/* Quote */
.section-quote {
    font-size: 15px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55);
    padding: 20px 30px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    max-width: 450px;
}

/* Methods preview */
.methods-preview {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.method-preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: all 0.3s ease;
    min-width: 200px;
}

.method-preview-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.method-preview-card.premium {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.method-icon {
    font-size: 24px;
    letter-spacing: 4px;
    opacity: 0.8;
}

.method-name {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
}

.method-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.method-token {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 4px;
}

/* CTA Section */
.cta-section {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    scroll-snap-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cta-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-text {
    font-size: clamp(18px, 3vw, 24px);
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    text-transform: lowercase;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--valis-radius-sm);
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-family: var(--valis-font-ui);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--valis-accent);
    border-color: var(--valis-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cta-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.cta-button:hover .cta-icon {
    transform: translateX(5px);
}

.cta-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
}

.cta-note a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cta-note a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVEGACIÓN
   ═══════════════════════════════════════════════════════════════════════════ */

.section-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body[data-phase="explanation"] .section-nav {
    opacity: 1;
    pointer-events: auto;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.nav-dot.active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* Skip to action */
.skip-to-action {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body[data-phase="explanation"] .skip-to-action {
    opacity: 1;
    pointer-events: auto;
}

.skip-link {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.skip-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    #portal-panel {
        max-width: 92vw;
        max-height: 74vh;
    }
}

@media (max-width: 768px) {
    :root {
        --blur-amount: 10px;
        --reveal-radius: 150px;
    }
    
    #portal-panel {
        max-width: 94vw;
        max-height: 76vh;
    }

    .info-text {
        bottom: 22px;
    }

    .explanation-container {
        padding: 30px 20px;
    }

    .section-nav {
        right: 15px;
    }

    .skip-to-action {
        right: 15px;
        bottom: 20px;
    }

    .trigram-display {
        gap: 40px;
    }

    .methods-preview {
        flex-direction: column;
    }

    .method-preview-card {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    #portal-panel {
        max-width: 96vw;
        max-height: 78vh;
    }

    .section-icon {
        font-size: 36px;
    }

    .cta-button {
        padding: 16px 30px;
        font-size: 13px;
    }

    .section-nav {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

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

.cta-button:focus,
.nav-dot:focus,
.skip-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FASE 2: REVELACIÓN - Frases secuenciales bajo logo centrado
   ═══════════════════════════════════════════════════════════════════════════ */

#revelation-phase {
    background: #000;
}

#revelation-phase .background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

#revelation-phase .revelation-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, 
        rgba(0,0,0,0.3) 0%, 
        rgba(0,0,0,0.7) 100%);
    pointer-events: none;
}

.revelation-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    min-height: 100vh;
}

/* Logo centrado - AUMENTADO AL DOBLE (reemplaza "yo prefiero otros nombres") */
.revelation-logo {
    margin-bottom: 60px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s ease, transform 1s ease;
}

.revelation-logo.visible {
    opacity: 1;
    transform: scale(1);
}

.revelation-logo img {
    width: 320px;  /* AUMENTADO: de 160px a 320px (el doble) */
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 4px 30px rgba(0,0,0,0.5));
}

/* Frase que cambia */
.revelation-phrase {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 300;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    max-width: 520px;
    min-height: 60px;
    
    /* Transición suave */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease, transform 1s ease;
    
    /* Sombra para legibilidad */
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.revelation-phrase.visible {
    opacity: 1;
    transform: translateY(0);
}

.revelation-phrase.fading {
    opacity: 0;
    transform: translateY(-10px);
}

/* Skip link */
.revelation-skip {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.revelation-skip .skip-link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    letter-spacing: 1px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.revelation-skip .skip-link:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .revelation-logo img {
        width: 260px;  /* AUMENTADO: de 130px a 260px */
    }
    
    .revelation-phrase {
        font-size: 18px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .revelation-logo img {
        width: 220px;  /* AUMENTADO: de 110px a 220px */
    }
    
    .revelation-logo {
        margin-bottom: 40px;
    }
    
    .revelation-phrase {
        font-size: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FASE 3: IDENTIDAD - Selector de tratamiento
   ═══════════════════════════════════════════════════════════════════════════ */

#identity-phase {
    background: #000;
}

#identity-phase .background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: blur(8px) grayscale(1) brightness(1.1);
}

.identity-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.identity-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    z-index: 10;
}

/* Logo en fase de identidad */
.identity-logo {
    margin-bottom: 0.5rem;
}

.identity-logo img {
    width: 160px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}

/* Pregunta */
.identity-question {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.03em;
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Sistema de órbita */
.orbit-system {
    position: relative;
    width: 380px;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Etiquetas orbitando */
.orbit-label {
    position: absolute;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.orbit-label-top {
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
}

.orbit-label-left {
    bottom: 20%;
    left: 12%;
}

.orbit-label-right {
    bottom: 20%;
    right: 12%;
}

/* Ocultar labels en modo input */
.orbit-system.mode-input .orbit-label {
    opacity: 0;
    transform: scale(0.7);
}

/* SVG Trinity Ring */
.trinity-ring {
    width: 280px;
    height: 280px;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1), 
                opacity 0.8s ease;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.15));
    cursor: pointer;
}

/* Trinity Ring se desvanece en modo input */
.orbit-system.mode-input .trinity-ring {
    opacity: 0;
    pointer-events: none;
}

/* Sectores */
.sector-path {
    fill: transparent;
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 1.2;
    transition: all 0.4s ease;
    cursor: pointer;
}

.sector-path:hover {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.8;
    fill: rgba(255, 255, 255, 0.05);
}

/* Estado bloqueado (tras selección) */
.orbit-system.locked .sector-path {
    stroke-opacity: 0.15;
    pointer-events: none;
}

.orbit-system.locked .sector-path.active {
    stroke-opacity: 1;
    fill: rgba(255, 255, 255, 0.85);
    stroke: white;
    stroke-width: 1.5;
    filter: url(#glow);
    pointer-events: none;
}

/* Formulario central */
.core-form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: 180px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s ease 0.2s;
}

.orbit-system.mode-input .core-form {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

/* Género elegido */
.chosen-gender {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Inputs */
.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 4px;
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.form-input:focus {
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

.form-input-age {
    width: 70px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.1rem;
}

/* Ocultar spinners del input number */
.form-input-age::-webkit-outer-spin-button,
.form-input-age::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.form-input-age[type="number"] {
    -moz-appearance: textfield;
}

/* Botón submit */
.submit-btn {
    margin-top: 0.5rem;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.submit-btn.visible {
    opacity: 1;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.submit-btn:active {
    transform: scale(0.95);
}

/* Link back */
.back-link {
    margin-top: 0.5rem;
    background: none;
    border: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.back-link:hover {
    color: rgba(255, 255, 255, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

/* Transición de salida */
body.transitioning {
    animation: fadeOutBody 0.5s ease forwards;
}



/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - Fase Identidad
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .orbit-system {
        width: 320px;
        height: 320px;
    }
    
    .trinity-ring {
        width: 240px;
        height: 240px;
    }
    
    .identity-logo img {
        width: 120px;
    }
    
    .identity-question {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .orbit-label {
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKIP INTRO - Para usuarios recurrentes
   ═══════════════════════════════════════════════════════════════════════════ */

.skip-intro-btn {
    position: fixed;
    bottom: var(--valis-space-6, 24px);
    right: var(--valis-space-6, 24px);
    display: flex;
    align-items: center;
    gap: var(--valis-space-2, 8px);
    padding: var(--valis-space-3, 12px) var(--valis-space-5, 20px);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--valis-font-ui, 'Inter', sans-serif);
    font-size: var(--valis-text-sm, 0.8rem);
    font-weight: 400;
    letter-spacing: var(--valis-tracking-wide, 0.02em);
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: 
        opacity 0.4s ease,
        transform 0.4s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.skip-intro-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.skip-intro-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skip-intro-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.skip-intro-text {
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
}

.skip-intro-name {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.skip-intro-arrow {
    margin-left: var(--valis-space-1, 4px);
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.skip-intro-btn:hover .skip-intro-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* Ocultar en fases posteriores a portal */
body[data-phase="revelation"] .skip-intro-btn,
body[data-phase="identity"] .skip-intro-btn {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Mobile */
@media (max-width: 480px) {
    .skip-intro-btn {
        bottom: var(--valis-space-4, 16px);
        right: var(--valis-space-4, 16px);
        padding: var(--valis-space-2, 8px) var(--valis-space-4, 16px);
        font-size: var(--valis-text-xs, 0.64rem);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOGGLE DE IDIOMA (v3.2)
   ═══════════════════════════════════════════════════════════════════════════ */

.lang-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--valis-font-sans, 'Inter', sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOTÓN "¿QUÉ ES VALIS?" (v3.2)
   ═══════════════════════════════════════════════════════════════════════════ */

.what-is-valis-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--valis-font-sans, 'Inter', sans-serif);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.what-is-valis-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL "¿QUÉ ES VALIS?" (v3.2)
   ═══════════════════════════════════════════════════════════════════════════ */

.valis-about-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.valis-about-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.valis-about-box {
    background: white;
    max-width: 480px;
    width: 100%;
    padding: 40px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.valis-about-overlay.visible .valis-about-box {
    transform: translateY(0) scale(1);
}

.valis-about-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.valis-about-close:hover {
    color: rgba(0, 0, 0, 0.8);
}

.valis-about-title {
    font-family: var(--valis-font-serif, 'Cormorant Garamond', serif);
    font-size: 1.8rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.valis-about-subtitle {
    font-family: var(--valis-font-sans, 'Inter', sans-serif);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    margin: 0 0 24px 0;
}

.valis-about-text {
    font-family: var(--valis-font-sans, 'Inter', sans-serif);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin: 0 0 24px 0;
}

.valis-about-diff-title {
    font-family: var(--valis-font-serif, 'Cormorant Garamond', serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.valis-about-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.valis-about-list li {
    font-family: var(--valis-font-sans, 'Inter', sans-serif);
    font-size: 0.85rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 10px;
    padding-left: 1em;
    text-indent: -1em;
}

.valis-about-list li::before {
    content: "—";
    margin-right: 0.5em;
    color: #999;
}

.valis-about-ok {
    width: 100%;
    background: #1a1a1a;
    border: none;
    color: white;
    font-family: var(--valis-font-sans, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 14px 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.valis-about-ok:hover {
    background: #333;
}

/* Mobile */
@media (max-width: 480px) {
    .lang-toggle-btn {
        top: 12px;
        right: 12px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .what-is-valis-btn {
        bottom: 12px;
        left: 12px;
        font-size: 0.65rem;
    }
    
    .valis-about-box {
        padding: 28px 24px;
    }
    
    .valis-about-title {
        font-size: 1.5rem;
    }
    
    .valis-about-text,
    .valis-about-list li {
        font-size: 0.8rem;
    }
}
