/* Codexa — footer: columnas limpias arriba y, abajo, la palabra CODEXA gigante con la asistente de pie al frente. */

.ft { position: relative; isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); padding-top: clamp(70px, 8vw, 120px);
  background: radial-gradient(70vmax 40vmax at 85% 100%, rgba(99, 102, 241, .22), transparent 65%), radial-gradient(50vmax 30vmax at 20% 100%, rgba(255, 170, 60, .12), transparent 70%), var(--night); }
.ft-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40vmax 22vmax at 70% 78%, rgba(255, 186, 90, .14), transparent 70%); animation: halo 9s ease-in-out infinite alternate; }

/* ---------- Columnas ---------- */
.ft-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.ft-brand { display: grid; gap: 22px; justify-items: start; }
.ft .brand { font-size: 24px; }
.ft-tag { font: 800 clamp(30px, 3.3vw, 46px)/.98 var(--display); font-variation-settings: "wght" 800, "wdth" 74; text-transform: uppercase; color: var(--ink); }
.ft-tag em { font-style: normal; color: var(--lamp); text-shadow: 0 0 30px rgba(255, 170, 60, .28); }
.ft-col { display: grid; gap: 11px; align-content: start; }
.ft-col h3 { margin-bottom: 6px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--indigo-hi); }
.ft-col a, .ft-col p { position: relative; width: fit-content; font-size: 15px; line-height: 1.4; color: #b4b5cf; transition: color .25s, transform .3s var(--ease); }
.ft-col a:hover { color: var(--lamp-hot); transform: translateX(4px); }
.ft-contact a, .ft-contact p { display: flex; align-items: center; gap: 10px; }
.ft-contact i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 10px var(--wa); }
.ft-contact i.ml { background: var(--indigo-hi); box-shadow: 0 0 10px var(--indigo); }
.ft-hours { margin-top: 8px; font: 400 12px/1.5 var(--mono) !important; color: var(--mute) !important; }

/* ---------- Escenario: palabra gigante + asistente ---------- */
.ft-stage { position: relative; width: 100%; max-width: 1600px; margin: clamp(30px, 5vw, 70px) auto 0; padding: 0 2vw; height: clamp(300px, 43vw, 700px); }
.ft-word { position: absolute; left: 2vw; right: 2vw; bottom: 0; display: flex; justify-content: space-between; user-select: none; overflow: hidden;
  font: 800 clamp(120px, 27.5vw, 440px)/.78 var(--display); font-variation-settings: "wght" 800, "wdth" 70; text-transform: uppercase; letter-spacing: -.01em; }
.ft-word span { display: inline-block; overflow: hidden; padding: .04em 0 .02em; color: transparent; -webkit-text-stroke: 1.5px rgba(236, 236, 244, .28);
  transform: translateY(105%); transition: transform 1.2s cubic-bezier(.16, 1, .3, 1), color .5s, -webkit-text-stroke-color .5s, text-shadow .5s; transition-delay: calc(var(--n, 0) * 70ms), 0s, 0s, 0s; }
.ft-word span:nth-child(1) { --n: 0; --h: #818cf8; } .ft-word span:nth-child(2) { --n: 1; --h: #ffc46b; } .ft-word span:nth-child(3) { --n: 2; --h: #22d3ee; }
.ft-word span:nth-child(4) { --n: 3; --h: #f43f5e; } .ft-word span:nth-child(5) { --n: 4; --h: #25d366; } .ft-word span:nth-child(6) { --n: 5; --h: #a78bfa; }
.ft.in .ft-word span { transform: none; }
.ft-word span:hover { color: var(--h); -webkit-text-stroke-color: transparent; text-shadow: 0 0 60px var(--h); }
.ft-stage::before { content: ""; position: absolute; left: 2vw; right: 2vw; bottom: 0; height: 40%; z-index: 0; background: linear-gradient(to top, var(--night) 4%, transparent); pointer-events: none; }

.ft-girl { position: absolute; z-index: 2; right: clamp(24px, 9vw, 190px); bottom: -1px; height: 112%; aspect-ratio: 452 / 1177; --px: 0; --py: 0;
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -6px), 0); transition: transform .4s ease-out, opacity 1s, translate 1.2s cubic-bezier(.16, 1, .3, 1); opacity: 0; translate: 0 50px; }
.ft.in .ft-girl { opacity: 1; translate: 0 0; transition-delay: 0s, .35s, .35s; }
.ft-girl img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .6)) drop-shadow(0 0 60px rgba(99, 102, 241, .22)); animation: breathe 4.8s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes breathe { 50% { transform: scale(1.008, 1.012); } }
.ft-pglow { position: absolute; left: 21%; top: 31%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; mix-blend-mode: screen; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(255, 215, 150, .65), rgba(255, 186, 90, .22) 40%, transparent 70%); animation: beat 2.6s ease-in-out infinite; }

/* Globo de mensaje */
.ft-bubble { position: absolute; z-index: 3; right: 66%; top: 6%; opacity: 0; transform: translateY(14px) scale(.9); transform-origin: 100% 100%; transition: opacity .5s, transform .6s cubic-bezier(.16, 1, .3, 1); }
.ft-bubble.on { opacity: 1; transform: none; }
.ft-bubble a { position: relative; display: block; min-width: 190px; padding: 14px 18px; border-radius: 20px 20px 4px 20px; background: rgba(20, 20, 34, .88); border: 1px solid rgba(255, 196, 107, .35);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .9), 0 0 40px -10px rgba(255, 170, 60, .3); transition: border-color .3s, transform .3s var(--ease); }
.ft-bubble a:hover { border-color: rgba(255, 196, 107, .8); transform: translateY(-3px); }
.ft-typing { display: inline-flex; gap: 5px; padding: 5px 2px; }
.ft-typing i { width: 7px; height: 7px; border-radius: 50%; background: #a5b4fc; animation: dots 1s infinite; }
.ft-typing i:nth-child(2) { animation-delay: .15s; } .ft-typing i:nth-child(3) { animation-delay: .3s; }
.ft-msg { display: none; }
.ft-bubble.said .ft-typing { display: none; }
.ft-bubble.said .ft-msg { display: grid; gap: 2px; animation: pop .45s var(--ease) both; }
.ft-msg b { font: 700 clamp(18px, 1.7vw, 24px)/1.15 var(--display); font-variation-settings: "wght" 800, "wdth" 78; text-transform: uppercase; color: var(--lamp); }
.ft-msg small { font: 400 12.5px/1.3 var(--mono); color: #c4c5dc; }

/* ---------- Barra final ---------- */
.ft-bottom { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 22px; padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); font: 400 12px/1.5 var(--mono); color: var(--mute); background: linear-gradient(to top, var(--night) 40%, transparent); margin-top: -1px; }
.ft-up { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.ft-up i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); transition: all .35s var(--ease); }
.ft-up:hover i { background: var(--lamp); border-color: var(--lamp); color: #1d1405; transform: translateY(-4px); }

/* ---------- Celular ---------- */
@media (max-width: 900px) {
  .ft-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
  .ft-brand { grid-column: 1 / -1; }
  .ft-contact { grid-column: 1 / -1; }
  .ft-stage { height: clamp(330px, 92vw, 540px); }
  .ft-word { font-size: 27vw; }
  .ft-girl { right: 50%; margin-right: -22vw; height: 118%; }
  .ft-bubble { right: 58%; top: 4%; }
  .ft-bubble a { min-width: 0; padding: 10px 14px; }
  .ft-made { display: none; }
  .ft-bottom { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .ft-word span, .ft-girl { transition: none; transform: none; translate: none; opacity: 1; }
  .ft-girl img, .ft-pglow, .ft-glow { animation: none; }
}

/* Ajustes tras revisar: sin cajas visibles, brillo de letras sin recorte, ella parada sobre la base de las letras */
.ft-stage::before { display: none; }
.ft-bottom { background: none; }
.ft-word span { transition: transform 1.2s cubic-bezier(.16, 1, .3, 1), color .5s, -webkit-text-stroke-color .5s, filter .5s; transition-delay: calc(var(--n, 0) * 70ms), 0s, 0s, 0s; }
.ft-word span:hover { text-shadow: none; filter: drop-shadow(0 0 28px var(--h)); }
.ft-girl { bottom: 6.6%; height: 104%; }
.ft-girl::after { content: ""; position: absolute; left: 6%; right: 2%; bottom: -1%; height: 3.4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); filter: blur(5px); z-index: -1; }
@media (max-width: 900px) {
  .ft-stage { height: clamp(400px, 118vw, 600px); margin-top: 64px; }
  .ft-girl { bottom: 8.6%; height: 92%; right: 50%; margin-right: -23vw; }
  .ft-bubble { right: 60%; top: 2%; }
}

/* Celular: la palabra gigante ocupa todo el ancho y ella se para sobre sus letras, sin taparse con el globo */
@media (max-width: 900px) {
  .ft-word { left: 3vw; right: 3vw; }
  .ft-girl { bottom: 11%; height: 88%; margin-right: -24vw; }
  .ft-bubble { right: 70%; top: 2%; }
  .ft-bubble a { min-width: 0; max-width: 150px; }
  .ft-msg b { font-size: 17px; }
}
