/* KOS Group · www.kosgroup.es
   Paleta: azul #1761A0 y gris #9E9E9E del logo, tonos de ambos (marino #0B2540 para titulares, gris #4A4A4A
   para texto) y un único acento naranja #F7931E, solo para llamadas a la acción, detalles y grafismos.
   Contraste (WCAG AA): botón naranja con texto marino 6,8:1; texto en naranja oscuro #B4530A sobre blanco 5,0:1;
   el gris del logo (#9E9E9E) no se usa para texto sobre blanco. Sin modo oscuro: el logo es para fondo claro.
   La CSP de nginx prohíbe estilos en línea: todo el estilo vive aquí. */
:root {
  --blue: #1761a0;
  --blue-dark: #104a7a;
  --navy: #0b2540;
  --blue-light: #8db8e0;
  --blue-soft: #cfe1f2;
  --blue-tint: #eef4fa;
  --gray: #9e9e9e;
  --gray-text: #4a4a4a;
  --gray-mute: #5f5f5f;
  --gray-line: #e3e6ea;
  --gray-tint: #f6f7f8;
  --white: #ffffff;
  --accent: #f7931e;
  --accent-ink: #b4530a;
  --accent-soft: #fff1e0;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(11, 37, 64, 0.06), 0 8px 24px rgba(11, 37, 64, 0.07);
  --shadow-hover: 0 2px 4px rgba(11, 37, 64, 0.08), 0 16px 40px rgba(11, 37, 64, 0.12);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--gray-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Sobre fondo oscuro (banda y pie) el anillo de foco es naranja: 6,8:1 sobre el marino. */
.band :focus-visible, footer.site :focus-visible { outline-color: var(--accent); }

h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.35rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10;
  background: var(--navy); color: var(--white); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; color: var(--white); }

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

/* ---------- Cabecera */
header.site {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--gray-line);
}
@supports (backdrop-filter: blur(8px)) {
  header.site { background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px); }
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px;
  min-height: 72px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 52px; width: auto; }

nav.site ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav.site a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--navy); font-weight: 600; text-decoration: none; font-size: 0.98rem;
}
nav.site a:hover { background: var(--blue-tint); color: var(--blue); }
nav.site a[aria-current="page"] { background: var(--blue-tint); color: var(--blue); box-shadow: inset 0 -3px 0 var(--accent); }

@media (max-width: 560px) {
  header.site { position: static; }
  header.site .wrap { justify-content: center; padding-top: 10px; padding-bottom: 10px; }
  .brand img { height: 46px; }
  nav.site { width: 100%; }
  nav.site ul { justify-content: center; }
  nav.site a { padding: 8px 12px; font-size: 0.95rem; }
}

/* ---------- Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--navy); box-shadow: 0 6px 18px rgba(247, 147, 30, 0.35); }
.btn-primary:hover { color: var(--navy); background: #f9a440; transform: translateY(-1px); }
.btn-ghost { border-color: var(--blue-soft); color: var(--blue); background: var(--white); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; text-decoration: none; color: var(--blue);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.15s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Etiquetas */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px; color: var(--accent-ink);
  font-size: 0.82rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--accent); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--gray-mute); max-width: 40em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Héroe */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 30%, var(--blue-soft) 0%, rgba(207, 225, 242, 0) 70%),
    radial-gradient(40% 50% at 10% 90%, var(--accent-soft) 0%, rgba(255, 241, 224, 0) 70%),
    linear-gradient(180deg, var(--blue-tint) 0%, var(--white) 100%);
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 32px; align-items: center; padding-top: 64px; padding-bottom: 72px;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lead { margin-top: 18px; }
.hero-art img { display: block; width: 100%; max-width: 600px; margin: 0 auto; }
.hero.compact .wrap { padding-top: 48px; padding-bottom: 48px; }
.hero.compact h1 { font-size: clamp(2rem, 4.4vw, 3rem); }

.breadcrumb { font-size: 0.92rem; margin: 0 0 14px; color: var(--gray-mute); }
.breadcrumb a { color: var(--gray-mute); }
.breadcrumb a:hover { color: var(--blue); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 48px; }
  .hero-art img { max-width: 400px; }
}

/* ---------- Secciones */
.section { padding: 88px 0; }
.section.tint { background: var(--gray-tint); }
.section.blue { background: var(--blue-tint); }
.section-head { margin-bottom: 44px; }
.section-head.split { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; flex-wrap: wrap; }
.section-head.split .lead { margin-bottom: 0; }
@media (max-width: 560px) { .section { padding: 60px 0; } .section-head { margin-bottom: 32px; } }

/* Cifras / beneficios */
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.benefit { padding: 8px 4px; }
.benefit h3 { margin-top: 16px; }
.benefit p { color: var(--gray-mute); margin: 0; }
@media (max-width: 760px) { .benefits { grid-template-columns: 1fr; gap: 28px; } }

.icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--blue-tint); color: var(--blue);
}
.icon svg { width: 26px; height: 26px; }
.icon.accent { background: var(--accent-soft); color: var(--accent-ink); }
.icon.solid { background: var(--blue); color: var(--white); }

/* Tarjetas */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--gray-line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card h3 { margin-top: 18px; }
.card p { color: var(--gray-mute); }
.card > :last-child { margin-bottom: 0; }
.card .link-arrow { margin-top: auto; padding-top: 8px; }
a.card { text-decoration: none; color: inherit; }
a.card:hover, .card.linked:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--blue-soft); }
.card.linked .stretched::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }

.product-card { padding: 0; overflow: hidden; }
.product-card .art { background: linear-gradient(180deg, var(--blue-tint), var(--white)); padding: 8px 24px 0; }
.product-card .art img { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
.product-card .body { padding: 8px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { margin-top: 6px; font-size: 1.35rem; }
.tag {
  display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px;
  background: var(--blue-tint); color: var(--blue); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); }

/* Lista con marcas */
.checks { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.25em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4530a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Fichas (chips) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li {
  padding: 6px 12px; border-radius: 999px; background: var(--gray-tint); border: 1px solid var(--gray-line);
  font-size: 0.9rem; color: var(--gray-text);
}

/* Bloques alternos (texto + ilustración) */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.feature + .feature { margin-top: 88px; }
.feature.reverse .feature-art { order: -1; }
.feature-art img { display: block; width: 100%; max-width: 480px; margin: 0 auto; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.reverse .feature-art { order: 0; }
  .feature + .feature { margin-top: 64px; }
  .feature-art img { max-width: 380px; }
}

/* Servicios: filas compactas */
.service { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; padding: 32px 0; border-top: 1px solid var(--gray-line); }
.service:last-child { border-bottom: 1px solid var(--gray-line); }
.service h3 { margin: 4px 0 6px; font-size: 1.35rem; }
.service p { color: var(--gray-mute); margin-bottom: 14px; }
.service .num { font-size: 0.85rem; font-weight: 800; color: var(--accent-ink); letter-spacing: 0.1em; }
@media (max-width: 560px) { .service { grid-template-columns: 1fr; gap: 12px; } }

/* Pasos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 24px 22px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-line); }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px;
  font-size: 2rem; font-weight: 800; line-height: 1; color: var(--blue);
}
.steps li:last-child::before { color: var(--accent-ink); }
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--gray-mute); font-size: 0.97rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Módulos (Integra) */
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.module { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 14px; background: var(--white); border: 1px solid var(--gray-line); }
.module .icon { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.module .icon svg { width: 22px; height: 22px; }
.module h3 { font-size: 1.02rem; margin: 2px 0 2px; }
.module p { margin: 0; font-size: 0.93rem; color: var(--gray-mute); }

/* Vídeo */
.video-frame {
  position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden;
  background: var(--navy); box-shadow: var(--shadow-hover); aspect-ratio: 16 / 9;
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Banda de llamada a la acción */
.band {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(50% 120% at 100% 0%, rgba(247, 147, 30, 0.28) 0%, rgba(247, 147, 30, 0) 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(141, 184, 224, 0.25) 0%, rgba(141, 184, 224, 0) 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 55%, var(--blue) 100%);
}
.band .wrap { padding-top: 72px; padding-bottom: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.band h2 { color: var(--white); margin: 0 0 8px; }
.band p { margin: 0; color: #dce8f5; max-width: 36em; }
.band .motto { font-weight: 800; letter-spacing: 0.18em; color: var(--blue-light); font-size: 0.9rem; margin-bottom: 12px; }
.band .motto span { color: var(--accent); }

/* Ubicación */
.place { display: flex; gap: 16px; align-items: flex-start; }
.place address { font-style: normal; font-size: 1.1rem; color: var(--navy); font-weight: 600; }

/* Datos en una fila */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.fact { padding: 22px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-line); }
.fact strong { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--blue); font-weight: 800; }
.fact span { color: var(--gray-mute); font-size: 0.95rem; }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Páginas legales */
.legal { padding: 56px 0 24px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin-bottom: 6px; }
.legal h2 { font-size: 1.2rem; margin: 36px 0 10px; letter-spacing: 0; }
.legal .updated { color: var(--gray-mute); }
.legal li { margin-bottom: 4px; }

.notfound { padding: 72px 0 40px; text-align: center; }
.notfound img { width: 100%; max-width: 360px; display: block; margin: 0 auto 8px; }
.notfound .actions { justify-content: center; }

/* ---------- Pie */
footer.site { background: var(--navy); color: #c9d6e4; font-size: 0.95rem; }
footer.site a { color: var(--white); text-decoration: none; }
footer.site a:hover { color: var(--accent); text-decoration: underline; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.foot-brand img { display: block; height: 48px; width: auto; background: var(--white); border-radius: 12px; padding: 6px 10px; box-sizing: content-box; }
.foot-brand p { margin: 16px 0 0; max-width: 28em; }
footer.site h2 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 6px 0 14px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 20px; padding-bottom: 28px; font-size: 0.88rem; color: #a9bbcf; }
.foot-legal p { margin: 0 0 4px; }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.product-card h3 a { color: var(--navy); text-decoration: none; }
.product-card:hover h3 a { color: var(--blue); }
.notfound .lead { margin-left: auto; margin-right: auto; }

@media (max-width: 560px) {
  .hero-art img { max-width: 300px; }
  .card { padding: 22px; }
  .card h3 { margin-top: 12px; }
  .cards { gap: 14px; }
}
@media (max-width: 560px) { html { scroll-padding-top: 0; } }
