/* Sistema de diseño basado en design/DESIGN.md (WRITER style reference) */
:root {
  /* Colores */
  --orchid: #a95ef8;      /* solo palabra destacada del titular */
  --iris: #5551ff;        /* acento: 1-2 elementos por pantalla */
  --iris-dark: #3f3bdb;
  --lavender: #e4e9ff;
  --ink: #000000;
  --white: #ffffff;
  --obsidian: #27272b;
  --graphite: #2d2d2d;
  --mist: #e4e7ed;
  --fog: #d2d4d7;
  --slate: #666666;
  --gradient-banner: linear-gradient(50deg, #f7c8ed 50px, #e5ecff 130px, #e5ecff 100%);

  /* Tipografía */
  --font-sans: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif; /* sustituto de CanelaDeck */

  /* Radios */
  --r-card: 12px;
  --r-pill: 60px;

  /* Layout */
  --max: 1200px;
  --gutter: 16px;
  --section: 80px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section: 112px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "clig" 0, "liga" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--iris); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 800px; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--obsidian); color: var(--white);
  padding: 8px 16px; border-radius: var(--r-pill); z-index: 100;
}
.skip:focus { left: 8px; }

.ico { width: 20px; height: 20px; flex: none; }

/* ---------- Tipografía ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.eyebrow--light { color: var(--lavender); }

h1 {
  font-size: clamp(38px, 8.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.031em;
}
h2 {
  font-size: clamp(30px, 5.5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
h3 { font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.hl { color: var(--orchid); }

.lead {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--graphite);
}
@media (min-width: 768px) { .lead { font-size: 20px; } }
.small { font-size: 14px; color: var(--slate); }

/* ---------- Botones (pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 16px/1 var(--font-sans);
  text-decoration: none;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  padding: 16px 28px;
  min-height: 48px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--lg { padding: 18px 32px; font-size: 17px; min-height: 56px; }
.btn--sm { padding: 10px 18px; font-size: 14px; min-height: 40px; }
.btn--primary { background: var(--obsidian); color: var(--white); }
.btn--primary:hover { background: var(--ink); }
.btn--accent { background: var(--iris); color: var(--white); }
.btn--accent:hover { background: var(--iris-dark); }
.btn--ghost { background: transparent; color: var(--iris); border-color: var(--iris); }
.btn--ghost:hover { background: var(--lavender); }

/* ---------- Barra superior ---------- */
.banner {
  background: var(--gradient-banner);
  font-size: 13px;
  text-align: center;
  padding: 9px var(--gutter);
}
.banner a { font-weight: 600; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--mist);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: var(--r-card);
  background: var(--obsidian); color: var(--white);
  display: grid; place-items: center; font-size: 13px; letter-spacing: .02em;
}
.topbar .btn { display: none; }
@media (min-width: 768px) { .topbar .btn { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 var(--section); }
@media (min-width: 768px) { .hero { padding-top: 80px; } }
.hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; } }
.hero h1 { margin-bottom: 24px; }
.hero .lead { max-width: 560px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero__cta .btn { width: 100%; max-width: 360px; }
@media (min-width: 480px) { .hero__cta .btn { width: auto; } }

.hero__visual {
  background: var(--lavender);
  border-radius: var(--r-card);
  padding: 40px 20px 0;
  display: flex; justify-content: center; align-items: flex-end;
  overflow: hidden;
}

/* Mockup de móvil */
.phone { width: 100%; max-width: 300px; }
.phone__frame {
  background: var(--obsidian);
  border-radius: 40px 40px 0 0;
  padding: 10px 10px 0;
}
.phone__screen {
  background: #efeae2;
  border-radius: 31px 31px 0 0;
  overflow: hidden;
}
.phone__bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  padding: 22px 14px 10px;
  text-align: left;
  border-bottom: 1px solid var(--mist);
}
.phone__bar strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.phone__bar small { font-size: 11px; color: var(--slate); }
.phone__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--iris); color: var(--white);
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
}
.chat { padding: 12px 10px 16px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.chat__day {
  align-self: center; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--white); color: var(--slate); padding: 3px 10px; border-radius: var(--r-pill); margin-bottom: 4px;
}
.msg {
  max-width: 86%;
  font-size: 12.5px; line-height: 1.4;
  padding: 7px 10px 16px;
  border-radius: 10px;
  position: relative;
}
.msg time { position: absolute; right: 8px; bottom: 3px; font-size: 9.5px; color: var(--slate); }
.msg--in { align-self: flex-start; background: var(--white); border-top-left-radius: 2px; }
.msg--out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.msg--card { display: flex; gap: 8px; align-items: center; padding-right: 14px; }
.msg--card .cal {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--iris); color: var(--white); display: grid; place-items: center;
}
.msg--card .ico { width: 16px; height: 16px; }

/* Vídeo */
.demo h2 { color: var(--white); max-width: 640px; margin: 0 auto 40px; }
.demo__video { max-width: 360px; margin: 0 auto; }
.video__frame {
  position: relative; width: 100%;
  aspect-ratio: 720 / 1100;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--graphite);
}
.video__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--white); color: var(--obsidian);
  display: grid; place-items: center;
  transition: transform .15s ease;
}
.video__play:hover { transform: translate(-50%, -50%) scale(1.06); }
.video__play svg { width: 30px; height: 30px; margin-left: 4px; }
.video__play[hidden] { display: none; }

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; }
.section--tint { background: var(--lavender); }
.section--dark { background: var(--obsidian); color: var(--white); }
.section--dark .lead { color: var(--fog); }
.section-head { max-width: 760px; margin-bottom: 48px; }

/* Problema */
.problem { border-top: 1px solid var(--mist); }
.bubbles { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.bubbles li {
  font-size: 15px; font-weight: 500;
  background: var(--white); color: var(--ink);
  padding: 12px 20px; border-radius: var(--r-pill);
  border: 1px solid var(--mist);
}
.bubbles li:nth-child(2) { margin-left: 12px; }
.section--dark .bubbles li { background: var(--graphite); color: var(--white); border-color: #3a3a40; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--white);
  border-radius: var(--r-card);
  padding: 28px 24px;
  position: relative;
}
.step__ico {
  width: 48px; height: 48px; border-radius: var(--r-card);
  background: var(--obsidian); color: var(--white);
  display: grid; place-items: center; margin-bottom: 24px;
}
.step__ico .ico { width: 22px; height: 22px; }
.step__n {
  position: absolute; top: 28px; right: 24px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--slate);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--graphite); font-size: 15px; }

/* Incluye */
.checks { list-style: none; padding: 0; margin: 8px 0 0; }
.checks li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--mist);
  font-size: 17px; line-height: 1.5;
}
.checks li:first-child { border-top: 1px solid var(--mist); }
.checks .ico {
  width: 28px; height: 28px; padding: 6px; margin-top: -1px;
  border-radius: 50%; background: var(--lavender); color: var(--iris);
}
.checks strong { font-weight: 600; }

/* Piloto */
.pilot {
  background: var(--obsidian);
  color: var(--white);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pilot::before {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%;
  background: radial-gradient(closest-side, rgba(85, 81, 255, .35), transparent 70%);
  pointer-events: none;
}
.pilot > * { position: relative; }
.pilot h2 { color: var(--white); }
.pilot p:not(.eyebrow) {
  font-family: var(--font-serif);
  font-size: 18px; line-height: 1.6; color: var(--fog);
  max-width: 620px; margin: 0 auto 32px;
}
@media (min-width: 768px) { .pilot { padding: 80px 48px; } .pilot p:not(.eyebrow) { font-size: 20px; } }

/* FAQ */
.faq { margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--fog); }
.faq details:first-child { border-top: 1px solid var(--fog); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0;
  font-size: 17px; font-weight: 500; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--white) no-repeat center / 14px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%2327272b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 48px 24px 0; color: var(--graphite); font-family: var(--font-serif); font-size: 17px; }
.todo, .faq .todo { color: #b42318; font-family: var(--font-sans); font-size: 15px; }

/* Sobre mí */
.about { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
@media (min-width: 640px) { .about { flex-direction: row; align-items: center; gap: 40px; } }
.about__photo {
  width: 160px; height: 160px; flex: none; border-radius: var(--r-card);
  background: var(--lavender); color: var(--iris);
  display: grid; place-items: center; font-size: 36px; font-weight: 600; object-fit: cover;
}
.about__text { font-size: clamp(20px, 3vw, 25px); line-height: 1.4; letter-spacing: -0.01em; }
.about__text strong { font-weight: 600; }
.about__name { font-weight: 600; text-decoration: underline; text-decoration-color: var(--orchid); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.about__name:hover { color: var(--iris); }
.about__btn { margin-top: 24px; }

/* Contacto */
.contact { background: var(--obsidian); color: var(--white); }
.contact .lead { color: var(--fog); margin-bottom: 32px; }
.contact__actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
@media (min-width: 640px) { .contact__actions { flex-direction: row; justify-content: center; } }
.contact__actions .btn { width: 100%; max-width: 360px; }
@media (min-width: 640px) { .contact__actions .btn { width: auto; } }
.contact .btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, .5); }
.contact .btn--ghost:hover { background: var(--graphite); border-color: var(--white); }

/* Pie */
.footer { background: var(--obsidian); color: var(--fog); font-size: 14px; border-top: 1px solid #3a3a40; }
.footer__inner { display: flex; flex-direction: column; gap: 12px; padding-top: 28px; padding-bottom: 96px; }
@media (min-width: 768px) { .footer__inner { flex-direction: row; justify-content: space-between; padding-bottom: 28px; } }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--fog); text-underline-offset: 3px; }
.footer a:hover { color: var(--white); }

/* Botón flotante (móvil): agendar videollamada */
.cta-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--iris); color: var(--white);
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .9); /* separación visual sobre fondos oscuros */
}
.cta-float .ico { width: 28px; height: 28px; }
@media (min-width: 768px) { .cta-float { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Páginas legales */
.legal { padding: 56px 0 var(--section); }
.legal h1 { font-size: clamp(32px, 6vw, 44px); margin-bottom: 32px; }
.legal h2 { font-size: 22px; margin: 32px 0 12px; font-weight: 600; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--graphite); margin-bottom: 12px; }
