/* =========================================================================
   American Flow — estilos del sitio
   Paleta tomada del logo: azul #0B3F9E, rojo #D4161C, blanco.
   Orden: 1 base · 2 componentes · 3 cabecera · 4 inicio · 5 páginas
          interiores · 6 animaciones · 7 responsive y accesibilidad
   ========================================================================= */

/* ---------- 1. Base ---------------------------------------------------- */
:root {
  --ink: #0a1a3a;
  --ink-2: #34425f;
  --muted: #5a6785;
  --line: #e2e8f2;
  --line-2: #edf1f8;
  --field: #78859f;
  --bg: #fff;
  --soft: #f5f8fd;
  --tile: #edf2fa;
  --tile-2: #e3ebf8;
  --blue: #0b3f9e;
  --blue-d: #082e78;
  --blue-l: #e6eefc;
  --sky: #4da3ff;
  --red: #d4161c;
  --red-d: #a50d12;
  --red-l: #fdeced;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --shadow-s: 0 1px 2px rgba(10, 26, 58, 0.06), 0 1px 1px rgba(10, 26, 58, 0.04);
  --shadow-m: 0 14px 32px -14px rgba(10, 26, 58, 0.22), 0 3px 8px rgba(10, 26, 58, 0.05);
  --shadow-l: 0 40px 80px -28px rgba(10, 26, 58, 0.4), 0 12px 24px -12px rgba(10, 26, 58, 0.16);

  --wrap: 1200px;
  --gut: clamp(20px, 4vw, 40px);
  --hd: 106px; /* espacio que ocupa la cabecera flotante arriba de cada página */
  --ff: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--hd) + 12px);
}

html.modal-open {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

.btn-primary:focus-visible {
  outline-color: var(--ink);
}

.cta-band :focus-visible,
.cat-all:focus-visible {
  outline-color: #fff;
}

main:focus {
  outline: none;
}

::selection {
  background: var(--blue);
  color: #fff;
}

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

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s;
}

.skip:focus {
  top: 12px;
}

h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  word-spacing: 0.07em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.85rem, 1.35rem + 2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  word-spacing: 0.05em;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

h3 {
  color: var(--ink);
}

.dot {
  margin-left: -0.07em;
}

.lead {
  max-width: 54ch;
  margin-top: 22px;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.fine-print {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- 2. Layout y componentes ------------------------------------ */
.wrap {
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-tight {
  padding-block: clamp(24px, 4vw, 56px);
}

.soft {
  background: var(--soft);
  border-block: 1px solid var(--line-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow .star {
  color: var(--red);
}

.eyebrow-light {
  color: #a9cbff;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-head > p {
  max-width: 42ch;
  font-size: 1.05rem;
  color: var(--muted);
}

.section-head.center {
  justify-content: center;
  text-align: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  font-weight: 700;
  color: var(--blue);
  transition: gap 0.25s var(--ease), border-color 0.25s;
}

.link-arrow:hover {
  gap: 12px;
  border-color: var(--red);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.btn .btn-ic {
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn-ic {
  transform: translateX(3px);
}

.btn-lg {
  min-height: 56px;
  padding: 0 30px;
  font-size: 1.02rem;
}

.btn-sm {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(11, 63, 158, 0.65);
}

.btn-primary:hover {
  background: var(--blue-d);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -12px rgba(11, 63, 158, 0.7);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-light {
  background: #fff;
  color: var(--blue);
}

.btn-light:hover {
  background: #eef4ff;
  transform: translateY(-2px);
}

.pill {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}

.icon-btn:hover {
  border-color: var(--ink);
  background: var(--soft);
}

.flip {
  transform: scaleX(-1);
}

/* Tarjeta de producto + contenedor de imagen */
.media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r);
  background: radial-gradient(120% 90% at 50% 18%, #fff 0%, var(--tile) 62%, var(--tile-2) 100%);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 12px rgba(10, 26, 58, 0.16));
  transition: transform 0.6s var(--ease);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.grid[hidden],
.card[hidden] {
  display: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 10px 10px 20px;
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 10px);
  background: #fff;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #d3deef;
  box-shadow: var(--shadow-m);
}

.card:hover .media img {
  transform: scale(1.07) translateY(-2px);
}

.card-go {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.card:hover .card-go,
.card:focus-visible .card-go {
  opacity: 1;
  transform: none;
}

.card-body {
  padding: 0 10px;
}

.card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.card h3 {
  margin: 4px 0 6px;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- 3. Cabecera flotante --------------------------------------- */
/* Tres "islas" de vidrio que flotan sobre la página: el logo, el menú
   (con un indicador que se desliza entre las opciones y una línea de
   progreso de lectura) y el selector de idioma + botón de cotizar. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding-top: 14px;
  pointer-events: none;
  transition: padding 0.35s var(--ease);
  --p: 0;
}

.site-header.is-scrolled {
  padding-top: 10px;
}

.hd {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin-inline: auto;
}

.hd > * {
  pointer-events: auto;
}

.tools,
.menu-btn,
.dock {
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 32px -14px rgba(10, 26, 58, 0.28), 0 0 0 1px rgba(10, 26, 58, 0.07);
  transition: box-shadow 0.35s, padding 0.35s var(--ease), background 0.35s;
}

.is-scrolled .tools,
.is-scrolled .menu-btn,
.is-scrolled .dock {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 #fff, 0 16px 36px -14px rgba(10, 26, 58, 0.36), 0 0 0 1px rgba(10, 26, 58, 0.09);
}

.brand {
  display: block;
  justify-self: start;
  border-radius: 12px;
}

/* El logo flota solo, como PNG con fondo transparente (sin recuadro). El halo blanco lo mantiene legible sobre cualquier contenido. */
.brand img {
  width: auto;
  height: 76px;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.95)) drop-shadow(0 3px 8px rgba(255, 255, 255, 0.85));
  transition: height 0.35s var(--ease);
}

.is-scrolled .brand img {
  height: 56px;
}

.tools {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  grid-column: 3;
  padding: 6px;
  border-radius: 999px;
}

.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--soft);
}

.lang a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--muted);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.lang a:hover {
  color: var(--ink);
}

.lang a[aria-current='true'] {
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow-s);
}

.tools-cta {
  min-height: 44px;
}

/* Menú central */
.dock {
  position: relative;
  grid-column: 2;
  justify-self: center;
  padding: 6px;
  border-radius: 999px;
}

.dock-links {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 2px;
}

.dock-links a {
  position: relative;
  display: block;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--ink-2);
  transition: color 0.3s, padding 0.35s var(--ease);
}

.is-scrolled .dock-links a {
  padding-block: 9px;
}

/* Sin JavaScript: la página activa se marca con fondo azul */
.dock a[aria-current='page'] {
  background: var(--blue);
  color: #fff;
}

.js .dock a[aria-current='page'] {
  background: transparent;
  color: var(--ink-2);
}

.dock-ind {
  position: absolute;
  z-index: 0;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 8px 18px -8px rgba(11, 63, 158, 0.65);
  opacity: 0;
  transition: transform 0.55s var(--spring), width 0.55s var(--spring), opacity 0.25s;
  pointer-events: none;
}

.dock-ind.is-ready {
  opacity: 1;
}

.js .dock-links a.is-on {
  color: #fff;
}

/* Línea de progreso de lectura: un hilo azul → celeste → rojo que "fluye" por el borde del menú */
.dock::after {
  content: '';
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--sky) 55%, var(--red));
  transform: scaleX(var(--p));
  transform-origin: left;
  opacity: 0;
  transition: opacity 0.3s;
}

.is-scrolled .dock::after {
  opacity: 1;
}

.dock-cta,
.dock-mail,
.menu-btn {
  display: none;
}

.menu-btn[hidden] {
  display: none !important;
}

.menu-btn {
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
}

.burger {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}

.burger i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2.4px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.2s, top 0.35s var(--ease);
}

.burger i:nth-child(1) {
  top: 0;
}

.burger i:nth-child(2) {
  top: 50%;
  margin-top: -1.2px;
}

.burger i:nth-child(3) {
  top: 100%;
  margin-top: -2.4px;
}

.menu-btn[aria-expanded='true'] .burger i:nth-child(1) {
  top: 50%;
  margin-top: -1.2px;
  transform: rotate(45deg);
}

.menu-btn[aria-expanded='true'] .burger i:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded='true'] .burger i:nth-child(3) {
  top: 50%;
  margin-top: -1.2px;
  transform: rotate(-45deg);
}

/* ---------- 4. Inicio --------------------------------------------------- */
.hero {
  position: relative;
  overflow: clip;
  padding: calc(var(--hd) + clamp(8px, 2vw, 32px)) 0 clamp(56px, 8vw, 104px);
  background: radial-gradient(900px 560px at 88% 0%, #d8e9ff 0%, rgba(216, 233, 255, 0) 65%), #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.fluya {
  position: relative;
  display: inline-block;
  color: var(--blue);
}

.swoosh {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12em;
  width: 100%;
  height: 0.2em;
  color: var(--red);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 44px;
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.stats div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
}

.stats dd {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stats dt {
  margin-top: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}

.hero-art {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}

.blob,
.ph-blob {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 22%, #fff 0%, #e4effe 36%, #c9e0ff 72%, #b3d5ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 50px 90px -40px rgba(11, 63, 158, 0.5);
}

.blob::before,
.blob::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.blob::before {
  inset: -5%;
  border: 1.5px dashed rgba(11, 63, 158, 0.25);
}

.blob::after {
  inset: -12%;
  border: 1px solid rgba(11, 63, 158, 0.1);
}

.flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 24px 22px rgba(8, 30, 80, 0.24));
}

/* Las imágenes "respiran" unos segundos al cargar y luego quedan quietas */
.a1 {
  width: 82%;
  left: 0;
  top: 4%;
  rotate: -3deg;
  animation: float 2.4s ease-in-out 2;
}

.a2 {
  width: 48%;
  right: -4%;
  top: 38%;
  rotate: 4deg;
  animation: float 2.2s ease-in-out -0.8s 2;
}

.a3 {
  width: 44%;
  left: 2%;
  bottom: -2%;
  animation: float 2.6s ease-in-out -1.4s 2;
}

.a4 {
  width: 44%;
  right: 8%;
  bottom: -5%;
  animation: float 2.4s ease-in-out -0.4s 2;
}

@keyframes float {
  50% {
    translate: 0 -12px;
  }
}

/* Líneas de producto */
.cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.cat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 24px 24px 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #f8fbff 0%, var(--tile) 100%);
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
}

.cat:hover {
  transform: translateY(-6px);
  border-color: #d3deef;
  box-shadow: var(--shadow-m);
}

.cat-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.cat h3 {
  min-width: 0;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.cat p {
  max-width: 26ch;
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.cat img {
  width: calc(100% + 48px);
  max-width: none;
  margin: auto -24px 0;
  filter: drop-shadow(0 14px 12px rgba(10, 26, 58, 0.2));
  transition: scale 0.6s var(--ease);
}

.cat:hover img {
  scale: 1.04;
}

.cat-go {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  transition: transform 0.3s var(--ease);
}

.cat-all {
  justify-content: space-between;
  padding-bottom: 24px;
  border: 0;
  color: #d6e3fb;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(77, 163, 255, 0.45), transparent 70%),
    linear-gradient(150deg, #0a1a3a 0%, #0b2b6e 60%, #0b3f9e 100%);
}

.cat-all .big {
  display: block;
  font-size: clamp(4.5rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #fff;
}

.cat-all p {
  max-width: 15ch;
  margin-top: 6px;
  color: #c5d6f4;
}

.cat-all:hover .cat-go {
  transform: translateX(4px);
}

/* Con ocho líneas el mosaico "Catálogo" queda solo en la última fila: en escritorio
   y en móvil se muestra como franja horizontal a todo el ancho. (".cats .cat-all"
   para ganarle a las reglas de ".cat" de las pantallas angostas.) */
@media (min-width: 1101px), (max-width: 700px) {
  .cats .cat-all {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: 6px 22px;
    min-height: 0;
    padding: 26px 96px 26px 28px;
  }

  .cats .cat-all .eyebrow {
    flex-basis: 100%;
  }

  .cats .cat-all .big {
    font-size: clamp(3.2rem, 5vw, 4.4rem);
  }

  .cats .cat-all p {
    flex: 1 1 14ch;
    max-width: 30ch;
    margin-top: 0;
  }

  .cats .cat-all .cat-go {
    top: 50%;
    bottom: auto;
    right: 26px;
    translate: 0 -50%;
  }
}

@media (max-width: 700px) {
  .cats .cat-all {
    gap: 4px 16px;
    padding: 22px 20px; /* en móvil la flecha va oculta (regla .cat-go de pantallas angostas) */
  }
}

/* Títulos largos de línea ("Conexiones / fabricación"): desde tableta el título se
   parte en dos líneas y el número queda a la derecha; en móvil el número baja. */
@media (min-width: 701px) {
  .cat h3 {
    flex: 1 1 0;
  }
}

/* Por qué / principios: tratamiento editorial (regla roja corta + icono) */
.why,
.values {
  display: grid;
  gap: 32px;
}

.why {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.values {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.why-item {
  position: relative;
  padding: 28px 8px 0 0;
  border-top: 1px solid var(--line);
}

.why-item::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--red);
}

.why-ic {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
}

.why-item h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.why-item p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Aplicaciones */
.apps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.app {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}

.app:hover {
  border-color: #cddaf0;
  box-shadow: var(--shadow-m);
  transform: translateY(-4px);
}

.app-ic {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--red-l);
  color: var(--red);
}

.app h3 {
  min-height: 2.5em;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.app p {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.app-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue);
  transition: gap 0.25s var(--ease);
}

.app:hover .app-go {
  gap: 10px;
}

/* Banda de llamado a la acción */
.cta-band {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
  padding: clamp(32px, 5.5vw, 68px);
  overflow: hidden;
  border-radius: var(--r-xl);
  color: #fff;
  background:
    radial-gradient(620px 320px at 92% 0%, rgba(77, 163, 255, 0.5), transparent 70%),
    linear-gradient(135deg, #0a1a3a 0%, #0b2b6e 55%, #0b3f9e 100%);
}

.cta-copy {
  position: relative;
  max-width: 580px;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  margin-top: 14px;
  font-size: 1.08rem;
  color: #c9d7f2;
}

.cta-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.cta-mail {
  font-weight: 600;
  color: #c9d7f2;
  border-bottom: 1px solid rgba(201, 215, 242, 0.4);
  transition: color 0.2s, border-color 0.2s;
}

.cta-mail:hover {
  color: #fff;
  border-color: #fff;
}

.cta-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-star {
  position: absolute;
  top: 50%;
  right: -60px;
  width: 340px;
  height: 340px;
  translate: 0 -50%;
  rotate: 12deg;
  color: #fff;
  opacity: 0.07;
}

/* Pie de página */
.site-footer {
  position: relative;
  padding-top: clamp(40px, 6vw, 72px);
  background: var(--soft);
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0 70%, var(--red) 70% 100%);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.5fr;
  gap: 40px;
}

.foot-brand img {
  width: auto;
  height: 66px;
}

.foot-brand p {
  max-width: 30ch;
  margin-top: 18px;
  color: var(--muted);
}

.foot-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 700;
  color: var(--blue);
}

.foot-mail:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-h {
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.site-footer li + li {
  margin-top: 10px;
}

.foot-lines {
  columns: 2;
  column-gap: 32px;
}

.foot-lines li {
  break-inside: avoid;
  white-space: nowrap;
}

.site-footer li a {
  font-size: 0.95rem;
  color: var(--ink-2);
  transition: color 0.2s;
}

.site-footer li a:hover {
  color: var(--blue);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- 5. Páginas interiores -------------------------------------- */
.page-hero {
  position: relative;
  overflow: clip;
  padding: calc(var(--hd) + clamp(12px, 3vw, 40px)) 0 clamp(36px, 5vw, 64px);
  background: radial-gradient(800px 420px at 100% 0%, #dcebff 0%, rgba(220, 235, 255, 0) 65%), #fff;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4.2rem);
}

.ph-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 32px;
  align-items: center;
}

.ph-art {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin-left: auto;
  aspect-ratio: 1 / 1;
}

.ph-blob {
  inset: 4%;
}

.ph-art img {
  position: absolute;
  top: 50%;
  left: -8%;
  width: 116%;
  max-width: none;
  translate: 0 -50%;
  filter: drop-shadow(0 24px 22px rgba(8, 30, 80, 0.24));
}

.page-hero-plain .ph-copy {
  max-width: 820px;
}

/* Textos legales */
.legal-in {
  max-width: 760px;
  padding-bottom: 40px;
}

.legal-in h2 {
  margin-top: 40px;
  font-size: 1.4rem;
}

.legal-in p {
  margin-top: 12px;
}

.legal-in a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Catálogo */
.catalog-body {
  padding-block: clamp(24px, 3vw, 40px) clamp(56px, 8vw, 104px);
}

.toolbar {
  position: sticky;
  top: calc(var(--hd) - 6px);
  z-index: 30;
  padding: 12px 0;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.toolbar-in {
  display: flex;
  align-items: flex-start;
  gap: 14px 20px;
}

.search {
  position: relative;
  flex: 0 0 clamp(230px, 22vw, 290px);
}

.search .ic {
  position: absolute;
  left: 17px;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 47px;
  border: 1.5px solid var(--field);
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 63, 158, 0.14);
}

.chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip span {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.chip:hover {
  border-color: #b9c8e3;
  color: var(--ink);
}

.chip[aria-pressed='true'] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.chip[aria-pressed='true'] span {
  color: rgba(255, 255, 255, 0.85);
}

.count {
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.empty {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
}

.empty-ic {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: var(--blue-l);
  color: var(--blue);
}

.empty h2 {
  font-size: 1.5rem;
}

.empty p {
  margin-top: 10px;
  color: var(--muted);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* Ventana de detalle de producto */
.modal {
  width: min(1000px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--r-xl);
  background: #fff;
  color: var(--ink-2);
  box-shadow: var(--shadow-l);
}

.modal::backdrop {
  background: rgba(6, 16, 40, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal[open] {
  animation: pop 0.4s var(--ease);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

.modal-in {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-media {
  display: grid;
  place-items: center;
  min-height: 400px;
  padding: 28px;
  background: radial-gradient(120% 90% at 50% 18%, #fff 0%, var(--tile) 68%, var(--tile-2) 100%);
}

.modal-media img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 24px rgba(8, 30, 80, 0.24));
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(26px, 4vw, 46px);
}

.modal-content .eyebrow {
  margin-bottom: 0;
}

.modal h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
}

.modal-content > p:not(.fine-print):not(.sr-only) {
  font-size: 1.02rem;
}

.specs {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.specs div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.specs dt {
  font-size: 0.9rem;
  color: var(--muted);
}

.specs dd {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}

.modal .fine-print {
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
}

.modal-nav {
  display: flex;
  gap: 8px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s;
}

.modal-close:hover {
  border-color: var(--ink);
  background: #fff;
}

/* Guía Camlock */
.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}

.guide {
  width: 100%;
  border-collapse: collapse;
}

.guide th,
.guide td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  font-size: 0.96rem;
}

.guide thead th {
  background: var(--soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.guide tbody tr:last-child > * {
  border-bottom: 0;
}

.guide tbody tr {
  transition: background 0.2s;
}

.guide tbody tr:hover {
  background: #fafcff;
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 36px;
  padding: 0 10px;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.t-go {
  text-align: right !important;
}

.t-go a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--blue);
}

.t-go a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Nosotros */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
}

.about-copy p {
  margin-top: 18px;
  font-size: 1.05rem;
}

.about-copy .btn {
  margin-top: 28px;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mo:nth-child(3n + 2) {
  margin-top: 28px;
}

.mo .media {
  border-radius: 20px;
  aspect-ratio: 1 / 1;
}

.mo .media img {
  transform: scale(1.12);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.steps li {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}

.step-n {
  display: block;
  margin-bottom: 14px;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue);
}

.steps h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.steps p {
  color: var(--muted);
}

.lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lines li {
  display: flex;
}

.lines a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--blue);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}

.lines a:hover {
  border-color: #cddaf0;
  box-shadow: var(--shadow-m);
  transform: translateY(-2px);
}

.lines-t {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.lines strong {
  font-weight: 700;
  color: var(--ink);
}

.lines small {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.contact-info {
  position: sticky;
  top: calc(var(--hd) + 8px);
  display: grid;
  gap: 20px;
}

.info-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}

.soft-card {
  background: var(--soft);
}

.info-card h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.info-ic {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--blue-l);
  color: var(--blue);
}

.info-mail {
  display: block;
  margin: 8px 0 18px;
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.info-mail:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.info-actions [hidden] {
  display: none;
}

.checks {
  margin-top: 14px;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.96rem;
}

.checks .ic {
  flex: none;
  margin-top: 3px;
  color: var(--blue);
}

.form-card {
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--shadow-m);
}

.form {
  display: grid;
  gap: 20px;
}

.form[hidden] {
  display: none;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.req {
  color: var(--red-d);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1.5px solid var(--field);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field select {
  appearance: none;
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366738f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center / 18px;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.55;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 63, 158, 0.14);
}

.field [aria-invalid='true'] {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(212, 22, 28, 0.1);
}

.hint {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: left;
}

.err {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red-d);
}

.err[hidden] {
  display: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.req-note {
  margin-bottom: -4px;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 4px;
}

.fine {
  max-width: 34ch;
  font-size: 0.85rem;
  color: var(--muted);
}

.fine a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

.btn.is-loading .spinner {
  display: block;
}

.btn.is-loading .btn-ic {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-banner {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-weight: 600;
}

.form-banner[hidden] {
  display: none;
}

.form-banner a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-banner.error {
  border-color: #f6c4c6;
  background: var(--red-l);
  color: #8f0e13;
}

.form-banner.ok {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: clamp(24px, 4vw, 40px);
  border-color: #bfe5cf;
  background: #eaf8f0;
  color: #14683a;
  font-weight: 500;
}

.form-banner.ok[hidden] {
  display: none;
}

/* Sin JavaScript, el aviso que llega desde /enviar/ (#enviado / #error) se muestra con :target */
.form-banner.ok[hidden]:target {
  display: grid;
}

.form-banner.error[hidden]:target {
  display: block;
}

.form-banner.ok strong {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0d4f2b;
}

.form-banner.ok .btn {
  margin-top: 10px;
}

/* 404 */
.nf {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: calc(var(--hd) + 16px) 0 72px;
  text-align: center;
  background: radial-gradient(900px 520px at 50% 0%, #d8e9ff 0%, rgba(216, 233, 255, 0) 65%), #fff;
}

.nf-in {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nf-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(7.5rem, 26vw, 17rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.nf-d {
  color: transparent;
  background: linear-gradient(160deg, var(--blue) 15%, var(--sky) 70%);
  -webkit-background-clip: text;
  background-clip: text;
}

.nf-d:last-of-type {
  background: linear-gradient(160deg, var(--sky) 10%, var(--red) 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

.nf-o {
  display: block;
  width: 1.35em;
  margin: 0 -0.22em;
}

.nf-o img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0.1em 0.1em rgba(8, 30, 80, 0.28));
  animation: float 2.8s ease-in-out 2;
}

.nf-p {
  position: absolute;
  width: 0.5em;
  height: auto;
  filter: drop-shadow(0 0.06em 0.06em rgba(8, 30, 80, 0.25));
}

.nf-p1 {
  left: -0.28em;
  top: 0.02em;
  rotate: -16deg;
  animation: float 2.4s ease-in-out -0.6s 2;
}

.nf-p2 {
  right: -0.3em;
  bottom: -0.04em;
  rotate: 16deg;
  animation: float 2.6s ease-in-out -1.2s 2;
}

.nf-copy {
  max-width: 640px;
}

.nf-copy h1 {
  margin-top: 32px;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
}

.nf-copy .lead {
  margin-inline: auto;
}

.nf-copy .hero-cta {
  justify-content: center;
}

.nf-copy + .nf-copy {
  margin-top: 48px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.nf-lines-t {
  margin-top: 36px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nf-lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.nf-lines a {
  display: block;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}

.nf-lines a:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}

/* Con JavaScript se muestra solo el idioma de la dirección visitada */
html[data-nf='es'] [data-nf='en'],
html[data-nf='en'] [data-nf='es'] {
  display: none;
}

/* ---------- Texto justificado --------------------------------------------
   Los párrafos y textos corridos van justificados, sin cortar palabras con
   guion (pedido del cliente). En pantallas angostas se alinean a la izquierda
   para que la justificación no deje huecos grandes entre palabras. Títulos,
   botones, menús y etiquetas cortas quedan alineados a la izquierda. */
p,
.lead {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: none;
  hyphens: none;
}

@media (max-width: 560px) {
  p,
  .lead {
    text-align: left;
  }
}

.count,
.err,
.fine,
.cat p,
.card-body p,
.foot-brand p,
.nf-lines-t,
.nf-copy p,
.empty p,
.cat-all p {
  text-align: left;
  hyphens: manual;
}

.nf-copy p,
.empty p {
  text-align: center;
}

/* Crédito del pie */
.credit {
  color: var(--muted);
}

.credit a,
.credit strong {
  font-weight: 700;
  color: var(--blue);
}

.credit a {
  text-decoration: underline;
  text-decoration-color: rgba(11, 63, 158, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.credit a:hover {
  text-decoration-color: var(--red);
}

/* Transición suave al cambiar de idioma: el contenido se desvanece y el de la otra
   versión entra con un leve desplazamiento (la cabecera se queda quieta) */
html.lang-out main,
html.lang-out .site-footer {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

@keyframes lang-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

html.lang-in main,
html.lang-in .site-footer,
html.lang-in .dock-links,
html.lang-in .tools-cta,
html.lang-in .dock-cta {
  animation: lang-in 0.6s var(--ease) both;
}

/* ---------- 6. Animaciones de entrada ---------------------------------- */
.reveal-on [data-reveal] {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal-on [data-reveal].is-in {
  opacity: 1;
  translate: none;
}

/* ---------- 7. Responsive y accesibilidad ------------------------------- */
@media (min-width: 62em) and (max-width: 71.99em) {
  .dock-links a {
    padding-inline: 15px;
  }

  .tools-cta {
    padding-inline: 14px;
  }
}

@media (max-width: 1180px) {
  .btn-lg {
    padding: 0 22px;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    gap: 12px 24px;
    justify-content: space-between;
  }
}

@media (min-width: 900px) and (max-width: 1139px) {
  .grid.feat > :nth-child(n + 7) {
    display: none;
  }
}

@media (max-width: 1100px) {
  .cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .why {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-grid {
    grid-template-columns: 1.2fr 1fr 1.4fr;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .cat-all {
    grid-column: span 1;
  }

  .apps {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .app {
    grid-column: span 2;
  }

  .app:nth-child(n + 4) {
    grid-column: span 3;
  }
}

/* Cabecera compacta (teléfono y tableta): logo + idioma + botón de menú; el menú es una hoja a pantalla completa */
@media (max-width: 61.99em) {
  :root {
    --hd: 92px;
  }

  .hd {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .hd > .brand,
  .hd > .tools,
  .hd > .menu-btn {
    position: relative;
    z-index: 2;
  }

  .brand img {
    height: 56px;
  }

  .is-scrolled .brand img {
    height: 46px;
  }

  .tools {
    margin-left: auto;
  }

  .tools-cta {
    display: none;
  }

  .js .menu-btn {
    display: grid;
  }

  .dock {
    position: fixed;
    inset: 0;
    z-index: 1;
    justify-self: stretch; /* si no, el navegador encoge y centra la hoja (justify-self:center del escritorio) */
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 118px var(--gut) 32px;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  .js .dock {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s, transform 0.35s var(--ease), visibility 0.35s;
  }

  .js .dock[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .dock::after,
  .dock-ind {
    display: none;
  }

  .dock-links {
    flex-direction: column;
    gap: 6px;
  }

  .dock-links a,
  .is-scrolled .dock-links a {
    padding: 16px 18px;
    border-radius: 18px;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
  }

  .dock a[aria-current='page'],
  .js .dock a[aria-current='page'] {
    background: var(--blue-l);
    color: var(--blue);
  }

  .dock-cta {
    display: inline-flex;
    align-self: flex-start;
  }

  .dock-mail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-weight: 700;
    color: var(--blue);
  }

  /* Sin JavaScript: el menú queda visible en una fila bajo el logo */
  html:not(.js) .site-header {
    position: absolute;
  }

  html:not(.js) .hd {
    flex-wrap: wrap;
  }

  html:not(.js) .dock {
    position: static;
    order: 3;
    flex: 1 0 100%;
    flex-direction: row;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 32px -14px rgba(10, 26, 58, 0.28), 0 0 0 1px rgba(10, 26, 58, 0.07);
  }

  html:not(.js) .dock-links {
    flex-flow: row wrap;
  }

  html:not(.js) .dock-links a {
    padding: 9px 14px;
    font-size: 0.95rem;
  }

  html:not(.js) .dock-cta,
  html:not(.js) .dock-mail {
    display: none;
  }
}

@media (max-width: 55em) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 520px;
    margin-top: 28px;
  }

  .ph-grid {
    grid-template-columns: 1fr;
  }

  .ph-art {
    display: none;
  }

  .about,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-info {
    position: static;
  }

  .values,
  .steps {
    grid-template-columns: 1fr;
  }

  .modal-in {
    grid-template-columns: 1fr;
  }

  .modal-media {
    min-height: 0;
    padding: 20px 20px 8px;
  }

  .modal-media img {
    max-width: 440px;
  }
}

@media (min-width: 55em) {
  .modal-in {
    min-height: min(580px, calc(100dvh - 32px));
  }
}

@media (max-width: 960px) {
  .toolbar-in {
    flex-wrap: wrap;
  }

  .search {
    flex: 1 1 100%;
  }

  .chips {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    margin: -6px;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chips.fade-r {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
  }

  .chips.fade-l {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent);
  }

  .chips.fade-l.fade-r {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
  }
}

@media (max-width: 700px) {
  .cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cat {
    min-height: 270px;
    padding: 18px 18px 0;
  }

  .cat img {
    width: calc(100% + 36px);
    margin: auto -18px 0;
  }

  .cat h3 {
    font-size: 1.05rem;
  }

  .cat p {
    max-width: none;
    font-size: 0.85rem;
  }

  .cat-go {
    display: none;
  }

  .pill {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .why {
    grid-template-columns: 1fr;
  }

  .apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card {
    padding: 8px 8px 16px;
    gap: 12px;
  }

  .card-body {
    padding: 0 6px;
  }

  .card h3 {
    font-size: 0.98rem;
  }

  .card p {
    font-size: 0.84rem;
  }

  .card-cat {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }

  .card-go {
    display: none;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .lines {
    grid-template-columns: 1fr;
  }

  .mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mo:nth-child(3n + 2) {
    margin-top: 0;
  }

  .mo:nth-child(even) {
    margin-top: 20px;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .foot-brand {
    grid-column: 1 / -1;
  }

  .foot-lines {
    columns: 1;
  }

  /* Tabla Camlock → tarjetas */
  .guide thead {
    display: none;
  }

  .guide,
  .guide tbody,
  .guide tr,
  .guide th,
  .guide td {
    display: block;
  }

  .guide tr {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line-2);
  }

  .guide tbody tr:last-child {
    border-bottom: 0;
  }

  .guide th,
  .guide td {
    padding: 4px 0;
    border: 0;
  }

  .guide td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 108px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .guide th[scope='row'] {
    margin-bottom: 6px;
  }

  .t-go {
    padding-top: 8px !important;
    text-align: left !important;
  }
}

@media (max-width: 560px) {
  .stats {
    gap: 12px;
  }

  .stats dd {
    font-size: 1.8rem;
  }

  .stats dt {
    font-size: 0.78rem;
  }

  .apps {
    grid-template-columns: 1fr;
  }

  .hero-cta .btn {
    flex: 1 1 100%;
  }

  .cta-actions,
  .cta-actions .btn {
    width: 100%;
  }

  .modal {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }

  .modal-in {
    max-height: 94dvh;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .modal-nav {
    width: 100%;
    justify-content: center;
  }
}

/* Pantallas bajas (teléfono horizontal, zoom alto): nada queda fijo ocupando espacio */
@media (max-height: 640px) {
  .toolbar {
    position: static;
  }
}

@media (max-height: 520px) {
  .site-header {
    position: absolute;
  }

  html {
    scroll-padding-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .chip[aria-pressed='true'] {
    border-width: 4px;
    text-decoration: underline;
  }

  .dock a[aria-current='page'],
  .lang a[aria-current='true'] {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
  }

  .dock-ind {
    display: none;
  }
}
