/* =====================================================================
   DSI Citas · landing
   Todo lo que se anima usa transform/opacity y ocupa un hueco fijo:
   nada cambia de altura mientras el usuario lee, así el scroll no salta.
   v4: tarjetas de negocio con «Reservar cita» (página de reservas online)
   y acceso aparte para los negocios.
   ===================================================================== */

:root { --gutter: clamp(16px, 4vw, 56px); --maxw: 1240px; }

html { scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* clip en vez de hidden: recorta sin crear otro contenedor de scroll (evita
   tirones en iOS y mantiene el nav pegajoso) */
body { overflow-x: hidden; }
@supports (overflow: clip) { body { overflow-x: clip; } }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--r-s); text-decoration: none;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  padding-inline: var(--gutter); padding-top: env(safe-area-inset-top, 0px);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
/* El desenfoque de fondo solo en pantallas grandes: en móvil encarece cada
   frame del scroll y es la causa típica de tirones */
@media (min-width: 881px) and (hover: hover) {
  .nav { background: color-mix(in srgb, var(--paper) 80%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__in {
  max-width: var(--maxw); margin: 0 auto; height: 68px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: var(--paper); flex: none; }
.brand__mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand__mark .brand__tick { stroke: var(--tick); }
.brand__txt { font-family: var(--f-display); font-size: 1.18rem; letter-spacing: -.02em; font-weight: 500; }
.brand__txt b { font-weight: 800; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--ink-2);
  padding: .5rem .8rem; border-radius: 999px; transition: background-color .15s, color .15s;
}
.nav__links a:hover { background: var(--paper-2); color: var(--ink); }
@media (max-width: 880px) { .nav__links { display: none; } .nav .btn { margin-left: auto; } .nav__in { height: 60px; } }

/* ----------------------------------------------------------------- hero */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding-inline: var(--gutter); padding-block: clamp(36px, 7vw, 88px) clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 980px) { .hero { grid-template-columns: minmax(0, 1fr); } }

.hero__eyebrow { display: inline-flex; align-items: center; gap: .55rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wa) 22%, transparent); }
.hero__title {
  margin-top: 1.1rem;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 700; line-height: .98; letter-spacing: -.035em;
  font-variation-settings: "opsz" 96;
}
.hero__title-2 { display: block; color: var(--ink-3); font-weight: 500; }
.hero__title em {
  font-style: normal; color: var(--ink); font-weight: 800;
  background: linear-gradient(transparent 62%, var(--tick-soft) 62%, var(--tick-soft) 92%, transparent 92%);
}
.hero__lead { margin-top: 1.4rem; max-width: 34em; font-size: clamp(1.02rem, 1.3vw, 1.14rem); color: var(--ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero__facts {
  list-style: none; padding: 0; margin: 2.4rem 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--line);
}
.hero__facts li { padding: 1rem 1rem 0 0; font-size: .84rem; color: var(--ink-3); line-height: 1.35; }
.hero__facts li + li { padding-left: 1rem; border-left: 1px solid var(--line); }
.hero__facts b { display: block; font-family: var(--f-time); font-size: 2.1rem; line-height: 1; color: var(--ink); font-weight: 800; margin-bottom: .35rem; }
@media (max-width: 520px) {
  .hero__facts { grid-template-columns: 1fr; }
  .hero__facts li, .hero__facts li + li { padding: .8rem 0; border-left: 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: .8rem; }
  .hero__facts b { margin: 0; min-width: 2.6ch; font-size: 1.7rem; }
}

/* -------------------------------------------------------------- stage */
.stage { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; contain: layout; }

.chat {
  grid-column: 1 / span 9; grid-row: 1; margin: 0; z-index: 2;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-2); overflow: hidden;
}
.chat__head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.chat__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); flex: none; }
.chat__avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chat__who { display: grid; line-height: 1.2; min-width: 0; }
.chat__who b { font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__who small { color: var(--ink-3); font-size: .76rem; }
.chat__online { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; color: var(--ok); font-weight: 600; white-space: nowrap; }
.chat__online i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* Ventana de altura FIJA: los mensajes se apilan desde abajo como en un chat
   de verdad y lo que sobra se desvanece por arriba. Nunca empuja la página. */
.chat__view {
  position: relative; height: 336px; overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--surface-2);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 36px);
}
.chat__log {
  position: absolute; left: 0; right: 0; bottom: 0;
  list-style: none; margin: 0; padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem;
  transition: opacity .35s var(--ease), transform .5s var(--ease-out);
}
/* Con JS la lista crece hacia abajo desde arriba (los mensajes existentes no
   se mueven de sitio) y se desplaza con transform para quedar anclada abajo. */
.chat__log.is-js { top: 0; bottom: auto; will-change: transform; }
.chat__log.no-anim { transition: none; }
.chat__log.is-fading { opacity: 0; }
.msg {
  max-width: 82%; padding: .55rem .8rem .45rem; border-radius: 16px; font-size: .9rem; line-height: 1.38;
  box-shadow: 0 1px 1px rgba(13, 20, 51, .06);
}
.msg.is-new { animation: msg-in .45s var(--ease-out) both; }
.msg time { display: block; text-align: right; font-size: .66rem; color: var(--ink-3); margin-top: .15rem; font-variant-numeric: tabular-nums; }
.msg--in { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 5px; }
.msg--out { align-self: flex-end; background: var(--tick-soft); border-bottom-right-radius: 5px; }
.ticks { letter-spacing: -.25em; margin-left: .25rem; color: var(--ink-3); transition: color .4s; }
.ticks.is-read { color: var(--tick); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: .7rem .85rem; background: var(--surface); border-radius: 16px; border-bottom-left-radius: 5px; box-shadow: 0 1px 1px rgba(13,20,51,.06); animation: msg-in .3s var(--ease-out) both; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.board {
  grid-column: 5 / span 8; grid-row: 2; margin-top: -40px; z-index: 3;
  background: var(--ink); color: var(--paper); border-radius: 22px; padding: 1.1rem 1.1rem .7rem;
  box-shadow: var(--shadow-2);
}
:root[data-theme="dark"] .board { background: #050817; border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .board { background: #050817; border: 1px solid var(--line); } }
.board__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.board .eyebrow { color: rgba(241, 242, 238, .64); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.board__sync { white-space: nowrap; font-size: .72rem; color: rgba(241, 242, 238, .64); display: inline-flex; gap: .5rem; align-items: center; }
.board__rows { list-style: none; margin: 0; padding: 0; transition: opacity .35s var(--ease); }
.board__rows.is-fading { opacity: 0; }
.row {
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; align-items: center; gap: .8rem;
  height: 3.2rem; border-bottom: 1px dashed rgba(255,255,255,.12);
  perspective: 600px;
}
.row:last-child { border-bottom: 0; }
.row__t { font-size: 1.85rem; line-height: 1; color: #fff; transform-origin: 50% 50%; }
.row__n { font-weight: 600; font-size: .92rem; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__n small { display: block; font-weight: 400; font-size: .76rem; color: rgba(241, 242, 238, .6); overflow: hidden; text-overflow: ellipsis; }
.row__s { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(241,242,238,.72); }
.row__s.ok { background: rgba(65, 201, 142, .16); color: #6FE0AE; }
.row__s.new { background: var(--tick); color: #04111c; }
.row--new { position: relative; }
.row--new::before { content: ""; position: absolute; inset: 2px -10px; border-radius: 12px; background: rgba(92, 196, 242, .1); z-index: -1; }
/* La fila nueva ocupa su hueco desde el principio (visibility, no display) */
.row.is-pending { visibility: hidden; }
.row.is-flip .row__t { animation: flip .7s var(--ease-out) both; }
.row.is-flip .row__n, .row.is-flip .row__s { animation: fadein .6s .25s var(--ease-out) both; }
@keyframes flip { 0% { transform: rotateX(-90deg); opacity: 0; } 60% { transform: rotateX(12deg); opacity: 1; } 100% { transform: none; } }
@keyframes fadein { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .chat { grid-column: 1 / span 10; }
  .board { grid-column: 3 / span 10; }
}
/* En escritorio el tablero se monta 40px sobre el chat: reservamos ese hueco */
@media (min-width: 561px) {
  .chat__view { height: 380px; }
  .chat__log { padding-bottom: calc(1.1rem + 40px); }
}
@media (max-width: 560px) {
  .stage { display: flex; flex-direction: column; gap: 14px; }
  .chat, .board { margin: 0; }
  .chat__view { height: 368px; }
  .row__t { font-size: 1.55rem; }
  .row { grid-template-columns: 3.6rem minmax(0, 1fr) auto; }
}

/* --------------------------------------------------------------- ticker */
.ticker { border-block: 1px solid var(--line); overflow: hidden; background: var(--surface); contain: paint; }
.ticker__track { display: flex; width: max-content; animation: ticker 60s linear infinite; will-change: transform; }
.ticker span { font-family: var(--f-time); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.9rem); padding: .7rem 1.6rem; white-space: nowrap; color: var(--ink-2); border-right: 1px solid var(--line); letter-spacing: .01em; }
@keyframes ticker { to { transform: translateX(-50%); } }
.is-offscreen .ticker__track, .ticker.is-offscreen .ticker__track { animation-play-state: paused; }

/* ------------------------------------------------------------- sections */
.section { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); padding-block: clamp(64px, 9vw, 128px) 0; }
.section__head { display: grid; gap: 1rem; max-width: 46rem; }
.section__head h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 700; letter-spacing: -.03em; font-variation-settings: "opsz" 72; }
.section__lead { font-size: 1.08rem; color: var(--ink-2); max-width: 38em; }

/* Aparición suave al entrar en pantalla: la hace el propio navegador con el
   scroll (sin JS y sin tocar el layout). Donde no hay soporte, se ve directo. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* how */
.steps { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.step { padding: 1.6rem 1.6rem 1.8rem 0; display: grid; grid-template-rows: auto auto 1fr auto; gap: .8rem; }
.step + .step { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.step__n { font-size: 3.4rem; line-height: .9; color: var(--pen); }
.step h3 { font-size: 1.45rem; font-weight: 700; }
.step p { color: var(--ink-2); font-size: .98rem; max-width: 30em; }
.step__viz { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; min-height: 52px; margin-top: .6rem; }
.bubble { background: var(--surface); border: 1px solid var(--line); padding: .55rem .85rem; border-radius: 14px 14px 14px 4px; font-size: .88rem; }
.slot { font-family: var(--f-time); font-weight: 700; font-size: 1.3rem; padding: .3rem .8rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.slot--pick { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.slot--busy { color: var(--ink-3); text-decoration: line-through; background: transparent; border-style: dashed; }
.move { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.5rem; }
.move s { color: var(--ink-3); }
.move b { color: var(--pen); }
.move .icon { color: var(--ink-3); }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 1.4rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* panel mock */
.mock {
  margin-top: 3rem; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-2);
}
.mock__bar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock__dots { display: flex; gap: 6px; }
.mock__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock__url { font-size: .78rem; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); padding: .25rem .8rem; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mock__body { display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; min-height: 440px; }
.mock__side { border-right: 1px solid var(--line); padding: 1.2rem; display: grid; align-content: start; gap: 1rem; background: var(--surface-2); }
.mock__biz { display: flex; gap: .7rem; align-items: center; }
.mock__biz b { display: block; font-size: .95rem; }
.mock__biz small { color: var(--ink-3); font-size: .76rem; }
.mock__av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--acc); color: #1b1407; flex: none; }
.mock__stat { display: flex; align-items: baseline; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.mock__stat .time { font-size: 2.2rem; line-height: 1; }
.mock__stat small { color: var(--ink-3); }
.mock__sync { font-size: .76rem; color: var(--ink-3); display: flex; gap: .5rem; align-items: center; margin-top: .6rem; }
.mock__day { display: grid; grid-template-rows: auto 1fr; }
.mock__dayhead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.mock__dayhead b { font-family: var(--f-display); font-size: 1.1rem; }
.mock__seg { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; font-size: .78rem; }
.mock__seg i { font-style: normal; padding: .3rem .7rem; border-radius: 999px; color: var(--ink-3); }
.mock__seg i.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.mock__grid { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: .8rem 1.2rem 1.2rem .6rem; }
.mock__hours { display: flex; flex-direction: column; justify-content: space-between; color: var(--ink-3); font-size: .95rem; padding-block: .1rem; }
.mock__col {
  position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(100% / 7 - 1px), var(--line) calc(100% / 7 - 1px), var(--line) calc(100% / 7));
}
.ev {
  position: absolute; left: 8px; right: 8px; top: var(--top); height: var(--h); min-height: 34px;
  border-radius: 10px; padding: .35rem .6rem; font-size: .8rem; line-height: 1.2; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; gap: .6rem; align-items: baseline;
}
.ev b { font-weight: 700; }
.ev small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev--ok { background: var(--ok-soft); border-color: transparent; box-shadow: inset 3px 0 0 var(--ok); }
.ev--pend { background: var(--warn-soft); border-color: transparent; box-shadow: inset 3px 0 0 var(--warn); }
.ev--sel { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 8px 24px -8px rgba(13,20,51,.5); }
.ev--sel small { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.mock__now { position: absolute; left: -5px; right: 0; top: var(--top); border-top: 2px solid var(--tick); }
.mock__now::before { content: ""; position: absolute; left: 0; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--tick); }
.mock__now span { position: absolute; right: 6px; top: -1.2rem; font-size: .9rem; color: var(--tick); }
.mock__detail { border-left: 1px solid var(--line); padding: 1.3rem; display: grid; align-content: start; gap: .6rem; }
.mock__detail h3 { font-size: 1.9rem; font-weight: 700; }
.mock__svc { color: var(--ink-2); }
.mock__when { color: var(--ink-3); font-size: .9rem; }
.mock__when .time { font-size: 1.35rem; color: var(--ink); }
.mock__wa { justify-self: start; margin-top: .4rem; pointer-events: none; }
.mock__tel { color: var(--ink-2); font-size: .92rem; }
.mock__actions { display: flex; gap: .5rem; margin-top: .6rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.mock__actions span { font-size: .82rem; font-weight: 600; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); }
.mock__actions span:last-child { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.pill { justify-self: start; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; }
.pill--new { background: var(--tick-soft); color: var(--tick); }
@media (max-width: 1080px) { .mock__body { grid-template-columns: minmax(0, 1fr) 260px; } .mock__side { display: none; } }
@media (max-width: 700px) {
  .mock__body { grid-template-columns: minmax(0, 1fr); }
  .mock__detail { border-left: 0; border-top: 1px solid var(--line); }
  .mock__day { min-height: 380px; }
  .mock__dayhead { flex-wrap: wrap; }
}

.features { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.features li { display: grid; gap: .6rem; align-content: start; }
.features .icon { width: 28px; height: 28px; color: var(--pen); }
.features h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.features p { color: var(--ink-2); font-size: .94rem; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

/* ----------------------------------------------- reservas online (v4) */
.book { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .book { grid-template-columns: minmax(0, 1fr); } }
.book__list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .9rem; }
.book__list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .8rem; align-items: start; color: var(--ink-2); }
.book__list .icon { width: 22px; height: 22px; color: var(--pen); margin-top: .1rem; }
.book__list b { color: var(--ink); }
/* Semana de ejemplo: huecos libres y ocupados, nunca nombres */
.weekmock {
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-2);
  padding: clamp(14px, 2vw, 22px); display: grid; gap: 14px; min-width: 0;
}
.weekmock__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.weekmock__head b { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: -.01em; }
.weekmock__legend { display: flex; gap: .9rem; font-size: .78rem; color: var(--ink-3); }
.weekmock__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.weekmock__legend .l-free { background: color-mix(in srgb, var(--ok) 22%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.weekmock__legend .l-busy { background: repeating-linear-gradient(135deg, var(--line-2) 0 2px, transparent 2px 6px); border: 1px solid var(--line-2); }
.weekmock__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wm-d { display: grid; gap: 6px; align-content: start; min-width: 0; }
.wm-d > span { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.wm-d > span b { display: block; font-family: var(--f-time); font-size: 1.5rem; letter-spacing: 0; color: var(--ink); line-height: 1.1; }
.wm-s {
  font-style: normal; display: block;
  font-family: var(--f-time); font-weight: 700; font-size: 1.05rem; text-align: center; padding: .38rem .2rem; border-radius: 9px;
  background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ink);
}
.wm-s--busy { background: repeating-linear-gradient(135deg, var(--paper-2) 0 3px, transparent 3px 8px); border-color: var(--line); color: var(--ink-3); font-weight: 500; text-decoration: line-through; text-decoration-color: var(--line-2); }
.wm-s--pick { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 8px 20px -8px rgba(13,20,51,.55); }
.weekmock__foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.weekmock__foot span { font-size: .9rem; color: var(--ink-2); }
.weekmock__foot span b { font-family: var(--f-time); font-size: 1.15rem; color: var(--ink); }
.weekmock__go { font-size: .84rem; font-weight: 700; padding: .55rem 1rem; border-radius: 999px; background: var(--tick); color: #04111c; }
@media (max-width: 520px) {
  .weekmock__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wm-d:nth-child(n+4) { display: none; }
}

/* sync */
.sync__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .sync__grid { grid-template-columns: minmax(0, 1fr); } }
.flow { margin: 0; aspect-ratio: 520 / 360; }
.flow svg { width: 100%; height: 100%; display: block; overflow: visible; }
.flow__node rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.flow__node--acc rect { fill: var(--ink); stroke: var(--ink); }
.flow__node text { font-family: var(--f-display); font-weight: 700; font-size: 20px; fill: var(--ink); text-anchor: middle; }
.flow__node--acc text { fill: var(--paper); }
.flow__node text.flow__sub { font-family: var(--f-body); font-weight: 400; font-size: 13px; fill: var(--ink-3); }
.flow__node--acc text.flow__sub { fill: color-mix(in srgb, var(--paper) 70%, transparent); }
.flow__line { stroke: var(--line-2); stroke-width: 2; fill: none; }
.flow__line--dash { stroke-dasharray: 5 6; }
.flow__arr { fill: var(--ink-3); }
/* Un punto recorre el circuito: solo transform (lo mueve la GPU) */
.flow__dot { fill: var(--tick); opacity: 0; }
@supports (offset-path: path('M0 0')) {
  .flow__dot { opacity: 1; offset-path: path('M160 70 L360 70 L430 110 L430 250 L360 290 L160 290 L90 250 L90 110 Z'); offset-rotate: 0deg; animation: flow-dot 7s var(--ease) infinite; }
}
@keyframes flow-dot { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.flow.is-offscreen .flow__dot { animation-play-state: paused; }

.table-wrap { overflow-x: auto; margin-top: 3rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.events { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .95rem; }
.events th, .events td { text-align: left; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.events thead th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; background: var(--surface-2); }
.events tbody th { font-weight: 700; white-space: nowrap; }
.events td { color: var(--ink-2); }
.events td:last-child { white-space: nowrap; color: var(--ink-3); font-size: .86rem; }
.events tr:last-child th, .events tr:last-child td { border-bottom: 0; }

/* businesses */
.biz__list { display: grid; gap: 12px; margin-top: 2.4rem; }
.bizcard {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 1.2rem; align-items: center;
  min-height: 86px; padding: 1.1rem 1.3rem; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; color: inherit; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.bizcard:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.bizcard:focus-visible { outline: 3px solid var(--tick); outline-offset: 3px; }
.bizcard__av { width: 52px; height: 52px; border-radius: 16px; background: var(--acc); color: #1b1407; display: grid; place-items: center; font-weight: 800; font-family: var(--f-display); font-size: 1.05rem; }
.bizcard__txt { min-width: 0; }
.bizcard__txt b { display: block; font-family: var(--f-display); font-size: 1.35rem; letter-spacing: -.02em; }
.bizcard__txt small { color: var(--ink-3); font-size: .9rem; }
.bizcard__hours { font-size: 1.25rem; color: var(--ink-2); white-space: nowrap; }
.bizcard__go { width: 24px; height: 24px; color: var(--ink-3); transition: transform .2s var(--ease), color .2s; }
.bizcard:hover .bizcard__go { transform: translateX(4px); color: var(--ink); }
/* v4: la tarjeta lleva a la página de reservas; el CTA toma el color del negocio */
.bizcard__cta {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  font-size: .86rem; font-weight: 700; padding: .6rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); transition: background-color .2s var(--ease), color .2s var(--ease);
}
.bizcard__cta .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.bizcard:hover .bizcard__cta { background: var(--acc); color: #1b1407; }
.bizcard:hover .bizcard__cta .icon { transform: translateX(3px); }
.biz__owner { margin-top: 1.4rem; color: var(--ink-3); font-size: .94rem; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.biz__owner a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .bizcard { grid-template-columns: auto minmax(0, 1fr); gap: .5rem 1rem; }
  .bizcard__hours { grid-column: 2 / 3; grid-row: 2; font-size: 1.05rem; white-space: normal; }
  .bizcard__cta { grid-column: 1 / -1; grid-row: 3; justify-content: center; margin-top: .5rem; padding: .75rem 1rem; }
}

/* cta */
.cta { padding-inline: var(--gutter); padding-block: clamp(72px, 10vw, 140px); }
.cta__in {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(32px, 6vw, 72px);
  border-radius: 32px; background: var(--ink); color: var(--paper);
  display: grid; gap: 1.2rem; position: relative; overflow: hidden;
}
.cta__in::after {
  content: "17:15"; position: absolute; right: -.04em; bottom: -.22em; font-family: var(--f-time); font-weight: 800;
  font-size: clamp(8rem, 22vw, 17rem); line-height: 1; color: rgba(255,255,255,.06); pointer-events: none;
}
:root[data-theme="dark"] .cta__in { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta__in { background: var(--surface); color: var(--ink); border: 1px solid var(--line); } }
.cta h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); max-width: 18em; font-weight: 700; letter-spacing: -.03em; position: relative; z-index: 1; }
.cta p { max-width: 36em; opacity: .78; position: relative; z-index: 1; }
.cta__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: .6rem; position: relative; z-index: 1; }
.cta .btn--primary { --btn-bg: var(--tick); --btn-fg: #04111c; --btn-bd: var(--tick); }
.cta .btn:not(.btn--primary) { --btn-bg: transparent; --btn-fg: inherit; --btn-bd: currentColor; }

/* footer */
.foot { padding-inline: var(--gutter); padding-block: 0 calc(48px + env(safe-area-inset-bottom, 0px)); }
.foot__in { max-width: var(--maxw); margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: baseline; color: var(--ink-3); font-size: .88rem; }
.foot__in a { color: var(--ink-2); }
.foot__small { flex-basis: 100%; font-size: .78rem; }

/* ------------------------------------------- v4.1 · atajos a /reservar */
/* El reparto de la barra lo sigue haciendo .nav__links (margin-left:auto). */
.nav__cita .icon { color: var(--tick); }

.section__cta { margin-top: 18px; }
.section__cta .btn .icon { transition: transform .2s var(--ease-out); }
.section__cta .btn:hover .icon { transform: translateX(3px); }

.biz__all { display: flex; justify-content: center; margin: 22px 0 6px; }
.biz__all .btn .icon { transition: transform .2s var(--ease-out); }
.biz__all .btn:hover .icon { transform: translateX(3px); }

.foot__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot__links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.foot__links a:hover { color: var(--pen); text-decoration: underline; }

/* En móvil la navbar oculta los enlaces: «Pedir cita» toma el margen
   automático y «Acceso negocios» queda a su lado, los dos compactos. */
@media (max-width: 880px) {
  .nav .nav__cita { margin-left: auto; }
  .nav .nav__cita + .btn { margin-left: 0; }
}
@media (max-width: 560px) {
  .nav__cita .icon { display: none; }
  .nav__in { gap: 8px; }
}

/* ------------------------------------------- v4.3 · franja para clientes */
/* La portada es ahora la explicación para negocios. Si un cliente llega
   aquí buscando pedir cita, esta franja le lleva directo a /reservar. */
.paracliente { margin: 0; background: var(--ink); color: var(--paper); }
.paracliente a {
  max-width: var(--maxw); margin: 0 auto; min-height: 52px; padding: .55rem var(--gutter);
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  color: inherit; text-decoration: none; font-size: 1rem; text-align: center;
}
.paracliente b { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--tick); }
.paracliente .icon { width: 1.25em; height: 1.25em; color: var(--tick); }
.paracliente a:hover b { text-decoration-thickness: 2px; }
.paracliente a:focus-visible { outline: 3px solid var(--tick); outline-offset: -3px; }
:root[data-theme="dark"] .paracliente { background: var(--surface-2); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .paracliente { background: var(--surface-2); color: var(--ink); } }

/* Tarjetas «Pruébalo» (reutilizan .bizcard) */
#prueba .bizcard__av .icon { width: 26px; height: 26px; stroke-width: 2; }
#prueba .bizcard { grid-template-columns: auto minmax(0, 1fr) auto; }
#prueba .bizcard__txt small { display: block; margin-top: .25rem; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 720px) {
  #prueba .bizcard { grid-template-columns: auto minmax(0, 1fr); }
  #prueba .bizcard__cta { grid-row: 2; }
}
/* Móvil estrecho: logo + «Pedir cita» + «Acceso negocios» sin que se parta */
.nav .brand__txt { white-space: nowrap; }
@media (max-width: 400px) {
  .nav__in { gap: 8px; }
  .nav .brand__txt { display: none; }
  .nav .btn--sm { padding: 0 .7rem; }
}
