/* Importación de fuentes */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,500;1,900&display=swap');

/* VARIABLES DE COLOR */
:root {
  --color-scheme-1--color-4: #193d70; /* azul TMT */
  --color-scheme-1--color-5: #229188; /* teal TMT */

  --dark-bg: #161616;
  --darker-bg: #0c0c0c;
  --card-bg: #1c1c1c;
  --white: #ffffff;
  --white-transparent: rgba(255, 255, 255, 0.8);
  --white-semi: rgba(255, 255, 255, 0.2);
  --white-light: rgba(255, 255, 255, 0.4);
  --white-very-light: rgba(255, 255, 255, 0.1);
  --grid-color: #193d7010;
  --shadow-primary: rgba(25, 61, 112, 0.4);
  --shadow-secondary: rgba(119, 145, 143, 0.4);
  --shadow-dark: rgba(0, 0, 0, 0.3);
  --primary-glow: #193d70aa;
}

/* RESET Y BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background-color: var(--dark-bg);
  overflow-x: hidden;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =================== PRELOADER =================== */
.preloader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, var(--dark-bg) 0%, var(--darker-bg) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  animation: fadeOut 1s ease 5s forwards;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 5s linear infinite;
  z-index: 0;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

#particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
  pointer-events: none;
}

.logo-container {
  position: relative;
  width: clamp(150px, 25vw, 250px);
  height: clamp(150px, 25vw, 250px);
  animation: dropSpin 2s ease-out forwards;
  z-index: 1;
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: fadeIn 1.5s ease 1.3s forwards, pulseGlow 1.5s ease-in-out 2s infinite;
  filter: drop-shadow(0 0 25px var(--color-scheme-1--color-4));
}

.scanner-ring {
  position: absolute;
  top: -15px;
  left: -15px;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  border: 2px solid var(--color-scheme-1--color-5);
  border-radius: 50%;
  animation: pulseRing 2.5s infinite ease-in-out;
  box-shadow: 0 0 35px var(--color-scheme-1--color-5);
  z-index: -1;
}

.loading-bar {
  margin-top: clamp(80px, 20vw, 160px);
  width: clamp(150px, 80vw, 300px);
  height: clamp(6px, 1.5vw, 12px);
  background-color: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 15px var(--primary-glow);
  border: 1px solid var(--color-scheme-1--color-4);
}

.loading-glow {
  width: 100%;
  height: 100%;
  background: linear-gradient(270deg, var(--color-scheme-1--color-4), var(--color-scheme-1--color-5), var(--color-scheme-1--color-4));
  background-size: 400% 400%;
  animation: glowingLoad 4s ease-in-out infinite, fillBar 2s ease forwards;
}

.loading-text {
  color: var(--white);
  font-size: clamp(12px, 3vw, 18px);
  font-weight: 600;
  margin-top: clamp(8px, 2vw, 16px);
  letter-spacing: 1px;
  text-shadow: 0 0 5px var(--color-scheme-1--color-4);
  animation: flicker 1.5s infinite;
}

@keyframes dropSpin { 
  0% { opacity: 0; transform: translateY(-50px) rotate(-10deg); } 
  100% { opacity: 1; transform: translateY(0) rotate(0deg); } 
}
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
@keyframes pulseRing { 
  0% { transform: scale(1); opacity: 1; } 
  100% { transform: scale(1.8); opacity: 0; } 
}
@keyframes pulseGlow {
  0% { filter: drop-shadow(0 0 20px var(--color-scheme-1--color-4)); }
  50% { filter: drop-shadow(0 0 35px var(--color-scheme-1--color-5)); }
  100% { filter: drop-shadow(0 0 20px var(--color-scheme-1--color-4)); }
}
@keyframes glowingLoad {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes fillBar { 
  0% { clip-path: inset(0 100% 0 0); } 
  100% { clip-path: inset(0 0 0 0); } 
}
@keyframes flicker { 
  0%,100% { opacity: 1; } 
  50% { opacity: 0.6; } 
}

/* =================== MAIN WRAPPER =================== */
.main-wrapper {
  width: 100%;
  min-height: 100vh;
  display: block;
  position: relative;
  overflow: hidden;
}

.w-layout-vflex {
  display: flex;
  flex-direction: column;
}

.flex-block-3 {
  position: relative;
  width: 100%;
  min-height: 100vh;
  z-index: 1;
}

/* =================== VIDEO + OVERLAY =================== */
.video-background,
.video-backgrounds {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.video-background video,
.background-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a0f18;
}

.background-video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.background-video.active {
  opacity: 1;
}

.background-color-overlay,
.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.70;
  background: url("../images/tmt-background.png") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}

.background-color-overlay {
  background: rgba(0, 0, 0, 0.45);
  background-image: none;
}

/* =================== CONTENIDO =================== */
.content {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding: clamp(16px, 5vw, 40px);
  opacity: 0;
}

.content.show { 
  display: flex; 
  animation: fadeInContent 1s ease forwards; 
}

@keyframes fadeInContent {
  0% { opacity: 0; backdrop-filter: blur(10px); }
  100% { opacity: 1; backdrop-filter: blur(0); }
}

/* =================== LOGO TRANSPARENTE =================== */
.logo-wrap { 
  display: grid; 
  place-items: center; 
  margin-bottom: clamp(20px, 8vw, 60px);
}

.logo-mask {
  width: clamp(180px, 28vw, 520px);
  aspect-ratio: 1;
  -webkit-mask: url("../images/logo_negativo.png") center / contain no-repeat;
  mask: url("../images/logo_negativo.png") center / contain no-repeat;
  background: rgba(255,255,255,0.30);
  backdrop-filter: brightness(1.2) saturate(1.05) contrast(1.05);
  border: 2px solid rgba(255,255,255,0.28);
  box-shadow:
    0 0 30px rgba(255,255,255,0.25),
    0 clamp(12px, 4vw, 24px) clamp(30px, 8vw, 60px) rgba(0,0,0,0.55);
  opacity: 0;
  transform: translateY(50px) scale(0.8);
}

.content.show .logo-mask {
  animation: logoEntrance 1.2s ease 0.3s forwards, logoFloat 3s ease-in-out 1.5s infinite;
}

.logo-fallback {
  width: clamp(180px, 28vw, 520px);
  height: auto;
  filter: drop-shadow(0 clamp(12px, 4vw, 24px) clamp(30px, 8vw, 60px) rgba(0,0,0,.55));
  display: none;
}

@supports not ((-webkit-mask: url("")) or (mask: url(""))) {
  .logo-mask { display: none; }
  .logo-fallback { display: block; }
}

@keyframes logoEntrance {
  0% { opacity: 0; transform: translateY(50px) scale(0.8); }
  60% { transform: translateY(-10px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* =================== SLIDER HERO =================== */
.slider {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  min-height: clamp(400px, 80vh, 800px);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.slider-mask {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  position: relative;
  transform: translateX(0);
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* Navigation arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: clamp(36px, 8vw, 48px);
  height: clamp(36px, 8vw, 48px);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  border: none;
}

.slider-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.left {
  left: clamp(12px, 4vw, 32px);
}

.slider-arrow.right {
  right: clamp(12px, 4vw, 32px);
}

.slider-arrow svg {
  width: clamp(16px, 4vw, 24px);
  height: clamp(16px, 4vw, 24px);
  fill: #fff;
}

/* Dots navigation */
.slide-dots {
  position: absolute;
  bottom: clamp(16px, 4vw, 32px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(8px, 2vw, 12px);
  z-index: 10;
}

.dot {
  width: clamp(8px, 2vw, 12px);
  height: clamp(8px, 2vw, 12px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: #00b4d8;
  transform: scale(1.2);
}

/* =================== HERO CONTENT =================== */
.wrapp-hero {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 24px);
}

.container-large {
  max-width: clamp(300px, 90vw, 1200px);
  margin: 0 auto;
  width: 100%;
}

.componet-hero-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.content-style {
  width: 100%;
  max-width: clamp(280px, 85vw, 700px);
  margin: 0 auto;
  text-align: center;
}

.frame-11 {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 4vw, 32px);
  align-items: center;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.heading-style-h1 {
  font-size: clamp(1.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide p {
  color: #fff;
  font-size: clamp(0.875rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  max-width: 100%;
}

.frame-20 {
  margin-top: clamp(16px, 4vw, 24px);
  display: flex;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: clamp(140px, 30vw, 200px);
  padding: clamp(10px, 2.5vw, 16px) clamp(20px, 5vw, 32px);
  border: none;
  border-radius: 25px;
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, #193d70, #229188);
  transition: transform .15s ease, filter .15s ease;
}

.button:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* =================== BOTONES (CTAs) =================== */
.cta-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(20px, 6vw, 50px);
  margin-top: clamp(16px, 4vw, 24px);
  opacity: 0;
  transform: translateY(60px);
}

.content.show .cta-section { 
  animation: buttonsSlideUp 1s ease 0.2s forwards; 
}

@keyframes buttonsSlideUp {
  0% { opacity: 0; transform: translateY(60px); }
  100% { opacity: 1; transform: translateY(0); }
}

.cta {
  text-decoration: none;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 3vw, 16px);
  width: clamp(150px, 35vw, 220px);
}

.cta-circle {
  width: clamp(100px, 20vw, 150px);
  height: clamp(100px, 20vw, 150px);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(80% 80% at 30% 25%, rgba(255,255,255,.10), rgba(255,255,255,0) 60%),
    radial-gradient(100% 100% at 70% 75%, rgba(0,0,0,.25), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1.6px solid rgba(255,255,255,.18);
  box-shadow: 0 clamp(15px, 5vw, 30px) clamp(40px, 10vw, 80px) rgba(0,0,0,.45);
  transition: all .3s ease;
}

.cta-circle img {
  width: 62%;
  height: auto;
  filter: drop-shadow(0 clamp(3px, 1vw, 6px) clamp(6px, 2vw, 12px) rgba(0,0,0,.35));
}

.cta:hover .cta-circle {
  transform: translateY(-4px) scale(1.05);
  border-color: rgba(255,255,255,.28);
  background: linear-gradient(135deg, var(--color-scheme-1--color-4), var(--color-scheme-1--color-5));
}

.cta-label {
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .95;
}

/* Progress bar for auto-advance */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: clamp(2px, 0.5vw, 4px);
  background: #00b4d8;
  z-index: 10;
  transform-origin: left;
  animation: progress 5s linear infinite;
}

@keyframes progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* =================== BREAKPOINTS RESPONSIVE =================== */

/* Extra Small devices (phones, 320px and up) */
@media screen and (max-width: 480px) {
  .content,
  .wrapp-hero {
    padding: 12px;
    min-height: 100dvh;
  }
  
  .slider {
    min-height: 100dvh;
  }
  
  .cta-section {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }
  
  .frame-11 {
    gap: 20px;
  }
  
  .logo-container {
    margin-bottom: 20px;
  }
  
  .scanner-ring {
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
  }
  
  .grid-bg {
    background-size: 20px 20px;
  }
  
  @keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
  }
}

/* Small devices (landscape phones, 481px - 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .content,
  .wrapp-hero {
    padding: 20px;
  }
  
  .cta-section {
    gap: 35px;
  }
  
  .frame-11 {
    gap: 24px;
  }
  
  .container-large {
    max-width: 95vw;
  }
}

/* Medium devices (tablets, 769px - 991px) */
@media screen and (min-width: 769px) and (max-width: 991px) {
  .content,
  .wrapp-hero {
    padding: 24px;
  }
  
  .container-large {
    max-width: 90vw;
  }
  
  .heading-style-h1 {
    font-size: 2.5rem;
  }
}

/* Large devices (desktops, 992px - 1199px) */
@media screen and (min-width: 992px) and (max-width: 1199px) {
  .container-large {
    max-width: 960px;
  }
  
  .heading-style-h1 {
    font-size: 2.75rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media screen and (min-width: 1200px) {
  .container-large {
    max-width: 1140px;
  }
}

/* Ultra wide screens (1400px and up) */
@media screen and (min-width: 1400px) {
  .container-large {
    max-width: 1320px;
  }
}

/* =================== LANDSCAPE ORIENTATION =================== */
@media screen and (orientation: landscape) and (max-height: 500px) {
  .content,
  .wrapp-hero,
  .slider {
    min-height: 100vh;
    height: 100vh;
  }
  
  .frame-11 {
    gap: 16px;
  }
  
  .logo-wrap {
    margin-bottom: 20px;
  }
  
  .cta-section {
    flex-direction: row;
    gap: 30px;
  }
  
  .heading-style-h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
  
  .slide p {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
  }
}

/* =================== HIGH DPI SCREENS =================== */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
  .logo-container img,
  .cta-circle img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* =================== DARK MODE SUPPORT =================== */
@media (prefers-color-scheme: dark) {
  :root {
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --card-bg: #1a1a1a;
  }
}

/* =================== REDUCED MOTION =================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .grid-bg {
    animation: none;
  }
  
  .scanner-ring {
    animation: none;
    opacity: 0.5;
  }
  
  .logo-container img {
    animation: fadeIn 0.5s ease forwards;
  }
  
  .loading-glow {
    animation: fillBar 1s ease forwards;
  }
}

/* =================== PRINT STYLES =================== */
@media print {
  .preloader,
  .video-background,
  .video-backgrounds,
  .slider-arrow,
  .slide-dots,
  .progress-bar {
    display: none !important;
  }
  
  .content {
    display: flex !important;
    opacity: 1 !important;
    position: static !important;
    height: auto !important;
  }
  
  .main-wrapper {
    overflow: visible !important;
  }
  
  body {
    overflow: visible !important;
  }
}

