/* ==========================================================================
   CEK · Componentes
   ========================================================================== */

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  transition: transform var(--t-fast), background-color var(--t-fast),
              border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--block { width: 100%; }

.btn--amber {
  background-color: var(--brand-amber);
  color: var(--on-amber);
  box-shadow: var(--shadow-amber);
}
.btn--amber:hover { background-color: var(--brand-amber-600); }

.btn--wa {
  background-color: var(--whatsapp);
  color: #fff;
}
.btn--wa:hover { background-color: var(--whatsapp-600); }

.btn--outline {
  background: transparent;
  border-color: var(--brand-amber);
  color: var(--brand-amber);
}
.btn--outline:hover {
  background-color: var(--brand-amber);
  color: var(--on-amber);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--brand-amber); color: var(--brand-amber); }

.btn .icon { width: 18px; height: 18px; }

/* --- Badge / pill --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--brand-amber-100);
  color: var(--amber-text);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 187, 23, 0.30);
}

.tag-placeholder {
  display: inline-block;
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-amber);
  background: var(--brand-amber);
  padding: 3px 8px;
  border-radius: 4px;
}

/* --- Cards --- */
.card {
  background-color: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.card:hover { transform: translateY(-4px); border-color: var(--brand-amber); }

.card--top-accent { border-top: 3px solid var(--brand-amber); }

.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand-amber-100);
  color: var(--amber-text);
  margin-bottom: 16px;
}
.card__icon .icon { width: 26px; height: 26px; }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: var(--fs-small); }

@media (min-width: 1024px) {
  .card { padding: 28px; }
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background-color: var(--nav-bg);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--t-base), border-color var(--t-base);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.navbar__logo {
  height: 26px;
  width: auto;
  content: var(--logo);
}
.navbar__menu {
  display: none;
  align-items: center;
  gap: 28px;
}
.navbar__menu a {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.navbar__menu a:hover { color: var(--brand-amber); }

.navbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar__cta { display: none; }

@media (min-width: 1024px) {
  .navbar__menu { display: flex; }
  .navbar__cta { display: inline-flex; }
}

/* WhatsApp pill en navbar (mobile) */
.nav-wa {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
}
.nav-wa .icon { width: 22px; height: 22px; }
@media (min-width: 1024px) { .nav-wa { display: none; } }

/* Hamburger */
.navbar__hamburger {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.navbar__hamburger .icon { width: 22px; height: 22px; }
/* Cuando el menú horizontal es visible (desktop), el hamburguer sobra */
@media (min-width: 1024px) {
  .navbar__hamburger { display: none; }
}

/* --- Theme switch (sol/luna) — funcional --- */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
}
[data-theme="light"] .theme-switch { background: rgba(0,0,0,0.05); }

.theme-switch__slot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px; height: 28px;
  color: var(--text-subtle);
  transition: color var(--t-base);
}
.theme-switch__slot .icon { width: 16px; height: 16px; }

.theme-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px; height: 28px;
  border-radius: var(--radius-pill);
  background: var(--brand-amber);
  transition: transform var(--t-base);
}
/* Knob sobre el modo activo: oscuro -> luna (derecha); claro -> sol (izquierda) */
[data-theme="dark"] .theme-switch__knob { transform: translateX(30px); }
[data-theme="light"] .theme-switch__knob { transform: translateX(0); }

[data-theme="light"] .theme-switch__slot--sun,
[data-theme="dark"] .theme-switch__slot--moon { color: var(--on-amber); }

/* --- Menú móvil (overlay) --- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transform: translateX(100%);
  transition: transform var(--t-base);
  visibility: hidden;
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }
.mobile-nav__head {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
}
.mobile-nav__links a {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.mobile-nav__cta { margin-top: auto; padding-top: 24px; display: grid; gap: 12px; }
@media (min-width: 1024px) { .mobile-nav { display: none; } }

body.no-scroll { overflow: hidden; }

/* --- Comparativo CFE --- */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.compare__col { text-align: center; }
.compare__label {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.compare__num {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: var(--fw-extrabold);
  line-height: 1;
}
.compare__num--red { color: var(--cfe-red); }
.compare__num--green { color: var(--cfe-green); }
.compare__arrow { color: var(--brand-amber); font-size: 1.5rem; }

/* --- Trust signals (hero) --- */
.trust-list { display: grid; gap: 12px; margin: 4px 0; }
.trust-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.trust-list .icon { width: 20px; height: 20px; color: var(--brand-amber); flex: 0 0 auto; }

/* --- Stats (trust bar) --- */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 16px;
}
.stat { text-align: center; }
.stat__num {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: var(--fw-extrabold);
  color: var(--amber-text);
  line-height: 1.1;
}
.stat__label {
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { border-left: 1px solid var(--divider); }
  .stat:first-child { border-left: 0; }
}

/* --- Lista "Qué incluye" (checks) --- */
.includes {
  display: grid;
  gap: 18px;
}
@media (min-width: 768px) { .includes { grid-template-columns: repeat(2, 1fr); column-gap: 40px; } }
.include {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}
.include__check {
  width: 26px; height: 26px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-amber-100);
  color: var(--amber-text);
}
.include__check .icon { width: 16px; height: 16px; }
.include h3 { font-size: var(--fs-body); margin-bottom: 2px; }
.include p { font-size: var(--fs-small); color: var(--text-muted); }

/* --- Tabla comparativa (diferenciador) --- */
.vs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.vs-table th, .vs-table td {
  padding: 14px 16px;
  text-align: center;
  font-size: var(--fs-small);
  border-bottom: 1px solid var(--divider);
}
.vs-table thead th {
  background: var(--brand-black);
  color: #fff;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.vs-table thead th.is-cek { color: var(--brand-amber); }
.vs-table tbody td:first-child { text-align: left; font-weight: var(--fw-medium); }
.vs-table .yes { color: var(--brand-amber); font-weight: var(--fw-bold); }
.vs-table .no { color: var(--cfe-red); font-weight: var(--fw-bold); }
.vs-table tr:last-child td { border-bottom: 0; }
.vs-table__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- Pasos (cómo funciona) --- */
.step__num {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--fw-extrabold);
  color: var(--amber-text);
  line-height: 1;
}

/* --- Acordeón FAQ --- */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item {
  border-bottom: 1px solid var(--divider);
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: transparent;
  border: 0;
  text-align: left;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.faq__q .icon {
  width: 22px; height: 22px;
  flex: 0 0 auto;
  color: var(--brand-amber);
  transition: transform var(--t-base);
}
.faq__q[aria-expanded="true"] .icon { transform: rotate(45deg); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-base);
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p {
  color: var(--text-muted);
  font-size: var(--fs-small);
  padding-bottom: 20px;
}

/* --- Formulario --- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-top: 3px solid var(--brand-amber);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-md);
  color: var(--text);
}
.form-card h3 { color: var(--text); }
.form-card__sub { color: var(--text-muted); font-size: var(--fs-small); margin-bottom: 20px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr; }
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  margin-bottom: 6px;
}
.field .req { color: var(--cfe-red); }
.field .hint { font-weight: var(--fw-regular); color: var(--text-subtle); font-size: var(--fs-label); }

.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-btn);
  font-size: var(--fs-small);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-amber);
  box-shadow: 0 0 0 3px var(--brand-amber-100);
}
.textarea { resize: vertical; min-height: 88px; }

/* File input estilizado */
.file {
  border: 1.5px dashed var(--input-border);
  border-radius: var(--radius-btn);
  padding: 18px 14px;
  text-align: center;
  background: var(--input-bg);
  color: var(--input-text);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.file:hover { border-color: var(--brand-amber); }
.file input { display: none; }
.file__icon { color: var(--brand-amber); margin-bottom: 6px; }
.file__icon .icon { width: 26px; height: 26px; margin-inline: auto; }
.file__text { font-size: var(--fs-small); font-weight: var(--fw-semibold); }
.file__hint { font-size: var(--fs-label); color: var(--text-subtle); margin-top: 2px; }
.file.has-file { border-color: var(--whatsapp); }
.file.is-dragover { border-color: var(--brand-amber); background: var(--brand-amber-100); }

.field-error {
  display: none;
  color: var(--cfe-red);
  font-size: var(--fs-label);
  margin-top: 4px;
}
.field.is-invalid .field-error { display: block; }
.field.is-invalid .input,
.field.is-invalid .select,
.field.is-invalid .file { border-color: var(--cfe-red); }

.form-microcopy {
  font-size: var(--fs-label);
  color: var(--text-subtle);
  text-align: center;
  margin-top: 12px;
}

.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  font-size: var(--fs-small);
  display: none;
}
.form-status.is-success { display: block; background: rgba(34,197,94,0.12); color: #16a34a; border: 1px solid rgba(34,197,94,0.4); }
.form-status.is-error { display: block; background: rgba(239,68,68,0.12); color: #dc2626; border: 1px solid rgba(239,68,68,0.4); }

/* --- WhatsApp flotante --- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--z-float);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-wa);
  animation: wa-pulse 2.4s ease-in-out infinite;
}
.wa-float .icon { width: 30px; height: 30px; }
.wa-float__tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  padding: 8px 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}
.wa-float:hover .wa-float__tooltip { opacity: 1; }
@media (min-width: 1024px) { .wa-float { width: 60px; height: 60px; right: 28px; bottom: 28px; } }

@keyframes wa-pulse {
  0%, 100% { box-shadow: var(--shadow-wa); }
  50% { box-shadow: 0 6px 30px rgba(37,211,102,0.7); }
}

/* --- Footer --- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: 56px 28px;
}
.footer a { color: var(--footer-muted); transition: color var(--t-fast); }
.footer a:hover { color: var(--brand-amber); }
.footer__grid {
  display: grid;
  gap: 36px;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1.4fr 1.2fr; } }
.footer__logo { height: 28px; margin-bottom: 14px; }
.footer h4 {
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-amber);
  margin-bottom: 14px;
}
.footer__list li { margin-bottom: 10px; font-size: var(--fs-small); color: var(--footer-muted); }
.footer__socials { display: flex; gap: 12px; margin-top: 8px; }
.footer__socials a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: var(--footer-muted);
}
.footer__socials a:hover { border-color: var(--brand-amber); color: var(--brand-amber); }
.footer__socials .icon { width: 18px; height: 18px; }
.footer__cta { display: grid; gap: 12px; }
.footer__cta .btn { color: #fff; }
.footer__legal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: var(--fs-label);
  color: var(--footer-muted);
  text-align: center;
}
.footer__legal a { text-decoration: underline; }
