/* MotoIng — versión 2: panel de Jerez, conversación con la IA, Lambda Tuner animado y efectos. */

/* haz de luz que recorre el borde (adaptado de «Border Beam Panel», 21st.dev / Motiq, MIT) */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.beam { position: relative; isolation: isolate; }
.beam::before, .beam::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--beam), transparent 0deg, rgba(255,45,45,.05) 18deg, rgba(255,45,45,.6) 46deg, var(--amber) 56deg, #fff 60deg, transparent 63deg,
    transparent 198deg, rgba(200,224,0,.05) 216deg, rgba(200,224,0,.55) 244deg, var(--lime) 254deg, #fff 258deg, transparent 261deg, transparent 360deg);
  animation: beam 8s linear infinite; }
.beam::before { padding: 2px; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; z-index: 2; }
.beam::after { display: none; }
.beam { box-shadow: 0 40px 90px -50px rgba(255,45,45,.55), 0 30px 70px -40px #000; }
.beam:hover::before, .beam:hover::after { animation-duration: 2.4s; }
@keyframes beam { to { --beam: 360deg; } }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.duo .checks { margin-top: 26px; }
.tag-plan { margin-top: 26px; }
.tag-plan span { font: 600 .82rem var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--lime); border: 1px solid rgba(200,224,0,.45); border-radius: 6px; padding: 5px 11px; }
.note { margin-top: 22px; color: #77828f; font-size: .84rem; text-align: right; }

/* panel de Jerez */
.hud-tag b { color: var(--lime); font-weight: 700; }
.track { margin: 4px 0 0; }
.track path { fill: none; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; }
.track .base { stroke: #05070a; stroke-width: 42; }
.track circle { fill: #fff; stroke: #05070a; stroke-width: 6; filter: drop-shadow(0 0 14px #fff); }
.hud-scale { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; font: 500 .68rem var(--mono); color: var(--muted); }
.hud-scale i { flex: 1; height: 4px; border-radius: 2px; background: linear-gradient(90deg, hsl(215 95% 55%), hsl(160 95% 50%), hsl(105 95% 50%), hsl(50 95% 52%), hsl(0 95% 55%)); }
.hud-rows { grid-template-columns: 1fr 1fr; }
.hud-rows div { grid-template-columns: 1fr auto auto; }
.hud-rows i:empty { display: none; }

/* conversación con la IA (escritura automática inspirada en «AI Chat Card», 21st.dev) */
.chat { border-radius: 20px; background: linear-gradient(170deg, #141b24, #0b0f14); border: 1px solid #2a3542; display: flex; flex-direction: column; min-height: 500px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.chat-head b { font: 600 1.15rem var(--head); letter-spacing: .06em; }
.chat-head span { margin-left: auto; font: 500 .72rem var(--mono); color: var(--muted); }
.chat-head em { font-style: normal; color: var(--lime); }
.chat-body { flex: 1; padding: 22px 20px 8px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 92%; font-size: .98rem; line-height: 1.5; animation: msgin .3s ease-out both; }
.msg.user { align-self: flex-end; background: var(--red); color: #fff; padding: 10px 15px; border-radius: 16px 16px 4px 16px; }
.msg.ai { align-self: flex-start; color: #dfe6ee; padding: 12px 15px; border-radius: 4px 16px 16px 16px; background: rgba(255,255,255,.045); border: 1px solid var(--line); min-height: 2.6em; }
.tool { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; font: 500 .78rem var(--mono); color: var(--muted); padding: 6px 12px; border: 1px dashed #334050; border-radius: 999px; animation: msgin .3s ease-out both; }
.tool::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--cyan); border-top-color: transparent; animation: spin .7s linear infinite; }
.tool.done { color: #c8d1dc; }
.tool.done::before { border: 0; width: 11px; height: 6px; border-radius: 0; border-left: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: rotate(-45deg) translateY(-2px); animation: none; }
.caret::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: blink 1s steps(1) infinite; }
.chat-dots { display: flex; gap: 6px; justify-content: center; padding: 12px 0 18px; }
.chat-dots i { width: 22px; height: 3px; border-radius: 2px; background: #2a3542; transition: background-color .3s; }
.chat-dots i.on { background: var(--red); }
@keyframes msgin { from { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }

/* Lambda Tuner animado */
.lt { border-radius: 20px; background: linear-gradient(170deg, #141b24, #0b0f14); border: 1px solid #2a3542; padding: 20px; }
.lt-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.lt-head b { font: 600 1.15rem var(--head); letter-spacing: .06em; text-transform: uppercase; }
.lt-head span { margin-left: auto; font: 500 .74rem var(--mono); color: var(--cyan); letter-spacing: .06em; text-transform: uppercase; }
.lt-grid { display: grid; grid-template-columns: 46px repeat(8, 1fr); gap: 3px; font: 500 .74rem var(--mono); font-variant-numeric: tabular-nums; }
.lt-grid span { display: grid; place-items: center; min-height: 34px; border-radius: 5px; background-color: #0b0f14; color: #c8d1dc; transition: background-color .5s, color .5s, opacity .5s; }
.lt-grid .h { background: none; color: #6f7c8b; font-size: .66rem; }
.lt-grid .off { opacity: .35; }
.lt-axis { display: flex; justify-content: space-between; margin: 8px 2px 16px 49px; font: 500 .68rem var(--mono); color: #6f7c8b; }
.lt-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; padding: 0; counter-reset: s; }
.lt-steps li { counter-increment: s; font: 600 .86rem var(--head); letter-spacing: .06em; text-transform: uppercase; color: #6f7c8b; padding-top: 9px; border-top: 3px solid #232c38; transition: color .3s, border-color .3s; }
.lt-steps li::before { content: counter(s) " · "; font-family: var(--mono); font-size: .8em; }
.lt-steps li.on { color: var(--text); border-color: var(--red); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
form .btn[disabled] { opacity: .6; cursor: wait; }

/* foco que sigue al ratón en las tarjetas (patrón «Spotlight», 21st.dev) */
.b::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,45,45,.2), transparent 70%); }
.b:hover::before { opacity: 1; }
.b > * { position: relative; }

/* barra de avance de la vista que se enseña sola */
.show-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--red); transform-origin: left; transform: scaleX(0); }
.show.auto .show-tabs button[aria-selected="true"]::after { animation: fillbar 5s linear forwards; }
@keyframes fillbar { to { transform: scaleX(1); } }

@media (max-width: 1020px) {
  .duo { grid-template-columns: 1fr; gap: 36px; }
  .duo.rev > :first-child { order: 2; }
  .note { text-align: left; }
}
@media (max-width: 620px) {
  .lt { padding: 14px; }
  .lt-grid { grid-template-columns: 34px repeat(8, 1fr); gap: 2px; font-size: .6rem; }
  .lt-grid span { min-height: 28px; }
  .lt-axis { margin-left: 36px; }
  .lt-steps li { font-size: .7rem; }
  .chat { min-height: 540px; }
  .chat-head span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .beam::before, .beam::after, .tool::before, .caret::after, .msg, .tool { animation: none; }
  .show.auto .show-tabs button[aria-selected="true"]::after { animation: none; }
}

/* ================================================================ fotos de los perfiles */
.seg-card { padding: 0; overflow: hidden; border-style: solid; }
.seg-card img { width: 100%; height: 200px; object-fit: cover; object-position: center 60%; filter: saturate(.9) contrast(1.05);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.seg-card .seg-label { display: block; padding: 6px 24px 0; }
.seg-card ol { padding: 0 24px 24px; }
