/* ============================================================
   BRAINLAB v2 — Clean Scientific Aesthetic
   Bright, minimal, European deep-tech
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* === DESIGN TOKENS === */
:root {
  /* Backgrounds */
  --bg-white:    #ffffff;
  --bg-off:      #f8f9fb;
  --bg-subtle:   #f2f4f8;
  --bg-section:  #eef1f6;
  --bg-dark:     #0f1923;
  --bg-dark-2:   #162032;

  /* Blues */
  --blue-deep:   #0a2540;
  --blue-mid:    #1455a4;
  --blue-bright: #2c7be5;
  --blue-light:  #4f96f5;
  --blue-pale:   #e8f0fd;
  --blue-wash:   #f0f5ff;

  /* Accents */
  --teal:        #0d9488;
  --teal-light:  #ccfbf1;
  --slate:       #64748b;
  --slate-light: #94a3b8;
  --slate-pale:  #f1f5f9;

  /* Typography */
  --text-dark:   #0a2540;
  --text-mid:    #334155;
  --text-muted:  #64748b;
  --text-faint:  #94a3b8;

  /* Borders */
  --border:      rgba(10, 37, 64, 0.08);
  --border-mid:  rgba(10, 37, 64, 0.14);
  --border-blue: rgba(44, 123, 229, 0.2);

  /* Fonts */
  --font:       'Manrope', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(10,37,64,0.06), 0 1px 2px rgba(10,37,64,0.04);
  --shadow-sm:  0 4px 12px rgba(10,37,64,0.07), 0 2px 4px rgba(10,37,64,0.04);
  --shadow-md:  0 8px 24px rgba(10,37,64,0.09), 0 4px 8px rgba(10,37,64,0.05);
  --shadow-lg:  0 16px 48px rgba(10,37,64,0.12), 0 8px 16px rgba(10,37,64,0.06);
  --shadow-xl:  0 24px 64px rgba(10,37,64,0.14), 0 12px 24px rgba(10,37,64,0.07);
  --shadow-blue: 0 8px 32px rgba(44,123,229,0.18);

  /* Spacing */
  --section-pad: 100px;
  --container:   1240px;

  /* Motion */
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --t1: 0.18s;
  --t2: 0.35s;
  --t3: 0.6s;
  --t4: 0.9s;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg-white);
  color: var(--text-dark);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === SUBTLE GRAIN === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  opacity: 0.3;
}

/* === SCROLL PROGRESS === */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-mid), var(--blue-light));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* === PAGE OVERLAY === */
.page-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-white);
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.page-overlay.active { opacity: 1; }

/* === CONTAINER === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
}

/* === NAVIGATION === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--t2) var(--ease),
              box-shadow var(--t2) var(--ease),
              height var(--t2) var(--ease);
}

nav.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border), var(--shadow-xs);
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-dark);
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
}

.nav-logo-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--blue-deep);
}

.nav-logo-tagline {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--blue-bright);
  letter-spacing: 0.14em;
  display: block;
  line-height: 1;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.825rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-mid);
  text-decoration: none;
  transition: color var(--t1);
}

.nav-links a:hover { color: var(--blue-mid); }
.nav-links a.active { color: var(--blue-bright); }

.nav-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bg-white) !important;
  background: var(--blue-mid);
  padding: 9px 22px;
  border-radius: 6px;
  transition: background var(--t1), transform var(--t1), box-shadow var(--t1) !important;
}

.nav-btn:hover {
  background: var(--blue-deep) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue) !important;
  color: var(--bg-white) !important;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-mobile-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--t2);
}

/* === SECTION BASE === */
section { position: relative; padding: var(--section-pad) 0; }

/* === EYEBROW LABELS === */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1.5px;
  background: var(--blue-bright);
  flex-shrink: 0;
}

/* === HEADINGS === */
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.1; color: var(--blue-deep); }

.display-xl {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.display-lg {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.display-md {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-blue { color: var(--blue-bright); }
.text-muted { color: var(--text-muted); }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--t2) var(--ease);
  position: relative;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--blue-mid);
  color: white;
  padding: 14px 32px;
  border-radius: 8px;
  box-shadow: var(--shadow-blue), var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--blue-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(44,123,229,0.28), var(--shadow-sm);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--blue-mid);
  padding: 13px 31px;
  border-radius: 8px;
  border: 1.5px solid var(--border-blue);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--blue-bright);
  background: var(--blue-wash);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  color: var(--blue-mid);
  padding: 0;
  background: none;
  font-weight: 600;
  font-size: 0.875rem;
  gap: 6px;
}

.btn-ghost:hover {
  color: var(--blue-deep);
  gap: 10px;
}

.btn-ghost .arrow {
  transition: transform var(--t2) var(--ease);
}
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* === DIVIDERS === */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* === CARDS === */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t2) var(--ease),
              transform var(--t2) var(--ease),
              border-color var(--t2);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border-blue);
}

/* Card with top accent */
.card-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-mid), var(--blue-light));
  border-radius: 12px 12px 0 0;
  opacity: 0;
  transition: opacity var(--t2);
}
.card-accent { position: relative; overflow: hidden; }
.card-accent:hover::before { opacity: 1; }

/* === TAGS === */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: var(--blue-pale);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(44,123,229,0.15);
}

/* === REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t3) var(--ease),
              transform var(--t3) var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 72px 0 0;
  background: var(--bg-white);
  position: relative;
}

/* Subtle grid background */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;

  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="70"><polygon points="80,35 60,70 20,70 0,35 20,0 60,0" fill="none" stroke="%232c7be5" stroke-width="1" stroke-opacity="0.2"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="70"><polygon points="80,35 60,70 20,70 0,35 20,0 60,0" fill="none" stroke="%232c7be5" stroke-width="1" stroke-opacity="0.2"/></svg>');
    
  background-size: 120px 70px;
  background-position: 0 0, 60px 35px;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: -30%;

  background:
    radial-gradient(
      circle,
      rgba(44,123,229,0.25) 0%,
      rgba(44,123,229,0.12) 15%,
      rgba(44,123,229,0.05) 25%,
      transparent 40%
    );

  filter: blur(40px);

  animation: scanGrid 15s linear infinite;
}

@keyframes scanGrid {

  0% {
    transform:
      translate(-35%, -20%)
      scale(0.7);
  }

  50% {
    transform:
      translate(10%, 0%)
      scale(1.1);
  }

  100% {
    transform:
      translate(40%, 25%)
      scale(1.4);
  }
}

/* Soft blue gradient blob */
.hero-glow {
  position: absolute;
  right: -10%;
  top: -10%;
  width: 70%;
  height: 120%;
  background: radial-gradient(ellipse 60% 80% at 60% 40%,
    rgba(44,123,229,0.08) 0%,
    rgba(79,150,245,0.04) 40%,
    transparent 70%);
  pointer-events: none;
}

/* Second blob bottom-left */
.hero-glow-2 {
  position: absolute;
  left: -5%;
  bottom: -10%;
  width: 40%;
  height: 60%;
  background: radial-gradient(ellipse,
    rgba(13,148,136,0.05) 0%,
    transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.hero-content { padding-top: 20px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: var(--blue-pale);
  border: 1px solid var(--border-blue);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
  animation: fadeUp 0.7s var(--ease) 0.1s both;
}

.hero-badge-dot {
  width: 5px;
  height: 5px;
  background: var(--blue-bright);
  border-radius: 50%;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero h1 {
  animation: fadeUp 0.8s var(--ease) 0.2s both;
  margin-bottom: 24px;
  color: var(--blue-deep);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 40px;
  animation: fadeUp 0.8s var(--ease) 0.35s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease) 0.5s both;
}

.hero-metrics {
  display: flex;
  gap: 40px;
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.8s var(--ease) 0.65s both;
}

.hero-metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--blue-deep);
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Hero visual panel */
.hero-visual {
  position: relative;
  animation: fadeIn 1s var(--ease) 0.3s both;
}

.hero-visual-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.hero-visual-header {
  background: var(--bg-off);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.win-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero-visual-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-left: 4px;
}

.hero-visual-body {
  padding: 28px;
}

/* Floating stat pill */
.hero-float-badge {
  position: absolute;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: float 4s ease-in-out infinite;
}

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

.hero-float-1 {
  top: -20px;
  right: -20px;
  animation-delay: 0s;
}

.hero-float-2 {
  bottom: 30px;
  left: -30px;
  animation-delay: 1.5s;
}

.float-icon {
  width: 32px;
  height: 32px;
  background: var(--blue-pale);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.float-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-deep);
  line-height: 1;
}

.float-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   HERO VIDEO (vídeo local HTML5, autoplay silenciado)
   ============================================================ */
.hero-video-card {
  /* Marco con un borde azul muy sutil para separarlo del fondo hexagonal */
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-blue);
}

.hero-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--blue-deep);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
}

.hero-video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(0.85);
  transition: transform var(--t4) var(--ease), filter var(--t3) var(--ease);
}

/* Velo azul profundo: integra cualquier miniatura con la paleta de la web */
.hero-video-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,37,64,0.10) 0%, rgba(10,37,64,0.25) 45%, rgba(10,37,64,0.82) 100%),
    linear-gradient(120deg, rgba(20,85,164,0.35) 0%, transparent 60%);
  mix-blend-mode: multiply;
  transition: opacity var(--t3) var(--ease);
}

/* La misma retícula hexagonal del fondo del hero, encima del vídeo */
.hero-video-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="70"><polygon points="80,35 60,70 20,70 0,35 20,0 60,0" fill="none" stroke="%23ffffff" stroke-width="1" stroke-opacity="0.14"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="70"><polygon points="80,35 60,70 20,70 0,35 20,0 60,0" fill="none" stroke="%23ffffff" stroke-width="1" stroke-opacity="0.14"/></svg>');
  background-size: 120px 70px;
  background-position: 0 0, 60px 35px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, transparent 30%, #000 100%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, transparent 30%, #000 100%);
  transition: opacity var(--t3) var(--ease);
}

/* Botón de reproducción */
.hero-video-play {
  position: absolute;
  top: 45%;
  left: 50%;
  z-index: 2;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  color: var(--blue-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(10,37,64,0.35), var(--shadow-blue);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: transform var(--t2) var(--ease), background var(--t2) var(--ease), color var(--t2) var(--ease);
}
.hero-video-play svg { margin-left: 3px; }

.hero-video-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.55);
  animation: heroVideoRing 2.6s var(--ease) infinite;
  pointer-events: none;
}
@keyframes heroVideoRing {
  0%   { transform: scale(0.85); opacity: 0.9; }
  80%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.hero-video:hover .hero-video-thumb { transform: scale(1.06); filter: saturate(1); }
.hero-video:hover .hero-video-play,
.hero-video-play:focus-visible {
  transform: scale(1.08);
  background: var(--blue-bright);
  color: #fff;
}
.hero-video-play:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
}

/* Pie del vídeo */
.hero-video-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  color: #fff;
  pointer-events: none;
  transition: opacity var(--t2) var(--ease), transform var(--t2) var(--ease);
}
.hero-video-caption-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  max-width: 28ch;
  text-shadow: 0 1px 12px rgba(10,37,64,0.5);
}
.hero-video-caption-meta {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.8);
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  background: rgba(10,37,64,0.35);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

/* Vídeo local HTML5: mismo encuadre que la miniatura (cover) y mismo fundido que tenía el iframe.
   pointer-events: none → no tapa el botón de play mientras está oculto (sin controles nativos). */
.hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t3) var(--ease);
}
.hero-video.is-playing video { opacity: 1; }
.hero-video.is-playing { cursor: default; }
.hero-video.is-playing .hero-video-play,
.hero-video.is-playing .hero-video-caption {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.hero-video.is-playing .hero-video-play { transform: scale(0.8); }

/* Al reproducir, las insignias flotantes se apartan para no tapar los controles */
.hero-visual--video .hero-float-badge {
  transition: opacity var(--t2) var(--ease);
}
.hero-visual--video.is-playing .hero-float-badge {
  opacity: 0;
  pointer-events: none;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeUp 1s var(--ease) 1s both;
  z-index: 10;
}

.scroll-mouse {
  width: 18px;
  height: 28px;
  border: 1.5px solid var(--border-mid);
  border-radius: 9px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.scroll-wheel {
  width: 2px;
  height: 5px;
  background: var(--blue-light);
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.3; transform: translateY(5px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-section { background: var(--bg-off); }

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.about-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-deep);
  letter-spacing: -0.03em;
  line-height: 1;
}

.about-stat-unit { color: var(--blue-bright); }

.about-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.about-visual-wrap {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   RESEARCH AREAS
   ============================================================ */

.research-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  margin-top: 56px;
}

.research-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: all var(--t2) var(--ease);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.research-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-wash) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--t2);
}

.research-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--border-blue);
}
.research-card:hover::after { opacity: 1; }

.research-card > * { position: relative; z-index: 1; }

.rc-number {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--blue-bright);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  display: block;
}

.rc-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--blue-mid);
}

.rc-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.rc-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   PLATFORM SECTION
   ============================================================ */
.platform-section { background: var(--bg-off); }

.platform-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
}

.platform-features {
  list-style: none;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.platform-feature {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--t1);
}

.platform-feature:first-child { border-top: 1px solid var(--border); }

.pf-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--blue-bright);
  flex-shrink: 0;
  margin-top: 2px;
  width: 24px;
  letter-spacing: 0.06em;
}

.pf-content strong {
  display: block;
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.pf-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Dashboard preview */
.platform-screen {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.ps-bar {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ps-dot { width: 10px; height: 10px; border-radius: 50%; }
.ps-dot-r { background: #ff5f57; }
.ps-dot-y { background: #ffbe2e; }
.ps-dot-g { background: #27c840; }

.ps-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-left: 8px;
}

.ps-body { padding: 22px; }

/* Pill status */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.status-pill.running {
  background: rgba(13,148,136,0.08);
  color: var(--teal);
  border: 1px solid rgba(13,148,136,0.2);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

/* Minimal bar chart */
.mini-chart {
  margin-top: 14px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
}

.mini-bar {
  flex: 1;
  background: linear-gradient(to top, var(--blue-mid), var(--blue-light));
  border-radius: 3px 3px 0 0;
  opacity: 0.7;
  transition: opacity var(--t1);
}
.mini-bar:last-child {
  opacity: 1;
  box-shadow: 0 0 0 1px var(--blue-light);
}
.mini-bar:hover { opacity: 1; }

/* ============================================================
   STATISTICS
   ============================================================ */
.stats-section {
  background: var(--blue-deep);
  padding: 80px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}

.stat-cell {
  padding: 48px 36px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: background var(--t2);
}

.stat-cell:last-child { border-right: none; }
.stat-cell:hover { background: rgba(255,255,255,0.04); }

.stat-number {
  font-size: clamp(2.2rem,4vw,3.4rem);
  font-weight: 800;
  color: white;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-accent { color: var(--blue-light); }

.stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  margin-top: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pubs-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 16px;
  margin-top: 48px;
}

.pub-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: all var(--t2) var(--ease);
}

.pub-card:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pub-journal {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.4;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.pub-authors {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   PARTNERS
   ============================================================ */
.partners-section {
  background: var(--bg-off);
  padding: 64px 0;
}

.partners-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 40px;
}

.partners-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 52px;
  flex-wrap: wrap;
}

.partner-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  transition: color var(--t2);
  text-transform: uppercase;
}

.partner-name:hover { color: var(--blue-mid); }

/* ============================================================
   NEWS
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}

.news-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--t2) var(--ease);
}

.news-card:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.news-img {
  height: 160px;
  background: var(--bg-subtle);
  position: relative;
  overflow: hidden;
}
.news-card:first-child .news-img { height: 200px; }

.news-body { padding: 22px; }

.news-date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.news-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.news-excerpt {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: var(--bg-off);
  text-align: center;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(44,123,229,0.07) 0%, transparent 70%);
}

.cta-section .container { position: relative; z-index: 1; }
.cta-section p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--blue-deep);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 56px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-top: 14px;
  max-width: 270px;
}

.footer-brand .nav-logo-name { color: rgba(255,255,255,0.9); }
.footer-brand .nav-logo-tagline { color: var(--blue-light); }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col ul a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--t1);
}
.footer-col ul a:hover { color: rgba(255,255,255,0.9); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.3);
}

.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color var(--t1);
}
.footer-links a:hover { color: rgba(255,255,255,0.6); }

/* ============================================================
   RESEARCH PAGE
   ============================================================ */
.page-hero {
  background: var(--bg-off);
  padding: 140px 0 80px;
  overflow: hidden;
  position: relative;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96'%3E%3Cpolygon points='42,2 80,22 80,62 42,82 4,62 4,22' fill='none' stroke='%230a2540' stroke-width='0.7' stroke-opacity='0.08'/%3E%3Cpolygon points='84,50 122,70 122,110 84,130 46,110 46,70' fill='none' stroke='%230a2540' stroke-width='0.7' stroke-opacity='0.08'/%3E%3Cpolygon points='0,50 38,70 38,110 0,130 -38,110 -38,70' fill='none' stroke='%230a2540' stroke-width='0.7' stroke-opacity='0.08'/%3E%3C/svg%3E");
  background-size: 84px 96px;
  opacity: 0.9;
}

.page-hero-gradient {
  position: absolute;
  right: 0; top: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(44,123,229,0.07) 0%, transparent 70%);
}

.page-hero .container { position: relative; z-index: 1; }
.page-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-top: 16px;
  line-height: 1.7;
}

/* Research detail areas */
.research-area {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}
.research-area:last-child { border-bottom: none; }

.research-area-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.research-area-layout.flip { direction: rtl; }
.research-area-layout.flip > * { direction: ltr; }

.ra-text p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 14px;
}

.ra-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.ra-visual {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

/* Timeline */
.timeline {
  max-width: 680px;
  margin-top: 56px;
  padding-left: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.timeline-item:last-child { border-bottom: none; }

.tl-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-bright);
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.tl-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.tl-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Data viz panel */
.viz-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: 56px;
}

.viz-header {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.viz-title-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.07em;
}

.viz-body-pad { padding: 32px; min-height: 280px; }

/* ============================================================
   PLATFORM PAGE
   ============================================================ */
.robot-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  margin-top: 56px;
}

.robot-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--t2) var(--ease);
}

.robot-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border-blue);
}

.robot-visual {
  height: 200px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.robot-body { padding: 22px; }
.robot-body h3 { font-size: 0.95rem; font-weight: 700; color: var(--blue-deep); margin-bottom: 6px; }
.robot-body p { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }

/* Sensor cards */
.sensor-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-top: 48px;
}

.sensor-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 18px;
  text-align: center;
  transition: all var(--t2) var(--ease);
}

.sensor-card:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.sensor-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--blue-pale);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.25rem;
}

.sensor-name { font-size: 0.85rem; font-weight: 700; color: var(--blue-deep); margin-bottom: 4px; }
.sensor-desc { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-muted); letter-spacing: 0.04em; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  margin-top: 48px;
}

.gallery-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all var(--t2) var(--ease);
}

.gallery-item:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }

.gallery-inner {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:nth-child(1) .gallery-inner { height: 100%; min-height: 360px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .research-grid { grid-template-columns: repeat(2,1fr); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .stats-grid .stat-cell:nth-child(2) { border-right: none; }
  .stats-grid .stat-cell:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.08); }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-grid .news-card:last-child { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .sensor-grid { grid-template-columns: repeat(2,1fr); }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
  :root { --section-pad: 72px; }
  .container { padding: 0 24px; }
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.97);
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 850;
    backdrop-filter: blur(16px);
  }
  .nav-links.open a { font-size: 1.3rem; }
  .nav-mobile-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .about-layout { grid-template-columns: 1fr; }
  .about-visual-wrap { display: none; }
  .platform-layout { grid-template-columns: 1fr; }
  .platform-screen { display: none; }
  .pubs-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .news-grid .news-card:last-child { display: block; }
  .research-area-layout { grid-template-columns: 1fr; }
  .research-area-layout.flip { direction: ltr; }
  .robot-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .research-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid .stat-cell { border-right: none; border-top: 1px solid rgba(255,255,255,0.08); }
  .stats-grid .stat-cell:first-child { border-top: none; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .sensor-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:nth-child(1) { grid-column: span 1; grid-row: span 1; }
  .gallery-item:nth-child(1) .gallery-inner { min-height: 180px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .robot-grid { grid-template-columns: 1fr; }
}

/* === HERO VIDEO: responsive y movimiento reducido === */
@media (max-width: 900px) {
  /* El vídeo sí se muestra en móvil/tablet, bajo el texto */
  .hero { padding-bottom: 120px; }
  .hero-inner { gap: 48px; }
  .hero-visual.hero-visual--video { display: block; }
  .hero-visual--video .hero-float-badge { display: none; }
}
@media (max-width: 600px) {
  .hero-video-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .hero-video-caption { left: 16px; right: 16px; bottom: 14px; }
  .hero-video-caption-title { font-size: 0.88rem; }
  .hero-video-caption-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video-ring { animation: none; opacity: 0; }
  .hero-video-thumb,
  .hero-video:hover .hero-video-thumb { transition: none; transform: none; }
}
