/* ============================================================
   SISTEMA DE COLOR — Nodal, version oscura
   ============================================================

   Base: azul marino #0b1c24 (tono 199 grados).
   Toda la paleta se elige por CERCANIA DE TONO a esa base, para que
   no haya choques calido-frio.

     PRIMARIO    #45d4c4  verde agua   tono 173  (a  26 de la base)
     SECUNDARIO  #7fb3e8  azul cielo   tono 210  (a  11 de la base)
     TERCIARIO   #9b8ce8  violeta      tono 250  (a  51 de la base)
     SENAL       #e8899a  rosa coral   tono 349  — SOLO advertencias

   El ambar #f2a65a que habia antes estaba a 169 grados de la base:
   practicamente el tono opuesto. Ese era el naranja que desentonaba.
   El rosa lo sustituye porque convive con el violeta y sigue leyendose
   como aviso.

   PROPORCION: primario domina, secundario apoya, terciario matiza,
   senal solo donde se advierte algo. Nunca al reves.

   CONTRASTE VERIFICADO sobre los cinco fondos (peor caso):
     texto claro 10.46 · texto medio 5.37 · primario 6.39
     secundario 5.30 · senal 4.72
   El violeta cae a 4.07 sobre el fondo de cierre: alli va solo como
   punto decorativo, nunca como texto.
   Tampoco usar el gris apagado como texto: cae a 3.31. */

:root {
  /* Superficies: marino de mas profundo a mas claro */
  --bg:          #0b1c24;
  --paper:       #122b36;
  --paper-deep:  #0e2530;
  --secondary:   #17323f;
  --cierre-bg:   #0d3f3d;

  /* Texto */
  --ink:         #eaf4f7;
  --muted:       #9ab4be;

  /* Marca */
  --primary:     #45d4c4;
  --accent:      #45d4c4;
  --secundario:  #7fb3e8;
  --violet:      #9b8ce8;
  --senal:       #e8899a;
  --amber:       #7fb3e8;  /* alias: lo que era ambar pasa a cielo */
  --sobre-aqua:  #04222a;

  /* Variantes (se conservan por compatibilidad) */
  --amber-ink:   #7fb3e8;
  --accent-ink:  #45d4c4;

  /* Líneas */
  --border:        #21414e;
  --border-strong: #2d5464;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-sans:    'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --radius: 8px;
  --radius-lg: 16px;
  --gutter: 20px;
  --shadow-panel: 0 1px 0 var(--border), 0 26px 52px -40px rgba(0, 0, 0, 0.85);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg, video { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}
h3 { font-weight: 600; letter-spacing: -0.02em; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
  font-size: 0.9rem;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow { max-width: 820px; }

/* ---------- Texturas: la página se lee como una hoja de trabajo ---------- */

.ruled {
  background-image: repeating-linear-gradient(
    to bottom,
    color-mix(in oklab, var(--border) 55%, transparent) 0 1px,
    transparent 1px 2.25rem
  );
}

/* Subrayado de rotulador */
.marker-teal {
  background-image: linear-gradient(to top,
    color-mix(in oklab, var(--accent) 32%, transparent) 0 0.42em, transparent 0.42em);
}
.marker-amber {
  background-image: linear-gradient(to top,
    color-mix(in oklab, var(--senal) 34%, transparent) 0 0.42em, transparent 0.42em);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Aparición al desplazar ---------- */

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand .eyebrow { display: none; }

.site-nav { display: flex; align-items: center; gap: 6px; }

.nav-link {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s;
}
.nav-link:hover { color: var(--ink); }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .24s cubic-bezier(.22,1,.36,1), background .24s, border-color .24s;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--primary); color: var(--sobre-aqua); }
.btn-primary:hover { background: #5ee3d3; }

.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: #ffffff; }

.btn-linea { background: var(--paper); color: var(--ink); border: 1px solid var(--border-strong); }
.btn-linea:hover { border-color: var(--ink); }

.btn-lg { min-height: 50px; padding: 0 28px; font-size: 1rem; }

/* ---------- Ritmo de secciones ---------- */

.section { border-bottom: 1px solid var(--border); }
.section-inner { padding: 72px var(--gutter); }
.bg-paper { background: var(--paper); }
.bg-deep  { background: var(--paper-deep); }

[id] { scroll-margin-top: 80px; }

.section-head { max-width: 62ch; }
.section-head h2 { margin-top: 14px; font-size: clamp(2rem, 4.4vw, 3.1rem); }
.section-head .lede { margin-top: 18px; font-size: 1.1rem; color: var(--muted); }

/* ---------- Apertura: la pregunta ---------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero .ruled { position: absolute; inset: 0; opacity: .6; pointer-events: none; }
/* Alturas ajustadas: lo importante tiene que caber en el primer pantallazo.
   El 57 % del tiempo de lectura ocurre sobre el pliegue (NN/g), y la gente
   solo baja si lo de arriba le dice de qué va. */
.hero-inner { position: relative; padding: 64px var(--gutter) 72px; text-align: center; }

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.5rem, 6.6vw, 4.5rem);
  line-height: 1.02;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 60ch;
  font-size: 1.08rem;
  line-height: 1.58;
  color: var(--muted);
}
.hero-sub strong { color: var(--ink); font-weight: 600; }

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Señales de confianza: cortas, en una línea, antes del pliegue */
.hero-señales {
  list-style: none;
  margin: 22px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 0.86rem;
  color: var(--muted);
}
.hero-señales li { display: flex; align-items: center; gap: 7px; }
.hero-señales li::before {
  content: "";
  width: 14px; height: 14px;
  flex: none;
  border-radius: 50%;
  background: var(--secondary);
  border: 1.5px solid var(--primary);
}

/* ---------- Servicios: rejilla de seis con panel de detalle ---------- */
/* El detalle se abre en un panel ancho bajo la rejilla, no dentro de la
   tarjeta: así no empuja al resto y no repite el acordeón de "¿te suena?". */

.svc-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.svc-tile {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color .26s cubic-bezier(.22,1,.36,1), box-shadow .26s cubic-bezier(.22,1,.36,1), transform .26s cubic-bezier(.22,1,.36,1);
}
.svc-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-panel);
  border-color: color-mix(in srgb, var(--tono, var(--primary)) 55%, transparent);
}
.svc-tile[aria-expanded="true"] {
  border-color: var(--tono, var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tono, var(--primary)) 16%, transparent);
}

/* Ilustración esquemática: explica el servicio, no lo decora */
.svc-art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 8;
  margin-bottom: 16px;
  border-radius: var(--radius);
  /* Cada servicio lleva su propio tono: da variedad sin romper la paleta */
  background: color-mix(in srgb, var(--tono, var(--primary)) 13%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--tono, var(--primary)) 20%, transparent);
  overflow: hidden;
}
.svc-art svg { width: 78%; height: auto; }

.svc-tile h3 { font-size: 1.1rem; line-height: 1.25; }
.svc-tile p { margin-top: 8px; font-size: 0.95rem; color: var(--muted); }

.svc-mas {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tono, var(--primary));
}
.svc-mas::after { content: "+"; font-size: 1rem; line-height: 1; }
.svc-tile[aria-expanded="true"] .svc-mas::after { content: "−"; }

.svc-panel {
  margin-top: 16px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 26px 22px;
  box-shadow: var(--shadow-panel);
}
.svc-panel[hidden] { display: none; }
.svc-panel:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.svc-panel h3 { font-size: clamp(1.4rem, 3vw, 2rem); max-width: 22ch; }
.svc-panel-intro { margin-top: 14px; max-width: 68ch; font-size: 1.05rem; color: var(--muted); }

.svc-dl { margin-top: 26px; display: grid; gap: 22px; }
.svc-dl > div { border-top: 1px solid var(--border); padding-top: 14px; }
.svc-dl dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.svc-dl dd { margin-top: 8px; font-size: 0.98rem; line-height: 1.6; }

/* El "cuándo NO" es el que sostiene la voz honesta: se marca aparte. */
.svc-dl > div.svc-no { border-top-color: var(--senal); border-top-width: 2px; }

.svc-panel .btn { margin-top: 26px; }

@media (min-width: 640px) {
  .svc-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .svc-tile { padding: 20px; }
  .svc-panel { padding: 32px 30px; }
  .svc-dl { grid-template-columns: 1fr 1fr; gap: 24px 40px; }
}

@media (min-width: 1000px) {
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .svc-dl { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 01 · Escenas reconocibles ---------- */

.escenas { margin-top: 44px; display: flex; flex-direction: column; gap: 12px; }

.escena {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: background .2s;
}
.escena[open] { background: var(--secondary); }

.escena > summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}
.escena > summary::-webkit-details-marker { display: none; }

.escena-dot { margin-top: 9px; width: 12px; height: 12px; border-radius: 50%; flex: none; }

.escena-txt { min-width: 0; flex: 1; }
.escena-txt h3 { font-size: 1.25rem; line-height: 1.25; }
.escena-txt p { margin-top: 8px; color: var(--muted); }

.escena-ver {
  margin-top: 4px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.escena[open] .escena-ver { display: none; }

.escena-cambio {
  border-top: 1px solid var(--border);
  padding: 22px;
}
.escena-cambio p { margin-top: 10px; font-size: 1.08rem; line-height: 1.6; max-width: 68ch; }

/* ---------- 01 · Diagnóstico guiado ---------- */

.dx {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.dx-cabecera { padding: 20px 22px 0; }

.dx-barra {
  margin-top: 10px;
  height: 4px;
  border-radius: 999px;
  background: var(--secondary);
  overflow: hidden;
}
.dx-barra span {
  display: block;
  height: 100%;
  width: 16.6%;
  border-radius: 999px;
  background: var(--primary);
  transition: width .45s cubic-bezier(.2,.8,.2,1);
}

.dx-paso { border: 0; padding: 24px 22px 0; }
.dx-paso[hidden] { display: none; }

.dx-paso legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  padding: 0;
}
.dx-paso legend:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }

.dx-ayuda { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }

.dx-ops { margin-top: 20px; display: grid; gap: 10px; }

/* Opción: objetivo táctil amplio, estado marcado evidente */
.dx-op {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.35;
  transition: border-color .16s, background .16s;
}
.dx-op:hover { border-color: var(--border-strong); background: var(--secondary); }
.dx-op input { width: 20px; height: 20px; flex: none; accent-color: var(--primary); margin: 0; }
.dx-op:has(input:checked) { border-color: var(--primary); background: var(--secondary); }
.dx-op:has(input:checked) span { font-weight: 600; }
.dx-op:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

.dx-error {
  margin: 16px 22px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--senal);
  background: var(--bg);
  font-size: 0.94rem;
  color: var(--ink);
}
.dx-error[hidden] { display: none; }

.dx-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 22px;
  border-top: 1px solid var(--border);
  margin-top: 26px;
}
.dx-nav .btn { flex: 1 1 auto; }

/* ---------- Resultado ---------- */

.dx-resultado { padding: 26px 22px; }
.dx-resultado[hidden] { display: none; }
.dx-resultado:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.dx-resultado h3 {
  margin-top: 12px;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.12;
}
.dx-res-intro { margin-top: 14px; max-width: 66ch; color: var(--muted); }
.dx-res-intro + .dx-res-intro { margin-top: 10px; }
.dx-resultado > .btn { margin-top: 22px; }

.dx-res-lista { list-style: none; margin-top: 28px; display: grid; gap: 18px; }
.dx-res-lista li { display: flex; gap: 14px; align-items: flex-start; }

.dx-res-n {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--sobre-aqua);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}
.dx-res-lista strong { display: block; font-size: 1.08rem; }
.dx-res-lista p { margin-top: 5px; color: var(--muted); font-size: 0.97rem; line-height: 1.55; }

/* Lo que NO hace falta: la parte honesta del resultado */
.dx-res-no {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 2px solid var(--senal);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.dx-res-no p:last-child { margin-top: 8px; font-size: 0.95rem; color: var(--muted); }

.dx-res-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }

@media (min-width: 640px) {
  .dx-cabecera { padding: 26px 30px 0; }
  .dx-paso { padding: 30px 30px 0; }
  .dx-ops { grid-template-columns: 1fr 1fr; }
  .dx-nav { padding: 28px 30px; }
  .dx-nav .btn { flex: 0 0 auto; min-width: 150px; }
  .dx-resultado { padding: 34px 30px; }
  .dx-error { margin: 18px 30px 0; }
}

/* ---------- 03 · El mismo martes ---------- */

/* ---------- Banda de video con texto encima ---------- */
/* El clip va desenfocado y muy velado a propósito: es atmósfera, no contenido.
   Así la baja resolución del material de archivo deja de notarse, y el texto
   mantiene contraste de sobra sobre el velo claro. */

.media-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--secondary);
  display: grid;
  align-items: center;
  /* Alto generoso para que el clip se vea alrededor de la tarjeta. */
  min-height: 360px;
  padding: 34px 22px;
}

.media-band video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Desenfoque suave: disimula la baja resolución del material de archivo
     sin borrarlo. La escala evita bordes translúcidos al desenfocar. */
  filter: blur(8px) saturate(0.9);
  transform: scale(1.12);
}

/* Velo bajo: el clip se ve. El contraste del texto NO depende de este velo
   sino de la tarjeta esmerilada — los clips tienen zonas negras puras y
   ningún velo uniforme razonable las salvaría. */
.media-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 28, 36, 0.55);
}

.media-band-inner {
  margin: 0 auto;
  max-width: 40rem;
  padding: 40px 32px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(120, 200, 195, 0.22);
  background: rgba(11, 28, 36, 0.82);
  backdrop-filter: blur(6px);
}

.media-band-inner h2 { margin: 14px auto 0; max-width: 20ch; font-size: clamp(1.5rem, 3.2vw, 2.4rem); }
.media-band-inner p { margin: 18px auto 0; max-width: 54ch; color: var(--muted); }

.tabla {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
}

.tabla-head, .tabla-fila {
  display: grid;
  grid-template-columns: 3.4rem minmax(0,1fr);
  gap: 6px 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.tabla-fila:last-child { border-bottom: 0; }
.tabla-head { align-items: center; }
.tabla-head span:last-child { display: none; }

.tabla-hora { font-family: var(--font-mono); font-size: 0.88rem; color: var(--muted); }
.tabla-antes { color: var(--muted); }
.tabla-despues { grid-column: 2; font-weight: 500; }
.tabla-despues .eyebrow { display: block; margin-bottom: 2px; }

.tabla-nota { margin-top: 22px; max-width: 60ch; color: var(--muted); }

/* ---------- 04 · Cuándo decimos que no ---------- */

.noes { margin-top: 44px; display: grid; gap: 34px; }

.no-item { border-top: 2px solid var(--senal); padding-top: 18px; }
.no-item h3 { font-size: 1.3rem; }
.no-item h3 .n {
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}
.no-item p { margin-top: 12px; color: var(--muted); }

/* ---------- 05 · Cómo se trabaja ---------- */
/* El video va como banda ancha ARRIBA, no a un lado del texto: esa figura
   (texto a un lado, video al otro) era justo la del diseño anterior. */

.modo-nota { margin-top: 12px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

.principios { margin-top: 44px; display: grid; gap: 32px; }
.principio { border-left: 2px solid var(--border-strong); padding-left: 22px; }
.principio:nth-child(1) { border-color: var(--accent); }
.principio:nth-child(2) { border-color: var(--violet); }
.principio:nth-child(3) { border-color: var(--secundario); }
.principio h3 { font-size: 1.35rem; }
.principio p { margin-top: 12px; color: var(--muted); }

/* ---------- Testimonios (el HTML está comentado hasta tener frases reales) ---------- */

.voces { margin-top: 40px; display: grid; gap: 20px; }

.voz {
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--bg);
  padding: 26px 24px;
}
.voz blockquote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.voz blockquote::before { content: "«"; color: var(--accent); }
.voz blockquote::after  { content: "»"; color: var(--accent); }
.voz figcaption { margin-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.voz cite { font-style: normal; font-weight: 600; font-size: 0.95rem; }
.voz figcaption span { font-size: 0.88rem; color: var(--muted); }

@media (min-width: 760px) { .voces { grid-template-columns: 1fr 1fr; } }

/* ---------- Nota al pie técnica ---------- */

.tecnica { display: grid; gap: 16px; padding: 48px var(--gutter); }
.tecnica p:last-child { max-width: 72ch; color: var(--muted); }

/* ---------- 06 · La llamada ---------- */

.agenda { display: grid; gap: 40px; }
.agenda-intro h2 { margin-top: 14px; font-size: clamp(1.75rem, 4vw, 3rem); }
.agenda-intro > p { margin-top: 18px; font-size: 1.1rem; color: var(--muted); }

.agenda-puntos { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.agenda-puntos li { display: flex; gap: 12px; }
.agenda-puntos i { margin-top: 9px; width: 8px; height: 8px; border-radius: 50%; flex: none; }

.agenda-mail { margin-top: 26px; font-size: 0.95rem; color: var(--muted); }
.agenda-mail a { color: var(--primary); font-weight: 600; }

.cal-marco {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 8px;
  box-shadow: var(--shadow-panel);
}
.calendly-inline-widget { border-radius: 10px; overflow: hidden; background: var(--paper); }

.calendar-fallback {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.calendar-fallback a { color: var(--primary); font-weight: 600; }

/* Si Calendly ya insertó su iframe, el respaldo sobra. */
.calendly-inline-widget:has(iframe) .calendar-fallback { display: none; }

/* ---------- Pie ---------- */

.site-footer { background: var(--paper-deep); border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px var(--gutter);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand svg { width: 24px; height: 24px; flex: none; }
.footer-brand p { font-size: 0.92rem; }
.footer-brand .dim { color: var(--muted); }

.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 0.92rem; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:first-child { text-decoration: underline; text-underline-offset: 4px; }
.footer-links a:last-child { font-weight: 600; text-decoration: none; }

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .brand .eyebrow { display: inline; }
  .nav-link { display: inline-flex; }
  .section-inner { padding: 100px var(--gutter); }
  .hero-inner { padding: 96px var(--gutter) 104px; }
  .escena > summary, .escena-cambio { padding: 26px; }
  .escena-cambio { padding-left: 64px; }
  .tabla-head, .tabla-fila { grid-template-columns: 5rem minmax(0,1fr) minmax(0,1fr); padding: 18px 26px; }
  .tabla-head span:last-child { display: block; }
  .tabla-despues { grid-column: 3; }
  .tabla-despues .eyebrow { display: none; }
  .noes { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 900px) {
  .nav-link.nav-secundario { display: inline-flex; }
  .diag { grid-template-columns: minmax(0,1fr) minmax(0,.95fr); gap: 56px; }
  .diag-panel-col { position: sticky; top: 96px; align-self: start; }
  .principios { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
  .agenda { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 64px; }
  .agenda-intro { position: sticky; top: 96px; align-self: start; }
  .tecnica { grid-template-columns: 10rem minmax(0,1fr); }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}


/* ================= Fotografía y ritmo visual =================
   Añadido tras medir 14 landings del sector: los buenos alternan ancho y
   disposición, no solo el color de fondo. Aquí las fotos rompen la simetría
   que hacía que todos los bloques parecieran el mismo. */

/* ---------- Hero a dos columnas ---------- */

/* Sin imagen al lado, el hero vuelve a una sola columna centrada: la
   pregunta ocupa todo el ancho y cae en dos lineas en vez de cinco. */
.hero-inner { display: block; text-align: center; }
.hero-txt { max-width: 940px; margin: 0 auto; }
/* El limite va en el titular, no en el bloque: en ch sobre un display grande
   una medida corta lo parte en una palabra por linea. */
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero-txt .hero-sub { max-width: 46ch; }

.hero-foto {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
}
.hero-foto img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/11; }

/* ---------- Miniatura en cada escena ---------- */

.escena-foto {
  width: 84px;
  height: 63px;
  flex: none;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ---------- Sección 05: foto vertical visible ---------- */

.modo-grid { display: grid; gap: 26px; align-items: center; }

.modo-foto {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.modo-foto img { width: 100%; height: 100%; display: block; object-fit: cover; aspect-ratio: 4/3; }
@media (min-width: 900px) { .modo-foto img { aspect-ratio: 4/5; } }
.modo-foto figcaption {
  padding: 10px 14px;
  background: var(--paper);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.modo-txt h2 { margin-top: 14px; font-size: clamp(2rem, 4.4vw, 3.1rem); }

/* ---------- Logos de herramientas ---------- */

.tec-logos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 34px;
  margin-bottom: 22px;
}
.tec-logos img { width: auto; opacity: 0.62; transition: opacity .24s cubic-bezier(.22,1,.36,1); }
.tec-logos li:hover img { opacity: 1; }
/* Igualar por AREA optica, no por altura: un logotipo 8.9:1 y otro 1.6:1 a la
   misma altura se ven con cinco veces distinto peso. */
.tec-logos img[alt="Anthropic"] { height: 17px; }
.tec-logos img[alt="LangChain"] { height: 22px; }
.tec-logos img[alt="OpenAI"]    { height: 22px; }
.tec-logos img[alt="AWS"]       { height: 40px; }
.tec-aviso { margin-top: 14px; font-size: 0.82rem; color: var(--muted); }

/* ---------- Cierre: la única sección saturada a sangre ---------- */
/* Patrón medido en Gradient Labs y Artisan: página clara con UN ambiente
   saturado, justo donde se pide la acción. */

.cierre {
  background: var(--cierre-bg);
  color: var(--ink);
  border-bottom: 0;
}
.cierre h2, .cierre .agenda-intro > p { color: var(--ink); }
.cierre .eyebrow { color: var(--primary); }
.cierre .agenda-intro > p { opacity: 0.88; }
.cierre .agenda-puntos { color: var(--ink); }
.cierre .agenda-mail { color: var(--muted); }
.cierre .agenda-mail a { color: var(--primary); }
.cierre .cal-marco { background: #0f4a49; border-color: #1f6b67; }

@media (min-width: 900px) {
  .modo-grid { grid-template-columns: 0.85fr 1.15fr; gap: 44px; }
  .escena-foto { width: 132px; height: 99px; }
  .tec-logos img { height: 26px; }
}


/* ---------- Ajustes de encuadre (revision de distribucion) ---------- */

@media (min-width: 900px) {
  /* La foto del hero se estira a la altura del texto: si es mucho mas baja,
     queda flotando y el bloque se ve descuadrado. */

  /* Seccion 05: la foto vertical manda el alto; el texto se centra a su lado. */
  .modo-grid { grid-template-columns: 0.78fr 1.22fr; gap: 48px; }
  .modo-txt { align-self: center; }
}

/* Miniaturas de escena algo mayores y siempre centradas con su texto */
@media (min-width: 640px) {
  .escena-foto { width: 118px; height: 88px; }
}
@media (min-width: 900px) {
  .escena-foto { width: 148px; height: 111px; }
}


/* ---------- Fotografia sobre fondo oscuro ---------- */
/* A pleno brillo las fotos claras deslumbran contra el marino y rompen
   la lectura. Se bajan un punto y se les da un borde tenue. */
/* Las fotos vienen de fuentes distintas —cafe marron, oficina beige— y
   sobre marino cada una tira para su lado. Casi desaturadas se leen como
   una sola familia y dejan de pelear con el fondo. */
.escena-foto, .modo-foto img {
  filter: saturate(0.26) brightness(0.82) contrast(1.08);
  transition: filter .3s cubic-bezier(.22,1,.36,1);
}
.escena[open] .escena-foto,
.escena summary:hover .escena-foto { filter: saturate(0.55) brightness(0.92) contrast(1.05); }

/* Mismo criterio para los videos de fondo */
.media-band video { filter: blur(8px) saturate(0.22) brightness(0.6); }
.escena-foto { border-color: var(--border); }
.tec-logos img { opacity: 0.55; }
.tec-logos li:hover img { opacity: 0.95; }


/* ================= Grafo de agentes del hero ================= */
/* Es la firma de la marca y explica el producto: un orquestador repartiendo
   trabajo entre agentes. Sustituye a la foto de stock del encabezado. */

.hero-grafo {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* el diagrama se centra; sin hueco muerto debajo */
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--secondary), var(--paper));
  padding: 22px 18px 0;
  box-shadow: var(--shadow-panel);
  overflow-x: auto;
}
.hero-grafo > svg { flex: 0 0 auto; }
.hero-grafo svg { width: 100%; height: auto; min-width: 520px; }

.hero-grafo figcaption {
  margin: 22px -18px 0;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hero-grafo .ar { fill: none; stroke: var(--border-strong); stroke-width: 1.3; }
.hero-grafo .nd { fill: var(--paper); stroke: var(--border-strong); stroke-width: 1.3; }
.hero-grafo .nd.nucleo { stroke: var(--primary); stroke-width: 1.9; }
.hero-grafo .nt { font-family: var(--font-mono); font-size: 12px; font-weight: 500; fill: var(--ink); }
.hero-grafo .et { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.4px; fill: var(--muted); }

/* La señal recorre cada rama con su propio color */
.hero-grafo .sig {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 6 150;
  animation: senal 3.4s linear infinite;
}
.hero-grafo .s-aqua   { stroke: var(--primary); filter: drop-shadow(0 0 4px rgba(69,212,196,.75)); }
.hero-grafo .s-violet { stroke: var(--violet);  filter: drop-shadow(0 0 4px rgba(155,140,232,.75)); }
.hero-grafo .s-amber  { stroke: var(--secundario); filter: drop-shadow(0 0 4px rgba(127,179,232,.75)); }
.hero-grafo .d1 { animation-delay: 0s }    .hero-grafo .d2 { animation-delay: .42s }
.hero-grafo .d3 { animation-delay: .52s }  .hero-grafo .d4 { animation-delay: .62s }
.hero-grafo .d5 { animation-delay: 1.18s } .hero-grafo .d6 { animation-delay: 1.28s }
.hero-grafo .d7 { animation-delay: 1.38s }

@keyframes senal { from { stroke-dashoffset: 156 } to { stroke-dashoffset: 0 } }

/* ================= Ilustraciones de servicio con vida ================= */
/* Cada una anima lo que explica: el chatbot escribe, el agente marca,
   la automatizacion avanza, los agentes se turnan, el conector encaja. */

.svc-art svg { overflow: visible; }

/* 1 · Chatbot escribiendo */
.tec1, .tec2, .tec3 { animation: teclea 1.5s ease-in-out infinite; }
.tec2 { animation-delay: .2s } .tec3 { animation-delay: .4s }
@keyframes teclea { 0%,60%,100% { opacity:.35 } 30% { opacity:1 } }

/* 2 y 6 · El visto se dibuja */
.trazo { stroke-dasharray: 22; stroke-dashoffset: 22; animation: dibuja 3s ease-in-out infinite; }
@keyframes dibuja {
  0%   { stroke-dashoffset: 22 }
  35%  { stroke-dashoffset: 0 }
  80%  { stroke-dashoffset: 0; opacity: 1 }
  95%  { stroke-dashoffset: 0; opacity: 0 }
  100% { stroke-dashoffset: 22; opacity: 1 }
}
.late { animation: latido 2.6s ease-in-out infinite; }
@keyframes latido { 0%,100% { opacity:.4 } 50% { opacity:1 } }

/* 3 · El flujo avanza */
.flecha { animation: avanza 2.4s ease-in-out infinite; }
.flecha.f2 { animation-delay: .5s }
@keyframes avanza {
  0%,100% { transform: translateX(0); opacity:.55 }
  50%     { transform: translateX(4px); opacity:1 }
}

/* 4 · Los agentes se turnan */
.sat1, .sat2, .sat3 { transform-box: fill-box; transform-origin: center; animation: turno 3s ease-in-out infinite; }
.sat2 { animation-delay: 1s } .sat3 { animation-delay: 2s }
@keyframes turno { 0%,70%,100% { opacity:.45; transform:scale(1) } 25% { opacity:1; transform:scale(1.18) } }

/* 7 · Cada rol ve lo suyo: el foco va rotando entre los tres */
.rol { animation: rota 3.6s ease-in-out infinite; }
.rol2 { animation-delay: 1.2s } .rol3 { animation-delay: 2.4s }
@keyframes rota { 0%,66%,100% { opacity:.32 } 20% { opacity:1 } }

/* 5 · El conector encaja */
.conector { transform-box: fill-box; transform-origin: center; animation: encaja 3s ease-in-out infinite; }
@keyframes encaja { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-2.5px) } }

/* Al pasar el raton, todo se acelera: el bloque responde */
.svc-tile:hover .tec1, .svc-tile:hover .tec2, .svc-tile:hover .tec3 { animation-duration: .9s }
.svc-tile:hover .trazo   { animation-duration: 1.4s }
.svc-tile:hover .flecha  { animation-duration: 1.1s }
.svc-tile:hover .sat1, .svc-tile:hover .sat2, .svc-tile:hover .sat3 { animation-duration: 1.5s }
.svc-tile:hover .conector { animation-duration: 1.3s }
.svc-tile:hover .rol      { animation-duration: 1.7s }

@media (prefers-reduced-motion: reduce) {
  .hero-grafo .sig { display: none }
  .tec1,.tec2,.tec3,.trazo,.late,.flecha,.sat1,.sat2,.sat3,.conector,.rol { animation: none !important }
  .rol { opacity: 1 }
  .trazo { stroke-dashoffset: 0 }
}

@media (min-width: 900px) {
  .hero-grafo svg { min-width: 0 }
}
