/* --- CSS RESET & VARIABLES --- */
:root {
  --neon: #1cd14f;
  --neon-glow: rgba(28, 209, 79, 0.4);
  --dark-bg: #0b0f19;
  --darker-bg: #05080f;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8f9fa;
  --text-muted: #a0aec0;
  
  --font-main: 'Inter', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--dark-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- TYPOGRAPHY & UTILITIES --- */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.text-neon { color: var(--neon); }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.bg-darker { background-color: var(--darker-bg); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

.btn-primary {
  background-color: var(--neon);
  color: var(--darker-bg);
  box-shadow: 0 4px 15px var(--neon-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(28, 209, 79, 0.6);
  background-color: #20e056;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--neon);
  color: var(--neon);
  transform: translateY(-3px);
}

/* --- BACKGROUND PATTERN --- */
.background-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: radial-gradient(var(--neon) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.05;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 1rem 0;
  background-color: rgba(5, 8, 15, 0.8);
  border-bottom: 1px solid var(--card-border);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Filter to render the grey SVG as white */
.logo-svg {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: var(--transition);
}

.logo-svg-hero {
  height: clamp(100px, 18vw, 200px);
  width: auto;
  filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

.logo-svg-footer {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  font-size: 0.95rem;
}

.nav-links a:not(.btn):hover {
  color: var(--neon);
}

@media (max-width: 900px) {
  .nav-links {
    display: none; /* Hide standard nav on mobile for simplicity, or implement hamburger */
  }
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
  background-image: url('imagenes/img3.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(11, 15, 25, 0.7) 0%, 
    rgba(11, 15, 25, 0.4) 50%, 
    rgba(11, 15, 25, 0.9) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-main);
  text-transform: uppercase;
}

.hero-title {
  margin-bottom: 2rem;
}

.hero-logo {
  margin-bottom: 1.5rem;
}


.badge {
  display: inline-block;
  background-color: var(--neon);
  color: var(--darker-bg);
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.hero-description {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 3rem auto;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- FEATURES SECTION --- */
.features, .tablet-features {
  padding: 8rem 0;
  position: relative;
}

.tablet-features {
  background-image: url('imagenes/img4.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.tablet-features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 15, 0.9);
  z-index: 1;
}

.tablet-features .container {
  position: relative;
  z-index: 2;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

.feature-text, .feature-image {
  flex: 1;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-list li {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.neon-icon {
  color: var(--neon);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 5px;
}

.feature-list h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-list p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* --- MOCKUPS --- */
.mockup-phone, .mockup-tablet {
  background-color: #1a1e29;
  border-radius: 40px;
  border: 8px solid #2a3040;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
              0 0 40px rgba(28, 209, 79, 0.15);
  overflow: hidden;
  margin: 0 auto;
}

.mockup-phone {
  width: 320px;
  height: 650px;
}

.mockup-tablet {
  width: 100%;
  max-width: 700px;
  height: 480px;
  border-radius: 20px;
}

.mockup-camera {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background-color: #000;
  border-radius: 10px;
  z-index: 10;
}

.mockup-screen {
  width: 100%;
  height: 100%;
  background-color: var(--dark-bg);
  position: relative;
  overflow: hidden;
}

.mockup-content {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Internal UI styling for Phone */
.app-header {
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--neon);
}

.score-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
}

.points {
  font-size: 1.5rem;
  font-weight: 800;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

.neon-bg {
  background: var(--neon);
  color: var(--darker-bg);
}

.live-badge {
  margin-top: auto;
  align-self: center;
  background: rgba(255,0,0,0.2);
  color: #ff3333;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}
.live-badge::before {
  content: '';
  width: 8px; height: 8px;
  background: #ff3333;
  border-radius: 50%;
  animation: blink 1s infinite alternate;
}

@keyframes blink {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* Internal UI styling for Tablet */
.tablet-app-ui {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tablet-header {
  display: flex;
  justify-content: space-between;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
}
.tablet-header .time {
  color: var(--text-muted);
}
.tablet-score {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}
.tablet-score .points {
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  width: auto; height: auto; background: none;
  font-weight: 900;
}

/* --- HARDWARE SECTION --- */
.hardware {
  padding: 10rem 0;
  background: radial-gradient(circle at center, rgba(28, 209, 79, 0.05) 0%, var(--dark-bg) 70%);
}

.sensor-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4rem 0;
}

.sensor-pulse {
  position: relative;
  width: 350px;
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sensor-pulse::before, .sensor-pulse::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--neon);
  border-radius: 50%;
  z-index: 1;
  opacity: 0;
  animation: pulse 3s infinite cubic-bezier(0.66, 0, 0, 1);
}

.sensor-pulse::after {
  animation-delay: 1.5s;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.sensor-circle {
  width: 280px;
  height: 280px;
  background-color: #0b0f19;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 20px var(--neon-glow);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 4px solid #1a202c;
}

.sensor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 15px var(--neon));
}

/* --- CONTACT CTA --- */
.contact-cta {
  padding: 6rem 0;
}

.cta-box {
  background: linear-gradient(135deg, var(--card-bg), rgba(28, 209, 79, 0.05));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-box h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: var(--text-main);
}

.cta-box p {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

.demo-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.input-field {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

textarea.input-field {
  border-radius: 12px;
  min-height: 100px;
}

.input-field:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 2px rgba(28, 209, 79, 0.2);
}

/* --- FOOTER --- */
.footer {
  background-color: #020408;
  padding-top: 5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-tagline {
  color: var(--text-muted);
  margin-top: 1rem;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.link-group h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: white;
}

.link-group a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.link-group a:hover {
  color: var(--neon);
}

.social-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: var(--transition);
}

.social-link:hover .social-icon {
  filter: none;
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- ANIMATION CLASSES --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-right {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-left {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

.is-visible {
  opacity: 1;
  transform: translate(0);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
  .feature-row, .feature-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
  
  .mockup-tablet {
    max-width: 480px;
    height: 320px;
  }
  
  .tablet-app-ui {
    padding: 1.5rem;
  }
  
  .tablet-header {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .feature-list li {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  /* .demo-form ya es columna por defecto */
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
}

/* --- WHATSAPP FLOAT --- */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
  transition: transform 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.3));
}

@media (max-width: 900px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: calc(40px + env(safe-area-inset-bottom));
    right: 30px;
  }
}
