/* ==========================================================================
   L&A Sistemas — hoja de estilos única (v5)
   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: #f6f8fb;
  --bg-alt: #edf1f7;
  --surface: #ffffff;
  --surface-alt: #eef2f8;
  --ink: #0f1729;
  --ink-soft: #33405a;
  --muted: #535f78;
  --line: #d3dbe8;
  --line-strong: #b4c0d4;

  --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 / 8%), 0 8px 20px -14px rgb(15 23 41 / 22%);
  --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);
}

/* 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);
}

@media (width < 34rem) {
  .tag {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
  }
}

/* --- 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;
  }
}

/* --- 15. v5: portada con foto, servicios, antes/ahora y casos --------- */

/* Los bordes y las sombras de las tarjetas se separan del fondo: el fondo
   de la página es un gris muy suave y las superficies son blancas. */
.card,
.fact {
  box-shadow: var(--shadow-sm);
}

/* 15a. Hero con la foto de los socios. En celular la foto va arriba y se
   funde con el fondo; en escritorio ocupa la derecha y el texto queda sobre
   el color liso de la página, así el contraste no depende de la imagen. */
.hero--photo {
  position: relative;
  padding: 0;
  background: var(--bg);
}

.hero__photo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 18%;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}

:root[data-theme="dark"] .hero__photo img {
  filter: brightness(0.78) saturate(0.95);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__photo img {
    filter: brightness(0.78) saturate(0.95);
  }
}

.hero__people {
  position: absolute;
  left: var(--gutter);
  bottom: 1rem;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgb(10 15 30 / 78%);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  backdrop-filter: blur(6px);
}

.hero--photo .hero__inner {
  display: block;
  padding-block: 0.5rem clamp(2.25rem, 7vw, 3.5rem);
}

.hero--photo h1 {
  max-width: 15ch;
}

/* En celular la foto es una franja baja: los dos botones del hero tienen que
   verse sin bajar, incluso en pantallas de 360 px. */
@media (width < 34rem) {
  .hero__photo {
    aspect-ratio: 2 / 1;
  }

  .hero--photo h1 {
    font-size: clamp(2rem, 9vw, 2.3rem);
  }

  .hero--photo .lead {
    margin-top: 0.8rem;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .hero--photo .hero__actions {
    margin-top: 1.1rem;
  }

  .hero__people {
    bottom: 0.6rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
  }
}

@media (width >= 64rem) {
  .hero--photo {
    display: grid;
    align-items: center;
    min-height: clamp(30rem, 60vh, 38rem);
  }

  .hero__photo {
    position: absolute;
    inset: 0 0 0 auto;
    width: 78%;
    aspect-ratio: auto;
  }

  /* El tramo izquierdo de la foto queda transparente: el texto se apoya en
     el color liso de la página y la foto aparece recién a la derecha. */
  .hero__photo img {
    object-position: 50% 14%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent 16%, rgb(0 0 0 / 55%) 36%, #000 58%);
    mask-image: linear-gradient(90deg, transparent 0, transparent 16%, rgb(0 0 0 / 55%) 36%, #000 58%);
  }

  /* Por encima de las tarjetas de servicios, que montan sobre el hero. */
  .hero__people {
    left: auto;
    right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
    bottom: 5.5rem;
  }

  .hero--photo .hero__inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(3.5rem, 7vw, 5.5rem);
  }

  .hero__copy {
    max-width: 34rem;
  }
}

/* 15b. Cuatro servicios: tarjetas que montan sobre el borde del hero. */
.pillars-section {
  position: relative;
  z-index: 2;
  padding-block: clamp(2rem, 5vw, 3rem) 0;
}

@media (width >= 64rem) {
  .pillars-section {
    margin-top: -3.25rem;
    padding-top: 0;
  }
}

.pillars {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.pillars .card {
  box-shadow: var(--shadow-md);
}

.card--digital .card__icon {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Franja de cifras: plana y con divisores, para no repetir el formato de las
   tarjetas de servicio que tiene encima. */
.facts--flush {
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 0;
  border-block: 1px solid var(--line-strong);
}

.facts--flush .fact {
  padding: 1.1rem 0.9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.facts--flush .fact strong {
  font-size: var(--step-2);
}

.facts--flush .fact:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.facts--flush .fact:nth-child(even) {
  border-left: 1px solid var(--line);
}

@media (width >= 56rem) {
  .facts--flush {
    grid-template-columns: repeat(4, 1fr);
  }

  .facts--flush .fact {
    padding: 1.35rem 1.5rem;
  }

  .facts--flush .fact:nth-child(n + 3) {
    border-top: 0;
  }

  .facts--flush .fact + .fact {
    border-left: 1px solid var(--line);
  }

  .facts--flush .fact:first-child {
    padding-left: 0;
  }
}

/* 15c. Antes / ahora. */
.shift {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

@media (width >= 60rem) {
  .shift {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  }
}

.shift__rule {
  width: 3rem;
  height: 3px;
  margin-top: 1.25rem;
  border-radius: 2px;
  background: var(--accent);
}

.shift__board {
  display: grid;
  gap: 0.75rem;
  align-items: center;
}

@media (width >= 34rem) {
  .shift__board {
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
  }
}

.shift__panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.shift__panel h3 {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
  font-size: var(--step-1);
}

.shift__panel--now h3 {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.shift__panel ul {
  list-style: none;
  margin: 0;
  padding: 0.4rem 1.1rem 0.6rem;
}

.shift__panel li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--ink-soft);
}

.shift__panel li:last-child {
  border-bottom: 0;
}

.shift__panel li svg {
  flex: none;
  color: var(--muted);
}

.shift__panel--now li svg {
  color: var(--brand-ink);
}

.shift__arrow {
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  transform: rotate(90deg);
}

@media (width >= 34rem) {
  .shift__arrow {
    transform: none;
  }
}

/* 15d. Casos de éxito en la portada. */
.cases {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 2.5rem;
}

@media (width >= 56rem) {
  .cases {
    grid-template-columns: 1fr 1fr;
  }
}

.case-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.case-card__visual {
  position: relative;
  display: grid;
  align-items: start;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.case-card__visual .tag {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.case-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.case-card__body h3 {
  margin-top: 0.35rem;
  font-size: var(--step-2);
}

.case-card__body > p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.case-card__body .case__tags {
  margin-top: 1rem;
}

.case-card__body .link-arrow {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 1.25rem;
}

/* 15e. Pantalla del sistema de comandas, rehecha en HTML y CSS con datos
   ficticios. Escala sola: todas las medidas están en em y el tamaño base
   sigue el ancho de su contenedor. Es una ventana de Windows, así que usa
   colores fijos también en modo oscuro. */
.pos {
  container-type: inline-size;
  width: 100%;
}

.pos__win {
  overflow: hidden;
  border: 1px solid #b8c6dc;
  border-radius: 0.6em;
  background: #f4f7fc;
  box-shadow: var(--shadow-lg);
  color: #1b2a41;
  font-family: "Segoe UI", var(--font-sans);
  font-size: max(0.6rem, 2.3cqw);
  line-height: 1.25;
}

.pos__title {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.55em 0.8em;
  background: #d7e5f8;
  font-size: 1.05em;
  font-weight: 600;
}

.pos__logo {
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 0.3em;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.72em;
  font-style: normal;
  font-weight: 700;
}

.pos__ctl {
  margin-left: auto;
  letter-spacing: 0.6em;
  color: #3f4f69;
}

.pos__tabs {
  display: flex;
  gap: 0.2em;
  padding: 0.35em 0.8em 0;
  border-bottom: 1px solid #b8c6dc;
  background: #e9f0fb;
  font-size: 0.95em;
}

.pos__tabs span,
.pos__tabs b {
  padding: 0.3em 0.8em;
}

.pos__tabs span {
  color: #33425c;
}

.pos__tabs b {
  margin-bottom: -1px;
  border: 1px solid #b8c6dc;
  border-bottom-color: #f4f7fc;
  border-radius: 0.3em 0.3em 0 0;
  background: #f4f7fc;
  font-weight: 600;
}

.pos__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  padding: 0.7em 0.8em;
  border-bottom: 1px solid #d3deee;
  background: linear-gradient(#ffffff, #eef4fc);
}

.pos__tool {
  display: grid;
  justify-items: center;
  gap: 0.25em;
  min-width: 5em;
  padding: 0.3em 0.4em;
  color: #25354f;
  font-size: 0.88em;
  text-align: center;
}

.pos__tool i {
  width: 1.9em;
  height: 1.9em;
  border-radius: 0.35em;
  background: var(--c, #2563eb);
}

.pos__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.2em;
  padding: 0.65em 0.8em;
  color: #33425c;
  font-size: 0.9em;
}

.pos__filters em {
  padding: 0.1em 0.65em;
  border: 1px solid #9fb2cf;
  border-radius: 0.25em;
  background: #ffffff;
  color: #1b2a41;
  font-style: normal;
}

.pos__actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4em;
  padding: 0 0.8em 0.7em;
}

.pos__actions span {
  overflow: hidden;
  padding: 0.55em 0.3em;
  border: 1px solid #9fb8dc;
  border-radius: 0.35em;
  background: #dce9fb;
  color: #16294a;
  font-size: 0.88em;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos__table {
  margin: 0 0.8em 0.8em;
  border: 1px solid #c5d1e4;
  border-radius: 0.3em;
  background: #ffffff;
  font-size: 0.92em;
}

.pos__row {
  display: grid;
  grid-template-columns: 0.5fr 1.2fr 1.6fr 1.2fr;
  gap: 0.6em;
  align-items: center;
  padding: 0.5em 0.7em;
  border-top: 1px solid #e3eaf5;
}

.pos__row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos__row--head {
  border-top: 0;
  background: #eef3fa;
  font-weight: 700;
}

.pos__state {
  justify-self: start;
  padding: 0.15em 0.85em;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 600;
}

.pos__state--prep {
  background: #15803d;
}

.pos__state--ready {
  background: #c2410c;
}

.pos__state--ship {
  background: #1d4ed8;
}

@container (width < 24rem) {
  .pos__tools {
    display: none;
  }
}

/* Recorrido de un pedido, en la ficha del caso de comandas. */
.flow {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.flow li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.85rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  counter-increment: paso;
}

.flow li::before {
  content: counter(paso);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-display);
  font-weight: 700;
}

.flow b {
  font-family: var(--font-display);
  color: var(--ink);
}

.flow span {
  color: var(--muted);
  font-size: var(--step--1);
}

@media (width >= 50rem) {
  .casefile__media--pos {
    grid-template-columns: 1.6fr 1fr;
  }
}

/* --- 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%;
    }
  }
}

@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;
  }
}
