/* ==========================================================================
   L&A Sistemas — hoja de estilos única (v4)
   HTML + CSS + JS sin build. Orden: tokens, base, layout, componentes.
   ========================================================================== */

/* --- 1. Tokens -------------------------------------------------------- */

/* Paleta tomada del logo: azul profundo como color principal, bordó como
   acento y neutros fríos de fondo. Los pares texto/fondo de este bloque
   están verificados para WCAG 2.2 AA (4.5:1 en texto normal). */
:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --surface: #ffffff;
  --surface-alt: #eef2f8;
  --ink: #0f1729;
  --ink-soft: #33405a;
  --muted: #535f78;
  --line: #e1e6ef;
  --line-strong: #c6cfde;

  --brand: #01348a;
  --brand-hover: #012868;
  --brand-soft: #e7eefa;
  --brand-ink: #01348a;
  --on-brand: #ffffff;

  --accent: #800f34;
  --accent-hover: #650b29;
  --accent-soft: #f8e8ee;
  --accent-ink: #800f34;
  --on-accent: #ffffff;

  --focus: #0057c0;

  /* Compatibilidad con las páginas que todavía usan los tokens de IA. */
  --ai: #0057c0;
  --ai-soft: var(--brand-soft);
  --ai-ink: #0057c0;

  /* Módulos del logo. */
  --logo-dark: #01348a;
  --logo-mid: #0057c0;
  --logo-light: #0068d3;
  --logo-accent: #800f34;
  --logo-la: #800f34;
  --logo-word: #01348a;

  --shadow-sm: 0 1px 2px rgb(15 23 41 / 6%);
  --shadow-md: 0 14px 34px -22px rgb(15 23 41 / 30%);
  --shadow-lg: 0 34px 70px -42px rgb(15 23 41 / 45%);

  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;

  --max: 75rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);

  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Manrope", var(--font-sans);

  /* Escala tipográfica fluida: sin media queries, se adapta al viewport. */
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.07rem + 0.28vw, 1.25rem);
  --step-2: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.4rem + 1vw, 2.25rem);
  --step-4: clamp(1.95rem, 1.6rem + 1.8vw, 3rem);
  --step-5: clamp(2.3rem, 1.75rem + 2.9vw, 4rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Modo oscuro: por preferencia del sistema, salvo que el usuario haya
   elegido claro explícitamente con el botón del header. Los dos bloques
   tienen que quedar iguales. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1e;
    --bg-alt: #0e1427;
    --surface: #121a2f;
    --surface-alt: #182139;
    --ink: #eef2fa;
    --ink-soft: #c9d2e4;
    --muted: #a0abc2;
    --line: #222c47;
    --line-strong: #34415f;

    --brand: #6b9cf2;
    --brand-hover: #8db3f6;
    --brand-soft: #16234a;
    --brand-ink: #9dbff8;
    --on-brand: #0a0f1e;

    --accent: #e8789a;
    --accent-hover: #f097b2;
    --accent-soft: #2c1322;
    --accent-ink: #f4a3bb;
    --on-accent: #0a0f1e;

    --focus: #9dbff8;

    --ai: #9dbff8;
    --ai-ink: #9dbff8;

    --logo-dark: #3d74e0;
    --logo-mid: #5a90f0;
    --logo-light: #7daaf7;
    --logo-accent: #d2416a;
    --logo-la: #f07895;
    --logo-word: #ffffff;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-md: 0 14px 34px -22px rgb(0 0 0 / 75%);
    --shadow-lg: 0 34px 70px -42px rgb(0 0 0 / 85%);
  }
}

:root[data-theme="dark"] {
  --bg: #0a0f1e;
  --bg-alt: #0e1427;
  --surface: #121a2f;
  --surface-alt: #182139;
  --ink: #eef2fa;
  --ink-soft: #c9d2e4;
  --muted: #a0abc2;
  --line: #222c47;
  --line-strong: #34415f;

  --brand: #6b9cf2;
  --brand-hover: #8db3f6;
  --brand-soft: #16234a;
  --brand-ink: #9dbff8;
  --on-brand: #0a0f1e;

  --accent: #e8789a;
  --accent-hover: #f097b2;
  --accent-soft: #2c1322;
  --accent-ink: #f4a3bb;
  --on-accent: #0a0f1e;

  --focus: #9dbff8;

  --ai: #9dbff8;
  --ai-ink: #9dbff8;

  --logo-dark: #3d74e0;
  --logo-mid: #5a90f0;
  --logo-light: #7daaf7;
  --logo-accent: #d2416a;
  --logo-la: #f07895;
  --logo-word: #ffffff;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 14px 34px -22px rgb(0 0 0 / 75%);
  --shadow-lg: 0 34px 70px -42px rgb(0 0 0 / 85%);
}

/* La división Marca Digital usa el bordó como marcador (etiquetas,
   viñetas, detalles). Los botones siguen en el azul de L&A. */
[data-accent="digital"] {
  --mark: var(--accent-ink);
  --mark-bg: var(--accent);
}

/* --- 2. Base ---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-2);
  font-weight: 650;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

blockquote,
figure,
dl,
dd {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

/* Foco visible en todo el sitio: anillo de 3px con contraste mínimo de 3:1
   contra el fondo (WCAG 2.4.7 y 2.4.13). */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.band :focus-visible,
.line-card--digital :focus-visible {
  outline-color: #ffffff;
}

::selection {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- 3. Layout -------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 52rem;
}

.section {
  padding-block: var(--section-y);
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section--tight {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.stack > * + * {
  margin-top: 1rem;
}

.grid {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(17.5rem, 100%), 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
}

.grid--5 {
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
}

/* --- 4. Tipografía de bloques ---------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mark, var(--brand-ink));
}

/* El marcador repite el módulo bordó del logo. */
.eyebrow::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 2px;
  background: var(--mark-bg, var(--accent));
}

.eyebrow--ai {
  color: var(--brand-ink);
}

.section-head {
  max-width: 46rem;
}

.section-head p {
  margin-top: 1rem;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--muted);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.quote {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-alt);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.text-link {
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

/* --- 5. Botones ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: var(--step-0);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn svg {
  flex: none;
}

.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--accent:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--surface-alt);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.btn--light {
  background: #ffffff;
  color: #01348a;
}

.btn--light:hover {
  background: #e7eefa;
  color: #012868;
}

.btn--outline-light {
  background: transparent;
  border-color: rgb(255 255 255 / 70%);
  color: #ffffff;
}

.btn--outline-light:hover {
  background: rgb(255 255 255 / 14%);
  border-color: #ffffff;
  color: #ffffff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 650;
  color: var(--brand-ink);
}

.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after,
a:hover > .link-arrow::after {
  transform: translateX(3px);
}

/* --- 6. Header -------------------------------------------------------- */

/* El esmerilado va en ::before y no en .header: un backdrop-filter anidado
   no ve la página, y el menú móvil necesita el suyo propio. */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
}

.header[data-scrolled="true"] {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

/* Logo horizontal dibujado en SVG: toma los colores de las variables, así
   el mismo trazo sirve en claro y en oscuro. */
.brand__logo {
  width: auto;
  height: 1.9rem;
}

.footer .brand__logo {
  height: 2.2rem;
}

.nav {
  display: none;
  align-items: center;
  gap: 0.1rem;
}

.nav a {
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.975rem;
  font-weight: 550;
  color: var(--ink-soft);
  transition: color 0.18s var(--ease);
}

.nav a:hover {
  color: var(--brand-ink);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav a[data-variant="digital"] {
  color: var(--accent-ink);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition:
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.icon-btn:hover {
  background: var(--surface-alt);
  border-color: var(--brand);
}

.header .btn {
  display: none;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
}

.theme-toggle [data-theme-icon="dark"] {
  display: none;
}

:root[data-theme="dark"] .theme-toggle [data-theme-icon="dark"] {
  display: block;
}

:root[data-theme="dark"] .theme-toggle [data-theme-icon="light"] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle [data-theme-icon="dark"] {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle [data-theme-icon="light"] {
    display: none;
  }
}

.menu-btn {
  display: inline-flex;
}

/* Menú móvil: capa traslúcida sobre la página, con un velo detrás que lo
   cierra al tocar afuera. */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  max-height: calc(100dvh - 4.25rem);
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-lg);
}

.mobile-nav[data-open="true"] {
  display: block;
}

@supports not (backdrop-filter: blur(1px)) {
  .header::before,
  .mobile-nav {
    background: var(--bg);
  }
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgb(10 15 30 / 35%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

body:has(.mobile-nav[data-open="true"]) .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .mobile-nav[data-open="true"] {
    animation: menu-in 0.22s var(--ease) both;
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-block: 1rem 1.5rem;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--step-1);
  font-weight: 550;
}

.mobile-nav a:hover {
  background: var(--surface-alt);
}

.mobile-nav a[aria-current="page"] {
  color: var(--brand-ink);
  font-weight: 700;
}

.header .mobile-nav .btn {
  display: flex;
  margin-top: 0.75rem;
  width: 100%;
  min-height: 3rem;
  font-size: var(--step-0);
}

.mobile-nav .btn:hover {
  background: var(--brand-hover);
}

@media (width >= 34rem) {
  .header .btn {
    display: inline-flex;
  }
}

@media (width >= 72rem) {
  .nav {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .mobile-nav,
  .nav-scrim {
    display: none !important;
  }
}

/* --- 7. Hero ---------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.75rem, 6vw, 5rem) clamp(3rem, 8vw, 5.5rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46rem 30rem at 0% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 70%),
    radial-gradient(30rem 22rem at 100% 100%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 72%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
}

@media (width >= 64rem) {
  .hero__inner {
    grid-template-columns: 1fr 1.02fr;
  }
}

.hero h1 {
  max-width: 16ch;
}

.hero .lead {
  margin-top: 1.1rem;
  max-width: 36rem;
}

/* Los dos accesos de la portada: en celular ocupan todo el ancho y quedan
   apilados, así se ven sin abrir el menú. */
.hero__actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.hero__actions .btn {
  width: 100%;
}

@media (width >= 34rem) {
  .hero__actions {
    display: flex;
    flex-wrap: wrap;
  }
  .hero__actions .btn {
    width: auto;
  }
}

.hero__contact {
  margin-top: 1.1rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

.hero__meta strong {
  color: var(--ink);
}

/* Visual genérico del hero (páginas internas). */
.hero__visual {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.hero__visual > img {
  width: 100%;
}

/* Vitrina de Marca Digital: un trabajo real en escritorio y, encima, una
   publicación para redes de la propia L&A. */
.showcase {
  position: relative;
  padding-bottom: 1.5rem;
  padding-right: clamp(1.5rem, 6vw, 3rem);
}

.showcase__post {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: clamp(8.75rem, 34%, 11.5rem);
  aspect-ratio: 4 / 5;
  padding: clamp(0.7rem, 2vw, 1rem);
  border-radius: 1rem;
  background: linear-gradient(150deg, #01348a 0%, #2a1e63 55%, #800f34 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.showcase__mark {
  width: clamp(1.4rem, 4vw, 2rem);
  height: auto;
}

.showcase__post p {
  margin: auto 0 0;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 2.2vw, 1.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
}

.showcase__post span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #fff;
}

.showcase__tag {
  position: absolute;
  left: 0.75rem;
  bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}

/* --- 7b. Mosaico de la portada --------------------------------------- */

/* Composición sobre la grilla del logo: 3x3, la celda superior izquierda
   queda libre y la inferior derecha es el módulo bordó. Habla de L&A:
   software arriba, un solo trabajo de cliente, la identidad propia y los
   servicios. El detalle de cada cliente va en la sección de casos. */
.mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: clamp(0.5rem, 1.4vw, 0.85rem);
}

.mosaic__tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.mosaic__system {
  grid-column: 2 / 4;
  grid-row: 1;
}

.mosaic__process {
  grid-column: 1 / 3;
  grid-row: 2;
  aspect-ratio: 16 / 10;
}

.mosaic__metric {
  grid-column: 3;
  grid-row: 2;
  display: grid;
  align-content: center;
  padding: clamp(0.6rem, 1.6vw, 1rem);
  padding-bottom: 2.4rem;
  background: var(--surface-alt);
}

.mosaic__metric p {
  display: grid;
  gap: 0.2rem;
  margin: 0;
}

.mosaic__metric strong {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent-ink);
}

.mosaic__metric span {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

/* Antes y después de un proceso: lo suelto a la izquierda, lo ordenado a
   la derecha. */
.process {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.35rem, 1.2vw, 0.75rem);
  height: 100%;
  padding: clamp(0.6rem, 1.8vw, 1.1rem);
  font-size: clamp(0.66rem, 1.5vw, 0.86rem);
  line-height: 1.2;
}

.process__col {
  display: grid;
  gap: 0.4rem;
}

.process__label {
  font-family: var(--font-display);
  font-size: 0.85em;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.process ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process li {
  padding: 0.35em 0.55em;
  border-radius: 6px;
  font-weight: 600;
}

/* --r y --x: posición final (suelta pero legible). --r0, --x0 y --y0: de
   dónde arranca la animación, más desordenada. */
.process__col--before li {
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  transform: rotate(var(--r)) translateX(var(--x));
}

.process__col--before li:nth-child(1) {
  --r: -2.5deg;
  --x: 0em;
  --r0: -14deg;
  --x0: -0.9em;
  --y0: 0.5em;
}

.process__col--before li:nth-child(2) {
  --r: 2deg;
  --x: 0.35em;
  --r0: 11deg;
  --x0: 1.2em;
  --y0: -0.4em;
}

.process__col--before li:nth-child(3) {
  --r: -1deg;
  --x: -0.15em;
  --r0: -9deg;
  --x0: 0.6em;
  --y0: 0.7em;
}

.process__col--after .process__label {
  color: var(--brand-ink);
}

.process__col--after li {
  display: flex;
  align-items: center;
  gap: 0.4em;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.process__col--after li::before {
  content: "";
  flex: none;
  width: 0.45em;
  height: 0.45em;
  border-radius: 1px;
  background: currentColor;
}

.process__arrow {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--accent-ink);
}

.mosaic__stat {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  align-content: end;
  gap: 0.15rem;
  padding: clamp(0.7rem, 1.6vw, 1rem);
  background: var(--brand);
  border-color: transparent;
  color: var(--on-brand);
}

.mosaic__stat strong {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.03em;
}

.mosaic__stat span {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
}

.mosaic__services {
  grid-column: 2;
  grid-row: 3;
  display: grid;
  align-content: center;
  padding: clamp(0.55rem, 1.4vw, 0.9rem);
  background: var(--surface-alt);
}

.mosaic__services ul {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(0.66rem, 1.5vw, 0.86rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-ink);
}

.mosaic__services li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mosaic__services li::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: currentColor;
}

.mosaic__services li[data-line="marca"] {
  color: var(--accent-ink);
}

.mosaic__accent {
  grid-column: 3;
  grid-row: 3;
  aspect-ratio: 1;
  background: var(--logo-accent);
  border-color: transparent;
}

/* Etiqueta que identifica cada muestra: qué es y de quién. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.tag--demo {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}

.mosaic__tile > .tag {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

/* La etiqueta de la demo va debajo del panel para no tapar datos. */
.mosaic__system {
  display: flex;
  flex-direction: column;
}

.mosaic__system > .demo {
  flex: 1;
}

.mosaic__system > .tag {
  position: static;
  align-self: flex-start;
  margin: 0 0.5rem 0.5rem;
  box-shadow: none;
}

@media (width < 34rem) {
  .mosaic__stat span,
  .mosaic__metric span {
    font-size: 0.7rem;
  }
  .tag {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
  }
}

/* --- 7c. Demo de sistema (ilustrativa, datos ficticios) -------------- */

.demo {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  height: 100%;
  min-height: 11rem;
  background: var(--surface);
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.demo__side {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  padding: 0.6rem 0.45rem;
  background: #01348a;
}

.demo__side i {
  display: block;
  height: 0.4rem;
  border-radius: 2px;
  background: rgb(255 255 255 / 35%);
}

.demo__side i:first-child {
  height: 1.1rem;
  background: rgb(255 255 255 / 85%);
}

.demo__main {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem 0.7rem;
  min-width: 0;
}

.demo__title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}

.demo__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.demo__kpi {
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
}

.demo__kpi b {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink);
}

.demo__rows {
  display: grid;
  gap: 0.2rem;
}

.demo__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-alt);
  white-space: nowrap;
  overflow: hidden;
}

.demo__row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo__state {
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.demo__state--warn {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

@media (width < 34rem) {
  .demo {
    min-height: 9.5rem;
    grid-template-columns: 1.5rem 1fr;
    font-size: 0.62rem;
  }
  .demo__row:nth-child(n + 3) {
    display: none;
  }
}

/* --- 8. Tarjetas ------------------------------------------------------ */

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition:
    transform 0.22s var(--ease),
    border-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}

a.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-top: 1.1rem;
  overflow-wrap: break-word;
  hyphens: auto;
}

.card p {
  margin-top: 0.6rem;
  flex: 1;
  color: var(--muted);
}

.card .link-arrow {
  margin-top: 1.25rem;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-ink);
  transition: background-color 0.22s var(--ease);
}

a.card:hover .card__icon {
  background: color-mix(in srgb, var(--brand) 20%, var(--brand-soft));
}

.card--ai .card__icon {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

[data-accent="digital"] .card__icon {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.card--step {
  gap: 0.35rem;
}

.card__num {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mark, var(--brand-ink));
}

/* Las dos líneas de trabajo de la portada. */
.lines {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.25rem);
  margin-top: 2.5rem;
}

@media (width >= 56rem) {
  .lines {
    grid-template-columns: 1fr 1fr;
  }
}

.line-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.line-card h3 {
  font-size: var(--step-3);
}

.line-card > p {
  margin-top: 0.75rem;
  color: var(--muted);
}

.line-card .ticks {
  flex: 1;
}

.line-card .btn-row {
  margin-top: 1.75rem;
}

.line-card--digital {
  background: linear-gradient(150deg, #4d0a20 0%, #800f34 100%);
  border-color: transparent;
  color: #ffffff;
}

.line-card--digital h3,
.line-card--digital .eyebrow {
  color: #ffffff;
}

.line-card--digital .eyebrow::before {
  background: #ffffff;
}

.line-card--digital > p,
.line-card--digital .ticks li {
  color: rgb(255 255 255 / 88%);
}

.line-card--digital .ticks li::before {
  background: #ffffff;
}

.line-card--digital .btn {
  background: #ffffff;
  color: #800f34;
}

.line-card--digital .btn:hover {
  background: #f8e8ee;
  color: #650b29;
}

/* Lista de problemas: piezas chicas y densas. */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
}

.chip {
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--step--1);
  font-weight: 550;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
}

.tech {
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.tech[data-highlight="true"] {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* Lista con viñeta propia: un módulo cuadrado, como en el logo. */
.ticks {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.ticks li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--ink-soft);
}

.ticks li::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: var(--mark-bg, var(--brand));
}

/* Respaldo: cifras de trayectoria. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-top: 2.5rem;
}

.fact {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--brand-ink);
}

.fact span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

/* --- 9. Bandas de color ---------------------------------------------- */

.band {
  background: #01348a;
  color: #ffffff;
  border-block: 1px solid transparent;
}

.band h2,
.band h3 {
  color: #ffffff;
}

.band p {
  color: rgb(255 255 255 / 88%);
}

.band .eyebrow {
  color: rgb(255 255 255 / 88%);
}

.band .eyebrow::before {
  background: #ffffff;
}

.band--digital {
  background: linear-gradient(135deg, #01348a 0%, #2a1e63 50%, #800f34 100%);
}

.band__split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (width >= 62rem) {
  .band__split {
    grid-template-columns: 1fr 1fr;
  }
}

.band-card {
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 8%);
}

.band-card h3 {
  font-size: var(--step-1);
}

.band-card p {
  margin-top: 0.4rem;
  font-size: var(--step--1);
}

/* --- 10. Casos ------------------------------------------------------- */

/* Estructura fija para todos los casos (marca y software): muestras,
   qué necesitaba el cliente, qué resolvimos y qué se entregó. */
.case {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

@media (width >= 58rem) {
  .case {
    grid-template-columns: 1.15fr 1fr;
  }
}

.case__shot {
  position: relative;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

@media (width >= 58rem) {
  .case__shot {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}

.case__shot img {
  width: 100%;
  height: auto;
}

.case__body {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.case__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.case__tags span {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ink-soft);
}

/* Caso v4: muestras arriba, ficha abajo. */
.casefile {
  margin-top: 2.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.casefile__media {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}

@media (width >= 50rem) {
  .casefile__media {
    grid-template-columns: 2.2fr 0.7fr 1.1fr;
    align-items: start;
  }
}

.casefile__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3.5vw, 2.5rem) 0;
}

.casefile__head p {
  color: var(--muted);
}

.casefile__facts {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
}

@media (width >= 50rem) {
  .casefile__facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

.casefile__facts dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mark, var(--brand-ink));
}

.casefile__facts dt::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--accent);
}

.casefile__facts dd {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

.casefile__facts .ticks {
  margin-top: 0.6rem;
  gap: 0.45rem;
}

.casefile__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 3.5vw, 2.5rem) clamp(1.25rem, 3.5vw, 2.5rem);
}

.casefile__foot .btn-row {
  margin-top: 0;
}

/* Marco de navegador y de celular para las capturas: se muestran
   completas, en su proporción original. */
.frame {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.frame__bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
  font-size: 0.75rem;
  color: var(--muted);
}

.frame__bar i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.frame__bar span {
  margin-left: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame img {
  width: 100%;
}

.frame--phone {
  max-width: 13rem;
  justify-self: center;
  border-radius: 1.4rem;
  border-width: 6px;
  border-color: #0f1729;
}

.figure figcaption {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* Lámina de identidad: logo, paleta y tipografía reales del cliente. */
.idsheet {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #f7f5f0;
  color: #1a1d26;
  box-shadow: var(--shadow-md);
}

.idsheet__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5160;
}

.idsheet__logo {
  padding: 0.9rem;
  border-radius: 0.6rem;
  background: #ffffff;
}

.idsheet__swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.swatch {
  display: grid;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #3d4452;
}

.swatch i {
  display: block;
  aspect-ratio: 1;
  border-radius: 0.4rem;
  border: 1px solid rgb(0 0 0 / 10%);
}

.idsheet__type {
  display: grid;
  gap: 0.1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ddd8cc;
}

.idsheet__type b {
  font-family: "IBM Plex Sans Condensed", "Arial Narrow", var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.idsheet__type span {
  font-size: 0.75rem;
  color: #4a5160;
}

/* --- 10b. Reels ------------------------------------------------------- */

.reels {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  margin-top: 2.5rem;
}

.reel {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
}

.reel video,
.reel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 72%));
  color: #fff;
  font-size: var(--step--1);
  font-weight: 600;
}

/* Tira de logos de clientes. */
.logos {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.logos img {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  filter: grayscale(100%);
  transition:
    opacity 0.2s var(--ease),
    filter 0.2s var(--ease);
}

.logos img:hover {
  opacity: 1;
  filter: none;
}

/* --- 10c. Marca Digital: servicios ---------------------------------- */

.services {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.25rem);
  margin-top: 2.5rem;
}

@media (width >= 60rem) {
  .services {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.service h3 {
  margin-top: 1rem;
}

.service > p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.service h4 {
  margin-top: 1.4rem;
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.service .ticks {
  margin-top: 0.7rem;
  flex: 1;
}

.service .btn-row {
  margin-top: 1.5rem;
}

.ownership {
  display: grid;
  gap: 1rem 2.5rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-xl);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
}

@media (width >= 56rem) {
  .ownership {
    grid-template-columns: 1fr 1.2fr;
  }
}

.ownership h2 {
  font-size: var(--step-3);
}

.ownership p {
  color: var(--ink-soft);
}

.ownership .ticks {
  margin-top: 0;
}

/* --- 11. Formulario -------------------------------------------------- */

.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: var(--step--1);
  font-weight: 650;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  transition:
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.field select {
  appearance: auto;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #c42b2b;
}

.field__hint {
  font-size: var(--step--1);
  color: var(--muted);
}

.field__optional {
  font-weight: 400;
  color: var(--muted);
}

.form__context {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: var(--step--1);
  font-weight: 600;
}

/* Trampa para bots: fuera de pantalla, nunca enfocable por teclado. */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.form-status {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--step-0);
  font-weight: 550;
}

.form-status:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.form-status[data-state="info"] {
  background: var(--surface-alt);
  color: var(--ink);
}

.form-status[data-state="ok"] {
  background: #e7f5ec;
  border-color: #9fd3b2;
  color: #145c32;
}

.form-status[data-state="error"] {
  background: #fdecec;
  border-color: #f0b4b4;
  color: #9b1c1c;
}

:root[data-theme="dark"] .form-status[data-state="ok"] {
  background: #0f2a1b;
  border-color: #23573a;
  color: #9fe0b8;
}

:root[data-theme="dark"] .form-status[data-state="error"] {
  background: #2d1414;
  border-color: #6b2a2a;
  color: #f8b4b4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status[data-state="ok"] {
    background: #0f2a1b;
    border-color: #23573a;
    color: #9fe0b8;
  }
  :root:not([data-theme="light"]) .form-status[data-state="error"] {
    background: #2d1414;
    border-color: #6b2a2a;
    color: #f8b4b4;
  }
}

.form-status[hidden] {
  display: none;
}

.form-status a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* --- 12. Contacto: datos --------------------------------------------- */

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (width >= 58rem) {
  .contact-grid {
    grid-template-columns: 1fr 0.8fr;
  }
}

.contact-item {
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}

.contact-item:first-of-type {
  border-top: 0;
}

.contact-item dt {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item dd {
  margin: 0.35rem 0 0;
  font-size: var(--step-1);
  font-weight: 650;
}

.contact-item dd a {
  color: var(--brand-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* --- 13. Footer ------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}

.footer__top {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

@media (width >= 48rem) {
  .footer__top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer h2 {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer ul {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.footer ul a {
  display: inline-block;
  padding-block: 0.2rem;
}

.footer a:hover {
  color: var(--brand-ink);
}

.footer__tagline {
  margin-top: 1.1rem;
  max-width: 28rem;
  color: var(--muted);
}

.social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition:
    border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

.social a:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
}

.footer__bottom {
  border-top: 1px solid var(--line);
}

.footer__bottom > .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-block: 1.25rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* Botón flotante de WhatsApp. Solo se inserta si hay número configurado.
   En celular es un círculo de 56px pegado a la esquina, respeta el área
   segura y deja lugar al final de la página para no tapar el footer. */
.wa-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: #25d366;
  color: #06281a;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 28px -10px rgb(0 0 0 / 45%);
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.wa-float svg {
  width: 1.6rem;
  height: 1.6rem;
}

.wa-float__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wa-float:hover {
  transform: translateY(-2px);
}

.wa-float:focus-visible {
  outline-color: #0f1729;
}

body:has(.wa-float) .footer__bottom > .wrap {
  padding-bottom: 5.5rem;
}

/* Mientras se escribe en un campo o el menú está abierto, el botón se
   retira para no tapar el teclado ni los controles. */
body:has(.mobile-nav[data-open="true"]) .wa-float,
body:has(.field :focus) .wa-float {
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
}

@media (width >= 48rem) {
  .wa-float {
    width: auto;
    height: auto;
    padding: 0.8rem 1.15rem;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: clamp(1rem, 3vw, 1.75rem);
  }
  .wa-float svg {
    width: 1.25rem;
    height: 1.25rem;
  }
  .wa-float__text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
  body:has(.wa-float) .footer__bottom > .wrap {
    padding-bottom: 1.25rem;
  }
  body:has(.field :focus) .wa-float {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.btn--wa svg {
  color: #128c4b;
}

:root[data-theme="dark"] .btn--wa svg {
  color: #4ade80;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--wa svg {
    color: #4ade80;
  }
}

/* --- 14. Movimiento --------------------------------------------------- */

/* Animaciones por scroll nativas: sin IntersectionObserver ni JS.
   Si el navegador no las soporta, el contenido queda visible. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
  }
}

/* Hero: el mosaico se arma módulo por módulo como el logo, y el proceso
   pasa de suelto a ordenado. Solo transform y opacity, una sola vez. Con
   «reducir movimiento» todo aparece directamente en su estado final. */
@media (prefers-reduced-motion: no-preference) {
  .mosaic__tile {
    animation: tile-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(120ms + var(--step, 0) * 90ms);
  }

  .mosaic__system { --step: 0; }
  .mosaic__process { --step: 1; }
  .mosaic__metric { --step: 2; }
  .mosaic__stat { --step: 3; }
  .mosaic__services { --step: 4; }

  .mosaic__accent {
    animation: tile-snap 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) 700ms both;
  }

  .process__col--before li {
    animation: settle 0.7s cubic-bezier(0.3, 1.2, 0.4, 1) both;
    animation-delay: calc(650ms + var(--n) * 80ms);
  }

  .process__arrow {
    animation: arrow-in 0.35s ease-out 1250ms both;
  }

  .process__col--after li {
    animation: row-in 0.35s ease-out both;
    animation-delay: calc(1350ms + var(--n) * 110ms);
  }

  .process li:nth-child(1) { --n: 0; }
  .process li:nth-child(2) { --n: 1; }
  .process li:nth-child(3) { --n: 2; }
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(0.7rem) scale(0.92);
  }
}

@keyframes tile-snap {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
}

@keyframes settle {
  from {
    transform: rotate(var(--r0)) translate(var(--x0), var(--y0));
  }
}

@keyframes arrow-in {
  from {
    opacity: 0;
    transform: translateX(-0.5rem);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateX(-0.6rem);
  }
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Transición entre páginas: el navegador anima la navegación entre
   documentos, sin router ni JavaScript. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation-duration: 0.18s;
}

::view-transition-new(root) {
  animation-duration: 0.28s;
}

@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 print {
  .header,
  .footer,
  .wa-float,
  .nav-scrim,
  .hero__bg {
    display: none;
  }
}
