/* ==========================================================================
   BioFog Panel — Universidad de La Salle
   Hoja de estilos principal
   ========================================================================== */

/* ---------- Variables ---------- */
:root {
  --navy: #0b3b62;
  --navy-900: #072b48;
  --navy-deep: #012e56;   /* BIOFOG */
  --aqua: #59aaac;        /* PANEL */
  --teal: #2bb5a8;
  --green: #2f8f5b;
  --sky: #d5e8f3;
  --sky-100: #eef6fb;
  --white: #ffffff;
  --text: #22364a;
  --muted: #5f7285;

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 12px 32px rgba(11, 59, 98, 0.14);
  --shadow-lg: 0 24px 60px rgba(11, 59, 98, 0.22);

  --radius: 18px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-title: 'Montserrat', 'Inter', sans-serif;
  --container: 1240px;
  --gutter: 32px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #b9d5e7;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fondo de TODA la web: coloca tu imagen en assets/fondo.png
   (queda fijo a pantalla completa detrás de todas las secciones;
   el degradado es solo respaldo mientras no exista la imagen) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #b9d5e7;
  background-image:
    url('../assets/fondo.png'),
    linear-gradient(160deg, #d3e6f1 0%, #a9cbe0 45%, #8db6d1 100%);
  background-size: cover, cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; }
svg { display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Efecto vidrio (glassmorphism) ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  padding-inline: 28px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(11, 59, 98, 0.12);
  transition: box-shadow 0.3s ease, height 0.35s ease;
}

/* Al bajar, el menú se compacta un poco */
.header.is-scrolled .navbar {
  height: 56px;
  box-shadow: 0 14px 40px rgba(11, 59, 98, 0.2);
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 40px; width: auto; }
.brand__text {
  display: none;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.05;
  color: var(--navy);
}
.brand.is-fallback img { display: none; }
.brand.is-fallback .brand__text { display: block; }

/* Ocupa el espacio entre el logo y el borde derecho, con los enlaces centrados */
.nav-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { font-weight: 600; }

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--sky-100);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: 132px 0 84px;
  color: var(--white);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 330px 330px;
  gap: 56px;
  align-items: center;
}

/* --- Columna de texto --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
}
.badge svg { width: 16px; height: 16px; color: var(--green); }

.hero__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 24px 0 22px;
}

.hero__line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.18em;
}
.hero__line--biofog { color: var(--navy-deep); }
.hero__line--panel { color: var(--aqua); }

/* Brillo blanco que recorre las letras de izquierda a derecha, en bucle */
.hero__shine {
  --shine-base: var(--navy-deep);
  display: inline-block;
}
.hero__line--biofog .hero__shine { --shine-base: var(--navy-deep); }
.hero__line--panel .hero__shine {
  --shine-base: var(--aqua);
  animation-delay: 0.4s;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__shine {
    background-image: linear-gradient(104deg,
      var(--shine-base) 0%,
      var(--shine-base) 45%,
      rgba(255, 255, 255, 0.92) 50%,
      var(--shine-base) 55%,
      var(--shine-base) 100%);
    background-size: 300% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: text-shine 3.6s linear infinite;
  }
}

@keyframes text-shine {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}

.hero__cloud {
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 0.7em;
  border-radius: 999px;
  color: var(--navy);
}
.hero__cloud svg { width: 0.46em; height: 0.46em; }

.hero__text {
  max-width: 440px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--navy-deep);
}

/* --- Botón --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 6px 6px 6px 30px;
  border-radius: 999px;
  font-size: 16.5px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Píldora azul que se aclara hacia el círculo blanco (efecto de fusión) */
.btn--primary {
  margin-top: 28px;
  color: var(--white);
  background:
    radial-gradient(circle at calc(100% - 28px) 50%,
      rgba(255, 255, 255, 0.85) 0,
      rgba(255, 255, 255, 0.45) 24px,
      rgba(255, 255, 255, 0.12) 46px,
      rgba(255, 255, 255, 0) 72px),
    linear-gradient(90deg, #012e56 0%, #073a66 45%, #1f5d8e 78%, #5b93bf 100%);
  box-shadow: 0 14px 30px rgba(1, 46, 86, 0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(1, 46, 86, 0.42);
}
.btn__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy-deep);
  box-shadow: 0 3px 10px rgba(1, 46, 86, 0.25);
  transition: transform 0.25s ease;
}
.btn__icon svg { width: 18px; height: 18px; }
.btn--primary:hover .btn__icon { transform: translateX(3px); }

/* --- Marcos de imagen (estudiante / panel) --- */
.hero__visual {
  position: relative;
  height: 520px;
}

.frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #dbebf4 0%, #a6c8dd 100%);
  box-shadow: var(--shadow-lg);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Arco superior (estudiante) */
.frame--student { border-radius: 50% 50% 44px 44px / 32% 32% 44px 44px; }
/* Arco inferior (panel) */
.frame--panel { border-radius: 44px 44px 50% 50% / 44px 44px 32% 32%; }

/* Panel: la parte de abajo se difumina con el fondo.
   La sombra pasa al envoltorio como drop-shadow, así sigue la forma ya difuminada. */
.frame-fade {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 22px 28px rgba(11, 59, 98, 0.2));
}
.frame-fade .frame--panel {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, rgba(0, 0, 0, 0.55) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 76%, rgba(0, 0, 0, 0.55) 88%, transparent 100%);
}

/* Marcador cuando falta la imagen */
.frame.is-empty img,
.tech__image.is-empty img { display: none; }
.frame.is-empty::after,
.tech__image.is-empty::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}

/* --- Tarjetas flotantes de vidrio --- */
.card {
  position: absolute;
  z-index: 3;
  padding: 14px;
  border-radius: 16px;
  color: var(--navy);
  /* Aparece con un rebote y luego flota en bucle */
  animation:
    card-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) var(--pop-delay, 1s) backwards,
    float 3s ease-in-out var(--float-delay, 0s) infinite;
}

@keyframes card-pop {
  from { opacity: 0; scale: 0.6; }
}

.card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(213, 232, 243, 0.95);
  color: var(--navy);
}
.card__icon svg { width: 20px; height: 20px; }
.card__icon--sm { width: 28px; height: 28px; }
.card__icon--sm svg { width: 15px; height: 15px; }
.card__icon--flat {
  width: auto;
  height: auto;
  background: transparent;
  color: var(--navy);
}
.card__icon--flat svg { width: 22px; height: 22px; }

.card__title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
.card__title--lg { font-size: 16px; }
.card__sub {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}
.card__value {
  display: block;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  margin: 4px 0 2px;
}
.card__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card__spark { width: 64px; height: 26px; margin: 2px 0; }

.card--row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Posiciones (escritorio) */
.card--prediction {
  top: 8px;
  right: -34px;
  width: auto;
  min-width: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  --pop-delay: 0.95s;
}
.card--prediction .card__title { font-size: 14.5px; white-space: nowrap; }
.card--prediction .card__sub { font-size: 12px; }
.card--prediction .card__spark { width: 70px; height: 28px; }
.card--research {
  left: -36px;
  bottom: -14px;
  width: 236px;
  --float-delay: 0.7s;
  --pop-delay: 1.1s;
}
.card--research .card__title { font-size: 17.5px; }
.card--research .card__sub { font-size: 12.5px; }
.card--arduino {
  top: -6px;
  right: -44px;
  width: auto;
  white-space: nowrap;
  --float-delay: 0.3s;
  --pop-delay: 1.2s;
}
.card--humidity {
  top: 44%;
  right: -44px;
  width: 128px;
  --float-delay: 1s;
  --pop-delay: 1.35s;
}
.card--collection {
  bottom: 44px;
  right: -44px;
  width: 140px;
  --float-delay: 1.5s;
  --pop-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ==========================================================================
   ESTADÍSTICAS
   ========================================================================== */
.stats {
  background: rgba(213, 232, 243, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding: 44px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat__value {
  display: block;
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
}
.stat__label {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  color: var(--navy);
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section { padding: 96px 0; }
.section--alt { background: rgba(255, 255, 255, 0.28); }

.section h2 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  color: var(--navy);
}
/* ==========================================================================
   SOBRE NOSOTROS — Sensores y tecnología del panel (infográfico)
   ========================================================================== */
.tech { position: relative; overflow: hidden; }
.tech__container { position: relative; }

.tech__head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}
.tech .tech__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  color: var(--navy-deep);
}
.tech .tech__title span {
  display: block;
  color: var(--aqua);
}
.tech__head p {
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--navy-deep);
}

/* Diagrama: tarjetas | imagen | tarjetas */
.tech__diagram {
  position: relative;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 290px;
  gap: 40px;
  align-items: center;
}

.tech__lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
/* Línea base con brillo suave */
.tech__line-base {
  fill: none;
  stroke: rgba(79, 195, 247, 0.6);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(79, 195, 247, 0.9));
  /* Se "dibuja" desde el punto hasta la tarjeta al entrar en pantalla */
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.55s;
}
.js .tech__diagram:not(.is-visible) .tech__line-base {
  stroke-dashoffset: 1;
  transition-delay: 0s;
}
/* Destello que recorre la línea de forma continua */
.tech__line-pulse {
  fill: none;
  stroke: #9beaff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 0.2 0.8;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 5px #4fc3f7) drop-shadow(0 0 12px rgba(79, 195, 247, 0.8));
  animation: line-pulse 2.4s linear infinite;
  transition: opacity 0.6s ease 1.7s;
}
.js .tech__diagram:not(.is-visible) .tech__line-pulse {
  opacity: 0;
  transition-delay: 0s;
}
@keyframes line-pulse {
  to { stroke-dashoffset: 0; }
}

.tech__col {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* Tarjetas con efecto vidrio reforzado */
.tech-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.26);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 12px 32px rgba(11, 59, 98, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.tech-card:hover {
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 18px 42px rgba(11, 59, 98, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.tech-card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: #1e6fb0;
  box-shadow: 0 6px 16px rgba(30, 111, 176, 0.22);
}
.tech-card__icon svg { width: 22px; height: 22px; }
.tech-card h3 {
  margin-bottom: 5px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy-deep);
}
.tech-card p {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--navy-deep);
}

/* Imagen central con puntos de conexión */
.tech__image {
  position: relative;
  margin: 0;
}
/* La base de la imagen se difumina hacia el fondo de la web */
.tech__image img {
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 68%, rgba(0, 0, 0, 0.55) 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 68%, rgba(0, 0, 0, 0.55) 85%, transparent 100%);
}
.tech__image.is-empty {
  min-height: 460px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(166, 200, 221, 0.55));
}
.tech__dot {
  position: absolute;
  z-index: 3;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #2ea8e0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 12px rgba(46, 168, 224, 0.9);
  transition: scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s, opacity 0.4s ease 0.45s;
}
.js .tech__diagram:not(.is-visible) .tech__dot {
  scale: 0;
  opacity: 0;
  transition-delay: 0s;
}
.tech__dot::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(46, 168, 224, 0.7);
  animation: dot-ring 2s ease-out infinite;
}
@keyframes dot-ring {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ==========================================================================
   PROCESO — carrusel de videos con efecto de profundidad
   ========================================================================== */
.proc { position: relative; overflow: hidden; }

.proc__head {
  max-width: 800px;
  margin: 0 auto 44px;
  text-align: center;
}
.proc .proc__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.08;
  color: var(--navy-deep);
}
.proc .proc__title span { color: var(--aqua); }
.proc__head p {
  max-width: 700px;
  margin: 16px auto 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--navy-deep);
}

/* El carrusel es hijo directo de la sección, así ocupa todo el ancho */
.proc__carousel { position: relative; }

.proc__track {
  --card-w: 310px;
  --card-h: 462px;
  --step-1: 298px;
  --step-2: 548px;
  --scale-0: 1.08;
  --scale-1: 0.86;
  --scale-2: 0.72;
  position: relative;
  height: 556px;
  touch-action: pan-y;
}

.proc__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-w);
  height: var(--card-h);
  transform: translate(-50%, -50%) scale(var(--scale-2));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.65s ease,
              filter 0.65s ease;
}
.proc__slide[data-pos] { pointer-events: auto; }

.proc__slide[data-pos="0"] {
  z-index: 5;
  opacity: 1;
  transform: translate(-50%, -50%) scale(var(--scale-0));
}
.proc__slide[data-pos="-1"],
.proc__slide[data-pos="1"] {
  z-index: 4;
  opacity: 0.94;
  filter: saturate(0.9);
  cursor: pointer;
}
.proc__slide[data-pos="-1"] { transform: translate(-50%, -50%) translateX(calc(var(--step-1) * -1)) scale(var(--scale-1)); }
.proc__slide[data-pos="1"] { transform: translate(-50%, -50%) translateX(var(--step-1)) scale(var(--scale-1)); }

.proc__slide[data-pos="-2"],
.proc__slide[data-pos="2"] {
  z-index: 3;
  opacity: 0.78;
  filter: saturate(0.8);
  cursor: pointer;
}
.proc__slide[data-pos="-2"] { transform: translate(-50%, -50%) translateX(calc(var(--step-2) * -1)) scale(var(--scale-2)); }
.proc__slide[data-pos="2"] { transform: translate(-50%, -50%) translateX(var(--step-2)) scale(var(--scale-2)); }

/* Tarjeta */
.proc__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 60px rgba(11, 59, 98, 0.24);
}
.proc__slide[data-pos="0"] .proc__card {
  box-shadow: 0 34px 80px rgba(11, 59, 98, 0.32);
}

/* Video */
.proc__media {
  position: relative;
  flex: 1;
  min-height: 0;
  background: linear-gradient(170deg, #cfe4f0 0%, #9dc0d8 100%);
}
.proc__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.proc__media.is-empty video { display: none; }
.proc__media.is-empty::after {
  content: 'Coloca ' attr(data-placeholder) ' en assets/videos/';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-deep);
}

.proc__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-deep);
  box-shadow: 0 8px 20px rgba(11, 59, 98, 0.22);
}
.proc__badge svg { width: 20px; height: 20px; }

/* Botón de reproducción: solo en la tarjeta central */
.proc__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1e6fb0;
  box-shadow: 0 10px 28px rgba(11, 59, 98, 0.3);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.25s ease;
}
.proc__slide[data-pos="0"] .proc__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.proc__play:hover { background: #fff; }
.proc__play svg { width: 24px; height: 24px; margin-left: 2px; }
.proc__play .proc__play-off { display: none; margin-left: 0; }
.proc__play.is-playing .proc__play-on { display: none; }
.proc__play.is-playing .proc__play-off { display: block; }

/* Botón de sonido: también solo en la tarjeta central */
.proc__sound {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-deep);
  box-shadow: 0 8px 20px rgba(11, 59, 98, 0.26);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.25s ease;
}
.proc__slide[data-pos="0"] .proc__sound {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.proc__sound:hover { background: #fff; }
.proc__sound svg { width: 20px; height: 20px; }
.proc__sound .proc__sound-on { display: none; }
.proc__sound.is-on .proc__sound-on { display: block; }
.proc__sound.is-on .proc__sound-off { display: none; }

/* Botón para ver el video en grande, junto al de sonido */
.proc__expand {
  position: absolute;
  right: 62px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-deep);
  box-shadow: 0 8px 20px rgba(11, 59, 98, 0.26);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.25s ease;
}
.proc__slide[data-pos="0"] .proc__expand {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.proc__expand:hover { background: #fff; }
.proc__expand svg { width: 19px; height: 19px; }

/* El botón central se desvanece mientras el video corre, para no tapar la imagen.
   Vuelve al pasar el cursor, al tocar el video o al pausarlo. */
.proc__slide[data-pos="0"] .proc__play.is-idle {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  pointer-events: none;
}

/* Texto */
.proc__body {
  padding: 16px 18px 18px;
  background: rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
}
.proc__body h3 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  color: var(--navy-deep);
}
.proc__slide[data-pos="0"] .proc__body h3 { font-size: 21px; }
.proc__body > p {
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--navy-deep);
}

.proc__stat {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(11, 59, 98, 0.12);
}
.proc__stat-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(213, 232, 243, 0.95);
  color: #1e6fb0;
}
.proc__stat-icon svg { width: 18px; height: 18px; }
.proc__stat-top {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-deep);
}
.proc__stat-top strong {
  font-family: var(--font-title);
  font-size: 21px;
  font-weight: 800;
}
.proc__stat-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

/* Flechas */
.proc__nav {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  color: var(--navy-deep);
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease, opacity 0.6s ease 0.5s;
}
.proc__nav:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.06);
}
.proc__nav svg { width: 22px; height: 22px; }
.proc__nav--prev { left: 14px; }
.proc__nav--next { right: 14px; }

/* Puntos */
.proc__dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
  transition: opacity 0.6s ease 0.6s;
}

/* Al entrar en pantalla, las tarjetas salen del centro y se abren en abanico */
.js .proc__carousel:not(.is-visible) .proc__slide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}
.js .proc__carousel:not(.is-visible) .proc__nav,
.js .proc__carousel:not(.is-visible) .proc__dots {
  opacity: 0;
  transition-delay: 0s;
}
.proc__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(1, 46, 86, 0.25);
  transition: width 0.3s ease, background 0.3s ease;
}
.proc__dot.is-active {
  width: 26px;
  background: var(--navy-deep);
}

/* ==========================================================================
   QA — Preguntas frecuentes
   ========================================================================== */
.qa {
  position: relative;
  overflow: hidden;
  padding: 0 0 96px;
}
.qa__inner {
  position: relative;
  padding-top: 64px;
}

/* --- Cinta animada continua --- */
.ticker {
  overflow: hidden;
  padding: 13px 0;
  background: linear-gradient(90deg,
    rgba(89, 170, 172, 0.48) 0%,
    rgba(116, 186, 160, 0.48) 50%,
    rgba(89, 170, 172, 0.48) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.ticker__track {
  display: flex;
  width: max-content;
}
.ticker__track.is-ready { animation: ticker 48s linear infinite; }
@keyframes ticker {
  to { transform: translateX(-50%); }
}
.ticker__group {
  display: flex;
  align-items: center;
}
.ticker__item {
  padding: 0 24px;
  font-size: 23px;
  font-weight: 200;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
}
.ticker__sep svg {
  width: 19px;
  height: 19px;
  color: rgba(255, 255, 255, 0.88);
}

/* --- Encabezado --- */
.qa__intro {
  max-width: 980px;
  margin: 0 auto 44px;
  text-align: center;
}
.qa .qa__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(26px, 3.1vw, 37px);
  line-height: 1.22;
  color: var(--navy-deep);
}
.qa .qa__title span {
  display: block;
  color: var(--aqua);
}
.qa__rule {
  display: block;
  width: 340px;
  max-width: 70%;
  height: 3px;
  margin: 22px auto 0;
  border-radius: 999px;
  background: var(--aqua);
}

/* --- Acordeón en dos columnas independientes --- */
.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 26px;
}
.faq__col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.faq__item {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 28px rgba(11, 59, 98, 0.12);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.faq__item:hover { background: rgba(255, 255, 255, 0.56); }
.faq__item.is-open {
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 16px 36px rgba(11, 59, 98, 0.16);
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  background: none;
  text-align: left;
}
.faq__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(214, 233, 245, 0.9);
  color: #1e6fb0;
}
.faq__icon svg { width: 20px; height: 20px; }
.faq__icon--green {
  background: rgba(216, 240, 224, 0.95);
  color: var(--green);
}
.faq__text {
  flex: 1;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy-deep);
}
.faq__toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--navy-deep);
}
.faq__toggle svg { width: 20px; height: 20px; }
.faq__sign-minus { display: none; color: var(--green); }
.faq__item.is-open .faq__sign-plus { display: none; }
.faq__item.is-open .faq__sign-minus { display: block; }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p {
  padding: 2px 18px 18px 70px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--navy-deep);
}

/* ==========================================================================
   ANIMACIONES DE SCROLL
   Cada elemento con data-anim aparece al entrar en pantalla. Se usan las
   propiedades translate / scale sueltas para no chocar con los transform
   propios de cada elemento (hover, flotación, parallax).
   ========================================================================== */

/* Barra de progreso de lectura */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--aqua), #2ea8e0 55%, var(--navy-deep));
  box-shadow: 0 0 10px rgba(46, 168, 224, 0.6);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.js [data-anim]:not(.is-visible) { opacity: 0; }

[data-anim].is-visible {
  animation-duration: 0.95s;
  animation-delay: var(--anim-delay, 0ms);
  animation-timing-function: cubic-bezier(0.22, 0.8, 0.26, 1);
  animation-fill-mode: backwards;
}
[data-anim="fade"].is-visible       { animation-name: a-fade; }
[data-anim="fade-up"].is-visible    { animation-name: a-fade-up; }
[data-anim="fade-down"].is-visible  { animation-name: a-fade-down; }
[data-anim="fade-left"].is-visible  { animation-name: a-fade-left; }
[data-anim="fade-right"].is-visible { animation-name: a-fade-right; }
[data-anim="zoom-in"].is-visible    { animation-name: a-zoom-in; }
[data-anim="blur-in"].is-visible    { animation-name: a-blur-in; animation-duration: 1.15s; }
[data-anim="flip-up"].is-visible    { animation-name: a-flip-up; animation-duration: 1.05s; }
[data-anim="grow-x"].is-visible     { animation-name: a-grow-x; animation-duration: 1.2s; }

@keyframes a-fade       { from { opacity: 0; } }
@keyframes a-fade-up    { from { opacity: 0; translate: 0 46px; } }
@keyframes a-fade-down  { from { opacity: 0; translate: 0 -32px; } }
@keyframes a-fade-left  { from { opacity: 0; translate: 80px 0; } }
@keyframes a-fade-right { from { opacity: 0; translate: -80px 0; } }
@keyframes a-zoom-in    { from { opacity: 0; scale: 0.8; } }
@keyframes a-blur-in {
  from { opacity: 0; filter: blur(16px); scale: 1.08; }
}
@keyframes a-flip-up {
  from { opacity: 0; transform: perspective(900px) rotateX(40deg) translateY(50px); }
  to   { opacity: 1; transform: perspective(900px) rotateX(0deg) translateY(0); }
}
@keyframes a-grow-x { from { opacity: 0; scale: 0 1; } }

/* ==========================================================================
   PERSONAL DE LABORATORIO
   ========================================================================== */
.team__head {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
}
.team .team__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  color: var(--navy-deep);
}
.team .team__title span { color: var(--aqua); }
.team__head p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--navy-deep);
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.team-card {
  position: relative;
  padding: 22px 20px 26px;
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 16px 40px rgba(11, 59, 98, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.team-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.44);
  box-shadow:
    0 24px 52px rgba(11, 59, 98, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.team-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy-deep);
  box-shadow: 0 8px 18px rgba(11, 59, 98, 0.18);
}
.team-card__badge svg { width: 21px; height: 21px; }
.team-card__badge--green { color: var(--green); }

.team-card__photo {
  position: relative;
  width: 80%;
  aspect-ratio: 1;
  margin: 4px auto 20px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(180deg, #dbebf4 0%, #a6c8dd 100%);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.7),
    0 14px 30px rgba(11, 59, 98, 0.2);
}
.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.team-card__photo.is-empty img { display: none; }
.team-card__photo.is-empty::after {
  content: 'Coloca ' attr(data-placeholder) ' en assets/';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--navy-deep);
}

.team-card h3 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  color: var(--navy-deep);
}
.team-card__rule {
  display: block;
  width: 44px;
  height: 3px;
  margin: 12px auto;
  border-radius: 3px;
  background: var(--aqua);
}
.team-card p {
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-deep);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  position: relative;
  padding: 60px 0 24px;
  color: var(--navy-deep);
  background: rgba(255, 255, 255, 0.46);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 -12px 40px rgba(11, 59, 98, 0.08);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.35fr;
}
.footer__col {
  padding: 0 30px;
  border-left: 1px solid rgba(1, 46, 86, 0.14);
}
.footer__col:first-child {
  padding-left: 0;
  border-left: 0;
}
.footer__col:last-child { padding-right: 0; }

/* Marca */
.footer__logo { display: inline-flex; }
.footer__logo img { height: 52px; width: auto; }
.footer__logo-text {
  display: none;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.05;
  color: var(--navy-deep);
}
.footer__logo.is-fallback img { display: none; }
.footer__logo.is-fallback .footer__logo-text { display: block; }

.footer__about {
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--navy-deep);
}
/* Títulos de columna */
.footer__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--navy-deep);
}
.footer__title-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(11, 59, 98, 0.14);
}
.footer__title-icon svg { width: 21px; height: 21px; }

/* Enlaces */
.footer__links a {
  display: block;
  padding: 9px 0;
  font-size: 15px;
  color: var(--navy-deep);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer__links a:hover {
  color: #2a8fa0;
  padding-left: 5px;
}

/* Contacto */
.footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  font-size: 15px;
  line-height: 1.45;
}
.footer__contact svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--navy-deep);
}
.footer__contact a {
  color: var(--navy-deep);
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}
.footer__contact a:hover { color: #2a8fa0; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 44px;
  font-size: 13.5px;
  color: rgba(1, 46, 86, 0.78);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 290px 290px;
    gap: 44px;
  }
  .hero__visual { height: 470px; }
  .nav-menu { gap: 40px; }

  .card--prediction { right: -24px; }
  .card--arduino,
  .card--humidity,
  .card--collection { right: -20px; }
  .card--humidity { top: 40%; }
  .card--collection { bottom: 40px; }
}

@media (max-width: 992px) {
  .hero { padding-top: 120px; }
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px 40px;
  }
  .hero__content {
    grid-column: 1 / -1;
    max-width: 560px;
  }
  .hero__visual { height: 460px; }

  .card--prediction { right: 6px; }
  .card--research { left: -12px; }
  .card--arduino,
  .card--humidity,
  .card--collection { right: -12px; }
  .card--humidity { top: 38%; }
  .card--collection { bottom: 36px; }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }
  /* Carrusel: tarjetas laterales más juntas */
  .proc__track {
    --card-w: 300px;
    --card-h: 430px;
    --step-1: 250px;
    --step-2: 466px;
    --scale-0: 1.05;
    --scale-1: 0.84;
    --scale-2: 0.7;
    height: 512px;
  }
  .proc__nav--prev { left: 12px; }
  .proc__nav--next { right: 12px; }

  .faq { gap: 20px; }
  .faq__col { gap: 16px; }

  /* Equipo en dos columnas */
  .team__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 640px;
    margin: 0 auto;
  }

  /* Footer: marca arriba a lo ancho, luego tres columnas */
  .footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 40px;
  }
  .footer__col--brand {
    grid-column: 1 / -1;
    max-width: 560px;
  }
  .footer__col:nth-child(2) {
    padding-left: 0;
    border-left: 0;
  }
  .footer__col { padding: 0 22px; }

  /* Infográfico: imagen arriba, tarjetas en dos columnas, sin líneas */
  .tech__diagram {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .tech__image {
    grid-column: 1 / -1;
    grid-row: 1;
    width: min(100%, 560px);
    margin: 0 auto;
  }
  .tech__col { grid-row: 2; }
  .tech__lines,
  .tech__dot { display: none; }
}

/* Navegación móvil */
@media (max-width: 900px) {
  .navbar {
    height: 60px;
    padding-inline: 20px;
  }
  .brand img { height: 34px; }
  .nav-toggle { display: inline-flex; }

  .nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    margin: 0;
    padding: 10px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(11, 59, 98, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
  }
  .nav-link::after { display: none; }
  .nav-link.active { background: var(--sky-100); }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .header { top: 12px; }

  .hero { padding: 100px 0 56px; }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero__title { font-size: clamp(44px, 13vw, 58px); }
  .hero__text { font-size: 16px; }

  .hero__visual {
    width: min(100%, 330px);
    height: 420px;
    margin-inline: auto;
  }

  .card { padding: 12px; }
  .card--prediction { top: 6px; right: 4px; min-width: 110px; }
  .card--research { left: 6px; bottom: -14px; width: 232px; }
  .card--arduino { top: 6px; right: 4px; }
  .card--humidity { top: 36%; right: 4px; width: 118px; }
  .card--collection { right: 4px; bottom: 14px; width: 130px; }

  .stats { padding: 36px 0; }
  .stat__value { font-size: 26px; }
  .stat__label { font-size: 15px; }

  .section { padding: 64px 0; }

  /* Carrusel: una tarjeta a la vez, con las vecinas asomando */
  .proc__head { margin-bottom: 32px; }
  .proc__head p { font-size: 15.5px; }
  .proc__track {
    --card-w: min(74vw, 290px);
    --card-h: 420px;
    --step-1: 78vw;
    --step-2: 150vw;
    --scale-0: 1;
    --scale-1: 0.86;
    --scale-2: 0.72;
    height: 460px;
  }
  .proc__slide[data-pos="-2"],
  .proc__slide[data-pos="2"] { opacity: 0; }
  .proc__nav {
    width: 42px;
    height: 42px;
  }
  .proc__nav svg { width: 18px; height: 18px; }
  .proc__nav--prev { left: 6px; }
  .proc__nav--next { right: 6px; }
  .proc__dots { margin-top: 20px; }

  /* Preguntas frecuentes en una sola columna */
  .qa { padding: 0 0 64px; }
  .qa__inner { padding-top: 44px; }
  .qa__intro { margin-bottom: 36px; }
  .ticker__item { padding: 0 18px; font-size: 19px; }
  .ticker__sep svg { width: 16px; height: 16px; }
  /* Las dos columnas se funden en una lista ordenada 1..5 */
  .faq {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .faq__col { display: contents; }
  .faq__item { order: var(--order, 0); }
  .faq__text { font-size: 15px; }
  .faq__a p { padding-left: 18px; }

  /* Equipo: tarjetas horizontales, foto a la izquierda */
  .team__head { margin-bottom: 32px; }
  .team__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .team-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    text-align: left;
  }
  .team-card__photo {
    width: 96px;
    flex-shrink: 0;
    margin: 0;
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.7),
      0 10px 22px rgba(11, 59, 98, 0.18);
  }
  .team-card__photo.is-empty::after { font-size: 9px; padding: 10px; }
  .team-card__badge {
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
  }
  .team-card__badge svg { width: 16px; height: 16px; }
  .team-card h3 { font-size: 17px; }
  .team-card__rule { margin: 9px 0; }
  .team-card p { font-size: 14px; }

  /* Footer en una sola columna */
  .footer { padding-top: 44px; }
  .footer__grid {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }
  .footer__col,
  .footer__col:nth-child(2) {
    padding: 0;
    border-left: 0;
  }
  .footer__bottom {
    flex-direction: column;
    margin-top: 32px;
  }

  .tech__head { margin-bottom: 32px; }
  .tech__diagram { grid-template-columns: 1fr; gap: 18px; }
  .tech__image { grid-row: 1; margin-bottom: 10px; }
  .tech__col { grid-row: auto; gap: 18px; }
}

/* Respeta la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { animation: none; }
  .tech__line-pulse,
  .tech__dot::after,
  .hero__shine,
  .ticker__track.is-ready { animation: none; }
  .proc__slide { transition-duration: 0.01ms; }
  [data-anim].is-visible { animation: none; }
  .tech__line-base,
  .tech__line-pulse,
  .tech__dot { transition: none; }
  .scroll-progress { display: none; }
}

/* ==========================================================================
   VENTANA DEL VIDEO AMPLIADO
   ========================================================================== */
.vmodal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
}
.vmodal[hidden] { display: none; }

.vmodal__fondo {
  position: absolute;
  inset: 0;
  background: rgba(1, 26, 48, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: a-fade 0.3s ease;
}

/* La caja se ajusta al video: si es vertical queda angosta y alta,
   si es horizontal queda ancha. Así no aparecen franjas negras. */
.vmodal__caja {
  position: relative;
  z-index: 1;
  max-width: min(1040px, 100%);
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 30px 80px rgba(1, 26, 48, 0.45);
  animation: a-zoom-in 0.35s cubic-bezier(0.22, 0.8, 0.26, 1);
}

.vmodal__barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 12px;
}
.vmodal__titulo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.2;
  color: var(--navy-deep);
}
.vmodal__cerrar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(213, 232, 243, 0.9);
  color: var(--navy-deep);
  transition: background 0.25s ease, transform 0.25s ease;
}
.vmodal__cerrar:hover {
  background: var(--navy-deep);
  color: var(--white);
  transform: rotate(90deg);
}
.vmodal__cerrar svg { width: 20px; height: 20px; }

.vmodal__video {
  display: block;
  width: auto;
  height: auto;
  min-width: 260px;
  max-width: min(1000px, 86vw);
  max-height: 74vh;
  margin: 0 auto;
  border-radius: 14px;
  background: #041e33;
}

/* Bloquea el scroll del fondo mientras la ventana está abierta */
body.is-locked { overflow: hidden; }

@media (max-width: 640px) {
  .vmodal { padding: 14px; }
  .vmodal__caja { padding: 12px; border-radius: 18px; }
  .vmodal__titulo { font-size: 16px; }
  .vmodal__video { min-width: 0; max-width: 100%; max-height: 66vh; }
}

@media (prefers-reduced-motion: reduce) {
  .vmodal__fondo,
  .vmodal__caja { animation: none; }
  .vmodal__cerrar:hover { transform: none; }
}
