/* ============================================================
   04-utilities.css — Utilidades, botones, helpers (corporativo)
   ============================================================ */

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

.container-fluid { width: 100%; padding-inline: var(--gutter); }

.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section-tight { padding-block: clamp(40px, 5vw, 72px); }

.surface-light { background: var(--bg); color: var(--ink); }
.surface-white { background: var(--bg-soft); color: var(--ink); }
.surface-tint  { background: var(--bg-tint); color: var(--ink); }
.surface-dark  { background: var(--navy-900); color: #E8EFF7; }
.surface-dark h1, .surface-dark h2, .surface-dark h3 { color: #FFFFFF; }

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* ===== Botones ===== */
.btn {
  --bg: var(--navy-900);
  --fg: #FFFFFF;
  --bd: var(--navy-900);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base),
              background var(--dur-fast),
              color var(--dur-fast),
              border-color var(--dur-fast);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active { transform: translateY(0); }

.btn--primary {
  --bg: var(--orange-500);
  --fg: #FFFFFF;
  --bd: var(--orange-500);
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover {
  --bg: var(--orange-600);
  --bd: var(--orange-600);
}

.btn--ghost {
  --bg: transparent;
  --fg: var(--navy-900);
  --bd: var(--line);
  box-shadow: none;
}
.btn--ghost:hover {
  --bd: var(--navy-900);
  background: var(--bg-soft);
}

.btn--ghost-light {
  --bg: transparent;
  --fg: #FFFFFF;
  --bd: rgba(255,255,255,0.3);
  box-shadow: none;
}
.btn--ghost-light:hover {
  --bd: #FFFFFF;
  background: rgba(255,255,255,0.06);
}

.btn--wa { --bg: var(--wa-green); --fg: var(--wa-text); --bd: var(--wa-green); }
.btn--wa:hover { --bg: var(--wa-green-hover); --bd: var(--wa-green-hover); }

.btn--lg { padding: 18px 28px; font-size: 15px; }
.btn--sm { padding: 10px 16px; font-size: 12px; }

.btn-arrow { display: inline-flex; transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ===== Chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.chip--accent {
  background: var(--orange-100);
  color: var(--orange-600);
  border-color: var(--orange-100);
}

.chip--teal {
  background: var(--teal-100);
  color: var(--teal-600);
  border-color: var(--teal-100);
}

.chip--dot::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.chip--live::before {
  background: #16A34A;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  animation: pulse 2s infinite;
}
.chip--live { color: #166534; background: #DCFCE7; border-color: #BBF7D0; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ===== Section heading ===== */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
  max-width: 80ch;
}
.section-head__eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-500);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-head__eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--orange-500);
}
.section-head__title { max-width: 22ch; margin-top: var(--space-2); }
.section-head__sub {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 100%;
  margin-top: var(--space-3);
  line-height: 1.55;
}
/* Variante full-width para secciones donde el sub ocupa toda la línea */
.section-head--full {
  max-width: 100%;
}

.section-head--full .section-head__title {
  max-width: 100%;
}

.section-head--full .section-head__sub {
  max-width: 100%;
}

/* Centered variant */
.section-head--center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}
.section-head--center .section-head__title,
.section-head--center .section-head__sub { max-width: 28ch; }
.section-head--center .section-head__sub { max-width: 60ch; }

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== Card lift — R-002: hover elevation compartida ===== */
@media (hover: hover) {
  .plan:hover,
  .testi-card:hover,
  .gracias-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
}

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* ===== Logo del brand ===== */
.brand-logo {
  display: block;
  height: 128px;
  width: auto;
}
@media (max-width: 600px) { .brand-logo { height: 80px; } }

/* ============================================================
   FAB — Floating WhatsApp button (sticky bottom-right)
   ============================================================ */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--wa-green);
  color: var(--wa-text);
  border-radius: 999px;
  padding: 14px;
  box-shadow: 0 12px 32px rgba(15, 33, 56, 0.18), 0 4px 12px rgba(37, 211, 102, 0.35);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: padding var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base);
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  pointer-events: none;
}

.fab.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fab__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  position: relative;
}

.fab__icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--wa-green);
  animation: fab-pulse 2s ease-out infinite;
}

@keyframes fab-pulse {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.fab__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width var(--dur-base) var(--ease-out),
              padding-inline var(--dur-base) var(--ease-out);
  padding-inline: 0;
}

.fab:hover {
  transform: translateY(-3px) scale(1);
  box-shadow: 0 18px 40px rgba(15, 33, 56, 0.22), 0 6px 16px rgba(37, 211, 102, 0.45);
}

.fab:hover .fab__label {
  max-width: 220px;
  padding-inline: 10px 6px;
}

@media (max-width: 600px) {
  .fab { bottom: 16px; right: 16px; padding: 12px; }
  .fab__icon { width: 24px; height: 24px; }
}

/* Esconde el FAB en móvil cuando aparece la sticky CTA bar */
@media (max-width: 700px) {
  .fab { display: none; }
}

/* ============================================================
   Sticky CTA bar (solo móvil)
   ============================================================ */
.cta-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 95;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 33, 56, 0.06);
  transform: translateY(110%);
  transition: transform var(--dur-base) var(--ease-out);
}
.cta-bar.is-visible { transform: translateY(0); }

.cta-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out);
}
.cta-bar__btn:active { transform: scale(0.97); }

.cta-bar__btn--wa {
  background: var(--wa-green);
  color: var(--wa-text);
}
.cta-bar__btn--primary {
  background: var(--orange-500);
  color: #FFFFFF;
}

@media (max-width: 700px) {
  .cta-bar { display: grid; }
  /* Deja espacio inferior para que el contenido no quede tapado */
  body { padding-bottom: 76px; }
}

/* ============================================================
   Trust bar (SUNAT / SISCONT / SIRE)
   ============================================================ */
.trust {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: var(--space-7);
}
.trust__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}
.trust__label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.trust__label::before,
.trust__label::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--line);
}
.trust__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}
.trust__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-family: var(--font-ui);
}
.trust__logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: grayscale(15%);
  transition: filter var(--dur-base);
}
.trust__logo:hover img { filter: grayscale(0%); }
.trust__logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trust__logo-text strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  line-height: 1;
}
.trust__logo-text span {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.02em;
}
@media (max-width: 800px) {
  .trust__logos { gap: var(--space-5); }
  .trust__logo img { height: 36px; }
  .trust__logo { gap: 10px; }
}
@media (max-width: 500px) {
  .trust__logo-text span { display: none; }
}

/* ============================================================
   Check icon utilitario — compartido por plan__feat,
   plans__guarantee-item y contact__proof-item
   ============================================================ */
.check-item {
  position: relative;
  padding-left: 1.6em;
}
.check-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 16px;
  height: 16px;
  background: var(--teal-500);
  -webkit-mask: var(--icon-check) no-repeat center / contain;
  mask: var(--icon-check) no-repeat center / contain;
}
