/* ============================================================================
   CONSULTORÍA · LEYDA ELIZABETH MONTAÑO
   Estilos propios (capa superior a Tailwind CDN)
   ========================================================================== */

/* --------------------------------- BASE ---------------------------------- */
:root {
  --navy-950: #050f2b;
  --navy-900: #0a1b3d;
  --navy-800: #10275c;
  --brand-600: #1d4ed8;
  --brand-500: #2563eb;
  --sky-400: #38bdf8;
  --ice: #f4f7ff;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* compensa el navbar fijo */
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: rgba(37, 99, 235, .18);
  color: var(--navy-900);
}

/* Scrollbar discreto */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef2fb; }
::-webkit-scrollbar-thumb { background: #c3cfe6; border-radius: 99px; border: 2px solid #eef2fb; }
::-webkit-scrollbar-thumb:hover { background: #9fb2d6; }

/* ------------------------------ ACCESIBILIDAD ---------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--navy-900);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 .75rem 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid rgba(56, 189, 248, .75);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------- NAVBAR -------------------------------- */
.site-header {
  transition: box-shadow .35s ease, background-color .35s ease, backdrop-filter .35s ease,
              border-color .35s ease, height .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: rgba(15, 34, 78, .08);
  box-shadow: 0 12px 34px -22px rgba(10, 27, 61, .55);
}

.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-500), var(--sky-400));
  transition: width .3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Menú móvil con desplazamiento suave */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .4s ease, opacity .3s ease, padding .3s ease;
  padding-top: 0;
  padding-bottom: 0;
}
#mobile-menu.open {
  max-height: 460px;
  opacity: 1;
}

/* --------------------------------- BOTONES ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-weight: 600;
  border-radius: .8rem;
  padding: .9rem 1.6rem;
  font-size: .95rem;
  transition: transform .25s cubic-bezier(.2, .8, .3, 1), box-shadow .25s ease, background-color .25s ease, color .25s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 55%, #0ea5e9 130%);
  color: #fff;
  box-shadow: 0 16px 34px -16px rgba(29, 78, 216, .75);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -16px rgba(29, 78, 216, .85);
}

.btn-light {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}
.btn-light:hover {
  background: rgba(255, 255, 255, .16);
  transform: translateY(-3px);
}

.btn-outline {
  background: #fff;
  color: var(--navy-900);
  border: 1px solid rgba(15, 34, 78, .16);
}
.btn-outline:hover {
  transform: translateY(-3px);
  border-color: rgba(29, 78, 216, .45);
  box-shadow: 0 16px 34px -20px rgba(10, 27, 61, .6);
}

/* ---------------------------------- HERO --------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(56, 189, 248, .28), transparent 62%),
    radial-gradient(760px 480px at 8% 110%, rgba(37, 99, 235, .38), transparent 60%),
    linear-gradient(155deg, var(--navy-950) 0%, var(--navy-900) 45%, #0e2a63 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 25%, transparent 78%);
  z-index: -1;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}
.blob-1 { width: 340px; height: 340px; background: #1d4ed8; top: -80px; right: 8%; }
.blob-2 { width: 260px; height: 260px; background: #0ea5e9; bottom: -60px; left: 6%; animation-delay: -5s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(0, -26px, 0) scale(1.06); }
}

.gradient-text {
  background: linear-gradient(100deg, #7dd3fc 0%, #60a5fa 45%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Tarjeta flotante del hero */
.float-card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px -35px rgba(0, 0, 0, .85);
}
.float-card-2 { animation: float 7s ease-in-out infinite; }
.float-card-3 { animation: float 9s ease-in-out infinite; animation-delay: -3s; }

/* --------------------------------- TARJETAS ------------------------------ */
.card {
  background: #fff;
  border: 1px solid rgba(15, 34, 78, .08);
  border-radius: 1.25rem;
  transition: transform .35s cubic-bezier(.2, .8, .3, 1), box-shadow .35s ease, border-color .35s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -34px rgba(10, 27, 61, .55);
  border-color: rgba(37, 99, 235, .3);
}
.card-featured {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.card-featured::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--brand-500), var(--sky-400), #a78bfa);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* --------------------------------- FORMULARIOS --------------------------- */
.field {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(15, 34, 78, .16);
  border-radius: .7rem;
  padding: .72rem .9rem;
  font-size: .9rem;
  color: #0f172a;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field::placeholder { color: #94a3b8; }
.field:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
}
label.lbl {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: .4rem;
}

/* Honeypot antispam: invisible para humanos */
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }

/* --------------------------------- REVEAL -------------------------------- */
/*  IMPORTANTE: el contenido NUNCA debe depender del JavaScript.
    Por defecto los bloques están VISIBLES; solo se ocultan cuando main.js
    confirma que está corriendo (añade .anim-ready al <html>).
    Así, si el script no carga o falla, el texto se muestra igualmente. */
.reveal {
  transition: opacity .7s cubic-bezier(.2, .8, .3, 1), transform .7s cubic-bezier(.2, .8, .3, 1);
}
.anim-ready .reveal:not(.is-visible)      { opacity: 0; transform: translateY(26px); }
.anim-ready .reveal-left:not(.is-visible)  { transform: translateX(-30px); }
.anim-ready .reveal-right:not(.is-visible) { transform: translateX(30px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------- ACORDEÓN ------------------------------ */
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--navy-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { transition: transform .3s ease; flex-shrink: 0; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item[open] { border-color: rgba(37, 99, 235, .35); box-shadow: 0 20px 45px -32px rgba(10, 27, 61, .6); }

/* --------------------------------- TIMELINE ------------------------------ */
.step-line::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(37, 99, 235, .35), rgba(56, 189, 248, .35));
}
@media (max-width: 767px) { .step-line::before { display: none; } }

/* --------------------------------- MÁS/CHECK ----------------------------- */
.tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .14);
  color: #16a34a;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ------------------------------ BOTONES FLotantes ------------------------ */
.float-action {
  position: fixed;
  right: 20px;
  z-index: 60;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .45);
  transition: transform .3s ease, opacity .3s ease;
}
.float-action:hover { transform: scale(1.08) translateY(-2px); }
#wa-float  { bottom: 88px; background: #25d366; }
#wa-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(37, 211, 102, .6);
  animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}
#back-top { bottom: 24px; background: var(--navy-900); color: #fff; opacity: 0; pointer-events: none; }
#back-top.show { opacity: 1; pointer-events: auto; }

@keyframes ping {
  0%   { transform: scale(1); opacity: .8; }
  75%, 100% { transform: scale(1.7); opacity: 0; }
}

/* --------------------------------- TABLA ADMIN --------------------------- */
.table-row-hover:hover { background: #f7faff; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.badge-pend { background: #fef3c7; color: #92400e; }
.badge-ok   { background: #dcfce7; color: #166534; }

/* --------------------------------- UTILIDADES ---------------------------- */
.text-balance { text-wrap: balance; }
.divider-grad {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-500), var(--sky-400), transparent);
}
.grid-surface {
  background-color: var(--ice);
  background-image:
    linear-gradient(rgba(15, 34, 78, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 34, 78, .05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* --------------------------------- RESPONSIVE ---------------------------- */
@media (max-width: 640px) {
  .btn { width: 100%; }
  .float-action { width: 48px; height: 48px; right: 14px; }
}

/* ------------------------------- 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;
  }
  .reveal, .anim-ready .reveal:not(.is-visible) { opacity: 1 !important; transform: none !important; }
}
