/* Akary · la página va de la noche al día: arriba medianoche, abajo amanece.
   Sin JavaScript (o con movimiento reducido) todo se ve encendido y en su sitio. */
:root {
  --noche: #0A1033;        /* fondo del inicio, más oscuro que el medianoche */
  --medianoche: #14215C;   /* color principal de la marca */
  --alba: #22357E;         /* el cielo antes de amanecer */
  --oro: #F2B233;          /* la luz */
  --blanco: #FFFFFF;
  --texto-claro: #EEF1FA;
  --texto-suave: #B6C0E4;
  --texto-dia: #4A5578;
  --titulo: "Quicksand", "Nunito", system-ui, sans-serif;
  --cuerpo: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-der: max(20px, env(safe-area-inset-right, 0px));
  --p: 1; /* avance del hilo de luz (0 a 1); el JS lo mueve con el scroll */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--noche);
  color: var(--texto-claro);
  font-family: var(--cuerpo);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.sr, .saltar:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar:focus { position: fixed; z-index: 100; top: 12px; left: 12px; background: var(--oro); color: var(--noche); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 4px; }

.contenedor { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-der); }
.angosto { max-width: 760px; }

h1, h2, h3 { font-family: var(--titulo); font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(34px, 6.2vw, 64px); line-height: 1.08; }
h2 em, h1 em { font-style: normal; color: var(--oro); }
.antetitulo { margin: 0 0 16px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--oro); }
.bajada { margin: 22px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--texto-suave); max-width: 58ch; }

/* ---------- Barra ---------- */
.barra {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter-der) 14px var(--gutter);
  color: var(--blanco);
  transition: background-color .4s ease, color .4s ease, box-shadow .4s ease;
}
.barra.con-fondo { background: rgba(10, 16, 51, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
body.dia .barra { color: var(--medianoche); }
body.dia .barra.con-fondo { background: rgba(255, 255, 255, .8); box-shadow: 0 1px 0 rgba(20,33,92,.08); }
.barra-logo { display: block; width: 116px; line-height: 0; }
.barra-logo svg { width: 100%; height: auto; overflow: visible; }
.barra nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-size: 14px; font-weight: 500; }
.barra nav a { text-decoration: none; opacity: .88; }
.barra nav a:hover { opacity: 1; }
.barra-boton { border: 1px solid currentColor; border-radius: 999px; padding: 7px 14px; opacity: 1 !important; }
@media (max-width: 520px) { .barra nav a:not(.barra-boton):not(.barra-idioma) { display: none; } }

/* ---------- 1. Inicio ---------- */
.inicio { position: relative; height: 100vh; height: 100svh; background: var(--noche); overflow: hidden; }
.cosmos { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.inicio::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(rgba(10,16,51,0), var(--noche)); pointer-events: none; z-index: 0; }
.inicio-escena {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(20px, 4vh, 40px);
  padding: 80px var(--gutter-der) 60px var(--gutter);
  text-align: center;
}
.halo {
  position: absolute; z-index: 0; left: 50%; top: 45%; width: min(120vw, 1100px); aspect-ratio: 1; max-width: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(242,178,51,.30), rgba(242,178,51,.10) 45%, rgba(10,16,51,0) 72%);
  pointer-events: none;
}
.filamento { position: relative; width: min(88vw, 780px); height: auto; overflow: visible; }
.filamento .guia { stroke: rgba(255,255,255,.07); }
.filamento .trazo { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.inicio-titulo { position: relative; font-size: clamp(24px, 4.2vw, 44px); line-height: 1.15; max-width: 18ch; font-weight: 500; }
.inicio-titulo em { font-weight: 700; }
.inicio-pista { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); left: 0; right: 0; margin: 0; font-size: 13px; letter-spacing: .08em; color: var(--texto-suave); }
.inicio-pista span { display: inline-block; margin-left: 4px; color: var(--oro); }

/* ---------- 2. Manifiesto ---------- */
.significado { position: relative; background: linear-gradient(var(--noche), #0D1440); padding: clamp(90px, 14vh, 160px) 0 0; overflow: hidden; }
.significado-rejilla { display: grid; gap: clamp(36px, 6vw, 80px); align-items: center; }
.kanji { position: relative; display: grid; place-items: center; min-height: 260px; font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 600; line-height: 1; }
.kanji-sol, .kanji-luna, .kanji-luz { grid-area: 1 / 1; font-size: clamp(150px, 26vw, 250px); }
.kanji-sol { color: var(--oro); text-shadow: 0 0 40px rgba(242,178,51,.55); }
.kanji-luna { color: #C9D4F2; text-shadow: 0 0 30px rgba(201,212,242,.35); }
.kanji-luz { color: #FFF4D6; opacity: 0; text-shadow: 0 0 24px rgba(242,178,51,.9), 0 0 80px rgba(242,178,51,.5); }
.kanji-leyenda { grid-area: 2 / 1; margin-top: 18px; font-family: var(--cuerpo); font-weight: 500; font-size: 14px; letter-spacing: .08em; color: var(--texto-suave); }
.significado-pasos { display: grid; gap: 22px; margin-top: 34px; }
.paso { padding-left: 18px; border-left: 2px solid rgba(242,178,51,.55); }
.paso h3 { font-size: 22px; }
.paso p { margin: 8px 0 0; color: var(--texto-suave); max-width: 52ch; }
/* Sin animación: el kanji ya unido. */
.kanji-sol, .kanji-luna { opacity: 0; }
.kanji-luz { opacity: 1; }
.animado .kanji-sol, .animado .kanji-luna { opacity: 1; }
.animado .kanji-luz { opacity: 0; }
.red { display: block; width: 100%; height: clamp(110px, 16vw, 200px); margin-top: clamp(40px, 7vh, 80px); }
.fibra { fill: none; stroke: rgba(150,170,240,.18); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pulso { fill: none; stroke: #FFE7A8; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 6 94; filter: drop-shadow(0 0 6px rgba(242,178,51,.95)); animation: viajar 3.4s linear infinite; }
.pulso.p2 { animation-duration: 4.6s; animation-delay: -1.3s; stroke: #CFE0FF; filter: drop-shadow(0 0 6px rgba(160,190,255,.9)); }
.pulso.p3 { animation-duration: 3.9s; animation-delay: -2.4s; }
@keyframes viajar { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@media (min-width: 900px) { .significado-rejilla { grid-template-columns: 5fr 7fr; } .kanji { min-height: 380px; } }

/* ---------- 3-5. Recorrido con el hilo de luz ---------- */
.recorrido {
  --hilo-x: 28px;
  position: relative; z-index: 1; /* por encima de Contacto: el brillo de la chispa no se corta al final */
  background: var(--fondo); color: var(--t1);
  padding-bottom: 60px;
  transition: background-color .8s ease, color .8s ease;
}
/* Tonos: con JS, el recorrido entero cambia de noche a día según el bloque que pasa por el centro (main.js);
   sin JS, cada bloque pinta su propio fondo. */
.recorrido[data-tono="noche"], html:not(.animado) .bloque[data-tono="noche"] {
  --fondo: #0D1440; --t1: var(--texto-claro); --t2: var(--texto-suave); --linea: rgba(255,255,255,.1);
  --tarjeta: rgba(255,255,255,.05); --oro-texto: var(--oro); --pista: rgba(255,255,255,.08);
}
.recorrido[data-tono="dia"], html:not(.animado) .bloque[data-tono="dia"] {
  --fondo: #FFFFFF; --t1: var(--medianoche); --t2: #4A5578; --linea: rgba(20,33,92,.12);
  --tarjeta: #F4F6FC; --oro-texto: #9A6700; --pista: rgba(20,33,92,.08);
}
/* Sin JS el fondo de cada bloque ocupa todo el ancho (sombra ancha recortada a los lados). */
html:not(.animado) .bloque { background: var(--fondo); color: var(--t1); box-shadow: 0 0 0 100vmax var(--fondo); clip-path: inset(0 -100vmax); }
.bloque { padding-block: clamp(40px, 7vh, 72px); }
.grupo-cabeza.bloque { padding-block: clamp(60px, 9vh, 100px) clamp(30px, 4vh, 50px); margin-bottom: 0; }
.recorrido .antetitulo, .recorrido h2 em, .recorrido .app-lema { color: var(--oro-texto); }
.recorrido .bajada, .recorrido .app-para, .recorrido .app-detalle, .recorrido .servicio p { color: var(--t2); }
.recorrido .app-enlace { border-bottom-color: var(--oro); }
.recorrido .app-enlace:hover { color: var(--oro-texto); }
.hilo { position: absolute; top: 0; bottom: 0; left: var(--hilo-x); width: 4px; margin-left: -2px; background: var(--pista); border-radius: 2px; pointer-events: none; z-index: 1; }
.hilo-luz {
  position: absolute; inset: 0; border-radius: 2px; overflow: hidden;
  background: linear-gradient(rgba(242,178,51,.25), var(--oro) 8%, #FFD36B);
  box-shadow: 0 0 8px 2px rgba(242,178,51,.9), 0 0 26px 8px rgba(242,178,51,.45), 0 0 70px 18px rgba(242,178,51,.18);
  transform-origin: top; transform: scaleY(var(--p));
}
/* Pulsos de luz que bajan por el hilo, como datos por una fibra. */
.hilo-luz::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0) 0 150px, rgba(255,250,230,.95) 175px, rgba(255,255,255,0) 205px, rgba(255,255,255,0) 300px);
  background-size: 100% 300px;
  animation: fluir 1.6s linear infinite;
}
@keyframes fluir { from { background-position: 0 0; } to { background-position: 0 300px; } }
.animado .recorrido:not(.hilo-activo) .hilo-chispa, .animado .recorrido:not(.hilo-activo) .hilo-cola { opacity: 0; }
.hilo-chispa, .hilo-cola { transition: opacity .4s ease; }
.hilo-cola {
  position: absolute; left: 50%; width: 14px; height: 180px; margin-left: -7px;
  top: calc(var(--p) * 100% - 180px);
  background: linear-gradient(to top, rgba(255,236,180,.95), rgba(242,178,51,.35) 40%, rgba(242,178,51,0));
  filter: blur(4px); border-radius: 7px;
}
.hilo-chispa {
  position: absolute; left: 50%; top: calc(var(--p) * 100%);
  width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0 30%, #FFF0C2 45%, var(--oro) 75%);
  box-shadow: 0 0 0 5px rgba(242,178,51,.35), 0 0 30px 12px rgba(242,178,51,.7), 0 0 90px 30px rgba(242,178,51,.3);
}
.hilo-chispa::before, .hilo-chispa::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255,226,150,.8);
  animation: latido 1.8s ease-out infinite;
}
.hilo-chispa::after { animation-delay: .9s; }
@keyframes latido { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
/* Tres chispitas girando alrededor de la punta. */
.hilo-chispa i { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #FFF6DA; box-shadow: 0 0 8px 3px rgba(242,178,51,.8); animation: orbita 2.4s linear infinite; }
.hilo-chispa i:nth-child(2) { animation-duration: 3.1s; animation-direction: reverse; width: 3px; height: 3px; margin: -1.5px; }
.hilo-chispa i:nth-child(3) { animation-duration: 1.9s; animation-delay: -.8s; width: 4px; height: 4px; margin: -2px; }
@keyframes orbita { from { transform: rotate(0deg) translateX(22px); } to { transform: rotate(360deg) translateX(22px); } }

.grupo { position: relative; }
.grupo-cabeza { padding-left: calc(var(--hilo-x) + 28px); margin-bottom: clamp(36px, 6vh, 64px); }

.app {
  position: relative;
  display: grid; gap: 22px;
  max-width: 1120px; margin: 0 auto;
  padding-left: calc(var(--hilo-x) + 28px); padding-right: var(--gutter-der);
}
/* El punto del hilo a la altura de cada sistema. */
.app::before {
  content: ""; position: absolute; left: var(--hilo-x); top: 18px;
  width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--fondo); border: 2px solid var(--linea);
  transition: background-color .6s ease, border-color .6s ease, box-shadow .6s ease;
}
.app.encendida::before, .app::before { background: var(--oro); border-color: #FFF4D6; box-shadow: 0 0 16px 4px rgba(242,178,51,.6); }
.app-pantalla {
  margin: 0; border-radius: 14px; overflow: hidden; min-width: 0;
  background: #1B2A6B;
  box-shadow: 0 0 0 1px rgba(242,178,51,.45), 0 24px 70px -24px rgba(242,178,51,.45);
  transition: box-shadow .8s ease;
}
.app-pantalla img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: filter .9s ease, transform .9s ease; }
.app-texto { min-width: 0; transition: opacity .8s ease, transform .8s ease; }
.app-para { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--texto-suave); }
.app h3 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; }
.app-lema { margin: 10px 0 0; font-family: var(--titulo); font-weight: 700; font-size: clamp(18px, 2vw, 22px); color: var(--oro); }
.app-detalle { margin: 12px 0 0; color: var(--texto-suave); max-width: 46ch; }
.app-enlace { display: inline-flex; gap: 8px; margin-top: 18px; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(242,178,51,.6); padding-bottom: 2px; }
.app-enlace:hover { color: var(--oro); }

/* Con movimiento: cada sistema empieza apagado y el hilo lo enciende. */
.animado .app::before { background: var(--fondo); border-color: var(--linea); box-shadow: none; }
.animado .app .app-pantalla { box-shadow: 0 0 0 1px var(--linea), 0 24px 70px -30px rgba(0,0,0,.35); }
.animado .app .app-pantalla img { filter: grayscale(1) opacity(.4); transform: scale(1.02); }
.animado .app .app-texto { opacity: .35; transform: translateY(10px); }
.animado .app.encendida::before { background: var(--oro); border-color: #FFF4D6; box-shadow: 0 0 16px 4px rgba(242,178,51,.6); }
.animado .app::after {
  content: ""; position: absolute; left: var(--hilo-x); top: 18px; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; border: 2px solid rgba(255,226,150,.9); opacity: 0; pointer-events: none;
}
.animado .app.encendida::after { animation: destello 1s ease-out 1; }
@keyframes destello { from { transform: scale(1); opacity: 1; } to { transform: scale(6); opacity: 0; } }
.animado .app.encendida .app-pantalla { box-shadow: 0 0 0 1px rgba(242,178,51,.45), 0 24px 70px -24px rgba(242,178,51,.45); }
.animado .app.encendida .app-pantalla img { filter: none; transform: none; }
.animado .app.encendida .app-texto { opacity: 1; transform: none; }

/* A la medida */
.servicios { list-style: none; margin: 0 auto; display: grid; gap: 14px; padding-left: calc(var(--hilo-x) + 28px); }
.servicio {
  padding: 22px 22px 22px 24px; border-radius: 14px;
  background: var(--tarjeta); border: 1px solid var(--linea);
  transition: background-color .7s ease, border-color .7s ease, opacity .7s ease;
}
.servicio h3 { font-size: 21px; display: flex; align-items: center; gap: 12px; }
.servicio h3::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--oro); box-shadow: 0 0 12px 3px rgba(242,178,51,.55); }
.servicio p { margin: 8px 0 0 21px; color: var(--texto-suave); }
.servicio-ia h3::before { background: #FFF4D6; box-shadow: 0 0 14px 5px rgba(242,178,51,.8); }
.animado .servicio { opacity: .4; }
.animado .servicio.encendida { opacity: 1; background: rgba(242,178,51,.07); border-color: rgba(242,178,51,.35); }

/* ---------- 6. Contacto: amanece ---------- */
.contacto {
  position: relative; overflow: hidden;
  background: linear-gradient(var(--alba) 0%, #6F80C2 26%, #E7ECF8 52%, var(--blanco) 74%);
  padding: clamp(220px, 34vh, 340px) 0 clamp(90px, 14vh, 150px);
  color: var(--medianoche);
}
.sol {
  position: absolute; left: 50%; top: 30%; width: min(150vw, 1300px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255,236,180,.95), rgba(242,178,51,.55) 22%, rgba(242,178,51,.16) 48%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.contacto-texto { position: relative; text-align: center; }
.contacto .antetitulo { color: #B07A0B; }
.contacto h2 em { color: #C98A0C; }
.contacto .bajada { color: var(--texto-dia); margin-left: auto; margin-right: auto; }
.boton {
  display: inline-block; margin-top: 30px;
  background: var(--medianoche); color: var(--blanco); text-decoration: none;
  font-weight: 600; padding: 15px 26px; border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(20,33,92,.6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.boton:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(20,33,92,.7); }
.boton:active { transform: scale(.98); }
.contacto-correo { margin: 14px 0 0; font-size: 15px; color: var(--texto-dia); }
.contacto-correo a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.redes { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
.contacto .redes, .porta-final .redes { justify-content: center; }
.redes a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--texto-dia); background: rgba(20, 33, 92, .06); transition: background .2s, color .2s, transform .2s; }
.redes a:hover, .redes a:focus-visible { background: #14215C; color: #fff; transform: translateY(-2px); }
.redes svg { width: 20px; height: 20px; fill: currentColor; }
.pie .redes { margin: 0; }

/* ---------- Asistente de IA ---------- */
.asistente {
  position: fixed; z-index: 31;
  right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  width: min(390px, calc(100vw - 32px)); height: min(580px, calc(100svh - 110px));
  display: flex; flex-direction: column;
  background: rgba(13, 20, 64, .96); color: var(--texto-claro);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(242,178,51,.35); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 0 40px -10px rgba(242,178,51,.35);
  overflow: hidden;
}
.asistente[hidden] { display: none; }
.asistente-cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.asistente-titulo { margin: 0; font-family: var(--titulo); font-weight: 700; font-size: 18px; }
.asistente-sub { margin: 2px 0 0; font-size: 12px; color: var(--oro); }
.asistente-cerrar { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.asistente-mensajes { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msj { margin: 0; padding: 10px 13px; border-radius: 14px; max-width: 88%; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msj-ia { align-self: flex-start; background: rgba(255,255,255,.07); border-top-left-radius: 4px; }
.msj-tu { align-self: flex-end; background: var(--oro); color: var(--noche); border-top-right-radius: 4px; }
.msj a { color: var(--oro); white-space: nowrap; }
.msj-tu a { color: var(--noche); }
.msj-pensando { display: inline-flex; gap: 5px; }
.msj-pensando span { width: 7px; height: 7px; border-radius: 50%; background: var(--oro); animation: puntos 1s ease-in-out infinite; }
.msj-pensando span:nth-child(2) { animation-delay: .15s; } .msj-pensando span:nth-child(3) { animation-delay: .3s; }
@keyframes puntos { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.asistente-sugerencias { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.asistente-sugerencias[hidden] { display: none; }
.asistente-sugerencias button { font: 500 12.5px var(--cuerpo); color: var(--texto-claro); background: rgba(242,178,51,.1); border: 1px solid rgba(242,178,51,.35); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.asistente-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.asistente-form input { flex: 1; min-width: 0; font: 15px var(--cuerpo); color: var(--texto-claro); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 10px 12px; }
.asistente-form input::placeholder { color: #8E9AC7; }
.asistente-form button { flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--oro); color: var(--noche); cursor: pointer; display: grid; place-items: center; }
.asistente-form button svg { width: 20px; height: 20px; }
.asistente-form button:disabled { opacity: .5; cursor: default; }
.asistente-nota { margin: 0; padding: 0 14px 12px; font-size: 11px; color: #8E9AC7; }

/* ---------- Pie ---------- */
.pie { background: var(--blanco); color: var(--texto-dia); padding: 28px 0 calc(env(safe-area-inset-bottom, 0px) + 96px); border-top: 1px solid #E6E9F2; }
.pie-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.pie img { width: 132px; height: auto; }
.pie p { margin: 0; font-size: 13px; }

/* ---------- Pantallas grandes: el hilo baja por el centro y los sistemas se alternan ---------- */
@media (min-width: 1024px) {
  .recorrido { --hilo-x: 50%; }
  /* Los títulos van en la columna izquierda: así el hilo, que baja por el centro, no los cruza. */
  .grupo-cabeza { padding-left: var(--gutter); max-width: 1120px; }
  .grupo-cabeza > * { max-width: calc(50% - 70px); }
  .app {
    grid-template-columns: 1fr 1fr; column-gap: 140px; align-items: center;
    padding-left: var(--gutter); padding-right: var(--gutter-der);
  }
  .app::before, .animado .app::after { top: 50%; margin-top: -6px; }
  .app:nth-of-type(even) .app-pantalla { order: 2; }
  .app:nth-of-type(odd) .app-texto { padding-right: 8px; }
  .app:nth-of-type(even) .app-texto { text-align: right; }
  .app:nth-of-type(even) .app-detalle { margin-left: auto; }
  .servicios { grid-template-columns: 1fr 1fr; column-gap: 140px; row-gap: 18px; padding-left: var(--gutter); max-width: 1120px; }
}

@media (prefers-reduced-motion: reduce) {
  .inicio-pista { display: none; }
  .pulso { stroke-dasharray: none; opacity: .5; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Apps móviles (Google Play) ---------- */
.tienda { list-style: none; margin: 0 auto; display: grid; gap: 14px; padding-left: calc(var(--hilo-x, 0px) + 28px); }
.tienda-app {
  display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 12px 16px;
  padding: 18px; border-radius: 18px; background: var(--tarjeta, #F4F6FC); border: 1px solid var(--linea, rgba(20,33,92,.12));
}
.tienda-icono { width: 60px; height: 60px; border-radius: 16px; background-size: cover; background-position: left top; box-shadow: 0 6px 16px -6px rgba(20,33,92,.45); }
.tienda-app h3 { font-size: 20px; }
.tienda-app p { margin: 2px 0 0; font-size: 14px; color: var(--t2, #4A5578); }
.tienda-boton, .tienda-pronto { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.tienda-boton { background: #111827; color: #FFFFFF; }
.tienda-boton svg { width: 16px; height: 16px; fill: currentColor; }
.tienda-boton:hover { background: #000; }
.tienda-pronto { border: 1px dashed var(--oro); color: var(--oro-texto, #9A6700); }

/* ---------- Tecnologías ---------- */
.tec { display: grid; gap: 22px; padding-left: calc(var(--hilo-x, 0px) + 28px); }
.tec-grupo h3 { font-size: 15px; letter-spacing: .04em; margin-bottom: 10px; color: var(--t2); font-family: var(--cuerpo); font-weight: 600; }
.tec-grupo ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tec-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--linea); background: var(--tarjeta); font-size: 14px; font-weight: 500; transition: border-color .25s ease, color .25s ease, transform .25s ease; }
.tec-chip svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.tec-chip:hover { border-color: var(--oro); color: var(--oro-texto); transform: translateY(-2px); }

/* ---------- Clientes ---------- */
.clientes-cuerpo { padding-left: calc(var(--hilo-x, 0px) + 28px); }
.cifra { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 24px; }
.cifra strong { font: 700 clamp(56px, 9vw, 96px)/1 var(--titulo); color: var(--oro-texto); text-shadow: 0 0 40px rgba(242,178,51,.35); }
.cifra span { font-size: clamp(16px, 1.8vw, 20px); color: var(--t2); max-width: 30ch; }
.clientes-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.clientes-lista a { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; text-decoration: none; background: var(--tarjeta); border: 1px solid var(--linea); transition: border-color .25s ease, transform .25s ease; }
.clientes-lista a:hover { border-color: var(--oro); transform: translateY(-2px); }
.clientes-lista strong { font-family: var(--titulo); font-size: 18px; }
.clientes-lista span { font-size: 13.5px; color: var(--t2); }
.restaurantes { margin: 22px 0 0; color: var(--t2); }
.boton-claro { background: var(--oro); color: var(--noche); box-shadow: 0 10px 30px -10px rgba(242,178,51,.7); }

@media (min-width: 700px) {
  .tienda { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clientes-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .tienda, .tec, .clientes-cuerpo { padding-left: var(--gutter); max-width: 1120px; }
  .tienda { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tec { grid-template-columns: 1fr 1fr; column-gap: 140px; }
  .clientes-lista { grid-template-columns: 1fr 1fr; column-gap: 140px; }
}

/* ---------- Barra: más secciones e idioma ---------- */
.barra-idioma { font-weight: 700; font-size: 13px; letter-spacing: .06em; border: 1px solid currentColor; border-radius: 8px; padding: 4px 8px; opacity: 1 !important; }
@media (max-width: 1000px) { .barra nav a:not(.barra-boton):not(.barra-idioma) { display: none; } }

/* ---------- Agente «Akari» ---------- */
.agente-avatar {
  position: relative; display: grid; place-items: center; flex: none;
  width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #22357E, var(--noche) 70%);
  box-shadow: 0 0 0 1.5px rgba(242,178,51,.7), 0 0 26px 2px rgba(242,178,51,.35);
}
.agente-avatar svg { width: 62%; height: auto; overflow: visible; }
.luz-agente { stroke-dasharray: 1 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 4px rgba(242,178,51,.9)); }
.agente-avatar::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid rgba(242,178,51,.6); animation: latido 3.2s ease-out infinite; pointer-events: none; }
.agente-boton {
  position: fixed; z-index: 30;
  right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: inline-flex; align-items: center; gap: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 14px var(--cuerpo); color: var(--noche);
}
.agente-etiqueta {
  order: -1; margin-right: -14px; padding: 11px 26px 11px 16px; border-radius: 999px 0 0 999px;
  background: linear-gradient(135deg, #FFE39A, var(--oro)); box-shadow: 0 10px 30px -10px rgba(242,178,51,.7);
}
.agente-boton:hover .agente-avatar { transform: scale(1.05); }
.agente-boton .agente-avatar { transition: transform .2s ease; }
.agente-boton:active .agente-avatar { transform: scale(.96); }
.agente-boton[aria-expanded="true"] { opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .agente-etiqueta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; margin: 0; } }
/* Mientras piensa, el tramo dorado del logo se enciende una y otra vez. */
.asistente.pensando .luz-agente { animation: encender 1.1s ease-in-out infinite; }
@keyframes encender { 0% { stroke-dashoffset: 1; } 55%, 100% { stroke-dashoffset: 0; } }
.agente-avatar-grande { width: 46px; height: 46px; }
.agente-avatar-grande::after { display: none; }
.asistente-cabeza { align-items: center; }
.asistente-quien { flex: 1; min-width: 0; }
.en-linea { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 8px rgba(61,220,132,.8); vertical-align: middle; }
.asistente-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 0 14px 12px; }
.asistente-humano { font-size: 12.5px; font-weight: 600; color: var(--oro); text-decoration: none; border-bottom: 1px solid rgba(242,178,51,.5); }
.asistente-pie .asistente-nota { padding: 0; }

/* ---------- Página de portafolio ---------- */
.pagina-portafolio { background: #FFFFFF; color: var(--medianoche); }
.porta-inicio { background: radial-gradient(ellipse at 50% 120%, rgba(242,178,51,.28), rgba(242,178,51,0) 55%), linear-gradient(var(--noche), var(--medianoche)); color: var(--texto-claro); padding: calc(env(safe-area-inset-top, 0px) + 130px) 0 80px; }
.porta-inicio h1 { font-size: clamp(38px, 7vw, 72px); line-height: 1.05; }
.porta-inicio h1 em { font-style: normal; color: var(--oro); }
.porta-grupo { padding: clamp(50px, 8vh, 90px) 0 0; --t2: #4A5578; --linea: rgba(20,33,92,.12); --tarjeta: #F4F6FC; --oro-texto: #9A6700; }
.porta-grupo h2 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 22px; }
.porta-rejilla { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.porta-tarjeta { display: grid; gap: 4px; text-decoration: none; color: inherit; border-radius: 16px; padding: 10px 10px 16px; background: #F4F6FC; border: 1px solid rgba(20,33,92,.1); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.porta-tarjeta:hover { transform: translateY(-4px); border-color: var(--oro); box-shadow: 0 18px 40px -20px rgba(20,33,92,.45); }
.porta-tarjeta img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.porta-nombre { font: 700 19px var(--titulo); padding-inline: 6px; }
.porta-que { font-size: 14px; color: #4A5578; padding-inline: 6px; }
.porta-host { font-size: 12.5px; color: #9A6700; padding-inline: 6px; font-weight: 600; }
.pagina-portafolio .restaurantes { color: #4A5578; }
.pagina-portafolio .tienda { padding-left: 0; }
.porta-final { text-align: center; padding: clamp(70px, 12vh, 120px) 0; }
.porta-final h2 { font-size: clamp(30px, 5vw, 48px); }
.porta-final h2 em { font-style: normal; color: #C98A0C; }
.pagina-portafolio .barra { color: var(--blanco); }
.pagina-portafolio.dia .barra { color: var(--medianoche); }
