/* ============================================================
   CYPHER INTELLIGENCE — SECTIONS
   hero · manifiesto · ecosistema · capacidades · narsil · equipo · diferencial · contacto
   ============================================================ */

/* ============================================================
   §1 — HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: 115px;
  padding-bottom: var(--space-9);
  background:
    var(--radar-bg) bottom right / 1000px 1000px no-repeat,
    radial-gradient(ellipse at 70% 50%, rgba(63, 184, 255, 0.12), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(63, 184, 255, 0.06), transparent 55%),
    var(--ink-bg);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}
.hero__inner {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  /* No grid: text in normal flow, visual absolutely anchored top-right */
}

.hero__coord {
  position: absolute;
  top: calc(var(--nav-h) + 18px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  color: var(--accent);
  letter-spacing: 0.32em;
  z-index: 5;
}

.hero__content {
  position: relative;
  z-index: 5;
  max-width: 54%;
}
.hero__content .eyebrow {
  margin-bottom: var(--space-5);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 64px);
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0 0 var(--space-5);
  color: var(--ink-fg);
}
.hero__title .title-line {
  display: block;
  white-space: nowrap;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: var(--type-lead);
  color: var(--ink-fg-dim);
  max-width: 48ch;
  margin: 0 0 var(--space-6);
  line-height: 1.55;
}
/* Partners marquee */
.hero__partners {
  margin-top: var(--space-7);
  max-width: 58%;
  position: relative;
  z-index: 5;
}
.hero__partners::before,
.hero__partners::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.hero__partners::before {
  left: 0;
  background: linear-gradient(to right, var(--ink-bg) 0%, transparent 100%);
}
.hero__partners::after {
  right: 0;
  background: linear-gradient(to left, var(--ink-bg) 0%, transparent 100%);
}
.marquee-wrap {
  overflow: hidden;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
.marquee-inner {
  display: flex;
  align-items: center;
  gap: clamp(32px, 4vw, 64px);
  width: max-content;
  animation: marqueeScroll 40s linear infinite; /* más lento con 13 logos */
}
.marquee-inner:hover { animation-play-state: paused; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  flex-shrink: 0;
  white-space: nowrap;
}
.marquee-item--logo {
  display: inline-flex;
  align-items: center;
}
.marquee-item--logo img {
  height: auto;
  width: auto;
  max-height: 30px;
  max-width: 160px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.65;
  transition: opacity var(--duration-fast) var(--ease),
              filter var(--duration-fast) var(--ease);
}
.marquee-item--logo img:hover {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 6px var(--accent));
}
.marquee-item--logo img[alt="Protaapp"] { max-height: 46px; }

@media (max-width: 900px) {
  .hero__partners { max-width: 100%; margin-top: var(--space-7); }
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: nowrap;
}

.hero__visual {
  position: absolute;
  /* Sube el paquete logo+halo para alinear su borde superior con el título
     de la izquierda (top fijo en px → estable ante el ancho del viewport). */
  top: calc(var(--nav-h) - 137px);
  right: clamp(20px, 3.5vw, 64px);
  width: 34vw;
  max-width: 520px;
  aspect-ratio: 1;
  margin: 0;
  z-index: 3;
}

/* Canvas de fondo — primera capa — cubre todo el hero sin mover el logo */
.hero__bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;         /* debajo del logo (z:3) y del contenido (z:4-5) */
  pointer-events: none;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero__visual-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__visual-fallback img {
  width: 70%;
  filter: drop-shadow(0 0 80px var(--accent-glow)) brightness(1.05);
  animation: float 8s ease-in-out infinite;
}
.hero__visual .ring {
  position: absolute;
  border: 1px solid rgba(63, 184, 255, 0.18);
  border-radius: 50%;
  pointer-events: none;
}
.hero__visual .ring--1 { inset: 6%; }
.hero__visual .ring--2 { inset: -8%; border-color: rgba(63, 184, 255, 0.10); }
.hero__visual .ring--3 { inset: -22%; border-color: rgba(63, 184, 255, 0.06); }

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-fg-mute);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  z-index: 5;
}
.hero__scroll .stick {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll .stick::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, var(--accent));
  animation: scrollDown 2.4s infinite var(--ease);
}

/* Hero metrics — en flujo, izquierda, entre botones y carrusel */
.hero__metrics {
  max-width: 58%;
  width: 100%;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--ink-line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4) var(--space-3);
  position: relative;
  z-index: 5;
}

.hero__metric {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Número contador — grande, alternado azul / blanco */
.hero__metric b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 36px);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink-fg);
}
.hero__metric:nth-child(odd)  b { color: var(--accent-bright); }
.hero__metric:nth-child(even) b { color: var(--ink-fg); }

/* Etiqueta — mono uppercase */
.hero__metric-tag {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-fg-mute);
  font-weight: 500;
}

/* Descripción corta — máx. 2 líneas */
.hero__metric-desc {
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-fg-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.manifesto__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 22ch;
  margin: 0 0 var(--space-6);
}
.manifesto__title em {
  font-style: normal;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.manifesto__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.manifesto__panel {
  position: relative;
  border: 1px solid var(--ink-line);
  background: linear-gradient(180deg, rgba(63, 184, 255, 0.04), rgba(63, 184, 255, 0));
  padding: var(--space-7);
}
.manifesto__panel .ptag {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  color: var(--accent);
  letter-spacing: 0.22em;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}
.manifesto__panel h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.015em;
  color: var(--ink-fg);
  margin: 0 0 var(--space-4);
}
.manifesto__panel p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-fg-dim);
}

/* ============================================================
   §3 — ECOSISTEMA — scroll-pinned deck reveal
   ============================================================ */
.eco-track {
  height: 200vh;
  position: relative;
}

.eco-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.eco {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--space-8);
  padding-bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background var(--duration) var(--ease);
}

.eco .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.eco .section__head { margin-bottom: var(--space-6); }

/* Contador de progreso de la baraja (001/003) — lo crea interactions.js,
   solo existe en escritorio (el deck va gateado por ecoDeckEnabled). */
.eco__progress {
  position: fixed;
  left: var(--gutter);
  bottom: 28px;
  z-index: 53;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--accent);
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
  pointer-events: none;
}
.eco__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
.eco__title em {
  font-style: normal;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background var(--duration) var(--ease);
}
.eco.is-lab .eco__title em {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFA0A0 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.eco.is-sec .eco__title em {
  background: linear-gradient(180deg, #FFFFFF 0%, #9BEEB7 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.eco.is-innov .eco__title em {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8D272 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.eco__grid {
  /* sin flex:1 → las cards y el manifiesto se agrupan arriba; el aire queda
     abajo (consistente con el resto de la página en pantallas altas) */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-6);
  overflow: visible;
  align-items: start;
}

/* JS drives all transforms — GPU hint */
.eco__grid > .s-card {
  will-change: transform, opacity;
  transform-origin: center center;
  min-height: clamp(280px, calc(100vh - 260px), 435px);
}

.eco__panels {
  margin-top: var(--space-7);
  /* panels live outside eco-pin in normal flow */
}

.eco__footer {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--ink-line);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-fg-mute);
}
.eco__footer .sep {
  flex: 1;
  height: 1px;
  background: var(--ink-line);
}

/* ============================================================
   §3 — NARSIL — scroll-pinned transition
   ============================================================ */
.narsil-track {
  height: 200vh;
  position: relative;
}

.narsil-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.narsil {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--space-8);
  padding-bottom: 0;
  background:
    var(--radar-bg) bottom right / 900px 900px no-repeat,
    radial-gradient(ellipse at 30% 50%, rgba(63, 184, 255, 0.10), transparent 55%),
    var(--ink-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.narsil .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Stage: CSS Grid stacking — grid and video in same cell */
.narsil__stage {
  flex: 1;
  display: grid;
  align-items: center;
  min-height: 0;
}

.narsil__stage > * {
  grid-area: 1 / 1;
  min-width: 0;
}

.narsil__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-8);
  align-items: center;
  z-index: 2;
  will-change: transform, opacity;
}

/* — Video reveal (JS drives opacity/transform inline) — */
.narsil__video-reveal {
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  z-index: 1;
  opacity: 0;
  transform: scale(0.88) translateY(50px);
  pointer-events: none;
  will-change: transform, opacity;
  display: block;
  overflow: hidden;
  margin-inline: calc(-1 * var(--gutter));  /* sangra a los bordes del contenedor */
}

.narsil__seal,
.narsil__body {
  will-change: transform, opacity;
}

.narsil__video-label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-fg-mute);
  margin-bottom: var(--space-4);
}

.narsil__video-label-line {
  flex: 1;
  height: 1px;
  background: var(--ink-line);
}

.narsil__video-frame {
  position: relative;
  border: 1px solid rgba(63, 184, 255, 0.18);
  background: #000;
  overflow: hidden;
  height: clamp(260px, 48vh, 520px);
  width: calc(clamp(260px, 48vh, 520px) * 16 / 9);
  max-width: 100%;
  align-self: center;
  min-height: 0;
}

.narsil__video-frame::before,
.narsil__video-frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  border-style: solid;
  z-index: 4;
  pointer-events: none;
}

.narsil__video-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.narsil__video-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.narsil__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* vídeo entero, sin recorte (letterbox oscuro) */
  min-height: 0;
  pointer-events: none;  /* ambiente, sin interacción */
}

/* ——— YouTube-style control bar ——————————————————— */
.narsil__video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 55%, transparent 100%);
  padding: 28px 14px 10px;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.narsil__video-controls.is-active,
.narsil__video-frame:hover .narsil__video-controls {
  opacity: 1;
  pointer-events: auto;
}

/* — Scrubber — */
.nvc__scrubber {
  padding: 8px 0 5px;
  cursor: pointer;
}

.nvc__scrubber-track {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.nvc__scrubber:hover .nvc__scrubber-track,
.nvc__scrubber.is-dragging .nvc__scrubber-track {
  height: 5px;
}

.nvc__scrubber-filled {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #f00;
  border-radius: 2px;
  pointer-events: none;
}

.nvc__scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  background: #f00;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.nvc__scrubber:hover .nvc__scrubber-thumb,
.nvc__scrubber.is-dragging .nvc__scrubber-thumb {
  opacity: 1;
}

/* — Bar — */
.nvc__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nvc__left,
.nvc__right {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* — Buttons — */
.nvc__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 3px;
  flex-shrink: 0;
  transition: background 0.12s ease;
}

.nvc__btn:hover {
  background: rgba(255,255,255,0.12);
}

.nvc__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* — Volume group — */
.nvc__vol-group {
  display: flex;
  align-items: center;
  width: 36px;
  overflow: hidden;
  transition: width 0.2s ease;
}

.nvc__vol-group:hover,
.nvc__vol-group:focus-within {
  width: 112px;
}

.nvc__vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 3px;
  background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0.3) 0%);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 4px;
}

.nvc__vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.nvc__vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

/* — Time — */
.nvc__time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.05em;
  user-select: none;
  white-space: nowrap;
  padding: 0 8px;
}

/* — Fullscreen — */
.narsil__video-frame:fullscreen,
.narsil__video-frame:-webkit-full-screen {
  cursor: default;
}

.narsil__video-frame:fullscreen .narsil__video-controls,
.narsil__video-frame:-webkit-full-screen .narsil__video-controls {
  opacity: 1;
  pointer-events: auto;
}

.narsil__video-frame:fullscreen .narsil__video,
.narsil__video-frame:-webkit-full-screen .narsil__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* — Mobile: simplify controls — */
@media (max-width: 640px) {
  .nvc__vol-group:hover,
  .nvc__vol-group:focus-within {
    width: 36px;
  }
  .nvc__vol-slider { display: none; }
  .nvc__time { display: none; }
}

.narsil__seal {
  position: relative;
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.narsil__seal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 184, 255, 0.22), transparent 60%);
  filter: blur(20px);
  animation: pulseGlow 4s ease-in-out infinite;
}
.narsil__seal img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(1.05) drop-shadow(0 0 40px rgba(63, 184, 255, 0.45));
  z-index: 2;
}

.narsil__radar-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-conic-gradient(
      rgba(63, 184, 255, 0.07) 0deg 0.5deg,
      transparent 0.5deg 30deg
    ),
    linear-gradient(to right,
      transparent calc(50% - 0.5px),
      rgba(63, 184, 255, 0.16) calc(50% - 0.5px),
      rgba(63, 184, 255, 0.16) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ),
    linear-gradient(to bottom,
      transparent calc(50% - 0.5px),
      rgba(63, 184, 255, 0.16) calc(50% - 0.5px),
      rgba(63, 184, 255, 0.16) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    ),
    radial-gradient(circle at 50% 50%,
      transparent 24%,
      rgba(63, 184, 255, 0.08) 24%, rgba(63, 184, 255, 0.08) calc(24% + 1px),
      transparent calc(24% + 1px) 48%,
      rgba(63, 184, 255, 0.08) 48%, rgba(63, 184, 255, 0.08) calc(48% + 1px),
      transparent calc(48% + 1px) 72%,
      rgba(63, 184, 255, 0.08) 72%, rgba(63, 184, 255, 0.08) calc(72% + 1px),
      transparent calc(72% + 1px)
    );
}

.narsil__seal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    transparent 288deg,
    rgba(63, 184, 255, 0.03) 308deg,
    rgba(63, 184, 255, 0.10) 330deg,
    rgba(63, 184, 255, 0.22) 350deg,
    rgba(63, 184, 255, 0.40) 359deg,
    transparent 360deg
  );
  pointer-events: none;
  z-index: 3;
  animation: radarSweep 4s linear infinite;
}

.narsil__seal .ring {
  position: absolute;
  border: 1px solid rgba(63, 184, 255, 0.22);
  border-radius: 50%;
  pointer-events: none;
}
.narsil__seal .ring--1 {
  inset: -4%;
  animation: ringPulse 4s ease-in-out infinite 0s;
}
.narsil__seal .ring--2 {
  inset: -14%;
  border-color: rgba(63, 184, 255, 0.10);
  animation: ringPulse 4s ease-in-out infinite 1.3s;
}
.narsil__seal .ring--3 {
  inset: -20%;
  border-color: rgba(63, 184, 255, 0.06);
  animation: ringPulse 4s ease-in-out infinite 2.6s;
}

.narsil__body .meta {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  color: var(--accent);
  letter-spacing: 0.24em;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
}
.narsil__body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: 0.02em;
  line-height: 0.95;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}
.narsil__body .codename {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-fg-mute);
  letter-spacing: 0.18em;
  margin-top: var(--space-3);
  text-transform: uppercase;
}
.narsil__body .lead {
  font-size: var(--type-lead);
  color: var(--ink-fg);
  line-height: 1.55;
  margin: var(--space-5) 0 0;
  max-width: 56ch;
}
.narsil__body .lead b {
  color: var(--accent);
  font-weight: 500;
}

.narsil__caps {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.narsil__caps li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-fg-dim);
  line-height: 1.5;
}
.narsil__caps li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-left: 1.5px solid var(--accent);
  border-top: 1.5px solid var(--accent);
  margin-top: 6px;
}

.narsil__actions {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--ink-line);
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   §2b — PRODUCTOS I+D+i (Guardian, La Luna del Cazador)
   Sección de producto estática que comparte la estética de NARSIL.
   Clases propias (.prod__*) e id por sección para modificarlas
   individualmente sin tocar NARSIL.
   ============================================================ */
.prod { position: relative; z-index: 2; overflow: hidden; --seal-rgb: 63, 184, 255; }
.prod__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-8);
  align-items: center;
  margin-top: var(--space-7);
}
.prod--mirror .prod__grid { grid-template-columns: 1.2fr 1fr; }
.prod--mirror .prod__seal { order: 2; }  /* sello a la derecha */

/* — Sello radar (reutiliza la estética de NARSIL) — */
.prod__seal {
  position: relative;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prod__seal::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--seal-rgb), 0.20), transparent 60%);
  filter: blur(20px);
  animation: pulseGlow 4s ease-in-out infinite;
}
.prod__seal::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg, transparent 288deg,
    rgba(var(--seal-rgb), 0.03) 308deg, rgba(var(--seal-rgb), 0.10) 330deg,
    rgba(var(--seal-rgb), 0.22) 350deg, rgba(var(--seal-rgb), 0.40) 359deg, transparent 360deg);
  pointer-events: none; z-index: 3;
  animation: radarSweep 4s linear infinite;
}
.prod__radar-grid {
  position: absolute; inset: 0; border-radius: 50%;
  overflow: hidden; pointer-events: none; z-index: 1;
  background:
    repeating-conic-gradient(rgba(var(--seal-rgb), 0.07) 0deg 0.5deg, transparent 0.5deg 30deg),
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(var(--seal-rgb), 0.16) calc(50% - 0.5px), rgba(var(--seal-rgb), 0.16) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(var(--seal-rgb), 0.16) calc(50% - 0.5px), rgba(var(--seal-rgb), 0.16) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    radial-gradient(circle at 50% 50%, transparent 30%, rgba(var(--seal-rgb), 0.08) 30%, rgba(var(--seal-rgb), 0.08) calc(30% + 1px), transparent calc(30% + 1px) 58%, rgba(var(--seal-rgb), 0.08) 58%, rgba(var(--seal-rgb), 0.08) calc(58% + 1px), transparent calc(58% + 1px));
}
.prod__seal .ring { position: absolute; border: 1px solid rgba(var(--seal-rgb), 0.22); border-radius: 50%; pointer-events: none; }
.prod__seal .ring--1 { inset: -4%; animation: ringPulse 4s ease-in-out infinite 0s; }
.prod__seal .ring--2 { inset: -14%; border-color: rgba(var(--seal-rgb), 0.10); animation: ringPulse 4s ease-in-out infinite 1.3s; }
.prod__seal .ring--3 { inset: -20%; border-color: rgba(var(--seal-rgb), 0.06); animation: ringPulse 4s ease-in-out infinite 2.6s; }
.prod__glyph {
  position: relative; z-index: 2;
  width: 46%; height: 46%;
  color: var(--accent);
  filter: drop-shadow(0 0 22px rgba(var(--seal-rgb), 0.45));
}

/* Per-section themes (overriding the accent vars cascades to glyph, meta,
   name gradient, caps markers and CTA inside the section) */
#guardian {            /* Cypher Security — verde */
  --seal-rgb: 91, 214, 146;
  --accent: #5BD692;
  --accent-bright: #9BEEB7;
  --accent-glow: rgba(91, 214, 146, 0.30);
  --shadow-cta: 0 0 24px rgba(91, 214, 146, 0.25);
}
#luna {                /* Cypher Lab — rojo */
  --seal-rgb: 255, 92, 92;
  --accent: #FF5C5C;
  --accent-bright: #FFA0A0;
  --accent-glow: rgba(255, 92, 92, 0.30);
  --shadow-cta: 0 0 24px rgba(255, 92, 92, 0.25);
}
/* El emblema de Luna tiene más aire interno; se agranda para igualar a Guardian */
#luna .prod__logo { width: 90%; height: 90%; }
.prod__glyph svg { width: 100%; height: 100%; display: block; }
/* Logo de producto sobre el radar (sustituye al glifo placeholder) */
.prod__logo {
  position: relative;
  z-index: 2;            /* sobre el radar-grid (z1), bajo el barrido (z3) */
  width: 66%;
  height: 66%;
  object-fit: contain;
  filter: brightness(1.05) drop-shadow(0 0 24px rgba(var(--seal-rgb), 0.45));
}

/* — Vídeo de fondo de sección (detrás del contenido, sobre el fondo) —
   Limitado al ancho del contenedor y centrado, igual que el vídeo de NARSIL,
   para que en monitores anchos no se estire a todo el viewport. */
.prod__bg-video,
.prod__bg-scrim {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container);
  z-index: 0;            /* el scrim va tras el vídeo en el DOM → pinta encima */
  pointer-events: none;
}
.prod__bg-video {
  height: 100%;
  object-fit: cover;
}
.prod__bg-scrim {
  background:
    linear-gradient(90deg, rgba(5, 8, 15, 0.80) 0%, rgba(5, 8, 15, 0.48) 55%, rgba(5, 8, 15, 0.22) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(5, 8, 15, 0.55) 100%);
}
.prod > .container { position: relative; z-index: 1; }  /* contenido por encima del vídeo */

/* — Cuerpo — */
.prod__body .meta {
  font-family: var(--font-mono); font-size: var(--type-mono);
  color: var(--accent); letter-spacing: 0.24em;
  margin-bottom: var(--space-3); text-transform: uppercase;
}
.prod__body h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 4vw, 56px); letter-spacing: 0.01em; line-height: 0.98;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0;
}
.prod__body .codename {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-fg-mute);
  letter-spacing: 0.18em; margin-top: var(--space-3); text-transform: uppercase;
}
.prod__body .lead {
  font-size: var(--type-lead); color: var(--ink-fg); line-height: 1.55;
  margin: var(--space-5) 0 0; max-width: 54ch;
}
.prod__body .lead b { color: var(--accent); font-weight: 500; }
.prod__caps { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.prod__caps li {
  display: grid; grid-template-columns: 24px 1fr; align-items: start; gap: 12px;
  font-size: 15px; color: var(--ink-fg-dim); line-height: 1.5;
}
.prod__caps li::before { content: ""; width: 9px; height: 9px; border-left: 1.5px solid var(--accent); border-top: 1.5px solid var(--accent); margin-top: 6px; }
.prod__actions {
  margin-top: var(--space-7); padding-top: var(--space-5);
  border-top: 1px solid var(--ink-line); display: flex; gap: var(--space-4); flex-wrap: wrap;
}

/* ============================================================
   §5 — DIFERENCIAL scroll track (sticky hold)
   ============================================================ */
.diff-track {
  height: 230vh;
  position: relative;
}
.diff-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Grid stack — diff and think-tank reveal occupy the same cell */
.diff-stage {
  display: grid;
  height: 100%;
}
.diff-stage > * {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
}

/* Compact overrides so all content fits within 100vh */
.diff-pin .diff {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + var(--space-4));
  padding-bottom: var(--space-3);
  position: relative;
  z-index: 2;
}

/* Think Tank reveal — mirrors narsil__video-reveal */
.diff-reveal {
  opacity: 0;
  transform: scale(0.88) translateY(50px);
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(63, 184, 255, 0.07), transparent 55%),
    var(--ink-bg);
}
.diff-reveal .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + var(--space-3));
  padding-bottom: var(--space-4);
}
.diff-reveal .section__head {
  padding-top: 0;
  margin-bottom: var(--space-4);
}
.diff-reveal .think__grid {
  margin-top: var(--space-4);
  gap: var(--space-7);
  grid-template-columns: 0.7fr 1.3fr;
}
.diff-reveal .think__body {
  gap: var(--space-3);
}
.diff-reveal .think__body p {
  font-size: 14px;
}
.diff-reveal .manifesto__title {
  margin-bottom: 0;
}
.diff-pin .section__head {
  padding-top: var(--space-3);
  margin-bottom: var(--space-3);
}
.diff-pin .manifesto__title {
  margin-bottom: var(--space-3);
}
.diff-pin .diff__grid {
  gap: var(--space-3) var(--space-8);
}
.diff-pin .diff__item .n {
  font-size: 28px;
}
.diff-pin .diff__close {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
}

/* ============================================================
   §6 — EQUIPO
   ============================================================ */
.team {
  position: relative;
  z-index: 2;
}
.team__intro {
  max-width: 70ch;
  font-size: var(--type-lead);
  color: var(--ink-fg-dim);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}
.team__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.team__card {
  position: relative;
  border: 1px solid var(--ink-line);
  background: linear-gradient(180deg, rgba(63, 184, 255, 0.04), rgba(63, 184, 255, 0));
  padding: var(--space-7);
  display: flex;
  flex-direction: column;
  transition: border-color var(--duration-fast) var(--ease),
              transform var(--duration) var(--ease);
}
.team__card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}
.team__card::before,
.team__card::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--accent);
  z-index: 1;
}
.team__card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.team__card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.team__name {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink-fg);
  margin: 0;
}
.team__name a {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  transition: color var(--duration-fast) var(--ease);
}
.team__name a:hover { color: var(--accent-bright); }
.team__name a svg { width: 22px; height: 22px; fill: currentColor; }

.team__role {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.45;
}

.team__bio {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-3);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-fg-dim);
}
.team__bio b { color: var(--ink-fg); font-weight: 500; }

/* — Equipo: tira de película vertical en un lateral (bucle continuo) —
   Patrón del marquee de partners adaptado a vertical: el track lleva el set
   de fotos duplicado y se desplaza -50% en bucle sin costura. — */
.team-strip {
  height: 100vh;
  height: 100svh;
  max-width: var(--container);       /* dentro del área de contenido */
  margin-inline: auto;
  padding: var(--nav-h) var(--gutter) 0; /* gutter lateral → no pisa los side-rails */
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;   /* tira | contenido */
  gap: clamp(var(--space-6), 4vw, var(--space-9));
  overflow: hidden;
  isolation: isolate;
}
.film {
  --img: clamp(110px, 15vh, 190px);  /* tamaño de cada foto de la tira */
  position: relative;
  width: var(--img);
  height: 100%;
  overflow: hidden;
  border-inline: 1px solid var(--ink-line);
}
.film::before,
.film::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 96px;
  z-index: 2;
  pointer-events: none;
}
.film::before { top: 0;    background: linear-gradient(to bottom, var(--ink-bg) 0%, transparent 100%); }
.film::after  { bottom: 0; background: linear-gradient(to top,    var(--ink-bg) 0%, transparent 100%); }
.film__track {
  display: flex;
  flex-direction: column;
  width: var(--img);
  height: max-content;
  animation: filmScroll 45s linear infinite;
}
.film__track:hover { animation-play-state: paused; }
@keyframes filmScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.film__item {
  flex-shrink: 0;
  width: var(--img);
  height: var(--img);
  margin-bottom: var(--space-3); /* en cada item → el -50% cae exacto en el bucle */
}
.film__item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 1px solid var(--ink-line);
  filter: url(#duotono); /* duotono azul de marca */
}
/* Hover: la foto recupera el color real (la tira ya se pausa en hover) */
@media (hover: hover) and (pointer: fine) {
  .film__item:hover img { filter: none; }
}

/* — Móvil: la sección fluye apilada y la tira pasa a horizontal — */
@media (max-width: 900px) {
  .team-strip {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }
  .film {
    width: 100%;
    height: var(--img);
    border-inline: none;
    border-block: 1px solid var(--ink-line);
  }
  .film::before,
  .film::after {
    top: 0;
    bottom: 0;
    height: auto;
    width: 64px;
  }
  .film::before { left: 0;  right: auto; background: linear-gradient(to right, var(--ink-bg) 0%, transparent 100%); }
  .film::after  { right: 0; left: auto;  background: linear-gradient(to left,  var(--ink-bg) 0%, transparent 100%); }
  .film__track {
    flex-direction: row;
    width: max-content;
    height: var(--img);
    animation-name: filmScrollX;
  }
  .film__item { margin-bottom: 0; margin-right: var(--space-3); }
  .team-inner { padding: var(--space-5) 0 var(--space-7); }
}
@keyframes filmScrollX {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   §7 — DIFERENCIAL / STATS
   ============================================================ */
.diff {
  position: relative;
  z-index: 2;
}

.diff__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--ink-line);
  margin-bottom: var(--space-9);
}

.diff__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6) var(--space-8);
}
.diff__item {
  border-top: 1px solid var(--ink-line);
  padding-top: var(--space-5);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-5);
}
.diff__item .n {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.diff__item .h {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink-fg);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.diff__item .p {
  font-size: 14px;
  color: var(--ink-fg-dim);
  line-height: 1.55;
  margin-top: 10px;
}

.diff__close {
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: 1px solid var(--ink-line);
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-fg);
  line-height: 1.3;
}
.diff__close b {
  color: var(--accent);
  font-weight: 500;
}

/* ============================================================
   §8 — CONTACTO
   ============================================================ */
.contact {
  position: relative;
  z-index: 2;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  background:
    var(--radar-bg) bottom right / 900px 900px no-repeat,
    radial-gradient(ellipse at 80% 20%, rgba(63, 184, 255, 0.12), transparent 55%),
    var(--ink-bg);
  overflow: hidden;
}

.contact .section__head {
  margin-bottom: var(--space-4);
  padding-top: var(--space-4);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-7);
  align-items: stretch;
  margin-top: var(--space-4);
}

/* Left column: the form */
.contact__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

/* Right column: intro on top + brand mark below, matching the form height */
.contact__visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}
.contact__visual-logo {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact__visual-logo img {
  width: 100%;
  max-width: 320px;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 60px var(--accent-glow)) brightness(1.05);
}

/* Paired fields (2×2) keep the form card compact in the left column */
.contact__form .field-row--4 { grid-template-columns: 1fr 1fr; }
/* Compact field rhythm so the vertical form stays dense, not sprawling */
.contact__form { gap: var(--space-3); }
.contact__form .field { gap: var(--space-1); }
.contact__form .field input,
.contact__form .field textarea,
.contact__form .field select { padding: 8px 0; font-size: 15px; }
.contact__form .field textarea { min-height: 56px; }
.contact__checks { gap: var(--space-2); }
.contact__form-foot { margin-top: var(--space-2); padding-top: var(--space-4); }

.contact__intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 var(--space-3);
}
.contact__intro h2 em {
  font-style: normal;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact__intro p {
  font-size: var(--type-lead);
  color: var(--ink-fg-dim);
  line-height: 1.55;
  margin-bottom: 0;
}

.contact__channels {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.contact__channel {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-fg-mute);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease),
              padding var(--duration-fast) var(--ease);
}
.contact__channel:hover {
  color: var(--accent);
  padding-left: var(--space-2);
}
.contact__channel .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.contact__channel .v {
  margin-left: auto;
  color: var(--ink-fg);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: 14px;
}

.contact__form-wrap {
  position: relative;
  border: 1px solid var(--ink-line);
  background:
    radial-gradient(ellipse at 90% 10%, rgba(63, 184, 255, 0.08), transparent 50%),
    var(--ink-bg-2);
  padding: var(--space-5);
}
.contact__form-wrap .hud-corners { inset: 14px; }
.contact__form-wrap .hud-corner { width: 18px; height: 18px; border-width: 1px; }

.contact__form-head {
  margin-bottom: var(--space-4);
}
.contact__form-head .eyebrow { margin-bottom: var(--space-2); }
.contact__form-head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

.contact__form {
  display: grid;
  gap: var(--space-5);
}

.contact__checks {
  display: grid;
  gap: var(--space-3);
}

.contact__form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--ink-line);
  gap: var(--space-6);
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .hero__content  { max-width: 56%; }
  .hero__visual   { width: 42vw; max-width: 520px; }
  .hero__metrics  { max-width: 60%; grid-template-columns: repeat(5, 1fr); }
  .hero__partners { max-width: 60%; }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-h) + var(--space-8));
    padding-bottom: var(--space-9);
  }
  .hero__content { max-width: 100%; }
  .hero__visual {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    margin: var(--space-7) auto 0;
  }
  .hero__coord { display: none; }
  .hero__metrics {
    max-width: 100%;
    margin-top: var(--space-5);
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5) var(--space-4);
  }
  .hero__metric b { font-size: clamp(22px, 5vw, 32px); }
  .hero__scroll { display: none; }

  .hero__title .title-line { white-space: normal; }

  .manifesto__grid { grid-template-columns: 1fr; }

  /* Capacidades en móvil: la baraja animada necesita las 3 cards a la vez en
     100vh, imposible en un teléfono (el dorso de una card ya pide ~500px). Se
     desactiva el pin y la sección fluye con las cards apiladas, accesibles y con
     tap-to-flip. La coreografía de baraja se mantiene intacta en escritorio. */
  .eco-track { height: auto; }
  .eco-pin { position: static; height: auto; overflow: visible; }
  .eco {
    height: auto;
    overflow: visible;
    padding-bottom: var(--space-10);
  }

  .eco__grid { grid-template-columns: 1fr; }
  /* Narrow widths wrap the descriptions to more lines — give the stacked cards room */
  .eco__grid > .s-card { min-height: 460px; }

  .narsil__grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .narsil__seal { max-width: 340px; }

  /* El reveal de vídeo está apilado en el grid (grid-area 1/1). En móvil ese grid
     se hace de 1 columna y crece en alto, así que el reveal se estiraba y el vídeo
     (apaisado) quedaba en una franja diminuta abajo. Lo sacamos del flujo y lo
     superponemos a toda la sección (100dvh), llenando con cover en vez de letterbox. */
  .narsil__video-reveal {
    position: absolute;
    inset: 0;
    margin-inline: 0;
    z-index: 3;
  }
  .narsil__video { object-fit: cover; }

  /* Productos I+D+i: apilar con el sello arriba (resetea el orden del mirror) */
  .prod__grid, .prod--mirror .prod__grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .prod--mirror .prod__seal { order: -1; }
  .prod__seal { max-width: 240px; }

  .team__grid { grid-template-columns: 1fr; }

  .diff__stats { grid-template-columns: repeat(2, 1fr); }
  .diff__stats .stat:nth-child(odd) { border-right: 1px solid var(--ink-line); }
  .diff__stats .stat:nth-child(even) { border-right: none; }
  .diff__stats .stat:nth-child(1),
  .diff__stats .stat:nth-child(2) { border-bottom: 1px solid var(--ink-line); }

  .diff__grid { grid-template-columns: 1fr; gap: var(--space-5); }

  .contact__form-wrap { padding: var(--space-7) var(--space-5); }
  /* Stack contact: brand mark on top (smaller), form below */
  .contact__grid { grid-template-columns: 1fr; }
  .contact__visual { order: -1; }
  .contact__visual img { max-width: 200px; }
}

@media (max-width: 560px) {
  /* Phones: unpair the fields for comfortable full-width inputs */
  .contact__form .field-row--4 { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .hero__title { font-size: clamp(34px, 8vw, 48px); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .hero__metrics { grid-template-columns: 1fr 1fr; }


  .diff__stats { grid-template-columns: 1fr; }
  .diff__stats .stat { border-right: none; border-bottom: 1px solid var(--ink-line); }
  .diff__stats .stat:last-child { border-bottom: none; }

  .diff__item { grid-template-columns: 60px 1fr; }
  .diff__item .n { font-size: 30px; }

  .narsil__body h2 { font-size: clamp(48px, 12vw, 64px); }

  .contact__form-foot { flex-direction: column; align-items: stretch; }
  .contact__form-foot .btn { justify-content: center; }
}

/* ============================================================
   §4 — THINK TANK
   ============================================================ */
.think-tank {
  background:
    radial-gradient(ellipse at 70% 40%, rgba(63, 184, 255, 0.07), transparent 55%),
    var(--ink-bg);
}

.think__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-9);
  align-items: center;
  margin-top: var(--space-7);
}

/* — Media frame (1:1 — square video) — */
.think__media-placeholder {
  position: relative;
  aspect-ratio: 1;
  background: #000;
  border: 1px solid rgba(63, 184, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.think__media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  pointer-events: none; /* ambient loop — no controls, no context menu, no fullscreen */
}

.think__media-placeholder::before,
.think__media-placeholder::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  border-style: solid;
  z-index: 2;
  pointer-events: none;
}
.think__media-placeholder::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}
.think__media-placeholder::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.think__media-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-6);
}

.think__media-icon {
  width: 52px;
  height: 52px;
  color: var(--accent);
  opacity: 0.25;
}

.think__media-tag {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-fg-mute);
}

/* — Text column — */
.think__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.think__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.think__body p {
  color: var(--ink-fg-dim);
  line-height: 1.6;
  font-size: 15px;
}

.think__caps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.think__caps li {
  padding-left: var(--space-5);
  position: relative;
  font-size: 14px;
  color: var(--ink-fg-dim);
  line-height: 1.5;
}

.think__caps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.think__actions {
  margin-top: var(--space-3);
}

/* — Equipo-back navigation (equipo.html) — */
/* — Equipo: tira lateral + contenido en dos columnas (acotado a esta página) — */
.equipo-standalone { padding: 0; }

.team-inner {
  min-width: 0;
  padding: var(--space-6) 0;        /* el gutter lateral lo da .team-strip */
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  justify-content: flex-start;      /* pegado arriba; el hueco queda abajo */
}
.team-inner .section__head { margin-bottom: 0; }
/* Tamaños generales del sitio; el manifiesto a ancho completo (una línea si cabe) */
.team-inner .manifesto__title { margin: 0; max-width: none; }

.equipo-back {
  padding-top: var(--space-8);
  padding-bottom: var(--space-9);
  border-top: 1px solid var(--ink-line);
}

.equipo-back__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-7);
}

.equipo-back__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--ink-line);
  background: rgba(14, 22, 38, 0.35);
  text-decoration: none;
  transition: border-color var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.equipo-back__link:hover {
  border-color: var(--accent);
  background: rgba(63, 184, 255, 0.04);
}

.equipo-back__link .ebl-num {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  letter-spacing: 0.2em;
  color: var(--accent);
}

.equipo-back__link .ebl-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-fg);
}

.equipo-back__link .ebl-desc {
  font-size: 13px;
  color: var(--ink-fg-mute);
  line-height: 1.5;
}

/* — Mobile Think Tank — */
@media (max-width: 900px) {
  .think__grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .think__media-placeholder {
    max-width: 360px;
    margin: 0 auto;
  }
  /* Inside the reveal (pinned 100vh) stack and cap the video so it never
     squashes against the text or overflows the viewport */
  .diff-reveal .think__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .diff-reveal .think__media-placeholder {
    max-width: 170px;
    margin: 0 auto;
  }
  .diff-reveal .think__body { gap: var(--space-2); }
}


/* ============================================================
   FIT eco a 100vh en pantallas bajas (portátiles) — la baraja SIGUE
   animando (pin intacto); solo se compacta y se encogen un poco las
   cards para que MISIÓN/VISIÓN quepan sin cortarse. Reactivo a resize.
   ============================================================ */
@media (max-height: 960px) {
  .eco { padding-top: var(--space-5); }
  .eco .section__head { margin-bottom: var(--space-3); }
  .eco__grid { margin-top: var(--space-4); }
  .eco__grid > .s-card { min-height: clamp(290px, calc(100vh - 360px), 435px); }
  .eco__panels { margin-top: var(--space-4); }
  .manifesto__panel { padding: var(--space-5); }
  .manifesto__panel .ptag { margin-bottom: var(--space-2); }
}


/* FIT equipo: en pantallas bajas, que la tira crezca en vez de cortar las
   cards (sin animación de pin → seguro dejar height auto). FIT equipo a 100vh en pantallas bajas */
@media (max-height: 960px) {
  .team-strip { height: auto; min-height: 100svh; overflow: visible; align-items: start; }
  .film { height: 100svh; }              /* el film se ata al viewport, no a la tira (evita que se infle) */
  .team-inner { align-self: start; }
}

/* equipo integrado: sin padding de sección (la tira gestiona su espacio) */
.section.team { padding: 0; }
