/* ============================================================
   Nexus Siniestros — identidad visual
   Toda la paleta y tipografía se ajusta desde estas variables.
   ============================================================ */
:root {
  --nx-navy-deep: #0A1830;
  --nx-navy: #10243E;
  --nx-navy-soft: #1A3354;
  --nx-teal: #2A9D8F;
  --nx-teal-bright: #3DBFAE;
  --nx-teal-soft: #E6F4F2;
  --nx-paper: #F7F9FB;
  --nx-surface: #FFFFFF;
  --nx-ink: #16202B;
  --nx-muted: #5A6675;
  --nx-line: #DDE4EB;
  --nx-on-dark: #EAF1F8;
  --nx-on-dark-muted: #9FB2C6;

  --nx-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --nx-font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --nx-radius: 14px;
  --nx-shadow: 0 1px 2px rgba(16, 36, 62, .05), 0 10px 30px rgba(16, 36, 62, .08);
  --nx-shadow-lift: 0 2px 4px rgba(16, 36, 62, .06), 0 18px 44px rgba(16, 36, 62, .14);
}

/* ---- base ---- */
body {
  font-family: var(--nx-font-body);
  color: var(--nx-ink);
  background: var(--nx-paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .nx-display {
  font-family: var(--nx-font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.15;
}

a { color: var(--nx-teal); }
a:hover { color: var(--nx-teal-bright); }

::selection { background: var(--nx-teal); color: #fff; }

.nx-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--nx-teal);
  margin-bottom: .75rem;
}

.nx-lead { font-size: 1.15rem; color: var(--nx-muted); }
.on-dark .nx-lead { color: var(--nx-on-dark-muted); }

/* ---- botones ---- */
.nx-btn-primary,
.nx-btn-ghost {
  display: inline-block;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.nx-btn-primary {
  background: var(--nx-teal);
  color: #fff;
  box-shadow: 0 6px 18px rgba(42, 157, 143, .35);
}
.nx-btn-primary:hover {
  background: var(--nx-teal-bright);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(42, 157, 143, .45);
}
.nx-btn-ghost {
  border-color: rgba(255, 255, 255, .45);
  color: var(--nx-on-dark);
}
.nx-btn-ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  transform: translateY(-2px);
}
.nx-btn-ghost.on-light {
  border-color: var(--nx-navy);
  color: var(--nx-navy);
}
.nx-btn-ghost.on-light:hover {
  background: var(--nx-navy);
  color: #fff;
}
.nx-btn-primary:focus-visible,
.nx-btn-ghost:focus-visible,
.nx-navbar a:focus-visible {
  outline: 3px solid var(--nx-teal-bright);
  outline-offset: 3px;
}

/* ---- navbar ---- */
.nx-navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  padding: 1.1rem 0;
  background: transparent;
  transition: background-color .3s ease, padding .3s ease, box-shadow .3s ease;
}
.nx-navbar.scrolled {
  background: rgba(10, 24, 48, .92);
  backdrop-filter: blur(10px);
  padding: .55rem 0;
  box-shadow: 0 6px 24px rgba(6, 14, 28, .35);
}
.nx-brand {
  font-family: var(--nx-font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: -.01em;
}
.nx-brand .dot { color: var(--nx-teal-bright); }
.nx-navbar .nav-link {
  color: var(--nx-on-dark-muted);
  font-weight: 500;
  padding: .35rem .85rem;
  border-radius: 8px;
}
.nx-navbar .nav-link:hover { color: #fff; }
.nx-navbar .nav-link.active { color: #fff; }
.nx-navbar .nav-link.active::after {
  content: "";
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--nx-teal-bright);
  margin-top: 2px;
}
.nx-navbar .nx-btn-primary { padding: .5rem 1.15rem; font-size: .9rem; }
.nx-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, .35);
}
.nx-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
@media (max-width: 991.98px) {
  .nx-navbar .navbar-collapse {
    background: rgba(10, 24, 48, .97);
    border-radius: var(--nx-radius);
    margin-top: .75rem;
    padding: 1rem 1.25rem;
  }
}

/* ---- hero (home) y page-head (subpáginas) ---- */
.nx-hero,
.nx-page-head {
  position: relative;
  overflow: hidden;
  color: var(--nx-on-dark);
  background:
    linear-gradient(160deg, var(--nx-navy-deep) 0%, var(--nx-navy) 55%, var(--nx-navy-soft) 100%);
  background-size: 180% 180%;
}
.nx-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 5rem;
  animation: nx-drift 24s ease-in-out infinite alternate;
}
.nx-page-head {
  padding: 9.5rem 0 4.5rem;
}
.nx-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: #fff;
}
.nx-page-head h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: #fff;
}
@keyframes nx-drift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

/* La firma: el halo que respira detrás del slogan. */
.nx-breath {
  position: absolute;
  width: min(72vw, 900px);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(61, 191, 174, .28) 0%,
    rgba(61, 191, 174, .10) 42%,
    rgba(61, 191, 174, 0) 68%);
  animation: nx-breathe 5.5s ease-in-out infinite;
}
@keyframes nx-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(.82); opacity: .75; }
  50%      { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

/* entrada del hero */
.nx-rise {
  opacity: 0;
  transform: translateY(26px);
  animation: nx-rise .9s cubic-bezier(.2, .7, .2, 1) forwards;
}
.nx-rise.d1 { animation-delay: .15s; }
.nx-rise.d2 { animation-delay: .35s; }
.nx-rise.d3 { animation-delay: .55s; }
@keyframes nx-rise {
  to { opacity: 1; transform: none; }
}

/* ---- secciones ---- */
[id] { scroll-margin-top: 84px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.nx-section { padding: 5.5rem 0; }
.nx-section.tight { padding: 4rem 0; }
.nx-section.alt { background: var(--nx-surface); }
.nx-section.wash { background: var(--nx-teal-soft); }
.nx-section h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: .75rem; }

/* ---- reveal on-scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }
.reveal.d4 { transition-delay: .4s; }

/* ---- cards ---- */
.nx-card {
  background: var(--nx-surface);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  padding: 1.75rem;
  height: 100%;
  box-shadow: var(--nx-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nx-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nx-shadow-lift);
  border-color: var(--nx-teal);
}
.nx-card h3 { font-size: 1.25rem; margin: .9rem 0 .4rem; }
.nx-card p { color: var(--nx-muted); margin-bottom: .5rem; }
.nx-card .nx-more {
  font-weight: 600;
  text-decoration: none;
}
.nx-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--nx-teal-soft);
  color: var(--nx-teal);
}
.nx-icon svg { width: 24px; height: 24px; }

/* ---- proceso: la ruta ---- */
.nx-route { position: relative; }
.nx-route::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 12%;
  right: 12%;
  border-top: 2px dashed var(--nx-teal);
  opacity: .5;
}
.nx-step { position: relative; text-align: center; padding: 0 .75rem; }
.nx-step .badge-num {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--nx-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--nx-navy);
  border: 3px solid var(--nx-teal);
}
.nx-step h3 { font-size: 1.2rem; }
.nx-step p { color: var(--nx-muted); font-size: .95rem; }
@media (max-width: 767.98px) {
  .nx-route::before {
    top: 8%;
    bottom: 8%;
    left: 50%;
    right: auto;
    border-top: 0;
    border-left: 2px dashed var(--nx-teal);
  }
  .nx-step { margin-bottom: 2.25rem; }
}

/* ---- banda de números ---- */
.nx-numbers {
  background: linear-gradient(160deg, var(--nx-navy-deep), var(--nx-navy));
  color: var(--nx-on-dark);
  padding: 4rem 0;
}
.nx-counter {
  font-family: var(--nx-font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.nx-counter .suffix { color: var(--nx-teal-bright); }
.nx-numbers .label {
  color: var(--nx-on-dark-muted);
  margin-top: .35rem;
}

/* ---- filas alternadas (servicios) ---- */
.nx-alt-row { padding: 3.5rem 0; }
.nx-alt-row .nx-visual {
  border-radius: var(--nx-radius);
  min-height: 240px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(61, 191, 174, .25), transparent 60%),
    linear-gradient(160deg, var(--nx-navy-deep), var(--nx-navy-soft));
  color: var(--nx-teal-bright);
}
.nx-alt-row .nx-visual svg { width: 84px; height: 84px; opacity: .9; }
.nx-alt-row h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.nx-alt-row p { color: var(--nx-muted); max-width: 46ch; }

/* ---- equipo ---- */
.nx-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  font-family: var(--nx-font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(160deg, var(--nx-navy), var(--nx-teal));
}

/* ---- formulario ---- */
.nx-form .form-control {
  border-color: var(--nx-line);
  border-radius: 10px;
  padding: .7rem .9rem;
}
.nx-form .form-control:focus {
  border-color: var(--nx-teal);
  box-shadow: 0 0 0 .2rem rgba(42, 157, 143, .18);
}

/* ---- footer ---- */
.nx-footer {
  background: var(--nx-navy-deep);
  color: var(--nx-on-dark-muted);
  padding: 3.5rem 0 2rem;
}
.nx-footer h4 {
  font-family: var(--nx-font-body);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nx-on-dark);
  margin-bottom: 1rem;
}
.nx-footer a {
  color: var(--nx-on-dark-muted);
  text-decoration: none;
  display: inline-block;
  padding: .15rem 0;
}
.nx-footer a:hover { color: #fff; }
.nx-footer .legal {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: .85rem;
}

/* ---- accesibilidad: sin movimiento ---- */
@media (prefers-reduced-motion: reduce) {
  .nx-hero, .nx-breath { animation: none; }
  .nx-rise { opacity: 1; transform: none; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nx-btn-primary, .nx-btn-ghost, .nx-card { transition: none; }
}
