:root {
  /* --- Sistema visual CitaPro ---
     Texto/acciones en near-black; acento de marca en teal/emerald (crecimiento,
     confianza). El acento se usa en la landing (marca, eyebrows, destacados). */
  --primary: #121417;        /* casi negro para acciones principales y texto */
  --primary-dark: #000000;
  --primary-light: #eef7f3;  /* tinte muy claro del acento para realces */
  --brand: #0f9d7a;          /* acento de marca: teal/emerald */
  --brand-dark: #0b7d61;
  --brand-soft: #e7f6f0;     /* fondo suave del acento */
  --brand-grad: linear-gradient(135deg, #12b088 0%, #0b7d61 100%);
  --accent: #0f9d7a;         /* alias usado en algunos componentes */
  --ink: #121417;            /* texto principal */
  --muted: #5f6670;          /* texto secundario */
  --bg: #ffffff;
  --bg-soft: #f5f8f7;        /* fondo de secciones (leve tinte frío) */
  --line: #e7e9ec;           /* bordes sutiles */
  --danger: #e5484d;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 20px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.14);
  --font-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); transform: translateY(-2px); }
/* Acción destacada en secciones oscuras: usa el acento de marca. */
.btn-accent { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 22px rgba(15,157,122,.35); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,157,122,.45); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(16,24,40,.07); background: rgba(255,255,255,.92); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
/* ---------- Marca CitaPro ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.4px; line-height: 1; }
/* Logo-mark: cuadrado redondeado con el ícono (calendario + check) en gradiente de marca. */
.brand .logo {
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-grid; place-items: center; color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 4px 12px rgba(15,157,122,.4), inset 0 1px 0 rgba(255,255,255,.25);
  flex-shrink: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.brand:hover .logo { transform: rotate(-4deg) scale(1.04); box-shadow: 0 6px 16px rgba(15,157,122,.5), inset 0 1px 0 rgba(255,255,255,.25); }
.brand .logo svg { width: 22px; height: 22px; display: block; }
.brand .logo-emoji { font-size: 18px; } /* respaldo si en algún lado queda emoji */
/* Wordmark: "Cita" normal + "Pro" resaltado en una píldora de marca. */
.brand .brand-text { display: inline-flex; align-items: baseline; gap: 0; }
.brand .brand-text b { font-weight: 800; color: var(--ink); }
.brand .brand-text .pro {
  font-weight: 800; color: #fff;
  background: var(--brand-grad); border-radius: 8px; padding: 2px 8px; margin-left: 5px;
}
/* En fondos oscuros (sidebars del panel y super-admin) la marca es blanca. */
.sidebar .brand .brand-text b { color: #fff; }
.sidebar .brand .brand-text .pro { color: #fff; background: var(--brand-grad); }
.sidebar .brand .logo { background: var(--brand-grad); box-shadow: 0 2px 8px rgba(15,157,122,.5), inset 0 1px 0 rgba(255,255,255,.22); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, var(--brand-soft) 0%, transparent 60%), linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  padding: 84px 0 56px;
}
/* Resplandor difuso de marca detrás del mock. */
.hero-glow {
  position: absolute; top: -120px; right: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(18,176,136,.22) 0%, transparent 65%);
  filter: blur(10px); pointer-events: none; z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 52px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--brand-dark);
  box-shadow: var(--shadow);
}
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: 54px; line-height: 1.06; letter-spacing: -1.8px; margin: 22px 0 18px; }
.hero h1 span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 540px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.hero-visual {
  position: relative; background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: 22px; border: 1px solid var(--line);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-visual .mock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.hero-visual .mock-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.mock-pill { background: var(--brand-soft); color: var(--brand-dark); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.mock-slot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 10px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.mock-slot:hover { border-color: var(--brand); transform: translateX(3px); box-shadow: 0 4px 14px rgba(15,157,122,.12); }
.mock-slot .who { display: flex; align-items: center; gap: 11px; }
.mock-slot .who small { color: var(--muted); }
.mock-avatar { width: 36px; height: 36px; border-radius: 50%; display:grid; place-items:center; color:#fff; font-weight:700; font-size: 13px; }
.mock-avatar.a1 { background: linear-gradient(135deg,#12b088,#0b7d61); }
.mock-avatar.a2 { background: linear-gradient(135deg,#6c8cff,#3a5bd9); }
.mock-avatar.a3 { background: linear-gradient(135deg,#ff8a5c,#e5603a); }
.mock-time { background: var(--primary); color: #fff; padding: 5px 11px; border-radius: 9px; font-size: 13px; font-weight: 700; }
.mock-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.mock-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(15,157,122,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15,157,122,.5); } 70% { box-shadow: 0 0 0 8px rgba(15,157,122,0); } 100% { box-shadow: 0 0 0 0 rgba(15,157,122,0); } }
/* Fila de rubros / confianza bajo el hero. */
.trust-row { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.trust-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-right: 6px; }
.trust-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease; }
.trust-chip:hover { transform: translateY(-2px); border-color: var(--brand); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 40px; } .hero-visual { animation: none; } }

/* ---------- Stats ---------- */
.stats { padding: 44px 0; background: var(--ink); color: #fff; background-image: radial-gradient(600px 200px at 50% 0%, rgba(18,176,136,.18), transparent 70%); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 42px; font-weight: 800; letter-spacing: -1px; background: linear-gradient(135deg,#3fe0b5,#12b088); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .lbl { opacity: .82; font-size: 14px; }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; } }

/* ---------- Secciones ---------- */
.section { padding: 88px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 52px; }
.section-head .eyebrow { color: var(--brand-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; font-size: 13px; }
.section-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -1.2px; margin: 10px 0 12px; }
.section-head p { color: var(--muted); font-size: 18px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #dfe4e2; }
.feature-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); display: grid; place-items: center; font-size: 24px; margin-bottom: 18px; }
.feature-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.plan {
  background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 32px 28px;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.plan { transition: transform .22s ease, box-shadow .22s ease; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan.highlight { border-color: var(--brand); box-shadow: var(--shadow-lg); position: relative; transform: scale(1.04); }
.plan.highlight:hover { transform: scale(1.04) translateY(-4px); }
.plan .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand-grad); color: #fff; padding: 5px 16px; border-radius: 999px; font-size: 12px; font-weight: 700; box-shadow: 0 6px 16px rgba(15,157,122,.4); }
.plan h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.plan .price { font-family: var(--font-display); font-size: 42px; font-weight: 800; letter-spacing: -1px; margin: 12px 0 2px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; margin: 20px 0 24px; display: flex; flex-direction: column; gap: 11px; }
.plan ul li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink); }
.plan ul li::before { content: '✓'; color: var(--brand); font-weight: 800; flex-shrink: 0; line-height: 1.5; }
.plan ul li .feat-text { flex: 1; min-width: 0; }
.plan .btn { margin-top: auto; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } .plan.highlight { transform: none; } .plan.highlight:hover { transform: translateY(-4px); } }

/* ---------- CTA final ---------- */
.cta-final { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: 28px; padding: 60px; text-align: center; background-image: radial-gradient(700px 260px at 50% 120%, rgba(18,176,136,.3), transparent 70%); }
.cta-final h2 { font-family: var(--font-display); font-weight: 800; font-size: 38px; letter-spacing: -1.2px; margin-bottom: 12px; }
.cta-final p { opacity: .9; font-size: 18px; margin-bottom: 26px; }

/* ---------- Footer ---------- */
.footer { padding: 48px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer .footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer .footer-contact { line-height: 1.7; }
.footer .footer-contact a { color: var(--brand-dark); text-decoration: none; }
.footer .footer-contact a:hover { text-decoration: underline; }

/* ---------- Social proof (testimonios) ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.testi:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testi .stars { color: #f5a623; font-size: 15px; letter-spacing: 2px; }
.testi .quote { font-size: 15.5px; color: var(--ink); line-height: 1.6; }
.testi .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testi .who .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; }
.testi .who .n { font-weight: 700; font-size: 15px; }
.testi .who .r { font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .testimonials { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.faq-item[open] { border-color: var(--brand); box-shadow: var(--shadow); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 22px; font-weight: 600; font-size: 16.5px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 24px; color: var(--brand-dark); font-weight: 400; transition: transform .2s ease; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: 15px; line-height: 1.65; }

/* ---------- Reveal on scroll (sutil, respeta prefers-reduced-motion) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual, .mock-foot .dot { animation: none; }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(26,20,36,.55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 460px;
  padding: 32px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow: auto;
}
.modal h3 { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-bottom: 6px; }
.modal .sub { color: var(--muted); margin-bottom: 20px; font-size: 15px; }
.modal .close { float: right; font-size: 22px; cursor: pointer; color: var(--muted); border: none; background: none; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: inherit; transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.form-msg { font-size: 14px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.form-msg.error { background: #fdecec; color: var(--danger); }
.form-msg.success { background: #e6f9f2; color: #067a55; }

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.hidden { display: none !important; }
.spinner { border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; width: 28px; height: 28px; animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Badge "Próximamente" en features de planes */
.soon-badge {
  display: inline-block;
  background: #fff3d6;
  color: #8a6100;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 1px;
  white-space: nowrap;
}
.plan ul li.feat-soon { color: var(--muted); }
.plan ul li.feat-soon::before { content: '🕒'; color: var(--muted); }

/* ---------- Responsive móvil (landing) ---------- */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav { height: 60px; }
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 32px; letter-spacing: -1px; }
  .hero p.lead { font-size: 16px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .section { padding: 48px 0; }
  .section-head h2 { font-size: 26px; }
  .section-head p { font-size: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .stat .num { font-size: 30px; }
  .cta-final { padding: 36px 22px; }
  .cta-final h2 { font-size: 26px; }
  .footer .footer-grid { flex-direction: column; gap: 14px; }
  .modal { max-width: 100%; padding: 24px 18px; }
  .trust-row { margin-top: 32px; gap: 8px; }
  .trust-chip { font-size: 13px; padding: 6px 12px; }
  .faq-item summary { font-size: 15px; padding: 16px 18px; }
}

/* Hint de validación bajo un campo del formulario (ej. RUT de empresa). */
.field-hint { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.field-hint.ok { color: #0a7d4b; }
.field-hint.err { color: #c0392b; }
