/* ═══════════════════════════════════════════════════════════════
   AVANTIA — Sistema de Diseño Compartido · Signal Ledger Preset
   Incluir en cada página: <link rel="stylesheet" href="avantia.css">
   ═══════════════════════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --white:       #F8F9FC;
  --light-blue:  #F0F4FF;
  --sapphire:    #1A56DB;
  --sapphire-dk: #1446B8;
  --sapphire-lg: rgba(26,86,219,0.08);
  --navy:        #0D1F3C;
  --navy-mid:    #162d52;
  --navy-deep:   #070f1e;
  --jade:        #059669;
  --jade-dk:     #047857;
  --muted:       #64748B;
  --border:      #E2E8F0;
  --card:        #FFFFFF;
  --danger:      #DC2626;
  --warn:        #D97706;

  --font-sans: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --r-sm: 0.625rem;
  --r:    1.25rem;
  --r-lg: 1.875rem;

  --shadow:       0 2px 12px rgba(13,31,60,.07), 0 1px 3px rgba(13,31,60,.04);
  --shadow-hover: 0 14px 44px rgba(26,86,219,.14), 0 4px 14px rgba(13,31,60,.09);

  --ease: cubic-bezier(0.16,1,0.3,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--navy);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* ── NOISE TEXTURE ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── SCROLL PROGRESS ── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--sapphire);
  z-index: 10000;
  transition: width 0.08s linear;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1.125rem 5rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s, box-shadow 0.3s;
}
nav.scrolled {
  background: rgba(248,249,252,0.93);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 1px 0 var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.125rem; font-weight: 800;
  color: var(--navy); letter-spacing: -0.025em;
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--jade);
  animation: pulse-dot 2s ease-in-out infinite;
}
.nav-links {
  display: flex; align-items: center; gap: 2.5rem; list-style: none;
}
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--navy); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.375rem;
  background: var(--sapphire); color: #fff !important;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 700;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: pulse-cta 3.5s ease-in-out infinite;
}
.nav-cta:hover {
  background: var(--sapphire-dk); transform: scale(1.04);
  box-shadow: 0 4px 18px rgba(26,86,219,0.35);
  animation: none;
}
.nav-mobile-btn {
  display: none; color: var(--navy); cursor: pointer; padding: 0.25rem;
}
.nav-drawer {
  display: none;
  position: fixed; inset: 0;
  background: rgba(248,249,252,0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
.nav-drawer.open { display: flex; }
.nav-drawer a { font-size: 1.375rem; font-weight: 700; color: var(--navy); transition: color 0.2s; }
.nav-drawer a:hover { color: var(--sapphire); }
.nav-drawer .nav-cta { font-size: 1rem; padding: 0.75rem 2rem; }
.nav-drawer-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  color: var(--navy); cursor: pointer;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  background: var(--sapphire); color: #fff;
  border-radius: var(--r); font-size: 0.9375rem; font-weight: 700;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  animation: pulse-cta 3.5s ease-in-out infinite;
}
.btn-primary:hover {
  background: var(--sapphire-dk); transform: scale(1.04);
  box-shadow: 0 0 0 6px rgba(26,86,219,0.12), 0 6px 24px rgba(26,86,219,0.3);
  animation: none;
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--navy); border-radius: var(--r);
  font-size: 0.9375rem; font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--navy); color: #fff; transform: scale(1.03); }
.btn-jade {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  background: var(--jade); color: #fff;
  border-radius: var(--r); font-size: 0.9375rem; font-weight: 700;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.btn-jade:hover {
  background: var(--jade-dk); transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(5,150,105,0.35);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.22); border-radius: var(--r);
  font-size: 0.9375rem; font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); transform: scale(1.03); }

/* ── SECTION SHARED ── */
.section-wrap { max-width: 1180px; margin: 0 auto; }
.section-tag {
  display: block; margin-bottom: 0.75rem;
  font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--sapphire); font-weight: 500;
}
.section-tag.light { color: var(--jade); }
.section-h2 {
  font-size: clamp(1.85rem, 3vw, 2.625rem);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.2; color: var(--navy); margin-bottom: 1rem;
}
.section-h2.light { color: #fff; }
.section-h2 .accent { font-weight: 700; color: var(--sapphire); font-style: normal; }
.section-h2.light .accent { color: rgba(255,255,255,0.65); }
.section-sub {
  font-size: 1.05rem; color: var(--muted);
  max-width: 560px; line-height: 1.7;
}
.section-sub.light { color: rgba(255,255,255,0.6); max-width: 580px; }

/* ── REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.07s; }
.reveal-d2 { transition-delay: 0.14s; }
.reveal-d3 { transition-delay: 0.21s; }
.reveal-d4 { transition-delay: 0.28s; }
.reveal-d5 { transition-delay: 0.35s; }
.reveal-d6 { transition-delay: 0.42s; }

/* ── STATUS BADGE ── */
.status-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.status-badge.blue {
  background: var(--sapphire-lg); border: 1px solid rgba(26,86,219,0.2);
  color: var(--sapphire);
}
.status-badge.jade {
  background: rgba(5,150,105,0.09); border: 1px solid rgba(5,150,105,0.25);
  color: var(--jade);
}
.status-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── FORM FIELDS ── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-size: 0.78rem; font-weight: 600;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
}
.form-input {
  width: 100%; padding: 0.875rem 1.1rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-sm);
  color: #fff; font-family: var(--font-sans); font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-input:focus { border-color: var(--sapphire); background: rgba(26,86,219,0.08); }
.form-input.error { border-color: #ef4444; }
select.form-input option { background: var(--navy); color: #fff; }
textarea.form-input { resize: vertical; min-height: 110px; }
.form-note {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: rgba(255,255,255,0.28); margin-top: 0.75rem;
}
.form-feedback {
  display: none; padding: 1rem 1.25rem;
  border-radius: var(--r-sm); margin-top: 1rem;
  font-size: 0.875rem; font-weight: 500;
}
.form-feedback.ok {
  display: block;
  background: rgba(5,150,105,0.12); border: 1px solid rgba(5,150,105,0.3); color: #6ee7b7;
}
.form-feedback.ko {
  display: block;
  background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.25); color: #fca5a5;
}

/* ── FOOTER ── */
footer {
  background: var(--navy-deep);
  padding: 3.5rem 5rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2rem; flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 1.5rem;
}
.footer-brand-name {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1rem; color: rgba(255,255,255,0.9);
  margin-bottom: 0.625rem;
}
.footer-tagline {
  font-size: 0.825rem; color: rgba(255,255,255,0.38);
  max-width: 220px; line-height: 1.6;
}
.footer-nav-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h5 {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3); margin-bottom: 0.875rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-col a { font-size: 0.825rem; color: rgba(255,255,255,0.42); transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem;
}
.footer-copy { font-family: var(--font-mono); font-size: 0.72rem; color: rgba(255,255,255,0.22); }
.footer-status {
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--jade);
}
.footer-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--jade); animation: pulse-dot 2s ease-in-out infinite;
}

/* ── KEYFRAMES ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}
@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,86,219,0); }
  50%       { box-shadow: 0 0 0 8px rgba(26,86,219,0.1); }
}
@keyframes float-card {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
  to { width: 100%; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  nav { padding: 1rem 2.5rem; }
  footer { padding: 2.5rem 2.5rem 1.5rem; }
}
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; z-index: 1001; }
  footer { padding: 2rem 1.5rem 1.5rem; }
  .footer-nav-cols { gap: 2rem; }
  .footer-grid { flex-direction: column; gap: 2rem; }
}
@media (max-width: 480px) {
  footer { padding: 1.5rem 1.25rem 1.25rem; }
}

/* ── JS-SHARED ACCORDION ── */
.faq-answer {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.42s var(--ease), opacity 0.3s ease, padding 0.3s;
}
.faq-answer.open { max-height: 280px; opacity: 1; }
