/* ============================================================
   Keystone Labs — hoja de estilos corporativa
   ============================================================ */
:root {
  --navy-950: #0a1628;
  --navy-900: #0f2038;
  --navy-800: #16304f;
  --navy-700: #1f4066;
  --accent: #2f81f7;
  --accent-soft: #dbeafe;
  --gold: #d4a72c;
  --ink: #1a2332;
  --ink-soft: #4b5a6e;
  --line: #e3e9f0;
  --bg: #ffffff;
  --bg-alt: #f5f8fb;
  --radius: 12px;
  --max-w: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 40, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }
.brand .logo-mark {
  width: 34px; height: 34px; flex: none;
}
.brand span em { font-style: normal; color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: #c8d4e2; font-size: 0.92rem; font-weight: 500;
}
.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav .nav-cta {
  background: var(--accent); color: #fff;
  padding: 9px 18px; border-radius: 8px; font-weight: 600;
}
.main-nav .nav-cta:hover { background: #1f6fe0; }
.main-nav .lang-switch {
  border: 1px solid rgba(255,255,255,0.28); border-radius: 8px;
  padding: 7px 12px; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.6px;
  color: #dbe6f2;
}
.main-nav .lang-switch:hover { border-color: #fff; color: #fff; }

/* Menú móvil */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: #fff;
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% 20%, rgba(47,129,247,0.18), transparent 70%),
    radial-gradient(500px 260px at 10% 90%, rgba(212,167,44,0.08), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase;
  color: #9db8d8;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 24px;
}
.hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #35c46a; }
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.15; font-weight: 800; letter-spacing: -0.5px;
  max-width: 780px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead {
  margin-top: 20px; font-size: 1.13rem; color: #b9c9dc; max-width: 640px;
}
.hero .hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 9px;
  font-weight: 600; font-size: 0.98rem; cursor: pointer; border: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1f6fe0; }
.btn-ghost { background: transparent; color: #dbe6f2; border: 1px solid rgba(255,255,255,0.28); }
.btn-ghost:hover { border-color: #fff; color: #fff; }

/* Stats bar */
.stats {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: rgba(10,22,40,0.55);
  padding: 22px 20px; text-align: center;
}
.stat .num { font-size: 1.65rem; font-weight: 800; color: #fff; }
.stat .lbl { font-size: 0.82rem; color: #9db8d8; margin-top: 2px; }

/* ---------- Secciones genéricas ---------- */
section.block { padding: 84px 0; }
section.block.alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .kicker {
  color: var(--accent); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 1.6px; text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.4px;
  margin-top: 10px; color: var(--navy-950);
}
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- Servicios ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 10px 28px rgba(15,32,56,0.10); transform: translateY(-2px); }
.card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; stroke: var(--accent); }
.card h3 { font-size: 1.08rem; font-weight: 700; color: var(--navy-950); }
.card p { margin-top: 8px; font-size: 0.93rem; color: var(--ink-soft); }
.card ul { margin: 12px 0 0 18px; font-size: 0.88rem; color: var(--ink-soft); }
.card ul li { margin-top: 4px; }

/* ---------- Seguridad ---------- */
.security-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
}
.security-points { list-style: none; margin-top: 8px; }
.security-points li {
  display: flex; gap: 14px; padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.security-points li:last-child { border-bottom: none; }
.security-points .check {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: #e7f6ec; display: flex; align-items: center; justify-content: center;
}
.security-points .check svg { width: 14px; height: 14px; stroke: #1e9e4e; }
.security-points strong { display: block; color: var(--navy-950); font-size: 0.98rem; }
.security-points span { font-size: 0.9rem; color: var(--ink-soft); }

.cert-panel {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  border-radius: 16px; padding: 40px 36px; color: #fff;
  box-shadow: 0 18px 44px rgba(15,32,56,0.28);
}
.cert-panel .badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(212,167,44,0.14); border: 1px solid rgba(212,167,44,0.45);
  color: #ecd28a; font-weight: 700; font-size: 0.86rem;
  padding: 8px 16px; border-radius: 999px;
}
.cert-panel .badge svg { width: 16px; height: 16px; stroke: #ecd28a; }
.cert-panel h3 { margin-top: 20px; font-size: 1.35rem; font-weight: 800; }
.cert-panel p { margin-top: 12px; color: #b9c9dc; font-size: 0.94rem; }
.cert-panel .mini-stats { display: flex; gap: 28px; margin-top: 26px; }
.cert-panel .mini-stats div strong { display: block; font-size: 1.25rem; }
.cert-panel .mini-stats div span { font-size: 0.78rem; color: #9db8d8; }

/* ---------- Nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about-grid .section-head { margin-bottom: 20px; }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fact {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.fact strong { display: block; font-size: 1.3rem; font-weight: 800; color: var(--navy-950); }
.fact span { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; position: relative;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: 0.8rem; font-weight: 800; color: var(--accent);
  letter-spacing: 1px;
}
.step h3 { margin-top: 8px; font-size: 1.02rem; font-weight: 700; color: var(--navy-950); }
.step p { margin-top: 6px; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 860px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px;
}
.contact-card .icon {
  width: 46px; height: 46px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.contact-card .icon svg { width: 24px; height: 24px; stroke: var(--accent); }
.contact-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy-950); }
.contact-card p { margin-top: 6px; font-size: 0.9rem; color: var(--ink-soft); }
.contact-card .mail {
  display: inline-block; margin-top: 14px; font-weight: 600; font-size: 0.98rem;
}
.contact-note { margin-top: 26px; font-size: 0.88rem; color: var(--ink-soft); max-width: 860px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950); color: #9db8d8; padding: 56px 0 32px;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.09);
}
.site-footer .brand { font-size: 1.05rem; margin-bottom: 14px; }
.site-footer h4 {
  color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer a { color: #9db8d8; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 26px; flex-wrap: wrap;
}
.footer-bottom .iso-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 999px;
  padding: 6px 14px; font-size: 0.78rem;
}
.footer-bottom .iso-chip svg { width: 14px; height: 14px; stroke: var(--gold); }

/* ---------- Páginas legales ---------- */
.legal-hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: #fff; padding: 64px 0 48px;
}
.legal-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.4px; }
.legal-hero p { margin-top: 10px; color: #b9c9dc; font-size: 0.95rem; }
.legal-body { padding: 56px 0 80px; }
.legal-body .container { max-width: 860px; }
.legal-body h2 {
  font-size: 1.25rem; font-weight: 800; color: var(--navy-950);
  margin-top: 40px; padding-top: 8px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.02rem; font-weight: 700; color: var(--navy-950); margin-top: 22px; }
.legal-body p { margin-top: 12px; color: var(--ink); font-size: 0.96rem; }
.legal-body ul, .legal-body ol { margin: 12px 0 0 22px; font-size: 0.96rem; }
.legal-body li { margin-top: 6px; }
.legal-body .updated {
  display: inline-block; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font-size: 0.85rem; color: var(--ink-soft);
  margin-bottom: 28px;
}
.legal-body table {
  width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.9rem;
}
.legal-body th, .legal-body td {
  border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top;
}
.legal-body th { background: var(--bg-alt); font-weight: 700; color: var(--navy-950); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .security-grid, .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .main-nav {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--navy-950); flex-direction: column; align-items: stretch;
    padding: 18px 24px 24px; gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .cards, .steps, .contact-grid, .about-facts { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 52px; }
  section.block { padding: 60px 0; }
}
