/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --indigo: #5B3DF5;
  --indigo-deep: #3A22C9;
  --indigo-soft: #ECE8FF;
  --ink: #1A1538;
  --ink-2: #4A4566;
  --cream: #FBF8F3;
  --paper: #FFFFFF;
  --line: #E7E2D9;
  --peach: #FFB59A;
  --peach-soft: #FFE9DF;
  --wa: #25D366;

  --display: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
::selection { background: var(--indigo); color: #fff; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 999;
  padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: 10px;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .95em 1.5em;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  transition: transform .35s var(--ease-out), background-color .25s, color .25s, box-shadow .35s var(--ease-out);
  white-space: nowrap;
}
.btn .ico { width: 1.25em; height: 1.25em; }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 0 0 0 var(--indigo-soft); }
.btn-primary:hover { background: var(--indigo-deep); transform: translateY(-2px); box-shadow: 0 0 0 6px var(--indigo-soft); }
.btn-ghost { color: var(--ink); border: 2px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }
.btn-sm { padding: .7em 1.15em; font-size: .95rem; }
.btn-lg { padding: 1.15em 1.9em; font-size: 1.1rem; }

.kicker {
  display: inline-block;
  font-weight: 600; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 1rem;
}
.kicker-light { color: var(--peach); }

.section { padding-block: clamp(80px, 11vw, 140px); }
.section-head { max-width: 680px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head h2 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; }
.section-lead { margin-top: 1.1rem; font-size: 1.15rem; color: var(--ink-2); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; color: var(--indigo); transition: transform .8s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-360deg); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-links { display: flex; align-items: center; gap: 2rem; font-weight: 500; }
.nav-links a:not(.btn) { position: relative; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--indigo); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2.5px; border-radius: 2px; background: var(--ink);
  transition: transform .35s var(--ease-out);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* =============================================================
   5. Sections
   ============================================================= */

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(72px, 9vw, 120px); }
.hero-grid { display: grid; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem .95rem; border-radius: 999px;
  background: var(--indigo-soft); color: var(--indigo-deep);
  font-weight: 600; font-size: .9rem;
  margin-bottom: 1.6rem;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); }
.hero-title { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 800; letter-spacing: -0.035em; }
.hl { color: var(--indigo); position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .04em; height: .22em;
  background: var(--peach); border-radius: 99px; z-index: -1;
  transform-origin: left; animation: underline 1s .5s var(--ease-out) both;
}
.hero-title .hl { isolation: isolate; }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-lead { margin-top: 1.5rem; max-width: 34em; font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

/* Chat demo */
.hero-visual { position: relative; justify-self: center; width: 100%; max-width: 390px; }
.hero-visual::before {
  content: ""; position: absolute; inset: 8% -10% -6% 8%;
  background: var(--indigo); border-radius: 40px; transform: rotate(4deg); z-index: -1;
}
.phone {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 30px;
  overflow: hidden;
}
.phone-top {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.2rem;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.phone-top strong { display: block; font-size: .98rem; line-height: 1.2; }
.phone-top small { color: #1FA855; font-weight: 500; font-size: .8rem; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--peach-soft); color: var(--indigo);
  display: grid; place-items: center;
}
.avatar svg { width: 24px; height: 24px; }
.chat {
  display: flex; flex-direction: column; gap: .6rem;
  padding: 1.2rem 1rem 1.4rem;
  min-height: 330px;
  background: var(--cream);
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
}
.msg {
  position: relative;
  max-width: 82%;
  padding: .6rem .85rem 1.25rem;
  border-radius: 16px;
  font-size: .93rem; line-height: 1.4;
}
.msg time { position: absolute; right: .7rem; bottom: .3rem; font-size: .68rem; opacity: .6; }
.msg.in { align-self: flex-start; background: var(--paper); border: 1.5px solid var(--line); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--indigo); color: #fff; border-bottom-right-radius: 4px; }
.typing {
  align-self: flex-end; display: inline-flex; gap: 4px;
  padding: .75rem .9rem; border-radius: 16px; border-bottom-right-radius: 4px;
  background: var(--indigo);
}
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .5; animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.msg.pop { animation: pop .5s var(--ease-out) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

.hero-note {
  display: flex; align-items: center; gap: .55rem;
  margin-top: 1.4rem; margin-left: .4rem;
  font-weight: 500; font-size: .95rem; color: var(--ink);
}
.note-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px #d7f7e3; }

/* ---------- Services ---------- */
.services { background: var(--paper); border-block: 1px solid var(--line); }
.cards { display: grid; gap: 20px; }
.card {
  display: flex; flex-direction: column;
  padding: 2rem 1.8rem 2.1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cream);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: 8px 8px 0 var(--ink); }
.card-featured { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.card-featured:hover { box-shadow: 8px 8px 0 var(--peach); }
.card-ico {
  width: 60px; height: 60px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--indigo-soft); color: var(--indigo);
  margin-bottom: 1.5rem;
}
.card-featured .card-ico { background: rgba(255,255,255,.14); color: #fff; }
.card-ico svg { width: 34px; height: 34px; }
.card h3 { font-size: 1.55rem; font-weight: 700; margin-bottom: .75rem; }
.card > p { color: var(--ink-2); }
.card-featured > p { color: #E4DEFF; }
.card-list { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1.5px dashed currentColor; display: grid; gap: .5rem; font-weight: 500; font-size: .95rem; }
.card-featured .card-list { border-top-color: rgba(255,255,255,.35); }
.card:not(.card-featured) .card-list { border-top-color: var(--line); }
.card-list li { display: flex; gap: .6rem; align-items: baseline; }
.card-list li::before {
  content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--peach); transform: translateY(-1px);
}
.extra {
  margin-top: 28px; padding: 1.3rem 1.6rem;
  border-radius: var(--radius-sm);
  background: var(--peach-soft);
  color: var(--ink);
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 20px; counter-reset: step; }
.step { position: relative; padding: 1.8rem 0 0; border-top: 2px solid var(--ink); }
.step-n {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.step p { color: var(--ink-2); max-width: 28em; }

/* ---------- Cases ---------- */
.cases { background: var(--indigo-soft); }
.case-grid { display: grid; gap: 28px; }
.case-link { display: block; }
.case-frame {
  border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; background: var(--paper);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.case-link:hover .case-frame { transform: translateY(-6px) rotate(-.6deg); box-shadow: 10px 10px 0 var(--indigo); }
.frame-bar { display: flex; gap: 6px; padding: .8rem 1rem; border-bottom: 2px solid var(--ink); background: var(--paper); }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); }
.frame-body {
  aspect-ratio: 16 / 9;
  display: grid; place-content: center; text-align: center; gap: .3rem;
  padding: 1.5rem;
}
.frame-title { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.frame-sub { font-size: .85rem; letter-spacing: .4em; text-transform: uppercase; }
.case-frame--ines .frame-body { background: #F6EFE8; color: #3B2F2A; }
.case-frame--ines .frame-title { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; }
.case-frame--bylala .frame-body { background: var(--peach); color: var(--ink); }
.case-frame--bylala .frame-title { font-family: var(--display); font-weight: 800; letter-spacing: -0.04em; }
.case-info { padding: 1.4rem .3rem 0; }
.case-info h3 { font-size: 1.6rem; margin-bottom: .45rem; }
.case-info p { color: var(--ink-2); max-width: 34em; }
.case-tag {
  display: inline-block; margin-top: .9rem;
  padding: .3rem .8rem; border-radius: 999px;
  border: 1.5px solid var(--ink); font-size: .82rem; font-weight: 600;
}

/* ---------- Why ---------- */
.why { background: var(--ink); color: var(--cream); }
.why-grid { display: grid; gap: 48px; }
.why-copy h2 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; margin-bottom: 1.5rem; }
.why-copy p { color: #CFCAE6; font-size: 1.12rem; max-width: 32em; }
.why-copy p + p { margin-top: 1rem; }
.why-copy em { font-style: normal; color: var(--peach); font-weight: 600; }
.why-list { display: grid; gap: 14px; align-content: start; }
.why-list li {
  padding: 1.4rem 1.5rem;
  border: 1.5px solid rgba(255,255,255,.16);
  border-radius: var(--radius-sm);
  transition: border-color .3s, background-color .3s;
}
.why-list li:hover { border-color: var(--peach); background: rgba(255,255,255,.04); }
.why-list h3 { font-size: 1.25rem; margin-bottom: .3rem; color: #fff; }
.why-list p { color: #B9B3D6; font-size: .98rem; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative; overflow: hidden;
  max-width: 860px; margin-inline: auto;
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 72px);
  text-align: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 32px;
}
.contact-mark {
  width: 64px; height: 64px; margin: 0 auto 1.2rem; color: var(--indigo);
  animation: spin-in 1.2s var(--ease-out) both;
}
@keyframes spin-in { from { transform: rotate(-200deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.contact-card h2 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; }
.contact-lead { max-width: 32em; margin: 1.2rem auto 2.2rem; font-size: 1.15rem; color: var(--ink-2); }
.contact-small { margin-top: 1.2rem; font-size: .92rem; color: var(--ink-2); }

/* ---------- Footer ---------- */
.footer { padding-block: 48px 110px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: .6rem; justify-items: start; }
.footer p { color: var(--ink-2); }
.footer-copy { font-size: .88rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

/* =============================================================
   6. Effects — reveal (solo si JS está activo)
   ============================================================= */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =============================================================
   7. Responsive (mobile-first)
   ============================================================= */
@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.4rem;
    background: var(--cream); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 1rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hl { white-space: normal; }
}

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; }
  .footer-inner { padding-right: 72px; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
  .hero-visual { justify-self: end; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card-featured { transform: translateY(-16px); }
  .card-featured:hover { transform: translateY(-22px); }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 80px; }
  .why-list { grid-template-columns: 1fr 1fr; }
}

/* =============================================================
   8. Reduced motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .typing i { animation: none; opacity: .8; }
}

/* =============================================================
   9. Abra — la mascota y el recorrido inmersivo
   ============================================================= */

/* ---------- Mascota: Abra, el genio ---------- */
.buddy {
  --arm: var(--indigo-deep);
  --hat: var(--ink);
  --band: #fff;
  position: fixed; left: 0; top: 0; z-index: 45;
  width: 120px; height: 120px;
  display: none; cursor: pointer;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.js .buddy { display: block; }
.buddy.on-dark { --arm: #8E7BFF; --hat: #fff; --band: var(--indigo); }
.buddy-inner { width: 100%; height: 100%; animation: bob 3.2s ease-in-out infinite; }
.buddy.is-flying .buddy-inner { animation: none; }
.buddy.is-poked .buddy-inner { animation: poke .7s var(--ease-out); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes poke { 0% { transform: scale(1) rotate(0); } 35% { transform: scale(1.18, .86) rotate(-14deg); } 100% { transform: scale(1) rotate(360deg); } }
.buddy svg { width: 100%; height: 100%; overflow: visible; }
.b-body { fill: var(--indigo); }
.b-arm {
  transform-box: view-box;
  transition: transform .6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.b-arm path { fill: none; stroke: var(--arm); stroke-width: 11; stroke-linecap: round; }
.b-arm circle { fill: var(--arm); }
.b-arm-l { transform-origin: 35px 92px; }
.b-arm-r { transform-origin: 125px 92px; }
.b-eye { fill: #fff; }
.b-pupils { fill: var(--ink); transition: transform .12s linear; }
.b-eyes-open { transform-box: view-box; transform-origin: 80px 85px; animation: blink-eyes 5s infinite; }
@keyframes blink-eyes { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }
.b-eyes-happy { display: none; }
.b-eyes-happy path, .b-brows path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.b-brows { transform-box: view-box; transition: transform .4s var(--ease-out); }
.b-mouth { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; }
.b-hat rect { fill: var(--hat); }
.b-hat .b-hat-band { fill: var(--band); }
.b-hat { transform-box: view-box; transform-origin: 80px 40px; transition: transform .5s var(--ease-out); }
.b-stars { fill: var(--indigo); opacity: 0; transition: opacity .3s; }
.on-dark .b-stars { fill: var(--peach); }
.b-stars path:nth-child(2) { fill: var(--ink); }
.on-dark .b-stars path:nth-child(2) { fill: #fff; }
.b-stars path { transform-box: fill-box; transform-origin: center; animation: twinkle 1.4s ease-in-out infinite; }
.b-stars path:nth-child(2) { animation-delay: .3s; }
.b-stars path:nth-child(3) { animation-delay: .6s; }
@keyframes twinkle { 0%, 100% { transform: scale(.5); } 50% { transform: scale(1.15); } }

/* Poses */
.pose-wave .b-arm-r { animation: wave 1.1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(-100deg); } 50% { transform: rotate(-135deg); } }
.pose-point .b-arm-l { transform: rotate(70deg); }
.pose-point-down .b-arm-r, .pose-point-down .b-arm-l { animation: tap 1s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.pose-magic .b-arm-r { transform: rotate(-120deg); }
.pose-magic .b-stars { opacity: 1; }
.pose-magic .b-brows { transform: translateY(-3px); }
.pose-hug .b-arm-l { transform: rotate(105deg); }
.pose-hug .b-arm-r { transform: rotate(-105deg); }
.pose-hug .b-eyes-open { display: none; }
.pose-hug .b-eyes-happy { display: block; }
.pose-hug .b-hat { transform: rotate(-12deg) translate(-4px, -4px); }

/* Lugares reservados para la mascota (nunca tapa contenido) */
.buddy-slot { width: 110px; aspect-ratio: 1; flex: none; pointer-events: none; }
html:not(.js) .buddy-slot { background: url("assets/logo.svg") center / 70% no-repeat; }

/* Globo de diálogo */
.bubble {
  position: fixed; left: 0; top: 0; z-index: 46;
  max-width: 230px; padding: .6rem .95rem;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 16px 16px 16px 4px;
  font-weight: 600; font-size: .92rem; line-height: 1.3;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.bubble.is-on { opacity: 1; }
.bubble.is-left { border-radius: 16px 16px 4px 16px; }
.bubble.is-mid { border-radius: 4px 16px 16px 16px; }

/* Destellos al volar */
.spark {
  position: fixed; z-index: 44; width: 10px; height: 10px; pointer-events: none;
  background: var(--peach);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: spark .8s ease-out forwards;
}
.spark:nth-child(odd) { background: var(--indigo); }
@keyframes spark { from { opacity: 1; transform: scale(1.3) rotate(0); } to { opacity: 0; transform: scale(.2) rotate(120deg) translateY(18px); } }

/* Barra de avance */
.progress {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: 100%; height: 4px; background: var(--indigo);
  transform: scaleX(0); transform-origin: left;
}

/* ---------- Hero ---------- */
.hero-visual { max-width: 420px; aspect-ratio: 1; display: grid; place-items: center; }
.hero-visual::before { content: none; }
.hero-blob {
  position: absolute; inset: 8%;
  background: var(--peach-soft); border-radius: 50%;
}
.hero-blob::after {
  content: ""; position: absolute; inset: -7%;
  border: 2px dashed var(--indigo); border-radius: 50%; opacity: .35;
  animation: turn 40s linear infinite;
}
@keyframes turn { to { transform: rotate(360deg); } }
.buddy-slot--hero { width: 56%; position: relative; }
.chip {
  position: absolute; z-index: 1;
  padding: .45rem .9rem; border-radius: 999px;
  background: var(--paper); border: 2px solid var(--ink);
  font-weight: 600; font-size: .88rem; white-space: nowrap;
  animation: bob 4s ease-in-out infinite;
}
.chip-1 { top: 10%; left: 0; }
.chip-2 { top: 72%; right: -4%; animation-delay: -1.3s; background: var(--indigo); color: #fff; border-color: var(--indigo); }
.chip-3 { bottom: 2%; left: 6%; animation-delay: -2.6s; }
.chip-4 { top: 0; right: 6%; animation-delay: -.6s; }
.chip-5 { top: 42%; left: -8%; animation-delay: -1.9s; background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-6 { bottom: 12%; right: 2%; animation-delay: -3.2s; background: #d7f7e3; border-color: #1FA855; }
.chip-2 { top: 60%; }

/* ---------- Servicios: escena fija + pasos ---------- */
.show { display: grid; gap: 24px; }
.stage {
  position: sticky; top: 80px; z-index: 5;
  height: 300px;
  background: var(--indigo-soft);
  border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden;
}
.scene {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px 20px 20px;
  opacity: 0; visibility: hidden; transform: scale(.96);
  transition: opacity .5s, transform .6s var(--ease-out), visibility 0s .5s;
}
.scene.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.buddy-slot--stage { position: absolute; right: 10px; bottom: 6px; width: 100px; }

.mock { width: min(78%, 380px); background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.mock-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.blk { display: block; height: 12px; border-radius: 6px; background: var(--line); transform-origin: left; }
.blk-nav { grid-column: 1 / -1; width: 40%; }
.blk-title { grid-column: 1 / -1; height: 26px; width: 85%; background: var(--ink); }
.blk-text { grid-column: 1 / -1; width: 65%; }
.blk-btn { width: 70%; height: 22px; border-radius: 99px; background: var(--indigo); }
.blk-img { grid-column: 1; height: 60px; background: var(--peach); border-radius: 10px; }
.blk-img2 { grid-column: 2; grid-row: 5; background: var(--indigo-soft); }
.blk-btn { grid-column: 1 / -1; width: 34%; }
.scene.is-active .blk { animation: build .6s var(--ease-out) both; }
.scene.is-active .blk:nth-child(2) { animation-delay: .12s; }
.scene.is-active .blk:nth-child(3) { animation-delay: .24s; }
.scene.is-active .blk:nth-child(4) { animation-delay: .36s; }
.scene.is-active .blk:nth-child(5) { animation-delay: .48s; }
.scene.is-active .blk:nth-child(6) { animation-delay: .6s; }
@keyframes build { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: none; } }

.scene-chat .phone { width: min(74%, 330px); border-radius: 20px; }
.scene-chat .phone-top { padding: .55rem .9rem; }
.scene-chat .avatar { width: 28px; height: 28px; background: var(--peach); }
.scene-chat .chat { min-height: 0; padding: .7rem .7rem .8rem; gap: .4rem; }
.scene-chat .msg { font-size: .78rem; padding: .4rem .6rem 1rem; }
.scene-chat .msg time { font-size: .6rem; }
.scene.is-active .msg { animation: pop .5s var(--ease-out) both; }
.scene.is-active .msg:nth-child(2) { animation-delay: .5s; }
.scene.is-active .msg:nth-child(3) { animation-delay: 1.1s; }
.scene.is-active .msg:nth-child(4) { animation-delay: 1.7s; }

.flow { display: grid; gap: 14px; width: min(72%, 320px); margin-right: 12%; }
.node {
  position: relative; padding: .55rem .9rem;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
  font-weight: 600; font-size: .88rem;
  animation: node-on 4s infinite;
}
.node + .node::before {
  content: ""; position: absolute; left: 22px; top: -16px; height: 14px;
  border-left: 2px dashed var(--ink);
}
.node:nth-child(2) { animation-delay: 1s; }
.node:nth-child(3) { animation-delay: 2s; }
.node:nth-child(4) { animation-delay: 3s; }
@keyframes node-on {
  0%, 22%, 100% { background: var(--paper); color: var(--ink); transform: none; }
  6%, 16% { background: var(--indigo); color: #fff; transform: translateX(6px); }
}

.svc { padding: 8px 0 56px; transition: opacity .4s; }
.svc-n { font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--indigo); letter-spacing: .08em; }
.svc h3 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; margin: .5rem 0 .9rem; }
.svc > p { color: var(--ink-2); font-size: 1.1rem; max-width: 30em; }
.svc .card-list { border-top-color: var(--line); max-width: 30em; }

/* Escena 4: anuncio */
.scene-ads { position: absolute; }
.ad {
  width: min(56%, 250px); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 16px; overflow: hidden;
  margin-right: 14%;
}
.ad-top { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; }
.ad-top strong { display: block; font-size: .8rem; line-height: 1.1; }
.ad-top small { font-size: .68rem; color: var(--ink-2); }
.ad-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--indigo); flex: none; }
.ad-media { aspect-ratio: 4 / 3.4; background: var(--peach); display: grid; place-items: center; border-block: 2px solid var(--ink); }
.ad-play { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); position: relative; }
.ad-play::after { content: ""; position: absolute; left: 16px; top: 11px; border-left: 14px solid var(--ink); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.ad-cta { display: flex; justify-content: space-between; padding: .55rem .75rem; font-weight: 600; font-size: .8rem; background: var(--indigo); color: #fff; }
.ad-pill, .ad-notif {
  position: absolute; padding: .3rem .7rem; border-radius: 999px;
  background: var(--paper); border: 2px solid var(--ink);
  font-weight: 600; font-size: .75rem; white-space: nowrap;
}
.ad-pill-1 { left: 6%; top: 14%; }
.ad-pill-2 { left: 4%; top: 46%; background: var(--ink); color: #fff; }
.ad-pill-3 { left: 9%; bottom: 14%; }
.ad-notif { right: 6%; top: 10%; background: #d7f7e3; border-color: #1FA855; }
.scene.is-active .ad { animation: pop .6s var(--ease-out) both; }
.scene.is-active .ad-pill { animation: pop .5s var(--ease-out) both; }
.scene.is-active .ad-pill-1 { animation-delay: .3s; }
.scene.is-active .ad-pill-2 { animation-delay: .45s; }
.scene.is-active .ad-pill-3 { animation-delay: .6s; }
.scene.is-active .ad-notif { animation: pop .5s 1.2s var(--ease-out) both; }

.case-url { display: inline-block; margin: .9rem 0 0 .5rem; font-size: .85rem; font-weight: 600; color: var(--indigo); }

/* ---------- Lugares de la mascota por sección ---------- */
.section-head--buddy { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: none; }
.buddy-slot--steps { width: 96px; }
.case-grid { position: relative; }
.buddy-slot--cases { position: absolute; right: 4%; top: -80px; width: 84px; }
.buddy-slot--why { width: 130px; margin-top: 2rem; }
.buddy-slot--contact { width: 130px; margin: 0 auto 1rem; }

@media (max-width: 959px) {
  .stage { height: 320px; }
  /* dejar lugar a Abra en la esquina de la escena */
  .scene-chat .phone { width: 100%; margin-right: 0; }
  .mock, .flow { width: 100%; margin-right: 0; }
  .buddy-slot--stage { width: 84px; right: 4px; bottom: 4px; }
  .ad { width: 50%; margin-right: 10%; }
  .ad-media { aspect-ratio: 16 / 10; }
  .ad-top { padding: .4rem .6rem; }
  .ad-cta { padding: .45rem .6rem; font-size: .72rem; }
  .ad-pill, .ad-notif { font-size: .68rem; padding: .25rem .6rem; }
  .ad-pill-1 { left: 4%; top: 30%; }
  .ad-pill-2 { left: 3%; top: 48%; }
  .ad-pill-3 { left: 5%; bottom: 30%; }
  .ad-notif { right: 4%; top: 5%; }
  .scene { padding: 14px 88px 14px 14px; }
  .scene-ads { padding-right: 14px; }
  .scene-chat .phone-top { display: none; }
  .scene-chat .phone { width: 78%; margin-right: 14%; }
}

@media (max-width: 719px) {
  .hero { padding-top: 28px; }
  /* en celular, solo los tres cartelitos originales */
  .chip-4, .chip-5, .chip-6 { display: none; }
  .chip-2 { top: 72%; }
  .hero-visual { max-width: 290px; margin-top: -16px; }
  .chip-2 { right: 0; }
  .chip-1 { left: 2%; }
  .cases .section-head { margin-bottom: 104px; }
  .chip { font-size: .78rem; }
  .bubble { max-width: 190px; font-size: .85rem; }
}

@media (min-width: 960px) {
  .show { grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: start; }
  .stage { top: 110px; height: min(520px, calc(100vh - 150px)); }
  .scene { padding: 36px; }
  /* Abra se asoma por la esquina de arriba a la derecha de la escena, sin tapar nada */
  .buddy-slot--stage { width: 130px; right: -58px; top: -48px; bottom: auto; }
  .ad-notif { right: auto; left: 52%; top: 7%; }
  .scene-chat .msg { font-size: .9rem; padding: .55rem .8rem 1.2rem; }
  .scene-chat .chat { padding: 1rem; gap: .55rem; }
  .node { font-size: 1rem; padding: .8rem 1.1rem; }
  .flow { gap: 18px; }
  .node + .node::before { top: -20px; height: 18px; }
  .blk-img { height: 90px; }
  .svc { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 0; opacity: .28; }
  .svc.is-active { opacity: 1; }
  .buddy-slot--steps, .buddy-slot--cases { width: 130px; }
  .buddy-slot--cases { top: -124px; }
  .buddy-slot--why { width: 160px; }
}

/* =============================================================
   10. Tipografía: Gloock (títulos) + Hanken Grotesk (texto)
   Gloock tiene un solo peso: los títulos van en 400 y sin negrita falsa
   ============================================================= */
h1, h2, h3, .brand-name, .step-n, .svc-n, .frame-title, .case-frame--bylala .frame-title {
  font-weight: 400;
  font-synthesis: none;
}
h1, h2, h3 { letter-spacing: -0.012em; line-height: 1.04; }
.hero-title { letter-spacing: -0.02em; line-height: 1.02; }
.brand-name { letter-spacing: -0.01em; font-size: 1.5rem; }
.svc-n { font-family: var(--sans); font-weight: 700; letter-spacing: .12em; font-size: .85rem; }
.step-n { font-size: 1.3rem; }
.case-frame--bylala .frame-title { letter-spacing: -0.01em; }
.eyebrow, .btn, .chip, .bubble { font-family: var(--sans); }
