/* ========== TOKENS ========== */
:root {
  --navy-900: #0A2540;
  --navy-800: #0F2D4F;
  --navy-700: #14365E;
  --navy-600: #1E4976;
  --navy-500: #2E6BAB;
  --navy-50:  #EEF4FB;

  --accent: #10B981;          /* verde acción */
  --accent-hover: #059669;
  --accent-50: #ECFDF5;
  --accent-glow: rgba(16,185,129,.35);

  --warn-50: #FEF3C7;
  --warn-700: #B45309;

  --ink-900: #0B1220;
  --ink-700: #334155;
  --ink-500: #64748B;
  --ink-300: #CBD5E1;
  --ink-100: #E5E9F0;
  --ink-50:  #F1F5F9;

  --bg:      #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-warm: #FBFAF7;          /* tono cálido sutil para romper monotonía */

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(10,37,64,.04), 0 1px 3px rgba(10,37,64,.06);
  --shadow-md: 0 4px 12px rgba(10,37,64,.06), 0 2px 4px rgba(10,37,64,.04);
  --shadow-lg: 0 24px 48px -12px rgba(10,37,64,.18);
  --shadow-xl: 0 40px 80px -20px rgba(10,37,64,.25);

  --container: 1200px;

  --font-display: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--navy-900);
}
h1 { font-size: clamp(2.25rem, 5.5vw, 4.25rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { color: var(--ink-700); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--navy-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  background: var(--navy-50);
  border-radius: 999px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16,185,129,.18);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  position: relative;
  isolation: isolate;
}
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Botón CTA principal: VERDE vibrante con glow para "Auditoría gratuita" */
.btn-cta {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  color: #fff;
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255,255,255,.2) inset,
    0 -1px 0 rgba(0,0,0,.08) inset,
    0 8px 20px -4px rgba(16,185,129,.45);
  border: 1px solid rgba(0,0,0,.05);
}
.btn-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 50%);
  z-index: -1;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.2) inset,
    0 -1px 0 rgba(0,0,0,.08) inset,
    0 12px 28px -4px rgba(16,185,129,.55);
}
.btn-cta:active { transform: translateY(0); }

.btn-primary {
  background: var(--navy-900);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--navy-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: #fff;
  color: var(--navy-900);
  border: 1px solid var(--ink-100);
}
.btn-secondary:hover {
  border-color: var(--navy-900);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--navy-900);
  padding: 10px 16px;
}
.btn-ghost:hover { color: var(--navy-600); }

.btn-lg { padding: 16px 28px; font-size: 1rem; }

/* ========== HEADER ========== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
header.scrolled { border-bottom-color: var(--ink-100); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo > span:last-child {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .logo { font-size: 1.0625rem; gap: 8px; }
  .logo-mark { width: 28px; height: 28px; font-size: 0.8125rem; }
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--navy-900);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(16,185,129,.4));
}
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--ink-700);
  transition: all .2s;
}
.nav-links a:hover { color: var(--navy-900); background: var(--bg-soft); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 10px;
    background: transparent;
    color: var(--navy-900);
  }
  .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 520px) {
  /* Botón Auditoría más compacto en móvil */
  .nav-cta .btn-cta {
    padding: 8px 12px;
    font-size: 0.8125rem;
    border-radius: 8px;
    gap: 4px;
  }
  .nav-cta .btn-cta .arrow { display: none; }
}
@media (max-width: 380px) {
  /* En pantallas muy pequeñas, texto más corto */
  .nav-cta .btn-cta {
    padding: 7px 10px;
    font-size: 0.75rem;
  }
}

/* Mobile menu drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10,37,64,.4);
  backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(320px, 86vw);
  background: #fff;
  padding: 24px;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.mobile-menu.open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.mobile-menu-panel a {
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--ink-900);
  border-radius: 8px;
}
.mobile-menu-panel a:hover { background: var(--bg-soft); }
.mobile-menu-panel .btn-cta { margin-top: auto; justify-content: center; }

/* ========== SECTIONS COMMON ========== */
section.block { padding: 80px 0; }
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.section-header p {
  font-size: 1.0625rem;
  margin-top: 16px;
  color: var(--ink-500);
}
@media (max-width: 720px) {
  section.block { padding: 60px 0; }
  .section-header { margin-bottom: 36px; }
}

/* ========== FOOTER ========== */
footer {
  background: var(--navy-900);
  color: rgba(255,255,255,.6);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand .logo-mark { background: #fff; color: var(--navy-900); }
.footer-brand p {
  color: rgba(255,255,255,.55);
  font-size: 0.9375rem;
  max-width: 320px;
  margin-bottom: 24px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  transition: all .2s;
}
.footer-social a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  transform: translateY(-2px);
}
.footer-col h5 {
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: rgba(255,255,255,.6);
  font-size: 0.9375rem;
  transition: color .2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: inherit; margin-right: 16px; }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  footer { padding: 48px 0 24px; }
}

/* ========== WHATSAPP FLOATING ========== */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  background: #25D366;
  color: #fff;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9375rem;
  box-shadow: 0 12px 28px rgba(37,211,102,.45);
  transition: all .25s;
}
.wa-float:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 36px rgba(37,211,102,.55);
}
.wa-float .wa-icon {
  width: 28px; height: 28px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #25D366;
}
@media (max-width: 520px) {
  .wa-float { bottom: 16px; right: 16px; padding: 12px; }
  .wa-float span:not(.wa-icon) { display: none; }
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 95;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .3s;
}
.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}
.cookie-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cookie-banner-head h4 { font-size: 1rem; }
.cookie-icon {
  width: 32px; height: 32px;
  background: var(--bg-soft);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.cookie-banner p {
  font-size: 0.875rem;
  color: var(--ink-500);
  line-height: 1.5;
  margin-bottom: 16px;
}
.cookie-banner p a {
  color: var(--navy-600);
  text-decoration: underline;
  font-weight: 500;
}
.cookie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cookie-actions button {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all .2s;
  flex: 1;
  min-width: 100px;
}
.cookie-actions .cookie-accept {
  background: var(--navy-900);
  color: #fff;
}
.cookie-actions .cookie-accept:hover { background: var(--navy-800); }
.cookie-actions .cookie-reject {
  background: var(--bg-soft);
  color: var(--ink-700);
  border: 1px solid var(--ink-100);
}
.cookie-actions .cookie-reject:hover { background: var(--ink-50); }
.cookie-actions .cookie-config {
  background: transparent;
  color: var(--ink-500);
  flex-basis: 100%;
  font-size: 0.8125rem;
  padding: 4px;
}
.cookie-actions .cookie-config:hover { color: var(--navy-900); }

@media (max-width: 520px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: 84px;
    padding: 20px;
  }
}

/* Cookie preferences modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10,37,64,.6);
  backdrop-filter: blur(6px);
  padding: 16px;
}
.cookie-modal.open { display: flex; }
.cookie-modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 32px;
  box-shadow: var(--shadow-xl);
}
.cookie-modal-card h3 { margin-bottom: 8px; }
.cookie-modal-card > p {
  font-size: 0.9375rem;
  color: var(--ink-500);
  margin-bottom: 24px;
}
.cookie-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px solid var(--ink-100);
  gap: 16px;
}
.cookie-row:first-of-type { border-top: 0; }
.cookie-row-info h5 { font-size: 0.9375rem; margin-bottom: 4px; }
.cookie-row-info p { font-size: 0.8125rem; color: var(--ink-500); line-height: 1.5; }

.toggle {
  position: relative;
  width: 42px; height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--ink-300);
  border-radius: 999px;
  cursor: pointer;
  transition: .25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .25s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle input:disabled + .toggle-slider { background: var(--navy-900); opacity: .6; cursor: not-allowed; }

.cookie-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.cookie-modal-actions button {
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.875rem;
  flex: 1;
  min-width: 120px;
  transition: all .2s;
}

/* ========== REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-card { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ========== LEGAL PAGES ========== */
.legal-page {
  padding: 80px 0 100px;
  max-width: 820px;
  margin: 0 auto;
}
.legal-page .breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-500);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.legal-page h1 { margin-bottom: 16px; font-size: clamp(2rem, 4vw, 3rem); }
.legal-page .updated {
  color: var(--ink-500);
  font-size: 0.875rem;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink-100);
}
.legal-page h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  scroll-margin-top: 100px;
}
.legal-page h3 { font-size: 1.125rem; margin: 24px 0 12px; }
.legal-page p,
.legal-page li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-700);
  margin-bottom: 12px;
}
.legal-page ul, .legal-page ol { padding-left: 24px; margin-bottom: 16px; }
.legal-page strong { color: var(--navy-900); }
.legal-page a { color: var(--navy-600); text-decoration: underline; }
.legal-page .info-box {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}
.legal-page .info-box p { margin: 0; font-size: 0.875rem; }
.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.875rem;
}
.legal-page table th,
.legal-page table td {
  text-align: left;
  padding: 12px;
  border: 1px solid var(--ink-100);
}
.legal-page table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--navy-900);
}
