/* Aztrobits Connecta · página de inicio.
   Referencia visual: AvatarAgenteIA (hero con el agente en su órbita, sus cuatro expresiones y su uso en el chat).
   Colores y tipografía de la guía de marca (BRAND.md). El ámbar es la señal de "cliente esperando" del panel. */
@font-face {
  font-family: "Sora";
  src: url("fonts/Sora-Variable.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}
:root {
  --night: #08061a; --night-2: #120e2e; --night-3: #14102f; --night-line: #2a2452;
  --violet: #6c4dff; --lilac: #8b73ff; --teal: #2ee6d3; --teal-dark: #13b3a3; --teal-ink: #0b7f74;
  --fog: #b7b0da; --ink: #4a4466; --paper: #f6f5fb; --sunk: #ecebf6; --line: #e0ddee;
  --wait: #e8a317;
  --gradient: linear-gradient(90deg, var(--violet), var(--teal));
  --font: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 80px);
  --max: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--paper); font: 400 17px/1.6 var(--font); }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 14px; font-weight: 600; font-size: 16px; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: #5a3cf0; }
.btn-ghost { border: 1px solid #3a3366; color: var(--paper); font-weight: 500; }
.btn-ghost:hover { border-color: var(--lilac); }
.btn-enter { min-height: 42px; padding: 0 22px; border-radius: 12px; background: var(--paper); color: var(--night); }
.btn-enter:hover { background: #fff; }

/* ---------- Barra superior ---------- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 32px; padding: 14px var(--gutter); background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--night-line) 60%, transparent); }
.top-brand img { width: 168px; height: auto; }
.top-nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.top-nav a { color: var(--fog); text-decoration: none; }
.top-nav a:hover { color: var(--paper); }

/* ---------- Inicio ---------- */
.hero { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(64px, 9vw, 112px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.06; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.lede { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--fog); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* El agente en su órbita y la conversación que lo hace cambiar de cara. */
.stage { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; }
.stage-orbit { position: relative; width: min(100%, 500px); aspect-ratio: 1; }
.stage-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-ring circle { fill: none; stroke: var(--lilac); stroke-opacity: .4; stroke-width: 1.5; stroke-dasharray: .006 .012; }
.stage-core { position: absolute; inset: 17%; border-radius: 50%; background: var(--night-2); border: 1px solid color-mix(in srgb, var(--teal) 18%, transparent); display: grid; place-items: center; transition: border-color .4s; }
.stage[data-mood="humano"] .stage-core { border-color: color-mix(in srgb, var(--wait) 45%, transparent); }
.stage-core .robot { width: 92%; height: 92%; }
.stage-mood { position: absolute; left: 50%; bottom: 3%; translate: -50% 0; white-space: nowrap; padding: 6px 14px 6px 12px; border: 1px solid var(--night-line); border-radius: 999px; background: var(--night); font-size: 14px; color: var(--fog); display: flex; align-items: center; gap: 8px; }
.stage-mood::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.stage-mood.is-human { color: #f6d58f; }
.stage-mood.is-human::before { background: var(--wait); }

.chat { width: min(100%, 360px); margin-top: -40px; position: relative; background: #fff; color: var(--night); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
@media (min-width: 1100px) { .stage { align-items: flex-start; padding-bottom: 150px; } .chat { position: absolute; right: 0; bottom: 0; margin: 0; width: 330px; } .chat-body { min-height: 0; height: 330px; overflow: hidden; } .stage-mood { left: 4%; translate: 0 0; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--night); display: grid; place-items: center; overflow: hidden; }
.chat-avatar .robot { width: 38px; height: 38px; }
.chat-who { display: flex; flex-direction: column; line-height: 1.3; }
.chat-who b { font-size: 15px; font-weight: 600; }
.chat-who em { font-style: normal; font-size: 12px; color: var(--teal-ink); }
.chat-body { list-style: none; margin: 0; padding: 16px 18px 20px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; min-height: 300px; font-size: 14px; line-height: 1.45; }
.msg { max-width: 82%; padding: 9px 13px; }
.msg.in { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; }
.msg.out { align-self: flex-end; background: #eeeaff; border-radius: 16px 16px 4px 16px; }
.msg.note { border-color: color-mix(in srgb, var(--wait) 55%, var(--line)); background: #fdf2d6; }
.js .msg { opacity: 0; translate: 0 6px; transition: opacity .3s, translate .3s; }
.js .msg.shown { opacity: 1; translate: 0 0; }

/* ---------- Secciones ---------- */
.section-head { max-width: 40em; }
.section-head h2, .team h2, .closing h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.section-head p { margin-top: 14px; color: var(--fog); }

/* Las cuatro caras, en el orden en que pasan en una conversación, unidas por la órbita de la marca. */
.moods { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(64px, 8vw, 104px) var(--gutter); border-top: 1px solid var(--night-line); }
.mood-track { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; position: relative; }
.mood-track::before { content: ""; position: absolute; left: 12%; right: 12%; top: 70px; height: 3px; border-radius: 3px; background: var(--gradient); opacity: .5; }
.mood-track li { position: relative; }
.mood-track .robot { width: 140px; height: 140px; background: var(--night); border-radius: 50%; position: relative; }
.mood-track h3 { margin-top: 18px; font-size: 20px; font-weight: 600; }
.mood-track p { margin-top: 6px; font-size: 15px; color: var(--fog); max-width: 22em; }
.mood-track .is-human h3 { color: #f6d58f; }

/* Datos de la tienda: fondo claro, como el panel. */
.store { background: var(--paper); color: var(--night); }
.store, .team { padding: clamp(64px, 8vw, 104px) max(var(--gutter), calc((100% - var(--max)) / 2)); }
.store .section-head p, .team-copy > p { color: var(--ink); }
.store-grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.sources { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sources li { display: grid; grid-template-columns: 11em 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.sources b { font-weight: 600; font-size: 18px; }
.sources span { color: var(--ink); font-size: 15px; }
.asks { list-style: none; margin: 0; padding: 24px; background: var(--sunk); border-radius: 22px; display: flex; flex-direction: column; gap: 8px; }
.asks li { align-self: flex-end; background: #eeeaff; border-radius: 16px 16px 4px 16px; padding: 9px 14px; font-size: 15px; }
.asks li:nth-child(odd) { margin-right: 18px; }

/* Tu equipo: la bandeja del panel con sus luces de estado. */
.team { background: var(--sunk); color: var(--night); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.team-copy > p { margin-top: 14px; max-width: 34em; }
.facts { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.facts li { padding-left: 26px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 3px; border-radius: 3px; background: var(--gradient); }
.inbox { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 8px 0; }
.inbox-title { padding: 14px 22px 10px; font-weight: 600; font-size: 18px; }
.inbox ul { list-style: none; margin: 0; padding: 0; }
.inbox li { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); }
.inbox .lamp { grid-row: span 2; align-self: center; }
.inbox b { font-weight: 600; font-size: 15px; }
.inbox em { grid-column: 2; font-style: normal; font-size: 14px; color: var(--ink); }
.inbox time { grid-column: 3; grid-row: 1; font-size: 13px; color: #8a84a8; }
.lamp { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: var(--violet); }
.lamp.human { background: var(--teal-dark); }
.lamp.wait { background: var(--wait); animation: glow 1.8s ease-out infinite; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wait) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) { .lamp.wait { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--wait) 35%, transparent); } }

/* Cierre */
.closing { padding: clamp(72px, 9vw, 120px) var(--gutter); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.closing .robot { width: 120px; height: 120px; }
.closing p { max-width: 32em; color: var(--fog); }
.closing .btn { margin-top: 10px; }

.foot { padding: 32px var(--gutter) 40px; border-top: 1px solid var(--night-line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 14px; color: var(--fog); }
.foot img { width: 140px; height: auto; }
.foot-legal { margin-left: auto; display: flex; gap: 20px; }
.foot-legal a { color: var(--fog); }
.foot-legal a:hover { color: var(--paper); }

/* ---------- Pantallas angostas ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .mood-track { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .mood-track::before { display: none; }
  .store-grid, .team { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top { gap: 16px; }
  .top-nav { display: none; }
  .top-brand { margin-right: auto; }
  .top-brand img { width: 140px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .mood-track { grid-template-columns: 1fr; }
  .mood-track li { display: grid; grid-template-columns: 96px 1fr; column-gap: 18px; }
  .mood-track .robot { width: 96px; height: 96px; grid-row: span 2; }
  .mood-track h3 { margin-top: 14px; }
  .sources li { grid-template-columns: 1fr; gap: 2px; }
  .foot-legal { margin-left: 0; flex-wrap: wrap; }
}
