/* Tipografía y botones, en la línea de chillbase.net: una grotesca
   semicondensada en mayúsculas para titulares y controles en bloques
   rectos con un «+» al lado. Va la última: manda sobre hero.css y
   servicios.css. (Chillbase usa Good Headline Pro, de pago; Barlow Semi
   Condensed es la libre que más se le parece.) */
:root {
  --f: "Barlow", system-ui, sans-serif;
  --f-titulo: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --bloque: rgba(34, 34, 34, 0.8);
  --bloque-encima: rgba(58, 58, 58, 0.92);
}
body { font-family: var(--f); }

/* ── Titulares ────────────────────────────────────────────────────────── */
h1, h2, h3, .logo-gigante, .lema, .lista-preguntas summary, .telon text {
  font-family: var(--f-titulo);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}
h2, .proceso-titulo h2, .preguntas h2, .contacto h2, .intro-lateral h2 { line-height: 0.9; letter-spacing: 0; font-weight: 700; }
.proceso-titulo h2 { font-size: clamp(3rem, 8.4vw, 9rem); }
.intro-lateral h2 { font-size: clamp(3rem, 7vw, 7.5rem); }
.preguntas h2 { font-size: clamp(2.6rem, 5.6vw, 5.6rem); }
.contacto h2 { font-size: clamp(3.4rem, 11vw, 12rem); }
.lista-proceso h3 { font-size: clamp(2.3rem, 5.4vw, 5.6rem); line-height: 0.92; letter-spacing: 0; font-weight: 700; }
.tarjeta h3 { font-size: clamp(2.1rem, 3.7vw, 3.7rem); line-height: 0.92; letter-spacing: 0; font-weight: 700; }
.lista-preguntas summary { font-size: clamp(1.3rem, 2.2vw, 2rem); font-weight: 600; letter-spacing: 0.005em; }
.lema { font-size: clamp(1.6rem, 3vw, 2.8rem); line-height: 0.95; }
.logo-gigante { letter-spacing: -0.01em; font-size: 40vw; }

/* El título del hero: mismas letras de cristal, ahora en esta fuente. */
.titular-lineas {
  font-family: var(--f-titulo);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 0.88;
  font-size: clamp(3.4rem, 14.6vw, 16.5rem);
}
.pie-hero .subtitulo, .subtitulo.frase { font-family: var(--f-titulo); font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(1.1rem, 1.9vw, 1.8rem); line-height: 1; }
@media (max-width: 900px), (orientation: portrait) {
  .titular-lineas { font-size: clamp(3rem, 18vw, 8rem); }
}

/* Etiquetas: cápsula con borde, como las de la referencia. */
.meta {
  display: inline-block;
  padding: 0.5rem 0.95rem 0.42rem;
  border: 1.5px solid rgba(var(--trazo), 0.7);
  border-radius: 999px;
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--hueso);
  margin-bottom: 1.6rem;
}
.nota { font-family: var(--f-titulo); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }

/* ── Botones: bloque recto, mayúsculas y un «+» en su casilla ─────────── */
.boton {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  min-height: 3.5rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--bloque);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: none;
  color: var(--fuerte);
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  overflow: hidden;
  transition: background 0.25s, color 0.25s;
}
.boton::before { display: none; }
.boton { padding-left: 1.2rem; align-items: center; }
/* La flecha del HTML pasa a ser la casilla del «+». */
.boton span {
  align-self: stretch;
  display: grid;
  place-items: center;
  width: 3.5rem;
  margin-left: 1.2rem;
  font-size: 0;
  border-left: 2px solid var(--negro);
  translate: none;
}
.boton span::before, .seg i::before {
  content: "";
  width: 15px;
  height: 15px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: rotate 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.boton:not(:has(span)) { padding-right: 1.2rem; }
.boton:hover { background: var(--bloque-encima); transform: none; }
.boton:hover span { translate: none; }
.boton:hover span::before, .seg:hover i::before { rotate: 90deg; }
.boton:active { transform: none; background: rgba(20, 20, 20, 0.95); }
.boton.lleno { background: var(--naranja); color: #0b0b0c; border: 0; box-shadow: none; }
.boton.lleno:hover { background: #ff7a35; }
.proceso .boton { padding: 0 0 0 1.3rem; font-size: 1.05rem; min-height: 3.8rem; }
.proceso .boton:not(:has(span)) { padding-right: 1.3rem; }
.proceso .boton span { width: 3.8rem; }

/* ── Nav: una barra de bloques, con el de contacto en naranja ─────────── */
.cab { display: flex; justify-content: center; padding: 1rem var(--x) 0; }
.barra-nav { display: flex; align-items: stretch; gap: 2px; padding: 0; background: none; border-radius: 0; font-size: 1rem; }
/* Fuera la pastilla translúcida del nav antiguo: quedaba detrás de los bloques
   (sobre negro no se veía; sobre blanco, sí). */
.cab nav.barra-nav { background: none; padding: 0; border-radius: 0; }
.cab nav.barra-nav a { opacity: 1; padding: 0; border-radius: 0; }
.seg {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 3.5rem;
  padding: 0 1rem 0 1.1rem !important;
  background: var(--bloque);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 3px !important;
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--fuerte);
  white-space: nowrap;
  transition: background 0.25s;
}
.seg i { display: grid; place-items: center; width: 15px; height: 15px; }
.seg:first-child { border-radius: 16px 3px 3px 16px !important; }
.seg:last-child { border-radius: 3px 16px 16px 3px !important; }
.seg:hover { background: var(--bloque-encima); }
.seg.marca { font-size: 1.5rem; font-weight: 700; letter-spacing: 0; text-shadow: none; padding: 0 1.2rem !important; }
.seg.hablar { background: var(--naranja); color: #0b0b0c; }
.seg.hablar:hover { background: #ff7a35; }
@media (max-width: 760px) {
  .cab nav.barra-nav { display: flex; width: 100%; }
  .seg.enlace { display: none; }
  .seg.marca { flex: 1; }
}

/* ══ Versión «3D»: estructura de The Resonance + hero de puntos ══════════ */
/* La página va enmarcada por dos líneas verticales, de arriba abajo. */
.reticula i { background: rgba(var(--trazo), 0.13); }
.reticula i:nth-child(2), .reticula i:nth-child(3) { display: none; }

/* Nav: el logo en su caja a la izquierda; enlaces y contacto a la derecha. */
.cab { display: block; padding: 1.4rem calc(var(--x) + 1.6rem) 0; }
.barra-nav { width: 100%; gap: 0.5rem; align-items: stretch; }
.seg, .seg:first-child, .seg:last-child { border-radius: 4px !important; }
.seg.marca { margin-right: auto; border: 1px solid rgba(var(--trazo), 0.16); }
.grupo-enlaces { display: flex; background: var(--bloque); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(var(--trazo), 0.12); border-radius: 4px; }
.grupo-enlaces .seg { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 0.95rem !important; min-height: calc(3.5rem - 2px); }
.grupo-enlaces .seg:hover { color: var(--naranja); background: none; }
@media (max-width: 760px) { .grupo-enlaces { display: none; } .cab { padding: 1rem var(--x) 0; } }
/* En ancho, la barra entera va junta y centrada: logo, enlaces y contacto. */
@media (min-width: 761px) {
  .cab nav.barra-nav { width: max-content; margin: 0 auto; }
  .seg.marca { margin-right: 0; }
}
}

/* Hero: negro, con el monograma de puntos y el titular macizo delante. */
.portal { background: radial-gradient(90% 70% at 62% 42%, #1a0d06 0%, #080606 46%, var(--negro) 78%); }
.portal::after { display: none; }
.logo3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.portal .titular-lineas {
  top: auto;
  bottom: clamp(6.5rem, 17vh, 10rem);
  translate: none;
  left: calc(var(--x) + 1.6rem);
  right: calc(var(--x) + 1.6rem);
  font-size: clamp(3.2rem, 13.2vw, 15rem);
  line-height: 0.84;
}
.portal .fila { justify-self: start; margin: 0; }
.portal .f2 { margin-left: 0; }
.portal .f3 { margin-left: 12%; }
.portal .fila::after { display: none; }
.solida { display: inline-block; color: var(--fuerte); }
.pie-hero { left: calc(var(--x) + 1.6rem); right: calc(var(--x) + 1.6rem); }
@media (max-width: 900px), (orientation: portrait) {
  .portal .titular-lineas { left: var(--x); right: var(--x); font-size: clamp(3rem, 19vw, 8rem); bottom: 9.5rem; }
  .portal .f3 { margin-left: 0; }
  .pie-hero { left: var(--x); right: var(--x); }
}

/* El punto del logo va pegado a las letras. */
.seg.marca { gap: 0; }

/* La E de puntos vive ahora en el lienzo fijo del trazo: siempre visible. */
.pinceladas { opacity: 1 !important; }

/* ── Creatividades con IA: vídeo a pantalla completa que se enciende ───── */
.ia { position: relative; z-index: 2; height: 460vh; }
/* Lo que viene después se monta una pantalla sobre el final de esta sección:
   sube por encima mientras sigue fijada y ya apagada (ver salidaIA en hero.js). */
.ia + * { margin-top: -100vh; }
/* Al final del tramo fijado, la sección «sale»: hero.js sube --sale de 0 a 1,
   el vídeo y el texto se apagan y el fondo pasa al color de la página. Cuando
   por fin se suelta ya es del mismo color que lo que viene: no hay corte. */
.ia-fijo { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: color-mix(in srgb, #050505, var(--pagina, #050505) calc(var(--sale, 0) * 100%)); }
.ia-fijo::after, .ia-cuerpo, .ia-boton { opacity: calc(1 - var(--sale, 0)); }
.ia-video { position: absolute; inset: 0; margin: 0; opacity: 0; will-change: opacity; }
.ia-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Velo para que el texto se lea sobre las zonas claras del vídeo. */
.ia-fijo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--fondo), 0.55), rgba(var(--fondo), 0.15) 45%, rgba(var(--fondo), 0.5)), linear-gradient(rgba(var(--fondo), 0.7), transparent 22%, transparent 70%, rgba(var(--fondo), 0.8));
}
.ia-cuerpo {
  --t: clamp(2.6rem, 6.25vw, 6.6rem);
  --linea: calc(var(--t) * 1.16);
  position: absolute; inset: 0; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(1.6rem, 4.6vw, 5.5rem);
  row-gap: clamp(1rem, 3vh, 2.2rem);
  padding: 0 var(--x);
  font-family: "Inter Tight", var(--f);
}
.ia h2 {
  align-self: center; justify-self: end;
  font-family: inherit; font-weight: 500; font-size: var(--t); line-height: 1;
  letter-spacing: -0.02em; text-transform: none; white-space: nowrap;
}
/* Tres líneas a la vista: la de en medio es la palabra activa. */
.ia-rueda {
  list-style: none; margin: 0; padding: 0;
  height: calc(var(--linea) * 3); overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 68%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 68%, transparent);
}
.ia-rueda li {
  height: var(--linea); line-height: var(--linea);
  font-weight: 500; font-size: var(--t); letter-spacing: -0.02em; white-space: nowrap;
  opacity: 0.32;
  transform: translate3d(0, calc(var(--linea) * (1 - var(--i, 0))), 0);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}
.ia-rueda li.activa { opacity: 1; }
.ia-raya { justify-self: end; align-self: start; margin-top: 0.95em; width: clamp(3rem, 8.6vw, 9rem); height: 1px; background: rgba(var(--trazo), 0.5); font-size: clamp(1.1rem, 1.5vw, 1.55rem); }
.ia-textos { display: grid; max-width: 34rem; }
.ia-textos p {
  grid-area: 1 / 1;
  font-size: clamp(1.1rem, 1.5vw, 1.55rem); line-height: 1.5; color: var(--hueso);
  opacity: 0; transform: translate3d(0, 0.8rem, 0);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ia-textos p.activa { opacity: 1; transform: none; }
.ia-boton { position: absolute; z-index: 1; left: 50%; bottom: clamp(1.6rem, 6vh, 3.4rem); translate: -50% 0; }
@media (max-width: 760px), (orientation: portrait) {
  .ia-cuerpo { --t: clamp(2.4rem, 12vw, 4.6rem); grid-template-columns: 1fr; row-gap: 0.4rem; }
  .ia h2 { justify-self: start; }
  .ia-raya { display: none; }
  .ia-textos { margin-top: 1rem; }
  .ia-boton { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .ia-rueda li, .ia-textos p { transition: none; }
}

/* En el pie, la palabra la escriben las virutas: el logo de fondo se queda
   casi invisible, solo como huella. */
.logo-gigante { opacity: 0.1; }

/* ── Aparecer enfocándose (suave.js) ──────────────────────────────────────
   Solo con la clase que pone el script: sin él, todo se ve desde el principio.
   Los colores siguen fundiendo aquí para no saltar al apagarse la luz. */
.con-aparicion .aparece {
  --espera: calc(var(--turno, 0) * 80ms);
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(0, 2.2rem, 0);
  transition: opacity 0.9s ease var(--espera), filter 1s ease var(--espera), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) var(--espera),
    color 0.9s ease, background-color 0.9s ease, border-color 0.9s ease;
}
.con-aparicion .aparece.visto { opacity: 1; filter: none; transform: none; }

/* Titulares que caen letra a letra (suave.js). */
.palabra { display: inline-block; white-space: nowrap; }
.letra { display: inline-block; transform-origin: 0 100%; will-change: transform; }
