/* Landing de Albia (albiabot.com). Albia viene de "alba": noche índigo y la luz del amanecer. */
:root {
  --night: #17153a;
  --night-2: #221f52;
  --indigo: #4f46e5;
  --indigo-deep: #3730a3;
  --dawn: #f7c873;
  --dawn-ink: #5a3d07;
  --paper: #f7f7fb;
  --tint: #eef0fb;
  --ink: #22223a;
  --muted: #5f6178;
  --line: #e1e3ee;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 1.0625rem/1.65 var(--body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--indigo-deep); }
:focus-visible { outline: 3px solid var(--dawn); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -.02em; line-height: 1.12; margin: 0; color: inherit; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: #fff; padding: .5rem .9rem; border-radius: 8px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 1rem/1 var(--body); padding: .95rem 1.4rem; border-radius: 12px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-sm { padding: .62rem 1rem; font-size: .92rem; border-radius: 10px; }
.btn-dawn { background: var(--dawn); color: var(--dawn-ink); }
.btn-dawn:hover { background: #fbd58e; color: var(--dawn-ink); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-indigo { background: var(--indigo); color: #fff; }
.btn-indigo:hover { background: var(--indigo-deep); color: #fff; }
.btn-line { background: #fff; color: var(--indigo); border-color: #cfd2f4; }
.btn-line:hover { border-color: var(--indigo); color: var(--indigo-deep); }

/* Navegación */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(23, 21, 58, .94); backdrop-filter: blur(10px); color: #fff; }
.nav-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font: 750 1.35rem/1 var(--display); letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; }
.brand:hover { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-login { padding-left: 1.6rem; border-left: 1px solid rgba(255, 255, 255, .2); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; padding: 12px 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--night); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 20px 1.25rem; border-top: 1px solid rgba(255, 255, 255, .1); }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav-login { padding-left: 0; border-left: 0; }
  .nav-links .btn { margin-top: 1rem; }
}

/* Portada */
.hero { position: relative; background: radial-gradient(900px 500px at 85% 10%, #2e2a7a 0%, transparent 65%), var(--night); color: #fff; padding: clamp(3rem, 7vw, 6rem) 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-bottom: clamp(5rem, 9vw, 8rem); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.02; max-width: 12ch; }
.lead { margin-top: 1.5rem; font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: rgba(255, 255, 255, .82); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.hero-note { margin-top: 2rem; font-size: .92rem; color: rgba(255, 255, 255, .62); max-width: 30rem; }
.hero-note a { color: var(--dawn); }
.horizon { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(60px, 9vw, 120px); }

/* Conversación de ejemplo */
.chat { margin: 0; background: #fff; color: var(--ink); border-radius: 22px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55); overflow: hidden; position: relative; z-index: 1; }
.chat-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.2rem; background: var(--indigo); color: #fff; }
.chat-head strong { display: block; font-size: .98rem; }
.chat-head small { display: block; font-size: .78rem; opacity: .8; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.chat-avatar svg { width: 24px; height: 24px; }
.chat-body { display: flex; flex-direction: column; gap: .7rem; padding: 1.3rem 1.2rem 1.4rem; background: #f6f7fb; min-height: 330px; }
.msg { max-width: 86%; padding: .75rem .95rem; border-radius: 16px; font-size: .95rem; line-height: 1.5; }
.msg.me { align-self: flex-end; background: var(--indigo); color: #fff; border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.tool { align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); background: #fff8e8; border: 1px dashed #e9c77d; border-radius: 14px; padding: .35rem .8rem; }
.tool-dot { width: 8px; height: 8px; border-radius: 50%; background: #d99a1f; }
.chat-caption { text-align: center; font-size: .75rem; color: #9aa0b4; padding: .55rem; background: #fff; border-top: 1px solid var(--line); }
/* Aparición única de la conversación (con JS y sin preferencia de movimiento reducido) */
.chat-body.playing [data-step] { opacity: 0; transform: translateY(6px); }
.chat-body.playing [data-step].shown { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9aa0b4; animation: dot 1s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  .chat-body { min-height: 0; }
}

/* Secciones */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-tint { background: var(--tint); }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); max-width: 22ch; }
.section-lead { margin-top: 1rem; color: var(--muted); font-size: 1.12rem; max-width: 40rem; }

/* Comparación */
.compare { margin-top: 3rem; border-top: 2px solid var(--ink); }
.compare-row { display: grid; grid-template-columns: 1fr 1.3fr 1.6fr; gap: 1.5rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.compare-head { font-size: .9rem; font-weight: 600; color: var(--muted); padding: .9rem 0; }
.compare-head span:last-child { color: var(--indigo); }
.compare-label { font-weight: 600; }
.compare-them { color: var(--muted); }
.compare-us { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: .3rem; padding: 1.2rem 0; }
  .compare-them::before { content: "Asistente personal: "; font-weight: 600; }
  .compare-us::before { content: "Albia: "; font-weight: 600; color: var(--indigo); }
}

/* Cajas con ícono (cómo funciona y qué es una conversación) */
.boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 3rem; }
.boxes-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 2.2rem; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 2.1rem 1.6rem 2rem; text-align: center; }
.box-icon { width: 60px; height: 60px; margin: 0 auto 1.2rem; border-radius: 18px; display: grid; place-items: center; background: var(--tint); color: var(--indigo); }
.section-tint .box-icon { background: #e4e6fa; }
.box h3 { font-size: 1.22rem; margin-bottom: .6rem; }
.box p { color: var(--muted); }
.boxes-4 .box h3 { font-size: 1.06rem; line-height: 1.3; }
.box-result { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--line); font-weight: 600; color: var(--indigo-deep) !important; font-size: .98rem; }
.conv { margin-top: 4.5rem; }
.section-tint .conv, .conv:first-child { margin-top: 0; }
.conv-title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
@media (max-width: 1000px) { .boxes-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .boxes { grid-template-columns: 1fr; } }
@media (max-width: 860px) and (min-width: 520px) { .boxes-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Niveles de integración */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 3rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.level { padding: 1.8rem 1.6rem 1.9rem; }
.level + .level { border-left: 1px solid var(--line); }
.level h3 { font-size: 1.3rem; margin: 1.2rem 0 .55rem; }
.level p { color: var(--muted); }
.level-need { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: .93rem; color: var(--ink); }
.level-meter { display: flex; gap: 5px; align-items: flex-end; height: 28px; }
.level-meter span, .level-meter i { width: 14px; border-radius: 4px; }
.level-meter :nth-child(1) { height: 10px; } .level-meter :nth-child(2) { height: 18px; } .level-meter :nth-child(3) { height: 28px; }
.level-meter span { background: var(--indigo); }
.level-meter i { background: #dfe1f4; }
@media (max-width: 860px) { .levels { grid-template-columns: 1fr; } .level + .level { border-left: 0; border-top: 1px solid var(--line); } }

.connector { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 3rem; align-items: center; margin-top: 3.5rem; }
.connector h3 { font-size: 1.45rem; margin-bottom: .7rem; }
.connector p { color: var(--muted); }
.connector-diagram { width: 100%; height: auto; }
.dg-label { font: 600 13px var(--body); fill: var(--muted); }
.dg-strong { font: 600 15px var(--body); fill: var(--ink); }
.dg-small { font: 400 12px var(--body); fill: var(--muted); }
.dg-light { fill: #fff; }
.dg-dawn { fill: var(--dawn); }
@media (max-width: 860px) { .connector { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Casos */
.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3.5rem; margin-top: 3rem; }
.use h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.use p { color: var(--muted); max-width: 32rem; }
.use q { display: inline-block; margin-top: 1rem; font-family: var(--display); font-weight: 500; font-size: 1.12rem; color: var(--indigo-deep); quotes: "«" "»"; }
@media (max-width: 760px) { .uses { grid-template-columns: 1fr; } }

/* Seguridad */
.section-night { background: var(--night); color: #fff; }
.section-night .section-lead { color: rgba(255, 255, 255, .72); }
.safety { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem 3rem; }
.safety li { padding-top: 1.2rem; border-top: 2px solid var(--dawn); }
.safety h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.safety p { color: rgba(255, 255, 255, .72); font-size: .98rem; }
@media (max-width: 900px) { .safety { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .safety { grid-template-columns: 1fr; } }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 3rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 1.7rem 1.5rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.plan-featured { border: 2px solid var(--indigo); }
.plan h3 { font-size: 1.45rem; }
.plan-level { color: var(--muted); font-size: .92rem; margin-top: .2rem; }
.plan-conv { margin-top: 1.3rem; font-size: .95rem; color: var(--muted); }
.plan-conv strong { display: block; font: 750 2rem/1.1 var(--display); color: var(--ink); letter-spacing: -.03em; }
.plan-price { margin-top: .9rem; font: 650 1.2rem var(--display); }
.plan-price small { font: 400 .85rem var(--body); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 1.3rem 0 1.6rem; flex: 1; font-size: .95rem; }
.plan li { padding: .45rem 0; border-top: 1px solid var(--line); }
.plan .btn { width: 100%; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

/* Preguntas */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; }
.faq details { border-bottom: 1px solid #d5d8ea; }
.faq details:first-child { border-top: 1px solid #d5d8ea; }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2.4rem 1.2rem 0; font-weight: 600; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .95rem; font: 400 1.6rem/1 var(--body); color: var(--indigo); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.3rem; color: var(--muted); max-width: 40rem; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-direct { margin-top: 1.5rem; color: var(--muted); }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field span { font-size: .9rem; font-weight: 600; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1.5px solid #d7d9e8; border-radius: 10px; padding: .75rem .85rem; width: 100%; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.contact-form .btn { justify-self: start; }
.form-legal { font-size: .85rem; color: var(--muted); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 12px; padding: .9rem 1rem; font-size: .95rem; }
.notice-ok { background: #ecfdf3; border: 1px solid #a6e9c1; color: #0f5132; }
.notice-error { background: #fff4f2; border: 1px solid #f5c2bb; color: #8a1f11; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } .contact-form .btn { justify-self: stretch; } }

/* Pie */
.footer { background: var(--night); color: rgba(255, 255, 255, .7); padding: 2.6rem 0; font-size: .92rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; align-items: center; }
.footer-brand p { margin-top: .6rem; }
.footer a { color: rgba(255, 255, 255, .85); }
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }

/* Páginas interiores (planes y demostración) */
.page-hero { position: relative; background: radial-gradient(900px 420px at 85% 0%, #2e2a7a 0%, transparent 65%), var(--night); color: #fff; padding: clamp(2.6rem, 6vw, 4.6rem) 0 clamp(5rem, 9vw, 7.5rem); overflow: hidden; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.04; max-width: 18ch; margin-top: 1.2rem; }
.page-hero .lead { margin-top: 1.3rem; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: rgba(255, 255, 255, .76); max-width: 40rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; color: rgba(255, 255, 255, .6); }
.crumbs a { color: var(--dawn); text-decoration: none; }
.crumbs a:hover { color: #fbd58e; text-decoration: underline; }
.section-flush { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.section-flush .plans { margin-top: 0; }
.section-more { margin-top: 1.6rem; }
.section-more a { font-weight: 600; }
.nav-links a[aria-current="page"]:not(.btn) { color: #fff; text-decoration: underline; text-decoration-color: var(--dawn); text-underline-offset: 8px; text-decoration-thickness: 2px; }

.ticks { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.6rem; color: var(--muted); font-size: .98rem; }
.ticks li::before { content: ""; position: absolute; left: .1rem; top: .5em; width: .75rem; height: .4rem; border-left: 2px solid var(--indigo); border-bottom: 2px solid var(--indigo); transform: rotate(-45deg); }

.facts { list-style: none; padding: 0; margin: 2.6rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 2.4rem; }
.facts li { padding-top: 1.1rem; border-top: 2px solid var(--indigo); }
.facts h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.facts p { color: var(--muted); font-size: .97rem; }
.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .facts, .facts-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .facts, .facts-3 { grid-template-columns: 1fr; } }

.cta-band { background: var(--night); color: #fff; padding: clamp(2.6rem, 6vw, 4rem) 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta-row h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-row p { margin-top: .5rem; color: rgba(255, 255, 255, .72); max-width: 34rem; }

.next-steps { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 1.2rem; }
.next-steps li { display: flex; gap: 1rem; align-items: flex-start; color: var(--muted); }
.next-steps li strong { color: var(--ink); }
.next-steps .box-icon { flex: none; width: 48px; height: 48px; margin: 0; border-radius: 14px; background: #e4e6fa; }
.next-steps .box-icon svg { width: 24px; height: 24px; }
