/* Ronald · orientación inicial. Base neutra, azul como único acento, vidrio sobrio. */
:root {
  --bg: #f4f1ea; --paper: #faf8f3; --ink: #0d0d12; --muted: #55596a; --blue: #3f35ff; --violet: #8158ff;
  --line: rgba(13, 13, 18, .1); --line-2: rgba(13, 13, 18, .16);
  --glass: rgba(250, 248, 243, .66);
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 0 0 1px rgba(13, 13, 18, .05), 0 30px 60px -30px rgba(13, 13, 18, .28);
  --r: 22px;
  --display: 'Sora', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); min-height: 100vh; overflow-x: hidden; }
a { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .12; }
.b1 { width: 520px; height: 520px; background: var(--blue); right: -120px; top: 80px; }
.b2 { width: 420px; height: 420px; background: var(--violet); right: 280px; bottom: -160px; opacity: .08; }

.top { border-bottom: 1px solid var(--line); background: rgba(244, 241, 234, .8); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; } /* el logo no es cuadrado: nunca forzar ancho = alto */
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.top nav a:hover { color: var(--ink); }

.layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); padding: clamp(32px, 6vw, 72px) 0 48px; align-items: start; }
.intro h1 { font: 700 clamp(2.2rem, 4.4vw, 3.4rem)/1.04 var(--display); letter-spacing: -.035em; margin: 0 0 18px; }
.lead { color: var(--muted); font-size: 1.08rem; margin: 0 0 26px; max-width: 46ch; }
.facts { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.facts li { padding-left: 26px; position: relative; color: var(--muted); }
.facts li::before { content: ''; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--blue); }
.facts b { color: var(--ink); font-weight: 600; }
.steps { display: grid; gap: 8px; margin: 0 0 26px; }
.steps div { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: .95rem; }
.steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line-2); font: 700 .78rem var(--display); }
.privacy { font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin: 0; max-width: 52ch; }

.chat { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .7); border-radius: var(--r); box-shadow: var(--shadow); display: flex; flex-direction: column; height: min(720px, calc(100vh - 120px)); min-height: 520px; position: sticky; top: 88px; overflow: hidden; }
@supports not (backdrop-filter: blur(1px)) { .chat { background: var(--paper); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); position: relative; flex: none; }
.avatar .face { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.3); } /* la imagen trae márgenes transparentes */
.avatar .online { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.who { margin: 0; font: 700 1rem var(--display); }
.role { margin: 0; color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(63, 53, 255, .15); }
.ghost { margin-left: auto; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font: 500 .82rem var(--body); color: var(--muted); cursor: pointer; }
.ghost:hover { color: var(--ink); border-color: var(--ink); }

.msgs { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .96rem; animation: in .28s ease both; }
.msg.bot { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.user { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card { align-self: stretch; background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 18px 20px; box-shadow: 0 18px 40px -28px rgba(13, 13, 18, .35); animation: in .35s ease both; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-tag { font: 700 .7rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.card h3 { font: 700 .82rem var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.card p, .card li { margin: 0; font-size: .95rem; }
.card ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.card .carga { font: 600 1.05rem var(--display); letter-spacing: -.01em; }
.card .first { color: var(--ink); font-weight: 600; }
.card-foot { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: .8rem; color: var(--muted); }
.copy { background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font: 500 .78rem var(--body); cursor: pointer; color: var(--muted); }
.copy:hover { color: var(--ink); border-color: var(--ink); }

.handoff { align-self: stretch; display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 16px; animation: in .35s ease both; }
.handoff p { margin: 0; font-size: .92rem; }
.handoff p b { font-family: var(--display); }
.btn { background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 11px 18px; font: 600 .92rem var(--body); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { filter: brightness(1.08); }
.btn.alt { background: #fff; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.chips button { background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 13px; font: 500 .84rem var(--body); color: var(--ink); cursor: pointer; }
.chips button:hover { border-color: var(--blue); color: var(--blue); }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .4); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; font: 400 .98rem/1.4 var(--body); background: #fff; color: var(--ink); max-height: 140px; }
.composer textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
.composer button { width: 46px; height: 46px; flex: none; border-radius: 14px; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; }
.composer button:disabled { opacity: .45; cursor: not-allowed; }
.noscript { padding: 0 18px 18px; font-size: .9rem; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.foot a { color: var(--muted); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding-top: 28px; }
  .chat { position: static; height: 78vh; min-height: 480px; }
  .steps { display: none; }
  .top nav { gap: 14px; }
}
@media (max-width: 420px) {
  .msg { max-width: 92%; }
  .ghost { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.chips[hidden], .card [hidden] { display: none; }
