/* Custom properties */
:root {
  --bg-core: #040814;
  --text-pure: #ffffff;
  --text-muted: #94a3b8;
  --accent-neon: #00e5ff;
  --accent-laser: rgba(0, 229, 255, 0.2);
  /* Glass variables */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

table,
input,
select,
textarea {
  font-family: inherit;
}

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

body {
  background-color: var(--bg-core);
  color: var(--text-pure);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Cinematic Glow */
.ambient-glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  z-index: -1;
}

.glow-1 {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}

.glow-2 {
  bottom: 20%;
  right: -20%;
  background: radial-gradient(circle, rgba(0, 60, 255, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Typography Hierarchy */
h1,
h2,h3,
.logo {
  font-family: 'Archivo Black', sans-serif;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -1.5px;
}

h1 {
  font-size: clamp(1.8rem, 8vw, 5.5rem);
  word-break: break-word;
  hyphens: auto;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 20px;
}

.section-title {
  margin-bottom: 30px;
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 100px 0;
}

.badge,
.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-neon);
  border: 1px solid var(--accent-neon);
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 24px 0;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  letter-spacing: 0;
  color: var(--text-pure);
  text-decoration: none;
  font-family: 'Archivo Black', sans-serif;
  display: flex;
  align-items: center;
}

.logo span {
  color: var(--text-muted);
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-left: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent-neon);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Hamburger Menu Button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent-neon);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  margin: 6px 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 5, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 100px 40px 40px;
    gap: 0;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--glass-border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links .nav-item {
    padding: 18px 0;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--glass-border);
    width: 100%;
    display: block;
  }

  .nav-links .btn-primary {
    margin-top: 24px;
    text-align: center;
    width: 100%;
  }
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--text-pure);
  color: var(--bg-core);
  box-shadow: 0 0 0 0 var(--accent-laser);
}

.btn-primary:hover,
.btn-primary.active {
  background: var(--accent-neon);
  color: var(--bg-core);
  box-shadow: 0 0 20px 0 var(--accent-laser);
}

.btn-secondary {
  background: transparent;
  color: var(--text-pure);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  border-color: var(--text-pure);
}

/* Hero Section */
.hero {
  padding-top: 180px;
  padding-bottom: 150px;
  /* Reduced from very top, giving more space */
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Background AI Image Wrapper */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('hero_ai_bg.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  /* Let the image show through the bright background */
  z-index: -2;
  /* Vignette Overlay */
  mask-image: linear-gradient(to bottom, white 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, white 40%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  /* Stay above the background */
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Marquee Trust Signals - Brutalist approach */
.marquee-wrapper {
  transform: rotate(-2deg);
  width: 110vw;
  margin-left: -5vw;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  overflow: hidden;
  padding: 24px 0;
}

.marquee {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.5rem;
  color: var(--text-muted);
  animation: scroll-left 25s linear infinite;
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.marquee-reverse {
  transform: rotate(2deg);
}

.marquee.scroll-right {
  animation: scroll-right 35s linear infinite;
}

@keyframes scroll-right {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

/* About Section */
.about .section-intro {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-muted);
  max-width: 900px;
}

/* Services */
.services-sub {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 50px;
  max-width: 800px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 40px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
}

.glass:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.5);
  transform: translateY(-8px);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 24px;
}

/* --- SVG ANIMATIONS --- */
.animated-icon {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Base strokes */
.base-stroke {
  stroke: var(--glass-border);
  stroke-width: 2;
  transition: stroke 0.4s ease;
}

.glass:hover .base-stroke {
  stroke: rgba(37, 99, 235, 0.8);
  /* Ilumina el borde al pasar el ratÃƒÂ³n */
}

/* 1. Automation Node Rotate */
.rotate-cw {
  transform-origin: 50% 50%;
  animation: rotate 8s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.pulse-glow {
  animation: pulse-op 2s ease-in-out infinite alternate;
}

.fade-lines {
  stroke-dasharray: 4;
  animation: dash-flow 2s linear infinite;
}

@keyframes pulse-op {
  0% {
    opacity: 0.3;
    stroke-width: 1;
    filter: drop-shadow(0 0 0px var(--accent-neon));
  }

  100% {
    opacity: 1;
    stroke-width: 3;
    filter: drop-shadow(0 0 6px var(--accent-neon));
  }
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -8;
  }
}

/* 2. Chatbot Writing Dots */
.draw-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw 3s ease forwards;
}

.glass:hover .draw-path {
  animation: draw 1.5s ease forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.dot-1 {
  animation: chat-bounce 1.4s infinite ease-in-out both;
}

.dot-2 {
  animation: chat-bounce 1.4s infinite ease-in-out both;
  animation-delay: 0.2s;
}

.dot-3 {
  animation: chat-bounce 1.4s infinite ease-in-out both;
  animation-delay: 0.4s;
}

@keyframes chat-bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-8px);
  }
}

/* 3. Neural Data Flow */
.chip-core {
  animation: data-process 3s infinite alternate;
}

@keyframes data-process {
  0% {
    fill: rgba(37, 99, 235, 0);
  }

  100% {
    fill: rgba(37, 99, 235, 0.2);
  }
}

.data-flow line {
  stroke-dasharray: 2 4;
  animation: data-dash 0.8s linear infinite;
}

@keyframes data-dash {
  to {
    stroke-dashoffset: -6;
  }
}

/* ---------------------- */

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-pure);
}

.service-tagline {
  color: var(--accent-neon);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.service-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.service-benefits {
  list-style: none;
  margin-top: auto;
  /* Empuja el contenedor a la base para alineaciÃƒÂ³n perfecta */
}

.service-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  color: var(--text-pure);
  font-size: 1rem;
  line-height: 1.6;
}

.service-benefits ion-icon {
  color: var(--accent-neon);
  flex-shrink: 0;
  margin-top: 4px;
  font-size: 1.2rem;
}

/* Use Cases (Impacto Sectorial) */
.use-cases .section-intro {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  max-width: 900px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.case-card.glass {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.case-img-wrapper {
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}

.case-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  filter: brightness(0.8) contrast(1.1);
}

.case-card:hover .case-img {
  transform: scale(1.05);
  filter: brightness(1.1) contrast(1.15);
}

.case-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.case-header {
  margin-bottom: 24px;
}

.sector-tag {
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.75rem;
  color: var(--accent-neon);
  letter-spacing: 2.5px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 8px 14px;
  border-radius: 4px;
}

.case-card h3 {
  font-size: 1.4rem;
  color: var(--text-pure);
  margin-bottom: 16px;
  line-height: 1.3;
}

.case-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Education */
.education-text {
  font-size: 1.25rem;
  color: var(--text-muted);
}

/* Contact Form */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.contact-form-wrapper.glass {
  position: relative;
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05), inset 0 0 20px rgba(255, 255, 255, 0.5);
  animation: float-form 6s ease-in-out infinite;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.contact-form-wrapper.glass:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08), inset 0 0 30px rgba(255, 255, 255, 0.8);
  animation-play-state: paused;
}

@keyframes float-form {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0px);
  }
}

.contact-info .contact-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--glass-border);
  color: var(--text-pure);
  padding: 16px;
  border-radius: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-neon);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.w-100 {
  width: 100%;
}

.privacy-note {
  margin-top: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Footer (Accesibilidad Corregida) */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: 40px 0;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.footer-links a {
  color: var(--text-pure);
  text-decoration: none;
  font-weight: 500;
  /* Accessibility fix: target sizes para Touch Devices */
  padding: 12px 16px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-neon);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 140px;
  }

  .nav-container {
    flex-direction: column;
    gap: 16px;
  }
}

/* Audiovisual Production Grid */
.audiovisual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.av-card {
  padding: 0;
  overflow: hidden;
}

.av-card h3 {
  font-size: 1.4rem;
  padding: 0 24px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.av-card .service-desc {
  padding: 0 24px 24px 24px;
  margin: 0;
}

.av-img-wrapper {
  width: 100%;
  height: 380px; 
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}

.av-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  filter: brightness(0.9) contrast(1.05);
}

.av-card:hover .av-img-wrapper img {
  transform: scale(1.05);
  filter: brightness(1.1) contrast(1.1);
}
/* Responsive Service Grid */
.benefit-grid { display: grid; grid-template-columns: 200px 1fr; gap: 16px; width: 100%; }
@media (max-width: 768px) { .benefit-grid { grid-template-columns: 1fr; gap: 8px; } }
