/* INTRO MINIMALISTA - DISEÑO INDUSTRIAL PROFESIONAL */
.minimal-intro-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    background: #0c0c0c;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    box-sizing: border-box;
}

/* Soporte para iOS/Safari */
@supports (-webkit-touch-callout: none) {
    .minimal-intro-section {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}

/* Contenedor principal */
.intro-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

/* Superficie metálica minimalista */
.metal-surface {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #1a1a1a 0%,
        #222222 25%,
        #1c1c1c 50%,
        #242424 75%,
        #1a1a1a 100%
    );
    border-radius: 2px;
    overflow: hidden;
}

.metal-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, 
            rgba(0, 0, 0, 0.1) 0px, 
            rgba(0, 0, 0, 0.1) 25px, 
            transparent 25px, 
            transparent 50px
        );
    background-size: 50px 50px;
    opacity: 0.15;
    pointer-events: none;
}

.metal-edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(254, 235, 21, 0.1);
    border-radius: 2px;
    pointer-events: none;
}

/* Proyección de texto elegante */
.projection-display {
    position: relative;
    width: 100%;
    height: 300px;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4rem;
    z-index: 1;
}

.word-sequence {
    position: relative;
    text-align: center;
    width: 100%;
    height: 100%;
}

.word, .result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Asap', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    color: var(--secondary-color, #feea15);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    margin: 0;
    padding: 0;
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.word {
    animation: word-fade 9s infinite ease-in-out;
}

.word:nth-child(1) { 
    animation-delay: 0s; 
}
.word:nth-child(2) { 
    animation-delay: 3s; 
}
.word:nth-child(3) { 
    animation-delay: 6s; 
}

.result {
    animation: result-fade 9s infinite ease-in-out;
    animation-delay: 8.5s;
    color: #ffffff;
}

@keyframes word-fade {
    0%, 30%, 100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.95);
        filter: blur(2px);
        -webkit-filter: blur(2px);
    }
    10%, 20% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0);
        -webkit-filter: blur(0);
    }
}

@keyframes result-fade {
    0%, 90%, 100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9);
    }
    95% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
}

.projection-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--secondary-color, #feea15) 50%,
        transparent 100%
    );
    opacity: 0.3;
    animation: line-pulse 3s ease-in-out infinite;
}

@keyframes line-pulse {
    0%, 100% { 
        opacity: 0.1; 
    }
    50% { 
        opacity: 0.4; 
    }
}

/* Logotipo minimalista */
.intro-logo {
    position: relative;
    text-align: center;
    margin-top: 2rem;
    opacity: 0;
    animation: logo-fade-in 1s ease-out forwards 1s;
    z-index: 1;
}

.logo-img {
    height: clamp(40px, 8vh, 60px);
    width: auto;
    max-width: 100%;
    filter: brightness(1.2);
    margin-bottom: 1rem;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.logo-subtitle {
    font-family: 'Asap', sans-serif;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    letter-spacing: clamp(4px, 1vw, 8px);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-weight: 300;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contador digital */
.digital-counter {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    color: rgba(254, 235, 21, 0.5);
    letter-spacing: 1px;
    opacity: 0;
    animation: counter-fade-in 1s ease-out forwards 1.5s;
    z-index: 1;
}

.counter-display {
    position: relative;
    font-variant-numeric: tabular-nums;
}

/* Fallback para navegadores antiguos */
@supports not (font-variant-numeric: tabular-nums) {
    .counter-display {
        font-feature-settings: "tnum" 1;
    }
}

.counter-display::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 8px;
    height: 100%;
    background: rgba(254, 235, 21, 0.3);
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { 
        opacity: 0; 
    }
    50% { 
        opacity: 1; 
    }
}

/* Indicador "Presiona para continuar" */
.continue-indicator {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fade-pulse 2s ease-in-out infinite 2s;
    z-index: 1;
    pointer-events: none;
}

.continue-text {
    font-family: 'Asap', sans-serif;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.continue-arrow {
    width: 20px;
    height: 1px;
    background: rgba(254, 235, 21, 0.6);
    position: relative;
}

.continue-arrow::after {
    content: '';
    position: absolute;
    right: -3px;
    top: -3px;
    width: 7px;
    height: 7px;
    border-right: 1px solid rgba(254, 235, 21, 0.6);
    border-top: 1px solid rgba(254, 235, 21, 0.6);
    transform: rotate(45deg);
}

@keyframes fade-pulse {
    0%, 100% { 
        opacity: 0.4; 
        transform: translateX(0);
    }
    50% { 
        opacity: 1; 
        transform: translateX(5px);
    }
}

/* Animaciones de entrada/salida */
@keyframes logo-fade-in {
    0% { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes counter-fade-in {
    0% { 
        opacity: 0; 
        transform: translateX(20px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Clase para ocultar intro */
.minimal-intro-section.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Transición de salida */
.minimal-intro-section.hide .intro-container {
    animation: intro-exit 0.8s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

@keyframes intro-exit {
    0% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.98); 
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Desktop grande */
@media (max-width: 1400px) {
    .intro-container {
        max-width: 1100px;
    }
}

/* Laptop/Tablet horizontal */
@media (max-width: 1200px) {
    .intro-container {
        width: 95%;
        max-width: 1000px;
        padding: 1.5rem;
    }
    
    .projection-display {
        margin-bottom: 3rem;
        height: 250px;
        min-height: 200px;
    }
    
    .word, .result {
        font-size: clamp(2.2rem, 7vw, 4rem);
    }
}

/* Tablet vertical */
@media (max-width: 992px) {
    .intro-container {
        height: 75vh;
        padding: 1.25rem;
    }
    
    .projection-display {
        height: 200px;
        min-height: 180px;
        margin-bottom: 2.5rem;
    }
    
    .word, .result {
        font-size: clamp(2rem, 6.5vw, 3.5rem);
        letter-spacing: 2.5px;
    }
    
    .intro-logo {
        margin-top: 1.5rem;
    }
    
    .logo-img {
        height: clamp(35px, 7vh, 50px);
    }
    
    .logo-subtitle {
        font-size: clamp(0.65rem, 1.8vw, 0.85rem);
        letter-spacing: clamp(3px, 0.9vw, 6px);
    }
    
    .digital-counter,
    .continue-indicator {
        bottom: 1.5rem;
    }
    
    .digital-counter {
        right: 1.5rem;
        font-size: clamp(0.65rem, 1.8vw, 0.85rem);
    }
    
    .continue-indicator {
        left: 1.5rem;
    }
}

/* Tablet pequeña / móvil grande */
@media (max-width: 768px) {
    .intro-container {
        height: 70vh;
        min-height: 400px;
        padding: 1rem;
    }
    
    .projection-display {
        height: 180px;
        min-height: 160px;
        margin-bottom: 2rem;
    }
    
    .word, .result {
        font-size: clamp(1.8rem, 6vw, 3rem);
        letter-spacing: 2px;
    }
    
    .logo-img {
        height: clamp(30px, 6vh, 45px);
        margin-bottom: 0.75rem;
    }
    
    .logo-subtitle {
        font-size: clamp(0.6rem, 1.6vw, 0.8rem);
        letter-spacing: clamp(2.5px, 0.8vw, 5px);
    }
    
    .digital-counter,
    .continue-indicator {
        bottom: 1rem;
    }
    
    .digital-counter {
        right: 1rem;
        font-size: clamp(0.6rem, 1.6vw, 0.8rem);
    }
    
    .continue-indicator {
        left: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .continue-text {
        font-size: clamp(0.6rem, 1.6vw, 0.8rem);
    }
    
    .continue-arrow {
        width: 16px;
    }
    
    .counter-display::after {
        width: 6px;
        right: -8px;
    }
}

/* Móvil */
@media (max-width: 576px) {
    .intro-container {
        height: 65vh;
        min-height: 350px;
        padding: 0.75rem;
        width: 92%;
    }
    
    .projection-display {
        height: 150px;
        min-height: 130px;
        margin-bottom: 1.5rem;
    }
    
    .word, .result {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        letter-spacing: 1.5px;
    }
    
    .logo-img {
        height: 30px;
        margin-bottom: 0.5rem;
    }
    
    .logo-subtitle {
        font-size: 0.6rem;
        letter-spacing: 3px;
    }
    
    .digital-counter,
    .continue-indicator {
        bottom: 0.75rem;
    }
    
    .digital-counter {
        right: 0.75rem;
        font-size: 0.7rem;
    }
    
    .continue-indicator {
        left: 0.75rem;
        gap: 4px;
    }
    
    .continue-text {
        font-size: 0.65rem;
    }
    
    .continue-arrow {
        width: 14px;
        height: 0.8px;
    }
    
    .continue-arrow::after {
        width: 6px;
        height: 6px;
        right: -2px;
        top: -2.5px;
    }
}

/* Móvil muy pequeño */
@media (max-width: 375px) {
    .intro-container {
        height: 60vh;
        min-height: 300px;
        padding: 0.5rem;
    }
    
    .projection-display {
        height: 120px;
        min-height: 100px;
        margin-bottom: 1rem;
    }
    
    .word, .result {
        font-size: clamp(1.2rem, 4.5vw, 2rem);
        letter-spacing: 1px;
    }
    
    .logo-img {
        height: 25px;
    }
    
    .logo-subtitle {
        font-size: 0.55rem;
        letter-spacing: 2.5px;
    }
}

/* Orientación horizontal en móviles */
@media (max-height: 600px) and (orientation: landscape) {
    .intro-container {
        height: 85vh;
        min-height: auto;
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem;
    }
    
    .projection-display {
        width: 60%;
        height: auto;
        min-height: auto;
        margin-bottom: 0;
        margin-right: 2rem;
    }
    
    .word, .result {
        font-size: clamp(2rem, 5vh, 3rem);
    }
    
    .intro-logo {
        margin-top: 0;
        width: 30%;
    }
    
    .logo-img {
        height: clamp(25px, 5vh, 40px);
    }
    
    .logo-subtitle {
        font-size: clamp(0.5rem, 1vh, 0.7rem);
        letter-spacing: clamp(2px, 0.5vw, 4px);
    }
    
    .digital-counter {
        bottom: 1rem;
        right: 1rem;
    }
    
    .continue-indicator {
        bottom: 1rem;
        left: 1rem;
        flex-direction: row;
        align-items: center;
    }
}

/* Compatibilidad con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    .minimal-intro-section,
    .minimal-intro-section * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .word, .result,
    .projection-line,
    .digital-counter,
    .intro-logo,
    .continue-indicator {
        animation: none !important;
        transition: none !important;
    }
    
    .word, .result {
        opacity: 1 !important;
        transform: translate(-50%, -50%) scale(1) !important;
        filter: none !important;
        -webkit-filter: none !important;
    }
    
    .result {
        opacity: 1 !important;
    }
    
    .intro-logo,
    .digital-counter,
    .continue-indicator {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .counter-display::after {
        animation: none !important;
        opacity: 0.5;
    }
    
    .minimal-intro-section.hide .intro-container {
        animation: none !important;
        opacity: 0;
        transform: scale(0.95);
    }
    
    .minimal-intro-section.hide {
        transition: none !important;
    }
}

/* Optimizaciones de rendimiento */
.minimal-intro-section {
    will-change: opacity, visibility;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000;
    -webkit-perspective: 1000;
}

.word, .result {
    will-change: opacity, transform, filter;
}

/* Mejoras de accesibilidad */
@media (prefers-contrast: high) {
    .word, .result {
        color: #ffed4e;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    }
    
    .logo-subtitle,
    .continue-text {
        color: rgba(255, 255, 255, 0.8);
    }
}

/* Dark mode (si se implementa después) */
@media (prefers-color-scheme: dark) {
    .minimal-intro-section {
        background: #000000;
    }
    
    .metal-surface {
        background: linear-gradient(
            135deg,
            #111111 0%,
            #1a1a1a 25%,
            #141414 50%,
            #1c1c1c 75%,
            #111111 100%
        );
    }
}