/* Krezio gestoría: components on top of base.css (Krezio design system). */
html, body { overflow-x: clip; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo__by { font-size: 13px; letter-spacing: 0; color: var(--faint); margin-left: 2px; align-self: flex-end; margin-bottom: 3px; }
.nav__links { margin-left: auto; }

/* ---------- App mockup (product split) ---------- */
.split__art--mock { background: var(--soft); }
.mock { width: 100%; max-width: 520px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 40px 80px -48px rgba(20,20,22,.35); }
.mock__bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.mock__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mock__bar p { margin-left: 10px; font-size: 12px; color: var(--faint); }
.mock__body { padding: 24px; }
.mock__hello { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; }
.mock__sub { font-size: 13px; color: var(--faint); margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 20px; }
.kpi { border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.kpi p { font-size: 12px; color: var(--muted); }
.kpi strong { display: block; margin-top: 4px; font-size: clamp(15px, 1.4vw, 18px); font-weight: 500; letter-spacing: -0.03em; }
.kpi span { font-size: 11.5px; color: var(--faint); }
.kpi--dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.kpi--dark p, .kpi--dark span { color: var(--on-dark-2); }
.bars { display: flex; align-items: end; gap: 6px; height: 80px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.bars i { flex: 1; height: var(--h); border-radius: 2px 2px 0 0; background: #e4e4e7; transform-origin: bottom; }
.bars i:last-child { background: var(--ink); }
.js .reveal.in .bars i { animation: grow 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 1s); }
@keyframes grow { from { transform: scaleY(0); } }

/* ---------- Chat messages ---------- */
.msg { font-size: 13.5px; line-height: 1.45; padding: 10px 12px; border-radius: 12px; max-width: 88%; }
.msg b { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.msg--agent { justify-self: start; align-self: flex-start; background: var(--soft); border-bottom-left-radius: 3px; }
.msg--me { justify-self: end; align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 3px; }
.msg--step { align-self: center; max-width: 100%; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; display: flex; gap: 8px; align-items: center; }
.msg--step::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fa66b; box-shadow: 0 0 0 4px rgba(63,166,107,.14); }
.msg--card { background: #fff; border: 1px solid var(--line); }
.msg--card dl { margin: 8px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: 13px; }
.msg--card dt { color: var(--muted); }
.msg--card dd { margin: 0; text-align: right; font-weight: 500; }
.msg--card dt:nth-last-of-type(1), .msg--card dd:last-child { padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink); }

/* ---------- Hero with live chat ---------- */
.hero--app { min-height: 0; }
.hero__grid--app { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(40px, 6vw, 96px); padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 120px); }
.hero__grid--app::before { display: none; }
.hero--app .hero__title { max-width: 14ch; }

.ask { margin-top: 40px; max-width: 520px; }
.ask__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 6px 0 22px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 16px; color: #fff; }
.ask__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask__text::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; background: currentColor; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ask__bar i { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-style: normal; }
.ask__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ask__chips button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: none; color: rgba(255,255,255,.78); font: inherit; font-size: 13.5px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.ask__chips button:hover { color: #fff; border-color: rgba(255,255,255,.5); }
.ask__chips button[aria-selected="true"] { background: #fff; color: var(--ink); border-color: #fff; }

.phone {
  position: relative; justify-self: end; width: 100%; max-width: 400px; height: 560px; color: var(--ink);
  background: #fff; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.7);
}
.phone__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.phone__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.phone__name { font-weight: 500; font-size: 15px; }
.phone__status { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.phone__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3fa66b; }
.phone__log { flex: 1; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.phone__log > * { animation: pop .45s var(--ease) both; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--soft); border-radius: 12px; border-bottom-left-radius: 3px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .3; transform: translateY(-2px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.phone__input { margin: 10px; height: 44px; border-radius: 999px; background: var(--soft); display: flex; align-items: center; justify-content: space-between; padding: 0 5px 0 16px; font-size: 14px; color: var(--faint); }
.phone__input i { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-style: normal; }
@media (max-width: 960px) {
  .hero__grid--app { grid-template-columns: minmax(0, 1fr); }
  .phone { justify-self: stretch; max-width: none; height: 500px; }
}

/* ---------- Facts strip ---------- */
.facts { border-bottom: 1px solid var(--line); }
.facts__grid { margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding-left: 0; padding-right: 0; }
.facts__grid > div { padding: 32px var(--gut) 36px; border-right: 1px solid var(--line); }
.facts__grid > div:last-child { border-right: 0; }
.facts dt { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.04em; font-weight: 500; line-height: 1.1; }
.facts dd { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) {
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .facts__grid > div:nth-child(2) { border-right: 0; }
  .facts__grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Agents: four in a row ---------- */
.agents__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.cards--row { grid-template-columns: repeat(4, 1fr); }
.cards--row .card__art { height: 150px; }
@media (max-width: 1100px) { .cards--row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .agents__head { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 640px) { .cards--row { grid-template-columns: 1fr; } }

/* ---------- A quarter: timeline ---------- */
.quarter { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 40px; }
.quarter::before, .quarter::after { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: var(--line); }
.quarter::after { background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 2.4s var(--ease) .3s; }
.quarter.in::after { transform: scaleX(1); }
.quarter li { position: relative; display: grid; gap: 10px; align-content: start; }
.quarter li::before { content: ""; position: absolute; top: -40px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 1px solid var(--ink); }
.quarter li:last-child::before { background: #3fa66b; border-color: #3fa66b; box-shadow: 0 0 0 5px rgba(63,166,107,.16); }
.quarter time { font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.quarter h3 { font-size: 26px; font-weight: 400; letter-spacing: -0.03em; margin-top: 8px; }
.quarter p { font-size: 15px; color: var(--muted); }
@media (max-width: 900px) {
  .quarter { grid-template-columns: 1fr; gap: 40px; padding: 0 0 0 36px; }
  .quarter::before, .quarter::after { top: 0; bottom: 0; left: 6px; right: auto; width: 1px; height: auto; }
  .quarter::after { transform: scaleY(0); transform-origin: top; }
  .quarter.in::after { transform: scaleY(1); }
  .quarter li::before { top: 2px; left: -36px; }
}

/* mock task list */
.mock__tasks { margin-top: 16px; display: grid; gap: 8px; font-size: 13.5px; }
.mock__tasks li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.mock__tasks li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin: 0 3px; }
.mock__tasks .done::before { background: #3fa66b; box-shadow: 0 0 0 4px rgba(63,166,107,.14); }
.mock__tasks .todo::before { background: #e0a33a; box-shadow: 0 0 0 4px rgba(224,163,58,.16); }

/* ---------- Comparison ---------- */
.vs { border-top: 1px solid var(--line); }
.vs__row { display: grid; grid-template-columns: 1fr 1.6fr 1.6fr; border-bottom: 1px solid var(--line); transition: background-color .3s; }
.vs__row:not(.vs__row--head):hover { background: #fafafa; }
.vs__row > span { padding: 22px 24px 22px 0; font-size: 16px; }
.vs__row > span:nth-child(1) { font-weight: 500; }
.vs__row > span:nth-child(2) { color: var(--faint); }
.vs__row > span:nth-child(3) { color: var(--ink-2); display: flex; align-items: baseline; gap: 12px; }
.vs__row:not(.vs__row--head) > span:nth-child(3)::before { content: ""; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #3fa66b; box-shadow: 0 0 0 4px rgba(63,166,107,.14); transform: translateY(-2px); }
.vs__row--head > span { font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 400 !important; padding-top: 16px; padding-bottom: 16px; }
@media (max-width: 700px) {
  .vs__row { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .vs__row > span:nth-child(1) { grid-column: 1 / -1; padding-bottom: 4px; }
  .vs__row--head > span:nth-child(1) { display: none; }
  .vs__row > span { padding: 14px 0; font-size: 14.5px; }
}

/* ---------- Pricing ---------- */
.billing { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft); }
.billing button { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); transition: background-color .2s, color .2s; }
.billing button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,22,.08); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.plan { background: var(--soft); padding: 32px; display: flex; flex-direction: column; align-items: flex-start; transition: background-color .35s; }
.plan:hover { background: #ededef; }
.plan__name { font-size: clamp(26px, 2.4vw, 32px); font-weight: 500; letter-spacing: -0.035em; }
.plan__tag { position: absolute; top: 32px; right: 32px; }
.plan { position: relative; }
.plan__for { margin-top: 8px; font-size: 15px; color: var(--muted); }
.plan__price { margin-top: 40px; font-size: 15px; color: var(--muted); }
.plan__price strong { font-size: clamp(48px, 4.6vw, 64px); font-weight: 500; letter-spacing: -0.05em; color: var(--ink); line-height: 1; }
.plan__note { margin-top: 8px; font-size: 13px; color: var(--faint); }
.plan ul { width: 100%; margin: 32px 0 40px; border-top: 1px solid var(--line); }
.plan li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.plan .btn { margin-top: auto; }
.plan--dark { background: var(--dark); color: var(--on-dark); }
.plan--dark:hover { background: #232326; }
.plan--dark .pill { background: #303034; color: #c9c9ce; }
.plan--dark .plan__for, .plan--dark .plan__price, .plan--dark .plan__note { color: var(--on-dark-2); }
.plan--dark .plan__price strong { color: #fff; }
.plan--dark ul { border-color: var(--card-line); }
.plan--dark li { border-color: var(--card-line); color: #d6d6da; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .res-head { flex-direction: column; align-items: flex-start; } }

/* ---------- Lead form (in the CTA box) ---------- */
.cta--form .cta__content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(40px, 6vw, 96px); align-items: start; padding-bottom: clamp(80px, 9vw, 136px); }
.cta__points { margin-top: 32px; display: grid; gap: 12px; color: rgba(255,255,255,.85); font-size: 15.5px; }
.cta__points li { display: flex; gap: 12px; align-items: center; }
.cta__points li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fa66b; box-shadow: 0 0 0 4px rgba(63,166,107,.2); flex-shrink: 0; }
.leadform { position: relative; background: #fff; color: var(--ink); border-radius: 12px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 50px 100px -50px rgba(0,0,0,.7); }
.leadform fieldset { margin-bottom: 22px; }
.leadform legend { margin-bottom: 10px; }
.leadform .seg label { min-width: 0; }
.leadform .seg span { padding: 9px 6px; font-size: 13.5px; }
.leadform .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.leadform .field { margin-bottom: 16px; }
.leadform .field > span:first-child small { font-weight: 400; color: var(--faint); font-size: 13px; }
.leadform textarea { min-height: 88px; }
.leadform [aria-invalid="true"], .leadform .input:has([aria-invalid="true"]) { border-color: #c2410c; }
.lead__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead__consent { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 20px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.lead__consent input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 20px; height: 20px; margin: 0; border: 1.5px solid #cfcfd4; border-radius: 5px; display: grid; place-items: center; cursor: pointer; transition: background-color .2s, border-color .2s; }
.lead__consent input::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px) scale(0); transition: transform .25s var(--ease); }
.lead__consent input:checked { background: var(--ink); border-color: var(--ink); }
.lead__consent input:checked::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.lead__consent input[aria-invalid="true"] { border-color: #c2410c; }
.leadform .btn { width: 100%; }
.leadform .btn:disabled { opacity: .6; cursor: progress; transform: none; }
.lead__status { min-height: 20px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.lead__status.is-err { color: #c2410c; }
.lead__done { position: absolute; inset: 0; border-radius: 12px; background: #fff; display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3vw, 40px); outline: none; }
.lead__done[hidden] { display: none; }
.lead__done-title { font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.lead__done p:not(.lead__done-title) { margin-top: 14px; color: var(--muted); }
.lead__done::before { content: ""; width: 44px; height: 44px; border-radius: 50%; margin-bottom: 24px; background: #3fa66b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.4 7.4 12.6 14 5.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat; animation: pop .5s cubic-bezier(.34, 1.6, .64, 1) both; }
@media (max-width: 960px) { .cta--form .cta__content { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .leadform .grid2 { grid-template-columns: 1fr; } .leadform .seg label { flex-basis: calc(50% - 4px); } }

.footer__brand p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  .phone__log > * { animation: none; }
}

/* =====================================================================
   Entrance animations: each section enters its own way.
   base.css gives .reveal a fade-up with blur; these variants replace it.
   ===================================================================== */
.js .reveal[class*="a-"] { filter: none; }

/* Headlines: words rise out of a mask, one after another */
.js .reveal.a-words { opacity: 1; transform: none; }
.a-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.a-words .w > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); transition-delay: calc(var(--wi, 0) * 55ms); }
.a-words.in .w > span { transform: none; }

/* Slide from the sides */
.js .reveal.a-left { transform: translateX(-48px); }
.js .reveal.a-right { transform: translateX(48px); }

/* Scale up from slightly smaller, with a soft overshoot */
.js .reveal.a-scale { transform: scale(.94); transition: opacity .8s var(--ease), transform 1s cubic-bezier(.34, 1.4, .64, 1); transition-delay: var(--d, 0s); }

/* Tilt up in 3D, like a card laid on the table */
.js .reveal.a-tilt { transform: perspective(1100px) rotateX(22deg) translateY(56px); transform-origin: 50% 100%; transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }

/* Every variant settles to its natural position once visible.
   (Needed because variant rules are as specific as base.css's .in rule and come later.) */
.js .reveal[class*="a-"].in { transform: none; }

/* Wipe from left to right */
.js .reveal.a-clip { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.a-clip.in { clip-path: inset(0 0 0 0); }

/* Comparison rows: row slides in, the old way gets crossed out, then the dot pops */
.js .reveal.a-row { transform: translateY(12px); }
.a-row > span:nth-child(2) { background: linear-gradient(currentColor, currentColor) 0 55% / 0 1px no-repeat; transition: background-size .8s var(--ease) .5s; }
.js .a-row > span:nth-child(2) { background-size: 0 1px; }
.a-row.in > span:nth-child(2), html:not(.js) .a-row > span:nth-child(2) { background-size: 100% 1px; }
.js .a-row > span:nth-child(3)::before { transform: translateY(-2px) scale(0); transition: transform .5s cubic-bezier(.34, 1.8, .64, 1) 1.1s; }
.js .a-row.in > span:nth-child(3)::before { transform: translateY(-2px) scale(1); }

/* Timeline: dots pop in sequence as the line passes them */
.js .quarter li::before { transform: scale(0); transition: transform .5s cubic-bezier(.34, 1.8, .64, 1); }
.js .quarter.in li::before { transform: scale(1); }
.quarter.in li:nth-child(1)::before { transition-delay: .3s; }
.quarter.in li:nth-child(2)::before { transition-delay: .9s; }
.quarter.in li:nth-child(3)::before { transition-delay: 1.5s; }
.quarter.in li:nth-child(4)::before { transition-delay: 2.1s; }

/* Product mockup drifts with scroll (set by main.js) */
.mock { transform: translateY(var(--py, 0px)) rotate(var(--pr, 0deg)); will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal.a-clip { clip-path: none; }
  .a-words .w > span { transform: none; }
  .js .quarter li::before, .js .a-row > span:nth-child(3)::before { transform: translateY(-2px) scale(1); }
  .js .quarter li::before { transform: none; }
  .a-row > span:nth-child(2) { background-size: 100% 1px !important; }
  .mock { transform: none; }
}

/* =====================================================================
   Agent illustrations (tools/iso_gestoria.py): own scenes and motion
   ===================================================================== */
.iso-g .ga { transform-box: fill-box; }
.iso-g .hl path, .iso-g .drop path { stroke: #f4f4f5; }

/* Facturas: sheets fall one by one onto the tray */
.iso-g--inbox .drop .ga { animation: drop 4.5s var(--ease) infinite both; animation-delay: calc(var(--i) * 1.5s); }
@keyframes drop {
  0% { opacity: 0; transform: translateY(-56px); }
  10% { opacity: 1; }
  28%, 62% { opacity: 1; transform: translateY(0); }
  80%, 100% { opacity: 0; transform: translateY(6px); }
}

/* Impuestos: bars rise and settle while it calculates; the total pulses */
.iso-g--bars .bar .ga { transform-origin: 50% 100%; animation: eq 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.45s); }
.iso-g--bars .bar.hl .ga { animation: eq-total 3.2s ease-in-out infinite; }
@keyframes eq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.5); } }
@keyframes eq-total { 0%, 100% { transform: scaleY(.7); } 40%, 60% { transform: scaleY(1); } }

/* Trámites: a document hops from station to station, each lights up on arrival */
.iso-g--route .traveller .ga { animation: travel 6s var(--ease) infinite; }
.iso-g--route .traveller path { stroke: #f4f4f5; }
@keyframes travel {
  0% { opacity: 0; transform: translate(0, -24px); }
  6%, 22% { opacity: 1; transform: translate(0, 0); }
  30% { transform: translate(calc(var(--hx) * .5), calc(var(--hy) * .5 - 26px)); }
  38%, 55% { transform: translate(var(--hx), var(--hy)); }
  63% { transform: translate(calc(var(--hx) * 1.5), calc(var(--hy) * 1.5 - 26px)); }
  71%, 86% { opacity: 1; transform: translate(calc(var(--hx) * 2), calc(var(--hy) * 2)); }
  96%, 100% { opacity: 0; transform: translate(calc(var(--hx) * 2), calc(var(--hy) * 2 - 24px)); }
}
.iso-g--route .station path { animation: light 6s ease infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes light { 0%, 5%, 26%, 100% { stroke: #5a5a61; } 8%, 22% { stroke: #f4f4f5; } }

/* Asistente: messages pop onto the phone, then clear */
.iso-g--chat .bubble .ga { transform-origin: 50% 100%; animation: msg 6s cubic-bezier(.34, 1.5, .64, 1) infinite both; animation-delay: calc(var(--i) * .7s); }
.iso-g--chat .bubble.me .t { fill: #3a3a3e; }
.iso-g--chat .bubble.me path { stroke: #9a9aa0; }
@keyframes msg {
  0% { opacity: 0; transform: translateY(12px) scale(.85); }
  8%, 72% { opacity: 1; transform: none; }
  84%, 100% { opacity: 0; transform: translateY(-8px); }
}

/* =====================================================================
   Multi-page site: services dropdown, service pages, hubs, calendar
   ===================================================================== */

/* ---------- Services dropdown (desktop) ---------- */
.nav__links { align-items: center; }
.dd__btn { font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: color .2s; }
.dd__btn::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease); }
.dd__btn:hover, .dd__btn[aria-expanded="true"], .dd__btn[aria-current] { color: var(--ink); }
.dd__btn[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.dd__panel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 40px 60px -40px rgba(20,20,22,.25); }
.dd__panel[hidden] { display: none; }
.dd__panel:not([hidden]) { animation: dd-in .35s var(--ease); }
@keyframes dd-in { from { opacity: 0; transform: translateY(-8px); } }
.dd__inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.1fr); border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding-left: 0; padding-right: 0; }
.dd__col { padding: 28px 24px 32px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dd__col .footer__label { margin-bottom: 10px; }
.nav__links .dd__col a { display: block; padding: 10px 12px; margin: 0 -12px; border-radius: 6px; color: var(--ink); transition: background-color .2s; }
.nav__links .dd__col a::after { display: none; }
.nav__links .dd__col a:hover { background: var(--soft); }
.dd__col b { display: block; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.dd__col small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.dd__aside { padding: 28px 28px 32px; background: var(--soft); display: flex; flex-direction: column; gap: 10px; }
.dd__aside-title { font-size: 20px; font-weight: 500; letter-spacing: -0.03em; }
.dd__aside p:not(.dd__aside-title) { font-size: 14px; font-weight: 400; color: var(--muted); }
.nav__links .dd__aside .link-arrow { margin-top: auto; color: var(--ink); }
.nav__links .dd__aside .link-arrow::after { content: "→"; position: static; height: auto; background: none; transform: none; }
.nav__links .dd__aside .link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Mobile menu: services accordion ---------- */
.mm summary { list-style: none; cursor: pointer; padding: 12px 0; font-size: 20px; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.mm summary::-webkit-details-marker { display: none; }
.mm summary::after { content: "+"; font-size: 22px; color: var(--muted); transition: transform .3s var(--ease); }
.mm[open] summary::after { transform: rotate(45deg); }
.mm__body { display: grid; padding: 8px 0 16px; border-bottom: 1px solid var(--line); }
.mobile-menu .mm__body a { font-size: 16px; padding: 8px 0; border: 0; color: var(--ink-2); }
.mm__label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 14px; }
.mobile-menu .mm__body .mm__all { margin-top: 10px; font-weight: 500; color: var(--ink); }

/* ---------- Footer ---------- */
.footer__grid--g { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); }
.footer__contact { margin-top: 20px !important; }
.footer__contact a { color: var(--ink) !important; font-weight: 500; }
@media (max-width: 1000px) { .footer__grid--g { grid-template-columns: 1fr 1fr; } .footer__grid--g .footer__brand { grid-column: 1 / -1; } }

/* ---------- Page heads with a side visual ---------- */
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
.page-head__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.chatcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 40px 80px -48px rgba(20,20,22,.35); overflow: hidden; }
.chatcard__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chatcard__log { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 20px; }
.js .chatcard.in .msg { animation: pop .5s var(--ease) both; }
.js .chatcard.in .msg:nth-child(2) { animation-delay: .5s; }
.js .chatcard.in .msg:nth-child(3) { animation-delay: 1s; }
.js .chatcard.in .msg:nth-child(4) { animation-delay: 1.5s; }
@media (max-width: 900px) { .page-head__grid { grid-template-columns: minmax(0, 1fr); } .chatcard { max-width: 460px; } }

/* ---------- Service: what's included ---------- */
.incl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.incl li { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); }
.incl li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.incl h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.incl h3::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fa66b; box-shadow: 0 0 0 4px rgba(63,166,107,.14); flex-shrink: 0; }
.incl p { margin-top: 8px; font-size: 15px; color: var(--muted); }
@media (max-width: 900px) {
  .incl { grid-template-columns: minmax(0, 1fr); }
  .incl li, .incl li:not(:nth-child(3n + 1)) { padding: 22px 0; border-left: 0; }
}

/* ---------- Service: who does what ---------- */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.role { background: var(--card); padding: 32px; }
.role .pill { background: #303034; color: #c9c9ce; }
.role ul { margin-top: 32px; }
.role li { padding: 14px 0; border-bottom: 1px solid var(--card-line); color: #d6d6da; font-size: 15.5px; }
.role li:last-child { border-bottom: 0; }
.role--you { background: #f4f4f5; }
.role--you .pill { background: #fff; color: var(--ink-2); }
.role--you li { color: var(--ink); border-color: #e2e2e5; }
@media (max-width: 860px) { .roles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Service: documents + plan ---------- */
.split > .split__list:first-child { border-right: 1px solid var(--line); }
.callout--plan { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.callout--plan .cta__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
@media (max-width: 860px) { .split > .split__list:first-child { border-right: 0; } }

/* ---------- Service cards / hub ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.svc-card { height: 100%; min-height: 250px; display: flex; flex-direction: column; background: var(--soft); padding: 28px; transition: background-color .35s; }
.svc-card:hover { background: #ebebed; }
.svc-card__n { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.svc-card .pill { align-self: flex-start; background: #fff; }
.svc-card h3 { margin-top: auto; padding-top: 48px; font-size: clamp(22px, 2vw, 26px); font-weight: 400; letter-spacing: -0.03em; }
.svc-card p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.svc-card__more { margin-top: 20px; font-size: 14px; font-weight: 500; }
.svc-card__more span { display: inline-block; transition: transform .35s var(--ease); }
.svc-card:hover .svc-card__more span { transform: translateX(4px); }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } }
.chips--jump { margin: 32px 0 0; }

/* ---------- Home: services columns ---------- */
.svc-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: clamp(40px, 5vw, 64px); }
.svc-col ul { border-top: 1px solid var(--line); margin-top: 14px; }
.svc-col a { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: padding .35s var(--ease); }
.svc-col a span { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.svc-col a small { font-size: 14px; color: var(--muted); }
.svc-col a:hover { padding-left: 8px; }
@media (max-width: 1000px) { .svc-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* ---------- Tax calendar ---------- */
.cal__bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.cal__bar .seg { min-width: 280px; }
.cal__next { font-size: 15px; color: var(--muted); }
.cal__next b { color: var(--ink); font-weight: 500; }
.cal__month { padding: 36px 0 10px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.cal__item { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 200px) 110px; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cal__date { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal__title { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.cal__models { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cal__days { justify-self: end; font-size: 12.5px; color: var(--muted); }
.cal__item.is-open .cal__days { color: var(--ink); }
.cal__item.is-next { background: var(--soft); margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: var(--gut); }
.cal__item.is-next .cal__days { background: var(--ink); color: #fff; padding: 3px 9px; border-radius: 999px; }
.cal__note { margin-top: 32px; font-size: 13.5px; color: var(--muted); max-width: 60em; }
@media (max-width: 800px) {
  .cal__item { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .cal__title { grid-column: 1; grid-row: 2; }
  .cal__models { grid-column: 1; grid-row: 3; }
  .cal__days { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

/* ---------- Legal ---------- */
.footer__law { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__law a { color: var(--muted); transition: color .2s; }
.footer__law a:hover { color: var(--ink); }
@media (max-width: 700px) { .footer__legal { flex-direction: column; gap: 12px; } }
.chips--legal .chip[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.prose--legal { font-size: 16.5px; }
.prose--legal td:first-child { color: var(--ink); }
.lead__consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.leadform__empresa[hidden] { display: none; }
.leadform__empresa > span:first-child b { font-weight: 500; }
.leadform select:invalid { color: var(--faint); }
