/* ============================================================
   Cliniza — landing
   Sistema de color heredado del panel de citas del piloto.
   REGLA ÚNICA: el azafrán significa "sin confirmar / se te escapa".
   No se usa para botones, enlaces ni decoración. Nunca.
   ============================================================ */

/* ---------------- Tipografías propias ----------------
   Servidas desde este dominio, no desde fonts.gstatic.com: así ninguna IP de
   visitante sale hacia Google. El `unicode-range` hace que latin-ext solo se
   descargue si aparece un carácter que lo necesite — con español, nunca.
   Fraunces e Instrument Sans son SIL Open Font License 1.1 (ver fuentes/LICENCIAS.md).
   ------------------------------------------------------ */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fuentes/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fuentes/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fuentes/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fuentes/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --tinta:        #1F1833;
  --tinta-media:  #6B6280;
  --tinta-suave:  #9A93AB;
  --porcelana:    #FAF9F7;
  --bruma:        #EFEBF3;
  --superficie:   #FFFFFF;
  --linea:        #E6E2EC;
  --linea-fuerte: #D6D0E2;

  --azafran:       #D98E04;
  --azafran-texto: #8A5A02;
  --azafran-tenue: #FDF4E0;

  --verdigris:       #3F7A6E;
  --verdigris-hondo: #2F5C53;
  --verdigris-claro: #9FD6C7;
  --verdigris-tenue: #EFF5F3;

  --radio-xs:    6px;
  --radio-sm:    10px;
  --radio-md:    16px;
  --radio-panel: 22px;
  --radio-card:  28px;
  --radio-pill:  9999px;

  --radio:       var(--radio-sm);
  --radio-panel: var(--radio-card);

  --curva-apple:  cubic-bezier(0.16, 1, 0.3, 1);
  --curva-spring: cubic-bezier(0.23, 1, 0.32, 1);  /* was bouncy 1.56 — unified to strong ease-out */
  --ease-out:     cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out:  cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer:  cubic-bezier(0.32, 0.72, 0, 1);
  --sombra-suave: 0 2px 4px rgba(31, 24, 51, 0.02), 0 12px 28px -6px rgba(31, 24, 51, 0.06);
  --sombra-alta:  0 20px 48px -10px rgba(31, 24, 51, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);

  --sans:  'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;

  --envoltorio: 1140px;
  --canal: clamp(1.25rem, 5vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--porcelana);
}

body {
  margin: 0;
  background-color: transparent;
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

[hidden] { display: none !important; }

.tabular { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--tinta);
  outline-offset: 3px;
  border-radius: var(--radio);
}

.saltar {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: .75rem 1rem;
  background: var(--tinta);
  color: var(--porcelana);
  text-decoration: none;
}
.saltar:focus { left: 0; }

/* ---------------- Fondo Ambiental Dinámico (Floating Aura) ---------------- */

.fondo-aura {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0; /* Por encima del lienzo base, por debajo del contenido */
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.aura-globo {
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  -webkit-filter: blur(65px);
  opacity: 0.85;
  will-change: transform;
}

.aura-globo--1 {
  width: clamp(420px, 48vw, 750px);
  height: clamp(420px, 48vw, 750px);
  top: -6%;
  left: -8%;
  background: radial-gradient(circle, rgba(63, 122, 110, 0.28) 0%, rgba(159, 214, 199, 0.22) 35%, transparent 70%);
  animation: aura-flotar-1 26s ease-in-out infinite alternate;
}

.aura-globo--2 {
  width: clamp(440px, 50vw, 780px);
  height: clamp(440px, 50vw, 780px);
  top: 30%;
  right: -10%;
  background: radial-gradient(circle, rgba(180, 150, 215, 0.3) 0%, rgba(220, 205, 235, 0.18) 40%, transparent 70%);
  animation: aura-flotar-2 32s ease-in-out infinite alternate;
}

.aura-globo--3 {
  width: clamp(380px, 44vw, 680px);
  height: clamp(380px, 44vw, 680px);
  bottom: 0%;
  left: 12%;
  background: radial-gradient(circle, rgba(135, 205, 190, 0.25) 0%, rgba(245, 225, 200, 0.32) 45%, transparent 70%);
  animation: aura-flotar-3 28s ease-in-out infinite alternate;
}

@keyframes aura-flotar-1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate3d(65px, 50px, 0) scale(1.08) rotate(12deg);
  }
  100% {
    transform: translate3d(-35px, 85px, 0) scale(0.96) rotate(-8deg);
  }
}

@keyframes aura-flotar-2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate3d(-75px, -60px, 0) scale(1.1) rotate(-15deg);
  }
  100% {
    transform: translate3d(-25px, 45px, 0) scale(0.94) rotate(8deg);
  }
}

@keyframes aura-flotar-3 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(60px, -70px, 0) scale(1.09);
  }
  100% {
    transform: translate3d(-45px, -35px, 0) scale(0.95);
  }
}

.aura-raton {
  position: absolute;
  top: 0;
  left: 0;
  width: 440px;
  height: 440px;
  margin-top: -220px;
  margin-left: -220px;
  border-radius: 50%;
  filter: blur(50px);
  -webkit-filter: blur(50px);
  background: radial-gradient(circle, rgba(63, 122, 110, 0.38) 0%, rgba(159, 214, 199, 0.25) 35%, rgba(180, 150, 215, 0.15) 55%, transparent 72%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.5s var(--curva-apple);
}

.aura-raton--visible {
  opacity: 0.9;
}

@media (hover: none) or (pointer: coarse) {
  .aura-raton {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aura-globo,
  .aura-raton {
    animation: none;
    transform: none;
    display: none !important;
  }
}

.barra,
main,
footer {
  position: relative;
  z-index: 1;
}

/* ---------------- Estructura ---------------- */

.envoltorio {
  width: 100%;
  max-width: var(--envoltorio);
  margin-inline: auto;
  padding-inline: var(--canal);
}

.franja { padding-block: clamp(4rem, 8.5vw, 10rem); }
.franja--hero { padding-block: clamp(2.75rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem); }
.franja--bruma {
  background: rgba(239, 235, 243, 0.88);
}
.franja--fina { padding-block: clamp(3rem, 6vw, 4.5rem); }

.franja--tinta {
  background: var(--tinta);
  color: var(--porcelana);
  position: relative;
  z-index: 1;
}

.seccion-cabeza { max-width: 46ch; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.seccion-cabeza h2 { margin-bottom: 1rem; }
.seccion-entrada {
  max-width: 54ch;
  color: var(--tinta-media);
  font-size: 1.0625rem;
}
.franja--tinta .seccion-entrada { color: #B6ADC8; }

h2 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* ---------------- Barra superior ---------------- */

.barra {
  position: sticky;
  top: 1rem;
  z-index: 40;
  max-width: calc(var(--envoltorio) - 2rem);
  margin-inline: auto;
  border-radius: var(--radio-pill);
  background: rgba(250, 249, 247, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(31, 24, 51, 0.06);
  box-shadow: 0 4px 20px -4px rgba(31, 24, 51, 0.06);
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

.barra-fila {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 56px;
  padding-inline: 1.25rem;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  margin-right: auto;
  transition: transform .2s var(--curva-apple);
}
.marca:hover { transform: scale(1.02); }
.marca:active { transform: scale(0.98); }
.marca-glifo { width: 28px; height: 28px; display: block; border-radius: 8px; }
.marca-nombre {
  font-family: var(--display);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.barra-nav { display: flex; gap: .6rem; align-items: center; }
.barra-nav a {
  font-size: .9375rem;
  color: var(--tinta-media);
  text-decoration: none;
  padding: .4rem .85rem;
  border-radius: var(--radio-pill);
  transition: color .2s var(--curva-apple), background-color .2s var(--curva-apple), transform .15s var(--curva-apple);
}
.barra-nav a:hover {
  color: var(--tinta);
  background: rgba(31, 24, 51, 0.05);
}
.barra-nav a:active {
  transform: scale(0.96);
}

/* ---------------- Botones Apple Style ---------------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radio-pill);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(31, 24, 51, 0.04);
  transition: transform .2s var(--curva-apple), box-shadow .25s var(--curva-apple), background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.boton:hover {
  transform: translateY(-1.5px);
}
.boton:active {
  transform: scale(0.96);
  transition: transform 100ms var(--curva-apple);
}

.boton--wa {
  background: var(--verdigris);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(63, 122, 110, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.boton--wa:hover {
  background: var(--verdigris-hondo);
  box-shadow: 0 8px 26px rgba(63, 122, 110, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.boton--linea {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--linea-fuerte);
  color: var(--tinta);
}
.boton--linea:hover {
  background: #FFFFFF;
  border-color: var(--tinta);
  box-shadow: 0 6px 20px rgba(31, 24, 51, 0.06);
}

.boton--compacto { padding: .55rem 1.15rem; font-size: .875rem; }
.boton--ancho { width: 100%; margin-top: .5rem; }

.glifo-wa { width: 19px; height: 19px; flex: none; }

/* ---------------- Eyebrows & Píldoras 21st.dev ---------------- */

.etiqueta-seccion {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--verdigris-hondo);
  margin-bottom: .65rem;
}
.seccion-cabeza--centro {
  text-align: center;
  margin-inline: auto;
}

.pildora-estado {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .85rem;
  border-radius: 99px;
  background: var(--verdigris-tenue);
  border: 1px solid rgba(63, 122, 110, 0.28);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--verdigris-hondo);
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(63, 122, 110, 0.08);
}

.punto-pulso {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verdigris);
  flex: none;
}
.punto-pulso::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--verdigris);
  opacity: .4;
  animation: pulso 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes pulso {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ---------------- 21st.dev Spotlight Card ---------------- */

.spotlight-card {
  position: relative;
  border-radius: var(--radio-panel);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(31, 24, 51, 0.06), 0 2px 8px -2px rgba(31, 24, 51, 0.04);
  transition: transform .25s var(--curva-apple), box-shadow .25s var(--curva-apple), border-color .25s var(--ease-out);
}
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(63, 122, 110, 0.12), transparent 75%);
  opacity: 0;
  transition: opacity .35s var(--ease-out);
  pointer-events: none;
}
.spotlight-card:hover {
  border-color: rgba(63, 122, 110, 0.35);
  box-shadow: 0 12px 32px -4px rgba(31, 24, 51, 0.06);
  transform: translateY(-2px);
}
.spotlight-card:hover::before {
  opacity: 1;
}

/* ---------------- Hero ---------------- */

.hero-rejilla {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.hero-texto h1 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin-bottom: 1.4rem;
}

.hero-entrada {
  max-width: 46ch;
  font-size: 1.1rem;
  color: var(--tinta-media);
}

.hero-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero-pie {
  margin-top: 1.1rem;
  font-size: .9375rem;
  color: var(--tinta-suave);
}
.hero-pie .tabular { color: var(--tinta-media); }

/* --- Tira de compatibilidad de software de mostrador --- */
.hero-compatibilidad {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(31, 24, 51, 0.08);
}
.compat-titulo {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tinta-suave);
  margin-bottom: .75rem;
}
.compat-lista {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.compat-pildora {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--tinta-media);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--linea);
  padding: .35rem .75rem;
  border-radius: var(--radio-pill);
  box-shadow: 0 1px 2px rgba(31, 24, 51, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .2s var(--curva-apple), border-color .2s var(--ease-out), color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.compat-pildora:hover {
  transform: translateY(-1px);
  border-color: var(--verdigris-claro);
  color: var(--tinta);
  box-shadow: 0 3px 8px rgba(63, 122, 110, 0.12);
}
.compat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verdigris-claro);
}

/* ---------------- Demo: agenda + móvil ---------------- */

.demo { position: relative; }

/* Haz conector físico de sincronización (21st.dev) */
.demo-conector {
  position: absolute;
  top: 175px;
  right: 275px;
  width: 130px;
  height: 4px;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s var(--ease-out);
}
.demo--sincronizando .demo-conector {
  opacity: 1;
}
.demo-conector-haz {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(270deg, var(--verdigris-claro) 0%, rgba(63, 122, 110, 0.85) 60%, transparent 100%);
  box-shadow: 0 0 12px rgba(63, 122, 110, 0.7), 0 0 24px rgba(159, 214, 199, 0.4);
  transform: scaleX(0);
  transform-origin: right center;
}
.demo--sincronizando .demo-conector-haz {
  animation: haz-disparo 0.55s var(--curva-apple) forwards;
}
.demo-conector-chispa {
  position: absolute;
  left: 0;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--verdigris-claro);
  box-shadow: 0 0 14px var(--verdigris);
  opacity: 0;
}
.demo--sincronizando .demo-conector-chispa {
  animation: chispa-impacto 0.55s var(--curva-apple) forwards;
}

@keyframes haz-disparo {
  0%   { transform: scaleX(0); opacity: 0; }
  30%  { opacity: 1; }
  70%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@keyframes chispa-impacto {
  0%   { transform: scale(0.85); opacity: 0; }
  50%  { opacity: 1; }
  80%  { transform: scale(1.8); opacity: 1; }
  100% { transform: scale(0.5); opacity: 0; }
}

.demo-agenda {
  background: var(--superficie);
  border: 1px solid rgba(31, 24, 51, 0.08);
  border-radius: var(--radio-card);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--sombra-alta);
  transition: transform .35s var(--curva-apple), box-shadow .35s var(--curva-apple);
}
.demo-agenda:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 64px -14px rgba(31, 24, 51, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.agenda-cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--linea);
}

.agenda-titulo {
  font-family: var(--display);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.agenda-cuenta {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  text-align: right;
}
.agenda-cifra {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--azafran);
  transition: color .4s var(--curva-apple), transform .3s var(--curva-apple);
}
/* Cuando ya no queda nada en azafrán, el contador deja de gritar. */
.agenda-cifra--resuelta { color: var(--verdigris); }
.agenda-cuenta-txt {
  font-size: .8125rem;
  line-height: 1.25;
  color: var(--tinta-suave);
}

.agenda-rejilla {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .65rem;
  padding-block: 1.1rem;
}

.dia { min-width: 0; }

.dia-cabeza {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  padding-bottom: .55rem;
  margin-bottom: .45rem;
  border-bottom: 1px solid var(--linea);
}
.dia-nombre { font-size: .75rem; color: var(--tinta-suave); text-transform: lowercase; }
.dia-num { font-size: .875rem; font-weight: 600; }

.hueco {
  padding: .5rem .6rem;
  margin-bottom: .45rem;
  border-radius: var(--radio-sm);
  border-left: 3px solid transparent;
  font-size: .75rem;
  line-height: 1.35;
  transition: background-color .35s var(--curva-apple), border-color .35s var(--curva-apple), transform .2s var(--curva-apple), box-shadow .2s var(--curva-apple);
}
.hueco:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 6px rgba(31, 24, 51, 0.04);
}
.hueco-hora { display: block; font-weight: 600; font-size: .8125rem; }
.hueco-quien { display: block; color: var(--tinta-media); }

/* confirmada = callada */
.hueco--ok {
  background: var(--porcelana);
  border-left-color: var(--verdigris-claro);
}

/* sin confirmar = ruidosa. Único uso del azafrán. */
.hueco--pendiente {
  background: var(--azafran-tenue);
  border-left-color: var(--azafran);
  color: var(--azafran-texto);
}
.hueco--pendiente .hueco-quien { color: var(--azafran-texto); }

.hueco--foco {
  box-shadow: 0 0 0 2px var(--azafran);
  animation: pulso-marta 2.4s var(--ease-in-out) infinite;
}

@keyframes pulso-marta {
  0%, 100% { box-shadow: 0 0 0 2px var(--azafran); }
  50% { box-shadow: 0 0 0 4px rgba(217, 142, 4, 0.4), 0 0 10px rgba(217, 142, 4, 0.2); }
}

.hueco--ok.hueco--foco {
  box-shadow: 0 0 0 2px var(--verdigris-claro);
  animation: flash-marta 0.25s var(--curva-apple) forwards;
}

.hueco--impacto {
  animation: impacto-haz 0.2s var(--ease-out) forwards !important;
}

@keyframes impacto-haz {
  0%   { transform: scale(1); }
  28%  { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(63, 122, 110, 0.55), 0 0 22px rgba(63, 122, 110, 0.45); }
  100% { transform: scale(1); box-shadow: 0 0 0 1px var(--verdigris-claro); }
}

@keyframes flash-marta {
  0% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(63, 122, 110, 0.45); }
  100% { transform: scale(1); box-shadow: 0 0 0 1px var(--verdigris-claro); }
}

.agenda-leyenda {
  display: flex;
  gap: 1.1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--linea);
  font-size: .75rem;
  color: var(--tinta-suave);
}
.pastilla { display: inline-flex; align-items: center; gap: .45rem; }
.pastilla::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
}
.pastilla--pendiente::before { background: var(--azafran); }
.pastilla--ok::before { background: var(--verdigris-claro); }

/* --- móvil iPhone Style con Realismo Físico (GestoDental inspired) --- */

.movil {
  width: min(305px, 100%);
  margin: -5.5rem -0.75rem 0 auto;
  position: relative;
  z-index: 2;
  background: #171324;
  border-radius: 42px;
  padding: .7rem;
  box-shadow: 0 28px 70px -15px rgba(31, 24, 51, .48), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  border: 3.5px solid #2B2440;
  transition: transform .35s var(--curva-apple), box-shadow .35s var(--curva-apple);
}
.movil:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 36px 80px -18px rgba(31, 24, 51, .58), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

/* Botones laterales físicos */
.movil-btn-lateral {
  position: absolute;
  background: #2B2440;
}
.movil-btn-lateral--vol1 {
  left: -7px;
  top: 78px;
  width: 4px;
  height: 34px;
  border-radius: 3px 0 0 3px;
}
.movil-btn-lateral--vol2 {
  left: -7px;
  top: 122px;
  width: 4px;
  height: 34px;
  border-radius: 3px 0 0 3px;
}
.movil-btn-lateral--power {
  right: -7px;
  top: 96px;
  width: 4px;
  height: 48px;
  border-radius: 0 3px 3px 0;
}

.movil-pantalla {
  background: #0E0A17;
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Dynamic Island */
.movil-isla {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 20px;
  background: #000000;
  border-radius: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
}
.isla-lente {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111424;
  box-shadow: inset 0 0 2px rgba(63, 122, 110, 0.4);
}

/* Barra de estado */
.movil-barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 1.1rem .35rem;
  font-size: .75rem;
  color: #B6ADC8;
  position: relative;
  z-index: 10;
}
.movil-hora { font-weight: 600; font-size: .8125rem; color: #E8E4F0; }

.movil-senales {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.senal-barra {
  width: 12px;
  height: 9px;
  display: inline-block;
  background: currentColor;
  clip-path: polygon(0 80%, 25% 80%, 25% 60%, 50% 60%, 50% 40%, 75% 40%, 75% 20%, 100% 20%, 100% 100%, 0 100%);
}
.senal-wifi {
  width: 11px;
  height: 9px;
  border-radius: 50% 50% 0 0;
  border-top: 2px solid currentColor;
  border-right: 2px solid transparent;
  border-left: 2px solid transparent;
  display: inline-block;
}
.senal-bateria {
  width: 18px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px;
  display: inline-flex;
}
.bateria-carga {
  width: 75%;
  height: 100%;
  background: #28C840;
  border-radius: 1px;
}

/* Cabecera de chat WhatsApp con avatar y pulso activo (GestoDental style) */
.movil-chat-cabecera {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .4rem .9rem .65rem;
  background: rgba(31, 24, 51, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--verdigris), var(--verdigris-hondo));
  display: grid;
  place-items: center;
  flex: none;
}
.chat-avatar-icono { font-size: .85rem; }

/* Onda de pulso expansiva (GestoDental pulse-ring) */
.chat-avatar-pulso {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--verdigris-claro);
  animation: pulse-ring 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.chat-meta { min-width: 0; }
.movil-quien { font-weight: 600; font-size: .8125rem; color: #FAF9F7; margin: 0; line-height: 1.2; }
.movil-sub { font-size: .6875rem; color: #9FD6C7; margin: 0; display: flex; align-items: center; gap: .3rem; }
.punto-activo {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28C840;
  display: inline-block;
  box-shadow: 0 0 6px #28C840;
}

.movil-hilo {
  background: #EFE9E1;
  padding: .85rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* Micro-chip de audio transcrito (21st.dev / dolor de audios en recepción) */
.burbuja-audio-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .6875rem;
  font-weight: 600;
  color: var(--verdigris-hondo);
  background: #DCEEE8;
  border: 1px solid rgba(63, 122, 110, 0.28);
  border-radius: var(--radio-pill);
  padding: .28rem .6rem;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(31, 24, 51, 0.04);
  animation: llega .45s cubic-bezier(.2, .7, .3, 1) .25s both;
}
.audio-chip-icono { font-size: .75rem; }
.audio-chip-check { color: var(--verdigris); font-weight: 700; }

/* Ondas ecualizadoras de audio/mensaje entrante (GestoDental style) */
.burbuja-ondas {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: .45rem;
  height: 14px;
}
.onda-bar {
  width: 2.5px;
  border-radius: 2px;
  background: var(--verdigris);
  animation: onda-baile 1.4s ease-in-out infinite alternate;
}
.onda-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.onda-bar:nth-child(2) { height: 12px; animation-delay: 0.3s; }
.onda-bar:nth-child(3) { height: 8px; animation-delay: 0.15s; }
.onda-bar:nth-child(4) { height: 14px; animation-delay: 0.4s; }
.onda-bar:nth-child(5) { height: 9px; animation-delay: 0.2s; }
.onda-bar:nth-child(6) { height: 11px; animation-delay: 0.35s; }

@keyframes onda-baile {
  0% { transform: scaleY(0.4); opacity: 0.6; }
  100% { transform: scaleY(1.2); opacity: 1; }
}

.burbuja {
  background: #FFFFFF;
  border-radius: 18px 18px 18px 6px;
  padding: .75rem .85rem .6rem;
  max-width: 95%;
  box-shadow: 0 2px 8px rgba(31, 24, 51, .06);
}
.burbuja-txt { font-size: .8125rem; line-height: 1.45; }
.burbuja-hora {
  margin-top: .25rem;
  text-align: right;
  font-size: .6875rem;
  color: var(--tinta-suave);
}
.doble-check { color: var(--verdigris); }

.burbuja-botones {
  display: flex;
  gap: .45rem;
  margin-top: .75rem;
  background: transparent;
  border-top: 0;
  padding-top: 0;
}
.burbuja-boton {
  appearance: none;
  border: 1px solid rgba(63, 122, 110, 0.3);
  background: #FFFFFF;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--verdigris-hondo);
  padding: .5rem .85rem;
  border-radius: var(--radio-pill);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(31, 24, 51, 0.05);
  transition: transform .15s var(--curva-apple), background-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.burbuja-boton:hover {
  background: var(--verdigris-tenue);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(63, 122, 110, 0.18);
}
.burbuja-boton:active {
  transform: scale(0.95);
}
.burbuja-boton:last-child { border-radius: var(--radio-pill); }
.burbuja-boton--sec {
  color: var(--tinta-media);
  border-color: var(--linea-fuerte);
}
.burbuja-boton--sec:hover {
  background: #F4F1EA;
  color: var(--tinta);
}

.burbuja--mia {
  align-self: flex-end;
  background: #D9F2E2;
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 2px 8px rgba(47, 92, 83, 0.08);
}

.burbuja--entra { animation: llega .55s cubic-bezier(.2, .7, .3, 1) .5s both; }
.burbuja--mia:not([hidden]) { animation: llega .35s cubic-bezier(.2, .7, .3, 1) both; }

@keyframes llega {
  from { opacity: 0; transform: translateY(9px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.demo-pista {
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--tinta-media);
  text-align: right;
}
.demo-pista b { color: var(--tinta); font-weight: 600; }

.reinicio {
  display: block;
  margin: .4rem 0 0 auto;
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--linea-fuerte);
  padding: 0 0 2px;
  font: inherit;
  font-size: .875rem;
  color: var(--tinta-media);
  cursor: pointer;
}
.reinicio:hover { color: var(--tinta); border-bottom-color: var(--tinta); }

/* ---------------- Cifras del sector ---------------- */

.cifras { display: grid; gap: 2.5rem; }

.cifra {
  display: grid;
  gap: .4rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linea-fuerte);
}

.cifra-num {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  font-size: clamp(2.3rem, 5vw, 3.1rem);
  line-height: .95;
  letter-spacing: -0.03em;
  color: var(--azafran);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cifra-pct { font-size: .5em; margin-left: .05em; }

.cifra-barra {
  height: 6px;
  background: var(--linea);
  border-radius: 99px;
  overflow: hidden;
  margin-top: .6rem;
}
/* El ancho va en clase y no en `style=`, para que la CSP pueda prohibir
   los estilos en línea sin excepciones. */
.cifra-barra span {
  display: block;
  height: 100%;
  background: var(--azafran);
  border-radius: 99px;
}
.cifra-barra--22 span { width: 22%; }
.cifra-barra--40 span { width: 40%; }
.cifra-barra--50 span { width: 50%; }

.cifra-cuerpo h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: .5rem;
  max-width: 38ch;
  text-wrap: balance;
}
.cifra-cuerpo p { max-width: 58ch; color: var(--tinta-media); font-size: 1rem; }
.cifra-fuente { margin-top: .6rem; font-size: .875rem; }
.cifra-fuente a { color: var(--tinta-suave); text-decoration-color: var(--linea-fuerte); text-underline-offset: 3px; }
.cifra-fuente a:hover { color: var(--tinta); }

/* ---------------- Calculadora de Citas Perdidas (21st.dev) ---------------- */

.franja--calculadora {
  background: #F4F0E8;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}

.calculadora-caja {
  background: var(--superficie);
  border: 1px solid rgba(31, 24, 51, 0.08);
  border-radius: var(--radio-card);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--sombra-alta);
  transition: transform .35s var(--curva-apple), box-shadow .35s var(--curva-apple);
}
.calculadora-caja:hover {
  box-shadow: 0 28px 64px -12px rgba(31, 24, 51, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.calculadora-control {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--linea);
}

.calculadora-fila-etiqueta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calculadora-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--tinta);
}

.calculadora-valor {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--verdigris-hondo);
}

.calculadora-slider-wrap {
  position: relative;
  margin-block: .85rem;
}

.calculadora-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  background: var(--linea-fuerte);
  border-radius: var(--radio-pill);
  outline: none;
  cursor: pointer;
  transition: background .2s var(--ease-out);
}
.calculadora-slider:focus-visible {
  outline: 2px solid var(--verdigris);
  outline-offset: 4px;
}
.calculadora-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--verdigris);
  border: 3.5px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(31, 24, 51, 0.28);
  cursor: pointer;
  transition: transform .2s var(--curva-spring), background-color .15s var(--ease-out), box-shadow .2s var(--ease-out);
}
.calculadora-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  background: var(--verdigris-hondo);
  box-shadow: 0 6px 18px rgba(63, 122, 110, 0.4);
}
.calculadora-slider:active::-webkit-slider-thumb {
  transform: scale(1.28);
}
.calculadora-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--verdigris);
  border: 3.5px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(31, 24, 51, 0.28);
  cursor: pointer;
  transition: transform .2s var(--curva-spring), background-color .15s var(--ease-out), box-shadow .2s var(--ease-out);
}

.calculadora-slider-marcas {
  display: flex;
  justify-content: space-between;
  font-size: .8125rem;
  color: var(--tinta-suave);
  margin-top: .6rem;
}

.calculadora-ayuda {
  font-size: .875rem;
  color: var(--tinta-suave);
  margin-top: .75rem;
}

/* Medidor visual de aforo / ocupación de cabina recuperada (21st.dev) */
.calc-aforo-caja {
  margin-top: 1.5rem;
  padding: 1rem 1.35rem;
  background: var(--porcelana);
  border: 1px solid var(--linea);
  border-radius: var(--radio-md);
}
.calc-aforo-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .6rem;
}
.calc-aforo-titulo {
  font-size: .875rem;
  font-weight: 600;
  color: var(--tinta);
}
.calc-aforo-pct {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--verdigris-hondo);
}
.calc-aforo-track {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
}
.calc-aforo-svg {
  width: 100%;
  height: 8px;
  display: block;
}
.calc-aforo-bg { fill: var(--linea-fuerte); }
.calc-aforo-bar {
  fill: var(--verdigris);
  transition: width .25s var(--curva-apple);
}

.calculadora-resultados {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.calc-tarjeta {
  background: var(--porcelana);
  border: 1px solid rgba(31, 24, 51, 0.06);
  border-radius: var(--radio-panel);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform .25s var(--curva-apple), box-shadow .25s var(--curva-apple);
}
.calc-tarjeta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(31, 24, 51, 0.06);
}
.calc-tarjeta--riesgo {
  background: var(--azafran-tenue);
  border-color: rgba(217, 142, 4, 0.25);
}
.calc-tarjeta--recuperada {
  background: var(--verdigris-tenue);
  border-color: rgba(63, 122, 110, 0.25);
}

.calc-tarjeta-sup {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tinta-media);
  margin-bottom: .3rem;
}
.calc-tarjeta--riesgo .calc-tarjeta-sup { color: var(--azafran-texto); }
.calc-tarjeta--recuperada .calc-tarjeta-sup { color: var(--verdigris-hondo); }

.calc-tarjeta-cifra {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--tinta);
  margin-bottom: .35rem;
}
.calc-tarjeta--riesgo .calc-tarjeta-cifra { color: var(--azafran); }
.calc-tarjeta--recuperada .calc-tarjeta-cifra { color: var(--verdigris); }

.calc-tarjeta-pie {
  font-size: .9375rem;
  color: var(--tinta-media);
}

.calculadora-cta {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--linea);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.calculadora-cta-txt {
  font-size: 1rem;
  font-weight: 500;
  color: var(--tinta-media);
}

/* ---------------- Bento Grid 21st.dev Apple Style ---------------- */

.bento-grid {
  display: grid;
  gap: 1.6rem;
}

.bento-tarjeta {
  background: var(--superficie);
  border: 1px solid rgba(31, 24, 51, 0.08);
  border-radius: var(--radio-card);
  padding: clamp(1.75rem, 3.8vw, 2.5rem);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra-suave);
  transition: transform .35s var(--curva-apple), box-shadow .35s var(--curva-apple), border-color .25s var(--ease-out);
}
.bento-tarjeta:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-alta);
  border-color: rgba(63, 122, 110, 0.3);
}

.bento-cabecera {
  margin-bottom: .85rem;
}

.bento-tag {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--verdigris-hondo);
  background: var(--verdigris-tenue);
  padding: .25rem .7rem;
  border-radius: var(--radio-pill);
  margin-bottom: .85rem;
}

.bento-tarjeta h3 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--tinta);
}

.bento-descripcion {
  color: var(--tinta-media);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  max-width: 54ch;
}

/* Micro-interfaces dentro del Bento */
.bento-micro-wa {
  margin-top: auto;
  background: var(--porcelana);
  border: 1px solid var(--linea);
  border-radius: var(--radio-md);
  padding: 1.2rem;
}
.bento-wa-globo {
  background: #FFFFFF;
  border-radius: 18px 18px 18px 4px;
  padding: .85rem 1rem;
  box-shadow: 0 2px 8px rgba(31, 24, 51, 0.04);
}
.bento-wa-remitente {
  font-size: .75rem;
  font-weight: 700;
  color: var(--verdigris);
  margin-bottom: .25rem;
}
.bento-wa-texto {
  font-size: .875rem;
  color: var(--tinta);
  line-height: 1.4;
}
.bento-wa-btn-fila {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}
.bento-wa-btn {
  font-size: .75rem;
  font-weight: 600;
  padding: .4rem .85rem;
  border-radius: var(--radio-pill);
  border: 1px solid var(--linea);
  color: var(--tinta-media);
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31, 24, 51, 0.03);
}
.bento-wa-btn--activo {
  background: var(--verdigris-tenue);
  border-color: var(--verdigris-claro);
  color: var(--verdigris-hondo);
}
.bento-wa-sincro {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--verdigris-hondo);
  font-weight: 500;
  margin-top: .85rem;
}
.punto-ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--verdigris);
}

/* Conmutador interactivo Día / Noche (21st.dev) */
.bento-noche-switch-wrap {
  display: inline-flex;
  gap: .3rem;
  background: var(--porcelana);
  padding: 3px;
  border-radius: var(--radio-pill);
  border: 1px solid var(--linea);
  margin-bottom: 1rem;
}
.bento-switch-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  color: var(--tinta-media);
  padding: .35rem .75rem;
  border-radius: var(--radio-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.bento-switch-btn--activo {
  background: #FFFFFF;
  color: var(--tinta);
  box-shadow: 0 1px 3px rgba(31, 24, 51, 0.08);
}
.bento-switch-btn:hover:not(.bento-switch-btn--activo) {
  color: var(--tinta);
}

.bento-micro-noche {
  margin-top: auto;
  background: var(--porcelana);
  border: 1px solid var(--linea);
  border-radius: var(--radio-md);
  padding: 1.2rem;
  transition: background-color .3s var(--curva-apple), border-color .3s var(--ease-out);
}
.bento-noche-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .7rem;
}
.bento-reloj {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--tinta-media);
}
.bento-noche-tag {
  font-size: .6875rem;
  font-weight: 600;
  background: #EAE6F0;
  color: var(--tinta-media);
  padding: .2rem .55rem;
  border-radius: var(--radio-pill);
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.bento-noche-msg {
  font-size: .875rem;
  color: var(--tinta-media);
  font-style: italic;
  margin-bottom: .75rem;
}
.bento-noche-resp {
  background: #FFFFFF;
  border-left: 3px solid var(--verdigris);
  padding: .75rem .9rem;
  border-radius: 0 14px 14px 0;
  box-shadow: 0 2px 6px rgba(31, 24, 51, 0.03);
  transition: border-left-color .3s var(--ease-out);
}
.bento-noche-check {
  display: block;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--verdigris);
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.bento-noche-resp p {
  font-size: .8125rem;
  color: var(--tinta);
  line-height: 1.4;
}

.bento-micro-pack {
  margin-top: auto;
  background: var(--porcelana);
  border: 1px solid var(--linea);
  border-radius: var(--radio-md);
  padding: 1.2rem;
}
.bento-pack-fila {
  display: flex;
  justify-content: space-between;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--tinta);
  margin-bottom: .6rem;
}
.bento-pack-progreso { color: var(--verdigris-hondo); }

/* Anillo de progreso circular Apple Health style (21st.dev) */
.bento-pack-visual {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: .4rem;
}
.bento-anillo-wrap {
  position: relative;
  width: 74px;
  height: 74px;
  flex: none;
}
.bento-anillo-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.anillo-track {
  fill: none;
  stroke: var(--linea);
  stroke-width: 7;
}
.anillo-fill {
  fill: none;
  stroke: var(--verdigris);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s var(--curva-spring);
}
.bento-anillo-centro {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 24px;
  font-weight: 700;
}
.anillo-num {
  font-size: 1.35rem;
  color: var(--tinta);
  line-height: 1;
}
.anillo-den {
  font-size: .8125rem;
  color: var(--tinta-suave);
}
.bento-pack-detalles {
  flex: 1;
  min-width: 0;
}
.bento-pack-barra {
  height: 7px;
  background: var(--linea);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .75rem;
}
.bento-pack-progreso-fill {
  display: block;
  height: 100%;
  width: 66%;
  background: var(--verdigris);
  border-radius: 99px;
}
.bento-pack-alerta {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8125rem;
  color: var(--tinta-media);
  background: #FFFFFF;
  padding: .55rem .8rem;
  border-radius: 12px;
  border: 1px solid var(--linea);
  box-shadow: 0 1px 3px rgba(31, 24, 51, 0.03);
}

/* ---------------- Comparativa Us vs Them Apple Style ---------------- */

.comparativa-rejilla {
  display: grid;
  gap: 1.6rem;
}

.comparativa-col {
  background: var(--superficie);
  border-radius: var(--radio-card);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra-suave);
  transition: transform .35s var(--curva-apple), box-shadow .35s var(--curva-apple);
}
.comparativa-col:hover {
  transform: translateY(-4px);
}

.comparativa-col--manual {
  border: 1px solid rgba(31, 24, 51, 0.08);
  background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(31, 24, 51, 0.02) 32px);
}

.comparativa-col--cliniza {
  border: 2px solid var(--verdigris);
  box-shadow: 0 16px 44px rgba(63, 122, 110, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
}
.comparativa-col--cliniza:hover {
  box-shadow: 0 24px 54px rgba(63, 122, 110, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.comparativa-cabecera {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--linea);
}

.comparativa-etiqueta-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .45rem;
}

.papel-postit {
  font-size: .6875rem;
  font-weight: 600;
  color: #7A5B18;
  background: #FFF5D6;
  border: 1px solid #EADBAC;
  border-radius: 4px;
  padding: .15rem .5rem;
  box-shadow: 0 1px 3px rgba(31, 24, 51, 0.05);
  transform: rotate(-1.5deg);
}

.badge-sincro {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--verdigris-hondo);
  background: var(--verdigris-tenue);
  border: 1px solid rgba(63, 122, 110, 0.28);
  border-radius: var(--radio-pill);
  padding: .2rem .6rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.punto-verde {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28C840;
  box-shadow: 0 0 6px #28C840;
}

.micro-anotacion {
  display: block;
  font-size: .75rem;
  font-style: italic;
  color: #9C7468;
  margin-top: .25rem;
}

.micro-check-tag {
  display: inline-block;
  font-size: .725rem;
  font-weight: 600;
  color: var(--verdigris-hondo);
  background: rgba(63, 122, 110, 0.08);
  border-radius: 4px;
  padding: .1rem .45rem;
  margin-top: .3rem;
}

.comparativa-etiqueta {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--tinta-suave);
}
.comparativa-etiqueta--destacada {
  color: var(--verdigris-hondo);
  background: var(--verdigris-tenue);
  padding: .25rem .75rem;
  border-radius: var(--radio-pill);
}

.comparativa-cabecera h3 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.comparativa-lista {
  display: grid;
  gap: 1.35rem;
}

.comparativa-lista li {
  display: flex;
  align-items: flex-start;
  gap: .95rem;
}

.comparativa-icono {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex: none;
  margin-top: .15rem;
}

.comparativa-icono--cruz {
  background: #F2EEEC;
  color: #8C7B76;
}

.comparativa-icono--check {
  background: var(--verdigris-tenue);
  color: var(--verdigris-hondo);
  border: 1px solid rgba(63, 122, 110, 0.25);
  box-shadow: 0 2px 6px rgba(63, 122, 110, 0.15);
}

.comparativa-lista strong {
  display: block;
  font-size: .95rem;
  color: var(--tinta);
  font-weight: 600;
  margin-bottom: .15rem;
}

.comparativa-lista p {
  font-size: .875rem;
  color: var(--tinta-media);
  line-height: 1.45;
}

/* ---------------- Acordeón FAQ Apple Grouped Style ---------------- */

.faq-lista {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: .85rem;
  border-top: 0;
}

.faq-item {
  background: var(--superficie);
  border: 1px solid rgba(31, 24, 51, 0.07);
  border-radius: var(--radio-panel);
  padding: 0 1.6rem;
  box-shadow: 0 1px 3px rgba(31, 24, 51, 0.02);
  transition: border-color .2s var(--ease-out), box-shadow .25s var(--curva-apple), transform .2s var(--curva-apple);
}
.faq-item:hover {
  border-color: rgba(63, 122, 110, 0.3);
  box-shadow: 0 6px 20px rgba(31, 24, 51, 0.04);
}

.faq-disparador {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 0;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--tinta);
  cursor: pointer;
  transition: color .15s var(--ease-out), transform .1s var(--curva-apple);
}
.faq-disparador:hover {
  color: var(--verdigris-hondo);
}
.faq-disparador:active {
  transform: scale(0.995);
}

.faq-icono {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--linea-fuerte);
  background: var(--superficie);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--tinta-media);
  flex: none;
  transition: transform .3s var(--curva-spring), background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.faq-disparador[aria-expanded="true"] .faq-icono {
  transform: rotate(45deg);
  background: var(--verdigris-tenue);
  border-color: var(--verdigris-claro);
  color: var(--verdigris-hondo);
}

.faq-respuesta {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--curva-apple), opacity .25s var(--ease-out);
  opacity: 0;
}
.faq-disparador[aria-expanded="true"] + .faq-respuesta {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-respuesta-interior {
  overflow: hidden;
}
.faq-respuesta-interior p {
  padding-bottom: 1.4rem;
  color: var(--tinta-media);
  font-size: 1rem;
  line-height: 1.6;
}

.nota-rgpd {
  margin-top: 2.75rem;
  padding: 1.6rem 2rem;
  background: var(--verdigris-tenue);
  border-left: 4px solid var(--verdigris);
  border-radius: var(--radio-card);
  max-width: 64ch;
  box-shadow: var(--sombra-suave);
}
.nota-rgpd h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--verdigris-hondo);
  margin-bottom: .5rem;
}
.nota-rgpd p { color: var(--tinta-media); font-size: 1rem; }

/* ---------------- Días ---------------- */

.dias { display: grid; gap: 0; border-top: 1px solid #3A3152; }

.dia-paso {
  display: grid;
  gap: .3rem 2.5rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid #3A3152;
}
.dia-sello {
  font-family: var(--display);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  font-size: 1.15rem;
  color: var(--verdigris-claro);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.dia-cuerpo h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: .35rem;
}
.dia-cuerpo p { color: #B6ADC8; max-width: 58ch; }

/* ---------------- Quiénes somos ---------------- */

.quienes { max-width: 60ch; }
.quienes h2 { margin-bottom: 1.1rem; }
.quienes p { color: var(--tinta-media); font-size: 1.0625rem; }
.quienes p + p { margin-top: 1rem; }

/* Sello de ingeniería y privacidad médica (21st.dev) */
.sello-seguridad {
  margin-top: 2.25rem;
  background: var(--superficie);
  border: 1px solid rgba(63, 122, 110, 0.22);
  border-radius: var(--radio-card);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  box-shadow: 0 12px 32px -6px rgba(63, 122, 110, 0.09);
  transition: transform .35s var(--curva-apple), box-shadow .35s var(--curva-apple), border-color .25s var(--ease-out);
}
.sello-seguridad:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -8px rgba(63, 122, 110, 0.15);
  border-color: var(--verdigris);
}
.sello-cabecera {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: .85rem;
}
.sello-icono {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--verdigris-tenue);
  border: 1px solid rgba(63, 122, 110, 0.25);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  flex: none;
}
.sello-subtitulo {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--verdigris);
  display: block;
  margin-bottom: .15rem;
}
.sello-cabecera h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--tinta);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.sello-texto {
  color: var(--tinta-media);
  font-size: .9375rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.sello-pildoras {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.sello-tag {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--tinta);
  background: var(--porcelana);
  border: 1px solid var(--linea);
  border-radius: var(--radio-pill);
  padding: .35rem .75rem;
  box-shadow: 0 1px 2px rgba(31, 24, 51, 0.02);
}
.sello-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verdigris);
}

/* ---------------- Contacto ---------------- */

.contacto-rejilla {
  display: grid;
  gap: clamp(2.25rem, 4.5vw, 4rem);
  align-items: start;
}

.contacto-texto h2 { margin-bottom: 1rem; }
.contacto-texto p { color: var(--tinta-media); max-width: 44ch; }

.contacto-boton { margin-top: 1.75rem; }

/* Especificidad: tiene que ganar a `.contacto-texto p`, de ahí el encadenado. */
.contacto-texto .contacto-directo {
  margin-top: .7rem;
  color: var(--verdigris-hondo);
  font-weight: 600;
  font-size: 1.0625rem;
}

.contacto-alt {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linea-fuerte);
  font-size: .9375rem;
}

.formulario {
  background: var(--superficie);
  border: 1px solid rgba(31, 24, 51, 0.08);
  border-radius: var(--radio-card);
  padding: clamp(1.6rem, 3.5vw, 2.5rem);
  display: grid;
  gap: 1.25rem;
  box-shadow: var(--sombra-alta);
  transition: transform .35s var(--curva-apple), box-shadow .35s var(--curva-apple);
}
.formulario:hover {
  box-shadow: 0 24px 54px rgba(31, 24, 51, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.campo { display: grid; gap: .45rem; }
.campo label { font-size: .9375rem; font-weight: 600; color: var(--tinta); }

.campo input,
.campo select {
  font: inherit;
  font-size: 1rem;
  padding: .85rem 1.1rem;
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--radio-md);
  background: var(--porcelana);
  color: var(--tinta);
  width: 100%;
  transition: border-color .2s var(--curva-apple), background-color .2s var(--curva-apple), box-shadow .2s var(--curva-apple);
}
.campo input::placeholder { color: var(--tinta-suave); }
.campo input:focus,
.campo select:focus {
  background: var(--superficie);
  border-color: var(--verdigris);
  box-shadow: 0 0 0 4px rgba(63, 122, 110, 0.16);
  outline: none;
}

.campo input[aria-invalid="true"] {
  border-color: var(--azafran);
  background: var(--azafran-tenue);
  box-shadow: 0 0 0 3px rgba(217, 142, 4, 0.2);
}

.formulario-error {
  margin: -.25rem 0 0;
  font-size: .9375rem;
  color: var(--azafran-texto);
}

.formulario-hecho {
  font-size: 1.1rem;
  color: var(--verdigris-hondo);
  font-weight: 600;
  padding: 1.5rem;
  background: var(--verdigris-tenue);
  border-radius: var(--radio-md);
  text-align: center;
}

.formulario-pie {
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--tinta-suave);
}

/* ---------------- Otros sectores ---------------- */

.otros { max-width: 62ch; }
.otros h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: .9rem; }
.otros p { color: var(--tinta-media); margin-bottom: 1.5rem; }

/* ---------------- Pie ---------------- */

.pie {
  background: var(--tinta);
  color: #B6ADC8;
  padding-block: 2.5rem;
  font-size: .9375rem;
}
.pie-fila { display: grid; gap: .5rem; }
.pie-marca { color: var(--porcelana); font-weight: 600; }
.pie-datos a { color: var(--verdigris-claro); text-underline-offset: 3px; }
.pie-sep {
  display: inline-block;
  width: 1px; height: 11px;
  background: #4A415F;
  margin-inline: .6rem;
  vertical-align: -1px;
}
.pie-legal { margin-top: .9rem; max-width: 64ch; font-size: .8125rem; line-height: 1.55; color: var(--tinta-suave); }

/* ---------------- Páginas legales ---------------- */

.documento { max-width: 68ch; padding-block: clamp(3rem, 6vw, 5rem); }
.documento h1 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: .75rem;
}
.documento-fecha { color: var(--tinta-suave); font-size: .9375rem; margin-bottom: 2.5rem; }

.documento h2 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  margin-bottom: .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linea);
}
.documento p { margin-bottom: 1rem; color: var(--tinta-media); }
.documento ul { margin: 0 0 1rem; padding-left: 1.2rem; list-style: disc; color: var(--tinta-media); }
.documento li { margin-bottom: .5rem; }
.documento a { color: var(--verdigris-hondo); text-underline-offset: 3px; }
.documento strong { color: var(--tinta); font-weight: 600; }

/* Hueco por rellenar con los datos fiscales reales. Imposible de pasar por alto. */
.pendiente {
  background: var(--azafran-tenue);
  color: var(--azafran-texto);
  border-bottom: 2px solid var(--azafran);
  padding: .1em .35em;
  font-weight: 600;
  font-size: .9375em;
}

.documento-accion { margin-top: 2rem; }

.volver {
  display: inline-block;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linea);
  color: var(--tinta-media);
  text-underline-offset: 3px;
}
.volver:hover { color: var(--tinta); }

/* ============================================================
   Adaptación a pantallas grandes
   ============================================================ */

@media (min-width: 680px) {
  .cifra { grid-template-columns: 11rem minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .cifra-num { grid-column: 1; grid-row: 1; }
  .cifra-barra { grid-column: 1; grid-row: 2; align-self: start; }
  .cifra-cuerpo { grid-column: 2; grid-row: 1 / span 2; }

  .calculadora-resultados { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .comparativa-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .pieza { grid-template-columns: 17rem minmax(0, 1fr); }
  .dia-paso { grid-template-columns: 7rem minmax(0, 1fr); }
}

@media (min-width: 900px) {
  .hero-rejilla { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
  .contacto-rejilla { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .bento-grid { grid-template-columns: repeat(12, 1fr); }
  .bento-tarjeta--ancha { grid-column: span 12; }
  .bento-grid .bento-tarjeta:not(.bento-tarjeta--ancha) { grid-column: span 6; }
}

@media (max-width: 899px) {
  /* Sin solape: aquí el móvil va debajo de la tarjeta, no encima de ella. */
  .movil { margin: 1.25rem auto 0; }
  .demo-conector { display: none !important; }
  .demo-pista { text-align: center; }
  .reinicio { margin-inline: auto; }
}

@media (max-width: 760px) {
  .barra-nav { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-entrada { font-size: 1.0625rem; }

  /* La semana sigue siendo una semana: cinco columnas.
     A este ancho cabe la hora, no el nombre. */
  .agenda-rejilla { gap: .4rem .3rem; }
  .demo-agenda { padding: 1rem .8rem .85rem; }
  .agenda-cifra { font-size: 2.1rem; }
  .dia-nombre { font-size: .6875rem; }
  .dia-num { font-size: .8125rem; }
  .hueco { padding: .4rem .3rem; border-left-width: 2px; }
  .hueco-hora { font-size: .75rem; }
  .hueco-quien { display: none; }

  .hero-acciones .boton { width: 100%; }
}

/* ============================================================
   Movimiento reducido
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   Chatbot Widget — Cliniza
   Adaptado al sistema de color y tipografía de la landing.
   ============================================================ */

#chatbot-widget {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  font-family: var(--sans);
  display: flex; flex-direction: column; align-items: flex-end; gap: 1rem;
}

/* --- Botón flotante --- */
#chatbot-toggle {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--verdigris);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(63, 122, 110, 0.25), 0 4px 15px rgba(31, 24, 51, 0.08);
  transition: .3s var(--curva-apple);
  position: relative; flex-shrink: 0;
}
#chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(63, 122, 110, 0.4);
}
#chatbot-toggle svg { width: 26px; height: 26px; color: #fff; transition: .3s var(--curva-apple); }
#chatbot-toggle .cb-icon-close { display: none; }
#chatbot-toggle .cb-icon-chat  { display: block; }
#chatbot-widget.cb-open #chatbot-toggle .cb-icon-close { display: block; }
#chatbot-widget.cb-open #chatbot-toggle .cb-icon-chat  { display: none; }

/* --- Badge de notificación --- */
#chatbot-badge {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px;
  background: var(--azafran); border-radius: 50%; border: 2px solid var(--porcelana);
  font-size: 11px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  animation: cb-badge-pulse 2s infinite;
}
@keyframes cb-badge-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
#chatbot-widget.cb-open #chatbot-badge { display: none; }

/* --- Panel principal --- */
#chatbot-panel {
  width: 370px;
  max-width: calc(100vw - 2.5rem);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio-card);
  box-shadow: var(--sombra-alta), 0 0 35px rgba(63, 122, 110, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transition: opacity .25s var(--curva-apple), transform .25s var(--curva-apple), visibility .25s;
  transform-origin: bottom right;
}
#chatbot-widget.cb-open #chatbot-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* --- Header --- */
#chatbot-header {
  padding: 1.25rem;
  background: var(--tinta);
  display: flex; align-items: center; gap: 0.75rem;
  flex-shrink: 0; color: #fff;
}
.cb-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--verdigris);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
}
.cb-avatar svg { width: 24px; height: 24px; color: #fff; }
.cb-header-info h4 {
  font-size: 0.95rem; font-weight: 700; margin: 0; letter-spacing: -0.01em;
}
.cb-status-line { display: flex; align-items: center; gap: 0.375rem; margin-top: 3px; }
.cb-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--verdigris-claro);
  box-shadow: 0 0 10px var(--verdigris-claro);
}
.cb-status-text { font-size: 0.75rem; color: rgba(255, 255, 255, 0.8); font-weight: 500; }

/* --- Zona de mensajes --- */
#chatbot-messages {
  flex: 1; overflow-y: auto;
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  scroll-behavior: smooth;
  background-color: var(--porcelana);
  background-image: radial-gradient(var(--linea) 1px, transparent 1px);
  background-size: 20px 20px;
}
#chatbot-messages::-webkit-scrollbar { width: 5px; }
#chatbot-messages::-webkit-scrollbar-thumb { background: var(--linea); border-radius: 10px; }

/* --- Burbujas --- */
.cb-msg {
  max-width: 85%; padding: 0.75rem 1rem;
  border-radius: var(--radio-sm);
  font-size: 0.875rem; line-height: 1.55;
  animation: cb-msg-in .3s var(--curva-apple) forwards;
}
@keyframes cb-msg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.cb-msg-bot {
  background: var(--superficie); border: 1px solid var(--linea);
  color: var(--tinta); align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.cb-msg-user {
  background: var(--verdigris); color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* --- Quick replies --- */
.cb-quick-replies {
  display: flex; flex-direction: column; gap: 0.5rem;
  align-self: flex-start; width: 100%; margin-top: 0.25rem;
}
.cb-quick-btn {
  padding: 0.65rem 1rem;
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  color: var(--verdigris); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: .3s var(--curva-apple);
  text-align: left;
  box-shadow: 0 2px 4px rgba(31, 24, 51, 0.02);
  font-family: var(--sans);
}
.cb-quick-btn:hover {
  border-color: var(--verdigris); background: var(--verdigris-tenue);
  transform: translateX(5px);
}

/* --- CTA (WhatsApp / Calendario) --- */
.cb-cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 0.5rem; padding: 0.75rem 1.15rem;
  background: #25d366; color: #fff;
  font-weight: 700; font-size: 0.85rem;
  text-decoration: none; border-radius: var(--radio-sm);
  transition: .3s var(--curva-apple);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
  align-self: flex-start; cursor: pointer;
  font-family: var(--sans);
}
.cb-cta-btn--calendar {
  background: var(--verdigris);
  box-shadow: 0 4px 15px rgba(63, 122, 110, 0.25);
}
.cb-cta-btn:hover { transform: scale(1.04); filter: brightness(1.06); }

/* --- Typing dots --- */
.cb-typing {
  display: flex; gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--radio-sm); align-self: flex-start;
}
.cb-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--verdigris); animation: cb-bounce 1.4s infinite; opacity: 0.4;
}
.cb-typing span:nth-child(2) { animation-delay: 0.2s; }
.cb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cb-bounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); opacity: 1; } }

/* --- Input area --- */
#chatbot-input-area {
  padding: 1rem; border-top: 1px solid var(--linea);
  display: flex; gap: 0.5rem;
  background: var(--superficie);
}
#chatbot-input {
  flex: 1; border: 1px solid var(--linea);
  border-radius: var(--radio-pill);
  padding: 0.6rem 1.2rem; font-size: 0.85rem;
  outline: none; transition: .2s;
  font-family: var(--sans);
  color: var(--tinta);
  background: var(--porcelana);
}
#chatbot-input::placeholder { color: var(--tinta-suave); }
#chatbot-input:focus {
  border-color: var(--verdigris);
  box-shadow: 0 0 0 3px rgba(63, 122, 110, 0.15);
  background: var(--superficie);
}
#chatbot-input:disabled { background: var(--bruma); cursor: not-allowed; }

#chatbot-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--verdigris); border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: .2s var(--curva-apple);
}
#chatbot-send:hover { transform: scale(1.1); }
#chatbot-send:disabled { background: var(--tinta-suave); cursor: not-allowed; transform: none; }
#chatbot-send svg { width: 18px; height: 18px; color: #fff; }

/* --- Responsive --- */
@media (max-width: 480px) {
  #chatbot-widget { bottom: 1rem; right: 1rem; }
  #chatbot-panel { width: calc(100vw - 2rem); height: 70vh; }
}

/* ============================================================
   Scroll Reveal — GPU-safe (transform + opacity only)
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--curva-apple), transform 0.8s var(--curva-apple);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children: each subsequent element delays slightly */
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 300ms; }

/* ============================================================
   FAQ Accordion — smooth slide with grid-template-rows
   ============================================================ */

.faq-respuesta-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--curva-apple), opacity .25s var(--ease-out);
  opacity: 0;
}
.faq-respuesta-wrap[aria-hidden="false"],
.faq-respuesta-wrap.faq-open {
  grid-template-rows: 1fr;
  opacity: 1;
}
.faq-respuesta-wrap > * {
  overflow: hidden;
}
