/* ==========================================================================
   SyncraClinics — estilos globales
   Identidad: clínica estética premium · salud, belleza y bienestar + tecnología
   ========================================================================== */

:root {
  /* DOMINANTE ~60% - Fondos cálidos */
  --bg-primary: #F7F3ED;   /* marfil cálido */
  --bg-secondary: #EDE7DD; /* beige suave, para alternar secciones */
  --bg-surface: #FFFFFF;

  /* SECUNDARIO ~30% - Verde salvia y estructura */
  --accent-main: #6A994E;   /* verde salvia — color principal */
  --accent-hover: #587F41;  /* verde salvia, tono hover */
  --accent-light: #A7C4A0;  /* verde salvia claro — secundario */
  --accent-tint: #EEF3E8;   /* verde salvia muy claro, para chips/fondos */

  --text-main: #292824;
  --text-muted: #6F6B63;
  --border-color: #DDD6CB;

  --ink: #26251F; /* superficie oscura cálida (footer / CTA), nunca azul */

  /* ACENTO ~10% - Champagne, muy sutil, solo detalles premium */
  --champagne: #C8A96B;
  --champagne-tint: #F5EEDF;

  --font-heading: "Manrope", "DM Sans", -apple-system, Segoe UI, sans-serif;
  --font-body: "Inter", -apple-system, Segoe UI, sans-serif;

  --radius: 12px;
  --radius-lg: 22px;
  --shadow-soft: 0 16px 36px rgba(41, 40, 36, 0.08);
  --shadow-card: 0 2px 12px rgba(41, 40, 36, 0.05);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
  transition: transform 0.35s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

a, button, input, select, textarea {
  font-family: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-main);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0 0 16px;
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--champagne);
  background: var(--champagne-tint);
  border: 1px solid rgba(200, 169, 107, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section {
  padding: 104px 0;
}

.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 60px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
}

.section-head p {
  font-size: 17px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
}

.btn-primary {
  background: var(--accent-main);
  color: #FFFFFF;
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(106, 153, 78, 0.28);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(106, 153, 78, 0.22);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-main);
  background: var(--bg-surface);
  color: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.btn-secondary:active {
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--border-color);
  box-shadow: 0 4px 20px rgba(41, 40, 36, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 20px;
  transition: padding 0.3s ease;
}

.site-header.is-scrolled .header-inner {
  padding: 12px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s ease;
}

.brand img {
  height: 30px;
  width: auto;
}

.brand:hover {
  opacity: 0.82;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 2px;
  transition: color 0.25s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -2px;
  height: 2px;
  background: var(--accent-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 6px;
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: var(--accent-tint);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 108px 0 88px;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--champagne);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 650;
}

.hero-inner h1 {
  font-size: clamp(30px, 3.2vw, 44px);
  text-wrap: balance;
}

.hero-lede {
  font-size: 18px;
  max-width: 540px;
}

.hero-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.hero-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-indicator svg {
  width: 16px;
  height: 16px;
  color: var(--accent-main);
  flex-shrink: 0;
}

/* Hero visual: panel claro con el flujo de automatización */
.hero-visual {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--accent-tint), transparent 55%),
              radial-gradient(circle at 0% 100%, var(--champagne-tint), transparent 50%);
  pointer-events: none;
}

.hero-visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  position: relative;
}

.hero-visual-head span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-visual-dots {
  display: flex;
  gap: 6px;
}

.hero-visual-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-color);
  display: block;
}

.workflow-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.workflow-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 22px;
  opacity: 0;
  transform: translateX(-10px);
  animation: workflow-in 0.7s ease forwards;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.workflow-step:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-card);
}

.workflow-step:last-child {
  margin-bottom: 0;
}

.workflow-step:nth-child(1) { animation-delay: 0.15s; }
.workflow-step:nth-child(2) { animation-delay: 0.35s; }
.workflow-step:nth-child(3) { animation-delay: 0.55s; }
.workflow-step:nth-child(4) { animation-delay: 0.75s; }
.workflow-step:nth-child(5) { animation-delay: 0.95s; }
.workflow-step:nth-child(6) { animation-delay: 1.15s; }

@keyframes workflow-in {
  to { opacity: 1; transform: translateX(0); }
}

.workflow-step-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-tint);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.workflow-step-icon svg {
  width: 16px;
  height: 16px;
}

/* punto que recorre la conexión entre pasos */
.workflow-step:not(:last-child) .workflow-step-icon::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 22px;
  background: linear-gradient(to bottom, var(--accent-light), transparent);
  transform: translateX(-50%);
}

.workflow-step:not(:last-child) .workflow-step-icon::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--champagne);
  transform: translate(-50%, 0);
  opacity: 0;
  animation: dot-travel 2.8s ease-in-out infinite;
  z-index: 1;
}

.workflow-step:nth-child(1) .workflow-step-icon::before { animation-delay: 0.4s; }
.workflow-step:nth-child(2) .workflow-step-icon::before { animation-delay: 0.95s; }
.workflow-step:nth-child(3) .workflow-step-icon::before { animation-delay: 1.5s; }
.workflow-step:nth-child(4) .workflow-step-icon::before { animation-delay: 2.05s; }
.workflow-step:nth-child(5) .workflow-step-icon::before { animation-delay: 2.6s; }

@keyframes dot-travel {
  0% { transform: translate(-50%, 0); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(-50%, 22px); opacity: 0; }
}

.workflow-step strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.workflow-step span {
  font-size: 12px;
  color: var(--text-muted);
}

.workflow-step .workflow-arrow {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--border-color);
  flex-shrink: 0;
}

/* ---------- Grids / Cards ---------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent-light);
}

.card:hover .card-icon svg {
  transform: translateY(-1px) scale(1.05);
}

.card:active {
  transform: translateY(-2px);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent-hover);
}

.card-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card p {
  font-size: 14.5px;
  margin-bottom: 0;
}

.problem-card {
  border-left: 3px solid var(--accent-main);
}

.pain-card {
  position: relative;
  width: 100%;
  margin: 0;
  text-align: left;
  font-size: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.pain-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.pain-check svg {
  width: 13px;
  height: 13px;
}

.pain-card.selected {
  border-color: var(--accent-main);
  background: var(--accent-tint);
}

.pain-card.selected .pain-check {
  background: var(--accent-main);
  border-color: var(--accent-main);
  color: #FFFFFF;
  transform: scale(1.08);
}

.pain-hint {
  max-width: 640px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Solution flow (Home) ---------- */
.flow-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-top: 8px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 148px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: default;
  transition: transform 0.3s ease, background 0.3s ease;
}

.flow-step:hover {
  transform: scale(1.05);
  background: var(--accent-tint);
}

.flow-step-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.flow-step:hover .flow-step-icon {
  border-color: var(--accent-main);
  box-shadow: 0 8px 18px rgba(106, 153, 78, 0.18);
}

.flow-step-icon svg {
  width: 24px;
  height: 24px;
}

.flow-step strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.flow-step span {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.flow-step:hover span {
  color: var(--text-main);
}

.flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  color: var(--border-color);
  flex-shrink: 0;
}

.flow-connector svg {
  width: 20px;
  height: 20px;
}

/* ---------- Dashboard demo (Home) — panel claro ---------- */
.dashboard-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.dashboard-head h3 {
  color: var(--text-main);
  font-size: 17px;
  margin: 0;
}

.dashboard-demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--champagne);
  background: var(--champagne-tint);
  border: 1px solid rgba(200, 169, 107, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-metric {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 18px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-metric:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-card);
}

.dashboard-metric strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--text-main);
  margin-bottom: 6px;
}

.dashboard-metric span {
  font-size: 12.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.dashboard-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border-color);
  overflow: hidden;
}

.dashboard-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-main), var(--champagne));
  transition: width 1.1s ease;
}

.dashboard-panel.is-visible .dashboard-bar span {
  width: var(--bar-value, 60%);
}

.dashboard-footnote {
  margin: 24px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Automatizaciones (Home) ---------- */
.automation-card {
  padding-top: 32px;
}

/* ---------- Integración (n8n, sin tecnicismos visibles) ---------- */
.integration-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

/* ---------- Confianza (Home) ---------- */
.trust-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
}

.trust-panel h2 {
  max-width: 460px;
  font-size: clamp(22px, 2.6vw, 28px);
  margin-bottom: 0;
}

.trust-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trust-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 9px 16px;
  border-radius: 999px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.trust-tag:hover {
  border-color: var(--accent-main);
  transform: translateY(-2px);
}

.trust-tag svg {
  width: 15px;
  height: 15px;
  color: var(--accent-main);
  flex-shrink: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Problema · Solución · Beneficio (soluciones.html) ---------- */
.ps-card .ps-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 10px;
}

.ps-card .ps-solution {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.ps-card .ps-benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-hover);
  margin: 0;
}

.ps-card .ps-benefit svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.solution-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.solution-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 15px;
}

.solution-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-main);
  font-weight: 700;
}

/* ---------- Demostración del asistente (chat) ---------- */
.chat-window {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-avatar svg {
  width: 18px;
  height: 18px;
}

.chat-header-info strong {
  display: block;
  font-size: 14.5px;
  color: var(--text-main);
}

.chat-header-info .chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.chat-header-info .chat-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-main);
  box-shadow: 0 0 0 3px var(--accent-tint);
  flex-shrink: 0;
}

.chat-messages {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-bubble {
  display: none;
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
}

.chat-bubble.is-shown {
  animation: chat-in 0.45s ease forwards;
}

@keyframes chat-in {
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.patient {
  align-self: flex-end;
  background: var(--accent-main);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.chat-typing {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(10px);
  animation: chat-in 0.3s ease forwards;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: chat-typing-dot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1); }
}

.chat-caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 20px auto 0;
  max-width: 440px;
}

/* ---------- Pérdida por no-shows + calculadora ---------- */
.noshow-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-soft);
  max-width: 760px;
  margin: 0 auto;
}

.noshow-example {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
}

.noshow-example-block {
  text-align: center;
}

.noshow-example-block strong {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  color: var(--text-main);
}

.noshow-example-block span {
  font-size: 13px;
  color: var(--text-muted);
}

.noshow-operator {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--champagne);
}

.noshow-example-result strong {
  color: var(--accent-hover);
}

.noshow-disclaimer {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.noshow-calculator h3 {
  font-size: 16px;
  margin-bottom: 18px;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.calculator-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--accent-tint);
  border: 1px solid rgba(106, 153, 78, 0.25);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 8px 0 28px;
}

.calculator-result span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.calculator-result strong {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--accent-hover);
}

.noshow-panel > p:last-child {
  text-align: center;
  margin-bottom: 0;
}

/* ---------- Checklist "¿Es para tu clínica?" ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15.5px;
  color: var(--text-main);
}

.checklist-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-tint);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.checklist-icon svg {
  width: 13px;
  height: 13px;
}

.fit-cta {
  text-align: center;
  margin-top: 36px;
}

.fit-cta p {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 20px;
}

/* ---------- CTA banda ---------- */
.cta-band {
  background: var(--ink);
  color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 60px;
  text-align: center;
  margin: 0 24px;
}

.cta-band h2,
.cta-band p {
  color: var(--bg-primary);
}

.cta-band .cta-actions {
  justify-content: center;
  margin-top: 24px;
}

.cta-band .btn-secondary {
  border-color: rgba(247, 243, 237, 0.3);
  color: var(--bg-primary);
}

.cta-band .btn-secondary:hover {
  border-color: var(--champagne);
  background: rgba(247, 243, 237, 0.06);
  color: var(--champagne);
}

/* ---------- Formulario de contacto ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-main);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-main);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--accent-hover);
  display: none;
}

.form-status.visible {
  display: block;
}

.form-status.error {
  color: #B3261E;
}

.modal-form button[type="submit"] {
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.modal-form button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(106, 153, 78, 0.25);
}

.modal-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.contact-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-info-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.contact-info-item:last-child {
  border-bottom: none;
}

.contact-info-item .card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 15px;
  margin-bottom: 2px;
}

.contact-info-item p {
  font-size: 14px;
  margin-bottom: 0;
}

.contact-info-phone {
  position: relative;
}

.contact-info-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.contact-info-trigger:hover {
  color: var(--accent-hover);
}

.contact-info-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.contact-info-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.phone-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  max-width: calc(100vw - 80px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  padding: 8px;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.phone-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.phone-menu-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  transition: background 0.2s ease, transform 0.2s ease;
}

.phone-menu-option:hover {
  background: var(--accent-tint);
  transform: translateX(3px);
}

.phone-menu-option svg {
  width: 18px;
  height: 18px;
  color: var(--accent-hover);
  flex-shrink: 0;
}

/* ---------- Solicitar información: CTA ---------- */
.info-cta {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.info-cta-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 22px;
  border-radius: 14px;
  background: var(--accent-tint);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
}

.info-cta-icon svg {
  width: 26px;
  height: 26px;
}

.info-cta h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.btn-lg {
  padding: 17px 36px;
  font-size: 16px;
  margin-top: 8px;
}

.contact-info-card-standalone {
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Modal: Solicitar demo ---------- */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(38, 37, 31, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 44px;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.3s ease;
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-close:hover {
  color: var(--accent-hover);
  border-color: var(--accent-main);
  transform: rotate(90deg);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.92);
}

.modal-step {
  animation: modal-step-in 0.3s ease;
}

@keyframes modal-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-sub {
  font-size: 15px;
  margin-bottom: 28px;
}

.modal-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.form-field select {
  width: 100%;
  padding: 13px 40px 13px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-surface);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-main);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F6B63' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field select:focus {
  outline: none;
  border-color: var(--accent-main);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--bg-primary);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(247, 243, 237, 0.12);
}

.footer-brand .brand-name {
  color: var(--bg-primary);
}

.footer-brand p {
  color: rgba(247, 243, 237, 0.6);
  font-size: 14px;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.footer-col a,
.footer-col p {
  display: block;
  color: rgba(247, 243, 237, 0.6);
  font-size: 14px;
  margin-bottom: 12px;
}

.footer-col a {
  width: fit-content;
  transition: color 0.25s ease, transform 0.25s ease;
}

.footer-col a:hover {
  color: var(--champagne);
  transform: translateX(3px);
}

.footer-col a:active {
  transform: translateX(1px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(247, 243, 237, 0.45);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-legal a {
  color: rgba(247, 243, 237, 0.45);
  font-size: 13px;
  transition: color 0.25s ease;
}

.footer-legal a:hover {
  color: var(--champagne);
}

/* ---------- Páginas legales ---------- */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 22px;
  margin-top: 40px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  font-size: 15px;
}

.legal-note {
  background: var(--accent-tint);
  border: 1px solid rgba(106, 153, 78, 0.25);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 40px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust-panel {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .flow-diagram {
    flex-direction: column;
  }

  .flow-connector {
    width: auto;
    height: 28px;
    transform: rotate(90deg);
  }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .main-nav.open {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 14px;
  }

  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-panel,
  .integration-panel {
    padding: 26px;
  }

  .cta-band {
    padding: 40px 24px;
  }

  .section {
    padding: 64px 0;
  }

  .choice-grid,
  .modal-form .form-grid,
  .checkbox-grid,
  .calculator-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .noshow-panel {
    padding: 28px 22px;
  }

  .chat-bubble {
    max-width: 90%;
  }

  .modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .modal-box {
    max-width: none;
    width: 100%;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 28px 20px 32px;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .trust-panel {
    padding: 32px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .modal-overlay,
  .modal-box,
  .modal-step,
  .card,
  .btn,
  .main-nav a::after,
  .footer-col a,
  .nav-toggle span,
  .modal-close,
  .pain-check,
  .phone-menu,
  .contact-info-trigger svg,
  .reveal,
  .workflow-step,
  .workflow-step-icon::before,
  .flow-step,
  .flow-step-icon,
  .dashboard-bar span,
  .site-header,
  .header-inner,
  img,
  .trust-tag,
  .chat-bubble,
  .chat-typing,
  .chat-typing span {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .workflow-step {
    opacity: 1 !important;
    transform: none !important;
  }

  .chat-bubble {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .chat-typing {
    display: none !important;
  }

  .dashboard-panel.is-visible .dashboard-bar span {
    width: var(--bar-value, 60%) !important;
  }
}
