/* ==========================================================================
   Ms&L GLOBAL ENTERPRISE COMPUTATIONAL SYSTEMS
   Arquitectura híbrida: Cinemática 100vh en PC + Scroll natural en Celulares
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;1,6..72,300;1,6..72,400&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

/* Base HTML y BODY */
html, body {
  margin: 0;
  padding: 0;
  background-color: #030305;
  color: #ECE7DF;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   1. MODO ESCRITORIO / PC (PANTALLA COMPLETA CINEMÁTICA 100vh)
   ========================================================================== */
@media (min-width: 1025px) {
  html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    user-select: none;
  }

  #master-slider {
    width: 100vw;
    height: 100vh;
    position: relative;
    will-change: transform;
  }

  .fullscreen-stage {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* ==========================================================================
   2. MODO MÓVIL / TELÉFONOS (FLUJO NATURAL SIN SOLAPAMIENTO)
   ========================================================================== */
@media (max-width: 1024px) {
  html, body {
    width: 100% !important;
    min-height: 100% !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #master-slider {
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    position: relative;
  }

  .fullscreen-stage {
    width: 100% !important;
    min-height: 100vh !important;
    height: auto !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5.5rem !important;
    padding-bottom: 4rem !important;
  }
}

/* Tipografía especializada */
.font-serif {
  font-family: 'Newsreader', Georgia, serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Grano analógico cinematográfico de fondo */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.038'/%3E%3C/svg%3E");
}

/* Transiciones elásticas suaves */
.spring-trans {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              border-color 0.3s ease,
              opacity 0.3s ease;
}

/* Puntos indicadores laterales (Desktop) */
.dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dot-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.3);
}

.dot-btn.active {
  background: #ECE7DF;
  height: 26px;
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.85);
}

/* Barra de progreso de telemetría */
.telemetry-bar-fill {
  background: linear-gradient(90deg, #D46547 0%, #38BDF8 50%, #ECE7DF 100%);
  background-size: 200% 100%;
  animation: telemetryPulse 3s infinite linear;
}

@keyframes telemetryPulse {
  0% { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

/* Inputs de cristal líquido */
.glass-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ECE7DF;
  transition: all 0.3s ease;
}

.glass-input:focus {
  outline: none;
  border-color: #38BDF8;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px -3px rgba(56, 189, 248, 0.35);
}

/* Micro-perspectiva 3D para tarjetas en desktop */
@media (min-width: 1025px) {
  .tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
  }
}

/* Menú Drawer deslizable para móvil - TOTALMENTE OCULTO EN DESKTOP */
.mobile-drawer {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(3, 3, 5, 0.97) !important;
  backdrop-filter: blur(40px) saturate(210%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(210%) !important;
  z-index: 99999 !important;
  flex-direction: column;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1024px) {
  .mobile-drawer.open {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }
}

@media (min-width: 1025px) {
  .mobile-drawer,
  .mobile-drawer.open,
  #mobile-drawer {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}
