/*
 * Adaptación de la propuesta aprobada al sistema visual que ya estaba en
 * producción. Este archivo no crea una identidad nueva: recupera la cabecera,
 * geometría, botones, sombras y escalas del sitio original.
 */
:root {
  --primary: #334155;
  --ink: #1e293b;
  --muted: #64748b;
  --soft: #f8fafc;
  --surface: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #677c8f;
  --accent-strong: #50687b;
  --navy: #020617;
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --radius: 2px;
}

body {
  color: var(--primary);
  background-color: var(--soft);
}

.page-shell {
  overflow: clip;
}

.site-header {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.nav,
.site-header.is-scrolled .nav {
  width: 100%;
  max-width: none;
  min-height: 74px;
  margin: 0;
  padding: 8px clamp(24px, 10vw, 160px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand img {
  width: auto;
  height: 58px;
}

/*
 * Las ilustraciones conservan su detalle y sus blancos, pero el azul eléctrico
 * se lleva a la gama acero del logotipo original (#50687b / #677c8f).
 */
.pillar-image,
.capability-card-image,
.what-diagram img,
.flow-step-image {
  filter: saturate(0.3) hue-rotate(-8deg);
}

#que-es-kairos,
#casos-de-uso,
#beneficios {
  scroll-margin-top: 96px;
}

.nav-links {
  gap: 18px;
  flex-wrap: nowrap;
}

.nav-links > a,
.nav-links > button {
  position: relative;
  min-height: auto;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-links > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links > a:hover,
.nav-links > a.active {
  border: 0;
  background: transparent;
  color: var(--primary);
}

.nav-links > a:hover::after,
.nav-links > a.active::after {
  transform: scaleX(1);
}

.nav-links > a[href*="contacto.html"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 20px;
  border: 1px solid var(--primary);
  border-radius: 2px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-links > a[href*="contacto.html"]::after {
  display: none;
}

.nav-links > a[href*="contacto.html"]:hover,
.nav-links > a[href*="contacto.html"].active {
  border: 1px solid #1e293b;
  background: #1e293b;
  color: #fff;
}

.language-switcher {
  border-radius: 2px;
  background: #fff;
}

.language-switcher button,
.language-switcher button.active {
  border-radius: 1px;
}

.language-switcher button.active {
  background: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.menu-glyph {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.hero {
  min-height: calc(100vh - 74px);
  padding-top: 70px;
}

.cap-hero,
.legal-hero {
  padding-top: 82px;
}

h1 {
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3,
button {
  letter-spacing: -0.02em;
}

.btn,
.btn.secondary,
.submit-btn {
  min-height: 44px;
  border-radius: 2px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn {
  border-color: var(--primary);
  background: var(--primary);
}

.btn:hover {
  border-color: #1e293b;
  background: #1e293b;
}

.btn.secondary {
  border-color: #cbd5e1;
  background: #fff;
  color: var(--ink);
}

.btn.secondary:hover {
  border-color: #1e293b;
  background: #f8fafc;
}

.tech-card,
.info-card,
.capability-card,
.use-case-card,
.case-gallery-card,
.flow-step,
.cta-band,
.feature,
.ethic-intro-card,
.ethic-middle-card,
.legal-nav,
.legal-card,
.legal-entity,
.about-card,
.about-claim,
.contact-card,
.demo-form-card,
.benefit-face {
  border-radius: 2px;
}

.benefit-front,
.about-claim,
.contact-card {
  background: linear-gradient(135deg, #334155, #1e293b);
}

.demo-form input,
.demo-form select,
.demo-form textarea {
  border-radius: 2px;
}

.privacy-check a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 1120px) {
  .nav {
    padding-inline: 32px;
  }

  .nav-links {
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .site-header {
    overflow: visible;
  }

  .nav {
    position: relative;
    width: 100%;
    min-height: 66px;
    padding: 7px 24px;
    align-items: center;
    flex-direction: row;
    border-radius: 0;
  }

  .brand img {
    height: 50px;
  }

  #que-es-kairos,
  #casos-de-uso,
  #beneficios {
    scroll-margin-top: 82px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  }

  .nav.menu-open .nav-links {
    display: flex;
  }

  .nav-links > a,
  .nav-links > button {
    width: 100%;
    min-height: 44px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .nav-links > a[href*="contacto.html"] {
    margin-top: 12px;
    border: 1px solid var(--primary);
    text-align: center;
  }

  .language-switcher {
    width: max-content;
    margin-top: 12px;
  }

  .language-switcher button {
    width: auto;
    min-height: 30px;
    padding: 6px 10px;
    border: 0;
  }

  .hero,
  .cap-hero,
  .legal-hero {
    padding-top: 62px;
  }

  .ethic-hero .cap-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) {
  .nav {
    width: 100%;
    padding: 7px 18px;
  }

  .hero-visual {
    min-height: 0;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }
}
