:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-deep: #1E3A8A;
  --blue-soft: #EFF6FF;
  --blue-line: #DBEAFE;
  --ink: #0F172A;
  --body: #475569;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --wa: #25D366;
  --radius: 14px;
  --nav-h: 68px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, .04), 0 10px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 12px 20px rgba(15, 23, 42, .06), 0 24px 48px rgba(15, 23, 42, .10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  color: var(--body);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

/* Mientras el banner de cookies está visible reserva su espacio al final de la
   página. Sin esto el banner queda encima del pie y bloquea los clics en los
   enlaces de Aviso Legal y Política de Cookies. */
body.cb-visible { padding-bottom: var(--cb-h, 90px); }

img { max-width: 100%; display: block; }
a { color: var(--blue); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -.022em; font-weight: 700; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--ink); color: #fff; padding: .75rem 1.15rem; border-radius: 0 0 8px 0;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 500;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: linear-gradient(140deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.02em;
  display: grid; place-items: center;
}
.brand-name { display: block; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; line-height: 1.25; }
.brand-role { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }

.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--body); text-decoration: none;
  transition: color .18s ease;
}
.nav-links a:hover { color: var(--blue); }

.nav-actions { display: flex; align-items: center; gap: .6rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  padding: .78rem 1.35rem; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-dark); box-shadow: var(--shadow-md); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.btn-outline-light {
  background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .7); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: var(--shadow-sm); }
.btn-wa:hover { background: #1EBE5A; box-shadow: var(--shadow-md); }
.btn-sm { font-size: 14px; padding: .6rem 1.05rem; }
.btn svg { flex: none; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .22s ease, opacity .18s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-panel {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 480;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  padding: 1rem 20px 1.5rem;
  display: none; flex-direction: column; gap: .25rem;
}
.nav-panel.open { display: flex; }
.nav-panel a {
  font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: .85rem .25rem; border-bottom: 1px solid var(--line);
}
.nav-panel a:last-child { border-bottom: none; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden; padding: 4.5rem 0 4rem;
  background: linear-gradient(155deg, #17307A 0%, #1E3A8A 34%, #2563EB 78%, #3B82F6 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(720px 460px at 84% 4%, rgba(96, 165, 250, .45), transparent 64%),
    radial-gradient(620px 420px at 2% 92%, rgba(147, 197, 253, .22), transparent 62%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .17) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(760px 460px at 72% 12%, #000 8%, transparent 74%);
  -webkit-mask-image: radial-gradient(760px 460px at 72% 12%, #000 8%, transparent 74%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 760px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: #E8F0FF; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  padding: .42rem .85rem; border-radius: 999px; margin-bottom: 1.5rem;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; flex: none;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .28);
}

.hero h1 { font-size: clamp(2.15rem, 7vw, 3.85rem); font-weight: 800; letter-spacing: -.035em; color: #fff; }
.hero h1 .accent {
  background: linear-gradient(100deg, #93C5FD 0%, #BFDBFE 55%, #E0ECFF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: #CBDCFF; margin-top: 1.35rem; max-width: 620px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.hero-meta { display: flex; flex-wrap: wrap; gap: .55rem 1.6rem; margin-top: 2.75rem; }
.hero-meta li { list-style: none; display: flex; align-items: center; gap: .5rem; font-size: 14.5px; color: #C3D6FA; font-weight: 500; }
.hero-meta svg { color: #93C5FD; flex: none; }

/* ---------- SECTIONS ---------- */
.section { padding: 4.5rem 0; position: relative; }

/* Tinte azulado suave: ninguna sección queda en blanco puro */
.section-soft {
  background: linear-gradient(180deg, #EEF4FF 0%, #F5F8FF 100%);
  border-top: 1px solid var(--blue-line); border-bottom: 1px solid var(--blue-line);
}
.section-tint { background: #F7FAFF; }
.section-tint::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(680px 380px at 88% 12%, rgba(37, 99, 235, .09), transparent 64%);
}
.section-tint > .wrap { position: relative; z-index: 1; }

.section-contact {
  background: linear-gradient(180deg, #F5F8FF 0%, #E7EFFF 100%);
  border-top: 1px solid var(--blue-line);
}

.section-head { max-width: 640px; margin-bottom: 2.75rem; }
.section-label {
  display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--blue); margin-bottom: .85rem;
}
.section-head h2 { font-size: clamp(1.75rem, 4.4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }
.section-head p { margin-top: .95rem; font-size: 1.02rem; color: var(--body); }

/* ---------- SERVICIOS ---------- */
.cards { display: grid; gap: 1.15rem; grid-template-columns: 1fr; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.85rem 1.6rem 1.75rem;
  transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease, border-color .28s ease;
}
/* Solo con ratón: en táctil el :hover se queda "pegado" tras tocar. */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-8px) scale(1.035);
    box-shadow: 0 18px 28px rgba(15, 23, 42, .09), 0 36px 60px rgba(37, 99, 235, .16);
    border-color: var(--blue);
    z-index: 2;
  }
  .card:hover .card-icon { background: var(--blue); color: #fff; border-color: var(--blue); }
}
.card-icon { transition: background .28s ease, color .28s ease, border-color .28s ease; }
.card-num {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em; color: var(--blue);
  display: block; margin-bottom: 1.1rem;
}
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-dark); border: 1px solid var(--blue-line);
  margin-bottom: 1.15rem;
}
.card h4 { font-size: 1.22rem; font-weight: 700; margin-bottom: .7rem; }
.card p { font-size: 15.3px; color: var(--body); }
.card-list { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.card-list li { list-style: none; display: flex; align-items: flex-start; gap: .55rem; font-size: 14.5px; color: var(--muted); }
.card-list svg { flex: none; color: var(--blue); margin-top: 5px; }

/* Tarjeta destacada: la auditoría gratuita, que es el gancho de captación.
   Ocupa el ancho completo de la rejilla y se diferencia del resto. */
.card-destacada {
  border-color: var(--blue);
  background: linear-gradient(150deg, #FFFFFF 0%, var(--blue-soft) 100%);
  box-shadow: 0 10px 20px rgba(37, 99, 235, .09);
}
.card-destacada .card-icon { margin-top: 1.1rem; background: #fff; }

/* ---------- BLOQUES DE SERVICIOS ---------- */
.bloque + .bloque { margin-top: 3.5rem; }
.bloque-head { margin-bottom: 1.6rem; }
.bloque-head h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 700; letter-spacing: -.025em;
  display: flex; align-items: center; gap: .7rem;
}
.bloque-head h3::before {
  content: ""; width: 4px; height: 22px; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
}
.bloque-head p { margin-top: .45rem; font-size: 15px; color: var(--muted); }

/* Puntos desarrollados de la auditoría: título + explicación */
.auditoria-puntos {
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--blue-line);
  display: grid; gap: 1.05rem;
}
.auditoria-puntos li { list-style: none; display: flex; align-items: flex-start; gap: .65rem; }
.auditoria-puntos svg { flex: none; color: var(--blue); margin-top: 5px; }
.auditoria-puntos strong { display: block; font-size: 15px; color: var(--ink); font-weight: 650; }
.auditoria-puntos span { display: block; margin-top: .2rem; font-size: 14.5px; color: var(--body); line-height: 1.65; }

/* CTA propio de cada servicio */
.card-cta {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 44px;
  margin-top: 1.25rem; font-size: 14.5px; font-weight: 600; color: var(--blue);
  text-decoration: none; transition: color .18s ease, gap .18s ease;
}
.card-cta:hover { color: var(--blue-deep); gap: .6rem; }
.card-cta svg { flex: none; }

/* ---------- PROYECTOS ---------- */
.project {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.project-body { padding: 2rem 1.6rem; }
.project-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--blue-deep); background: var(--blue-soft); border: 1px solid var(--blue-line);
  padding: .32rem .7rem; border-radius: 999px; margin-bottom: 1rem;
}
.project h3 { font-size: clamp(1.4rem, 3.4vw, 1.85rem); font-weight: 800; letter-spacing: -.025em; }
.project-loc { font-size: 14.5px; color: var(--muted); margin-top: .35rem; font-weight: 500; }
.project p.project-desc { margin-top: 1.1rem; font-size: 15.5px; }
.project-feats { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.chip {
  font-size: 13.5px; font-weight: 500; color: var(--body);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem;
}
.project-link { display: inline-flex; margin-top: 1.75rem; }

.project-visual {
  background: linear-gradient(150deg, var(--blue-deep) 0%, var(--blue) 100%);
  padding: 2.25rem 1.6rem; display: grid; place-items: center; min-height: 200px;
}
.browser {
  width: 100%; max-width: 440px; background: #fff; border-radius: 11px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
}
.browser-bar { display: flex; align-items: center; gap: .38rem; padding: .6rem .75rem; background: #F1F5F9; border-bottom: 1px solid var(--line); }
.browser-dot { width: 9px; height: 9px; border-radius: 50%; background: #CBD5E1; flex: none; }
.browser-shot { display: block; width: 100%; height: auto; }
.browser-url {
  flex: 1; margin-left: .45rem; background: #fff; border: 1px solid var(--line); border-radius: 5px;
  font-size: 11px; color: var(--muted); padding: .18rem .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- CONTACTO ---------- */
.contact { text-align: center; }
.contact h2 { font-size: clamp(1.8rem, 4.6vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
.contact > p { margin: 1.05rem auto 0; max-width: 520px; font-size: 1.05rem; }
.contact-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2.25rem; }
.contact-note { margin-top: 1.5rem; font-size: 14px; color: var(--muted); }

/* ---------- FOOTER ---------- */
.footer { background: var(--ink); color: #94A3B8; padding: 3rem 0 2rem; font-size: 14.5px; }
.footer-top { display: grid; gap: 1.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(148, 163, 184, .2); }
.footer-brand { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.015em; }
.footer-brand span { color: #60A5FA; }
.footer-tag { margin-top: .4rem; font-size: 13.5px; color: #94A3B8; }
.footer-col h4 { font-size: 12.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: #E2E8F0; margin-bottom: .85rem; }
.footer-col a, .footer-col p { display: block; color: #94A3B8; text-decoration: none; font-size: 14.5px; padding: .18rem 0; }
.footer-col a:hover { color: #60A5FA; }
.footer-bottom { padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; align-items: center; font-size: 13.5px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; }
.footer-legal a { color: #94A3B8; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.footer-legal a:hover { color: #60A5FA; }

/* ---------- WHATSAPP FLOTANTE ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 400;
  width: 54px; height: 54px; border-radius: 50%; background: var(--wa);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(37, 211, 102, .42);
  transition: transform .18s ease, box-shadow .18s ease;
}
.wa-float:hover { transform: scale(1.06); box-shadow: 0 8px 26px rgba(37, 211, 102, .52); }
body.cb-visible .wa-float { bottom: calc(var(--cb-h, 90px) + 18px); }

/* ---------- MODALES ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9000;
  background: rgba(15, 23, 42, .6); padding: 1.25rem; overflow-y: auto;
}
.modal-overlay.active { display: block; }
.modal-box {
  position: relative; background: #fff; border-radius: 14px; max-width: 720px;
  margin: 3rem auto; padding: 2.25rem 1.6rem 2rem; box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: .6rem; right: .8rem;
  background: none; border: none; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-box h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.modal-box h3 { font-size: 1.02rem; margin: 1.5rem 0 .5rem; color: var(--blue-deep); }
.modal-box p, .modal-box li { font-size: 14.6px; color: var(--body); }
.modal-box ul { margin: .5rem 0 .5rem 1.15rem; display: grid; gap: .35rem; }
.modal-box table { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: 13.5px; }
.modal-box th { text-align: left; background: var(--blue-soft); color: var(--blue-deep); padding: .55rem .7rem; font-weight: 600; }
.modal-box td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); color: var(--body); }
.modal-date { margin-top: 1.75rem; font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- COOKIES ---------- */
.cookie-banner {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 8000;
  background: var(--ink); color: #CBD5E1; padding: 1rem 20px;
  gap: .85rem; align-items: center; flex-wrap: wrap; box-shadow: 0 -4px 20px rgba(15, 23, 42, .18);
}
.cookie-banner.show { display: flex; }
.cookie-banner p { flex: 1 1 260px; font-size: 13.5px; line-height: 1.6; margin: 0; }
.cookie-banner a { color: #60A5FA; cursor: pointer; text-decoration: underline; }
.cookie-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 0 1.3rem;
  min-height: 44px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  transition: background .18s ease;
}
.cookie-reject { background: transparent; color: #CBD5E1; border-color: rgba(148, 163, 184, .4); }
.cookie-reject:hover { background: rgba(148, 163, 184, .12); }
.cookie-accept { background: var(--blue); color: #fff; }
.cookie-accept:hover { background: var(--blue-dark); }

/* ---------- REVEAL ---------- */
/* Solo se oculta si el JS ha arrancado: sin JS el contenido se ve igualmente. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 600px) {
  .cookie-banner { padding: 1rem 24px; }
  .modal-box { padding: 2.5rem 2.25rem 2.25rem; }
  .project-body { padding: 2.5rem 2.25rem; }
}

@media (min-width: 768px) {
  .section { padding: 5.5rem 0; }
  .hero { padding: 6rem 0 5rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-destacada { grid-column: 1 / -1; }
  .auditoria-puntos { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
    .footer-top { grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; }
  .project { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; }
  .project-visual { height: 100%; padding: 3rem 2rem; }
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-panel { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Pantallas muy bajas (móviles antiguos): una barra fija de 68px se come demasiado
   alto y deja enlaces del pie atrapados debajo, sin forma de pulsarlos. En esas
   pantallas la barra deja de ser fija y el problema desaparece de raíz. */
@media (max-height: 660px) {
  .nav { position: static; }
}
