/* ============================================================
   JADA — Hoja de estilos principal
   Sistema de diseño v1.2 · Mayo 2025
   Mobile-first · Dark mode automático · Sin frameworks
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── Tokens de marca ────────────────────────────────────── */
:root {
  /* Brand */
  --brand-900: #011F51;
  --brand-700: #064379;
  --brand-500: #1A6DC8;
  --brand-300: #5FA3E0;
  --brand-100: #C8DEFA;
  --brand-50:  #EBF2FD;
  /* Gradient */
  --gradient: linear-gradient(140deg, #011F51 0%, #064379 55%, #1A6DC8 100%);
  /* Neutrals */
  --n-900: #0D1220;
  --n-700: #2B3352;
  --n-500: #566B92;
  --n-300: #A5B6D0;
  --n-100: #EBF0F8;
  --n-50:  #F5F7FB;
  /* WhatsApp */
  --wa:    #25D366;
  --wa-dk: #1ebe5d;
  /* Type */
  --font-display: 'Barlow Semi Condensed', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  /* Layout */
  --max-w: 1200px;
  --px: 24px;

  /* ── Tokens semánticos (light mode) ── */
  --bg-page:    #ffffff;
  --bg-surface: #ffffff;
  --bg-muted:   #F5F7FB;
  --bg-accent:  #EBF2FD;
  --text-1:     #0D1220;
  --text-2:     #2B3352;
  --text-3:     #566B92;
  --border-clr: #EBF0F8;
  --border-sub: #F5F7FB;
}

/* ── Dark mode — se activa con la preferencia del sistema ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:    #070B14;
    --bg-surface: #0E1525;
    --bg-muted:   #111B2A;
    --bg-accent:  #0D2040;
    --text-1:     #EDF2FF;
    --text-2:     #9DB2D8;
    --text-3:     #6B85A8;
    --border-clr: rgba(255,255,255,.08);
    --border-sub: rgba(255,255,255,.04);
    /* Brand overrides */
    --brand-50:  #0D2040;
    --brand-100: #1E3D6E;
    --n-50:  #111B2A;
    --n-100: rgba(255,255,255,.08);
  }
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
}
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text-1);
}
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: .01em; }
h2 { font-size: clamp(24px, 3.5vw, 36px); font-weight: 600; letter-spacing: .01em; }
h3 { font-family: var(--font-body); font-size: 18px; font-weight: 600; }
p  { color: var(--text-2); line-height: 1.75; }
p + p { margin-top: 1em; }

.label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand-500);
}
.label-light { color: var(--brand-300); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  transition: background .18s, border-color .18s, transform .12s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-wa  { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dk); }

.btn-primary { background: var(--brand-500); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.1);
  border-color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--brand-500);
  padding-left: 0;
  padding-right: 0;
  border: none;
}
.btn-ghost:hover { color: var(--brand-700); }
.btn-ghost svg { transition: transform .18s; }
.btn-ghost:hover svg { transform: translateX(4px); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-clr);
  box-shadow: 0 1px 12px rgba(1,31,81,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 26px; width: auto; }

/* En dark mode el logo (color) se invierte a blanco */
@media (prefers-color-scheme: dark) {
  .site-header .logo img { filter: brightness(0) invert(1); }
}

/* Desktop nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
.desktop-nav a:not(.nav-cta) {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.desktop-nav a:not(.nav-cta):hover { color: var(--brand-500); background: var(--bg-accent); }
.desktop-nav a.active:not(.nav-cta) { color: var(--brand-500); font-weight: 600; }

.nav-cta {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--wa);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
  flex-shrink: 0;
  transition: background .18s;
}
.nav-cta:hover { background: var(--wa-dk); }
.nav-cta svg { width: 18px; height: 18px; }

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  margin-left: auto;
  width: 36px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg-page);
  border-top: 1px solid var(--border-clr);
  padding: 12px 0 20px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-2);
  padding: 13px 24px;
  border-bottom: 1px solid var(--border-sub);
  transition: color .15s, background .15s;
}
.mobile-nav a:hover { color: var(--brand-500); background: var(--bg-accent); }
.mobile-nav a.active { color: var(--brand-500); font-weight: 600; }
.mobile-nav .btn-wa {
  margin: 16px 24px 0;
  justify-content: center;
  color: #fff;
  background: var(--wa);
  border-bottom: none;
  padding: 14px 28px;
}
.mobile-nav .btn-wa:hover { background: var(--wa-dk); color: #fff; }

/* ── Hero ─────────────────────────────────────────────────
   Estructura flexible: soporta gradiente solo, imagen de
   fondo o video de fondo. Ver comentarios en el HTML.
   ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 96px 0 100px;
}
/* Capa de medios (video o imagen) */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video,
.hero-img-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Overlay gradiente para legibilidad cuando hay video/imagen */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg,
    rgba(1,31,81,.95)  0%,
    rgba(6,67,121,.88) 55%,
    rgba(26,109,200,.78) 100%
  );
  z-index: 1;
}
/* Fondo gradiente sólido (placeholder activo hasta tener el archivo) */
.hero-bg-solid {
  position: absolute;
  inset: 0;
  background: var(--gradient);
  z-index: 0;
}
/* Contenido del hero siempre encima */
.hero > .container { position: relative; z-index: 2; }

.hero .label { color: var(--brand-300); margin-bottom: 20px; display: block; }
.hero h1 { color: #fff; max-width: 680px; margin-bottom: 24px; }
.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,.82);
  max-width: 540px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Page hero (páginas interiores) */
.page-hero {
  background: var(--gradient);
  color: #fff;
  padding: 72px 0 80px;
}
.page-hero .label { color: var(--brand-300); margin-bottom: 16px; display: block; }
.page-hero h1 { color: #fff; max-width: 700px; margin-bottom: 20px; }
.page-hero p  { color: rgba(255,255,255,.8); max-width: 600px; font-size: 18px; }

/* ── Section headers ─────────────────────────────────────── */
.section-header { margin-bottom: 52px; }
.section-header .label { display: block; margin-bottom: 14px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 600px; color: var(--text-2); }
.section-header.center { text-align: center; }
.section-header.center p { margin: 0 auto; }

/* ── Fondos de sección ───────────────────────────────────── */
.bg-white { background: var(--bg-surface); }
.bg-light { background: var(--bg-muted); }
.bg-brand { background: var(--bg-accent); }
.bg-dark  { background: var(--brand-900); }
.bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark .label { color: var(--brand-300); }
.bg-dark p  { color: var(--brand-100); }

/* ── Cards grid ──────────────────────────────────────────── */
.grid-3 { display: grid; gap: 24px; grid-template-columns: 1fr; }
.grid-2 { display: grid; gap: 24px; grid-template-columns: 1fr; }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-clr);
  border-radius: 16px;
  padding: 32px;
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.card-icon svg { width: 26px; height: 26px; color: var(--brand-500); }
.card h3 { margin-bottom: 10px; }

.bg-dark .card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
}
.bg-dark .card h3 { color: #fff; }
.bg-dark .card p  { color: rgba(255,255,255,.7); }
.bg-dark .card-icon { background: rgba(255,255,255,.08); }
.bg-dark .card-icon svg { color: var(--brand-300); }

/* ── Feature list ────────────────────────────────────────── */
.feature-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.55;
}
.feature-list li .check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--bg-accent);
  border: 1.5px solid var(--brand-300);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  flex-shrink: 0;
}
.feature-list li .check svg { width: 12px; height: 12px; color: var(--brand-500); }

/* ── System cards (ventanas page) ───────────────────────── */
.system-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-clr);
  border-radius: 20px;
  padding: 44px;
}
/* Layout interior: texto | imagen */
.system-card-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}
.system-card-body { display: flex; flex-direction: column; }

/* Placeholder logo de marca (YoungLim / Veratec) */
.brand-logo-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  background: var(--bg-muted);
  border: 1.5px dashed var(--border-clr);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 28px;
  align-self: flex-start;
  cursor: default;
}
.brand-logo-placeholder svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .5; }
/* Reemplazar el placeholder con la imagen real del logo:
   <img src="recursos/logos/younglim.svg" alt="YoungLim"
        height="48" style="align-self:flex-start; margin-bottom:28px"> */

/* Contenedor de imagen del sistema */
.system-card-media {
  aspect-ratio: 4/3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-muted);
  flex-shrink: 0;
}
.system-card-media img { width: 100%; height: 100%; object-fit: cover; }

.system-tag {
  display: inline-block;
  background: var(--bg-accent);
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  align-self: flex-start;
}
.system-card h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 16px; }
.system-card-body > p { max-width: 560px; margin-bottom: 4px; }

/* ── Image placeholders ──────────────────────────────────── */
.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--brand-300);
  text-align: center;
  padding: 32px;
  border-radius: inherit;
}
.img-placeholder svg { width: 38px; height: 38px; opacity: .55; flex-shrink: 0; }
.img-placeholder .ph-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  opacity: .7;
  max-width: 200px;
  line-height: 1.5;
}

/* ── Split layout (texto + imagen en secciones) ──────────── */
.split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.split-text { display: flex; flex-direction: column; gap: 20px; }
.split-img {
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-muted);
}
.split-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Process steps ───────────────────────────────────────── */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 28px;
  padding: 52px 0;
  border-bottom: 1px solid var(--border-clr);
}
.step:first-child { padding-top: 0; }
.step:last-child  { border-bottom: none; padding-bottom: 0; }
.step-num {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  color: var(--brand-100);
  line-height: 1;
  padding-top: 2px;
}
.step-body h2 { font-size: clamp(20px, 2.5vw, 26px); margin-bottom: 12px; }
.step-body p  { max-width: 620px; }

/* ── Obras grid ──────────────────────────────────────────── */
.obras-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.obra-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-muted);
  border: 1px solid var(--border-clr);
}
.obra-img {
  aspect-ratio: 4/3;
  background: var(--bg-accent);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.obra-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.07);
  transition: transform 0.45s ease;
}
.obra-img:hover img { transform: scale(1); }
.obra-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  color: var(--brand-300);
  font-size: 13px;
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
}
.obra-placeholder svg { width: 36px; height: 36px; opacity: .45; }
.obra-info { padding: 20px 22px 22px; }
.obra-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-500);
  background: var(--bg-accent);
  padding: 3px 12px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.obra-info h3 { font-size: 16px; margin-bottom: 4px; }
.obra-meta { font-size: 13px; color: var(--text-3); }
.obras-disclaimer {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 16px;
  line-height: 1.65;
}

/* ── Contact layout ──────────────────────────────────────── */
.contact-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-clr);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-card h2 { font-size: clamp(20px, 2.5vw, 24px); }
.contact-card > p { font-size: 15px; }
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.contact-icon svg { width: 24px; height: 24px; color: var(--brand-500); fill: currentColor; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-500);
}
.contact-link:hover { color: var(--brand-700); }
.social-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-muted);
  border: 1px solid var(--border-clr);
  padding: 10px 18px;
  border-radius: 10px;
  transition: color .15s, background .15s, border-color .15s;
}
.social-btn:hover {
  color: var(--brand-500);
  background: var(--bg-accent);
  border-color: var(--brand-100);
}
.social-btn svg { width: 18px; height: 18px; }

/* Coverage box */
.coverage-box {
  background: var(--bg-accent);
  border: 1px solid var(--brand-100);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 20px;
}
.coverage-box svg { width: 28px; height: 28px; color: var(--brand-500); flex-shrink: 0; margin-top: 2px; }
.coverage-box h3 { font-size: 17px; margin-bottom: 6px; }
.coverage-box p { font-size: 15px; }

/* ── CTA section ─────────────────────────────────────────── */
.cta-section {
  background: var(--gradient);
  color: #fff;
  padding: 88px 0;
  text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: 16px; }
.cta-section p {
  color: rgba(255,255,255,.82);
  max-width: 480px;
  margin: 0 auto 36px;
  font-size: 17px;
}

/* ── Problem / texto largo ────────────────────────────────── */
.problem-text { max-width: 680px; }
.problem-text p { font-size: 18px; line-height: 1.75; }

/* ── Process preview (home) ─────────────────────────────── */
.process-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  counter-reset: step;
  margin-top: 8px;
}
.process-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-clr);
}
.process-item:last-child { border-bottom: none; }
.process-item-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-100);
  width: 36px;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 4px;
}
.process-item-body h3 { font-size: 17px; margin-bottom: 4px; }
.process-item-body p  { font-size: 15px; }

/* ── Clients section ─────────────────────────────────────── */
.clients-text { max-width: 640px; font-size: 18px; line-height: 1.75; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--n-900);
  color: #fff;
  padding: 64px 0 0;
}
@media (prefers-color-scheme: dark) {
  .site-footer { border-top: 1px solid rgba(255,255,255,.06); }
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .footer-logo img {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}
.footer-brand p { font-size: 14px; color: var(--n-300); max-width: 260px; line-height: 1.6; }
.footer-nav-col h4,
.footer-contact-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--n-500);
  margin-bottom: 16px;
}
.footer-nav-col ul,
.footer-contact-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav-col a { font-size: 14px; color: var(--n-300); transition: color .15s; }
.footer-nav-col a:hover { color: #fff; }
.footer-contact-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--n-300);
  transition: color .15s;
}
.footer-contact-col a:hover { color: #fff; }
.footer-contact-col svg { width: 16px; height: 16px; flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; color: var(--n-500); }
.footer-social { display: flex; gap: 20px; }
.footer-social a { font-size: 13px; color: var(--n-300); transition: color .15s; }
.footer-social a:hover { color: #fff; }

/* ── WhatsApp buttons — fill icon ───────────────────────── */
/* Los path del SVG no heredan fill automáticamente; con currentColor
   toman el color del botón (#fff) tanto en light como en dark mode. */
.btn-wa svg,
.nav-cta svg { fill: currentColor; }

/* ── WhatsApp float ──────────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  width: 58px;
  height: 58px;
  background: var(--wa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,.38), 0 2px 8px rgba(0,0,0,.18);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(37,211,102,.48), 0 2px 12px rgba(0,0,0,.2);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet+ */
@media (min-width: 640px) {
  :root { --px: 32px; }
  .grid-2    { grid-template-columns: repeat(2, 1fr); }
  .obras-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid  { grid-template-columns: repeat(2, 1fr); }
  .split-layout { grid-template-columns: 1fr 1fr; }
  .system-card-inner { grid-template-columns: 1fr 1fr; }
}

/* Nav visible desde 860px — evita zona ciega entre tablet y desktop */
@media (min-width: 860px) {
  .desktop-nav { display: flex; }
  .nav-cta     { display: flex; }
  .menu-toggle { display: none; }
  /* Links más compactos para que entren en anchos intermedios */
  .desktop-nav a:not(.nav-cta) { padding: 8px 10px; }
  .nav-cta { padding: 10px 14px; }
  .header-inner { gap: 16px; }
}

/* Desktop */
@media (min-width: 1024px) {
  :root { --px: 40px; }
  .section { padding: 100px 0; }

  /* Restaurar espaciado completo */
  .desktop-nav a:not(.nav-cta) { padding: 8px 14px; }
  .nav-cta { padding: 10px 18px; }
  .header-inner { gap: 32px; }

  .grid-3    { grid-template-columns: repeat(3, 1fr); }
  .obras-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid  { grid-template-columns: 240px 1fr 1fr auto; gap: 48px; }

  .hero      { padding: 112px 0 120px; }
  .page-hero { padding: 88px 0 96px; }

  .system-card { padding: 56px; }
  .system-card-inner { grid-template-columns: 1fr 340px; gap: 52px; }
  .system-card-media { aspect-ratio: 3/4; }

  .step { grid-template-columns: 80px 1fr; gap: 32px; }
  .step-num { font-size: 64px; }

  .process-list { grid-template-columns: repeat(5, 1fr); }
  .process-item {
    flex-direction: column;
    padding: 0;
    border-bottom: none;
    border-left: 2px solid var(--border-clr);
    padding-left: 24px;
  }
  .process-item:first-child { border-left: 2px solid var(--brand-300); }
}

/* ── Dark mode — correcciones de legibilidad ─────────────── */
@media (prefers-color-scheme: dark) {
  /* nav-cta: forzar blanco explícito para que no herede variables de dark mode */
  .nav-cta { color: #fff; }
  /* system-tag: brand-700 (#064379) sobre bg-accent (#0D2040) = invisible */
  .system-tag { color: var(--brand-300); }

  /* obra-tag: brand-500 (#1A6DC8) sobre bg-accent (#0D2040) = bajo contraste */
  .obra-tag { color: var(--brand-300); }

  /* step-num / process-item-num: brand-100 (#1E3D6E) sobre bg-surface oscuro = invisible
     Se mantiene decorativo pero con algo de presencia visual */
  .step-num,
  .process-item-num { color: rgba(255,255,255,.1); }

  /* bg-dark: fondo siempre #011F51 (brand-900). En dark mode --brand-100
     se vuelve #1E3D6E — casi invisible sobre ese fondo. Forzar a claro. */
  .bg-dark p { color: rgba(255,255,255,.75); }
}

/* Mobile */
@media (max-width: 639px) {
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { justify-content: center; width: 100%; max-width: 320px; }
  .cta-section .btn { width: 100%; max-width: 320px; justify-content: center; }
  .system-card { padding: 28px; }
  .wa-float { bottom: 20px; right: 20px; width: 52px; height: 52px; }
  .wa-float svg { width: 26px; height: 26px; }
}
