/* =========================================================================
   Estudio Miguel Alonso — hoja de estilos principal
   Orden: 1. Fuentes · 2. Tokens · 3. Base · 4. Layout · 5. Componentes
          6. Secciones · 7. Utilidades · 8. Movimiento reducido / impresión
   ========================================================================= */

/* 1. Fuentes (OFL, alojadas en el propio sitio) -------------------------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. Tokens ---------------------------------------------------------------- */
:root {
  /* Color: azul institucional */
  --navy-950: #06152a;
  --navy-900: #0a1f3a;
  --navy-800: #0f2c52;
  --navy-700: #14315e;
  --navy-600: #1d4580;
  --navy-500: #2c5c9e;
  --navy-300: #8fa6c6;
  --navy-200: #c9d6ea;
  --navy-100: #e6edf6;
  --navy-50: #f4f7fb;

  /* Color: naranja de la marca (el del logo) */
  --orange-500: #ff8d15; /* acentos gráficos (barras, líneas): el color exacto del logo */
  --orange-400: #ffa23f;
  --orange-600: #c9500b; /* fondos de botones con texto blanco (contraste 4,5:1, AA) */
  --orange-700: #a8420a;
  --orange-100: #fff1e2;

  /* Roles */
  --color-text: #0e1726;
  --color-text-muted: #475569;
  --color-text-on-dark: #ffffff;
  --color-text-on-dark-muted: #b8c8e0;
  --color-border: #dde4ee;
  --color-border-strong: #c3cedd;
  --color-bg: #ffffff;
  --color-bg-soft: var(--navy-50);
  --color-link: var(--navy-600);
  --color-focus: #1d6fe0;
  --color-success: #17663f;
  --color-success-bg: #e8f5ee;
  --color-error: #b42318;
  --color-error-bg: #fdecea;

  /* Tipografía */
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --text-xs: 0.8125rem;   /* 13px */
  --text-sm: 0.9375rem;   /* 15px */
  --text-base: 1.0625rem; /* 17px */
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --text-xl: 1.375rem;
  --text-h3: 1.25rem;
  --text-h2: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  --text-h1: clamp(2.125rem, 1.55rem + 2.4vw, 3.5rem);
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;

  /* Espaciado (escala de 4 px) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --section-y: clamp(4rem, 3rem + 4vw, 6.5rem);
  --gutter: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
  --container: 75rem; /* 1200px */

  /* Radios y sombras */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.06), 0 1px 3px rgba(14, 23, 38, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(14, 23, 38, 0.06), 0 12px 24px -6px rgba(14, 23, 38, 0.1);
  --shadow-lg: 0 24px 48px -12px rgba(6, 21, 42, 0.35);

  --header-h: 4.5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

/* 3. Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p, ul, ol, figure, blockquote, address { margin: 0; }
p { text-wrap: pretty; }
ul[class], ol[class] { padding: 0; list-style: none; }
address { font-style: normal; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--color-link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-800); }

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

::selection { background: var(--orange-100); color: var(--color-text); }

/* 4. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--soft { background: var(--color-bg-soft); }

.section-header { max-width: 46rem; margin-bottom: var(--space-12); }
.section-header--center { margin-inline: auto; text-align: center; }
.section-header--center .eyebrow { justify-content: center; }
.section-header--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  max-width: none;
}
.section-header--split > div { max-width: 46rem; }

.section-title { font-size: var(--text-h2); color: var(--navy-900); }

/* 5. Componentes ----------------------------------------------------------- */

/* Icono */
.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon--sm { width: 1.125rem; height: 1.125rem; }

/* Antetítulo: la barra naranja retoma las líneas verticales del logo */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--navy-600);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 3px;
  height: 1.1em;
  border-radius: 2px;
  background: var(--orange-500);
}
.eyebrow--light { color: var(--navy-200); }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0.6875rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn--sm { min-height: 2.5rem; padding: 0.5rem 1rem; }
.btn--lg { min-height: 3.25rem; padding: 0.875rem 1.5rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--orange-600); color: #fff; }
.btn--primary:hover { background: var(--orange-700); color: #fff; box-shadow: 0 8px 20px -8px rgba(201, 80, 11, 0.6); }
.btn--primary:active { transform: translateY(1px); }

.btn--secondary { background: #fff; color: var(--navy-800); border-color: var(--color-border-strong); }
.btn--secondary:hover { border-color: var(--navy-700); color: var(--navy-900); }

.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.7); color: #fff; }

.btn[disabled] { opacity: 0.7; cursor: progress; }

.button-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.button-row--center { justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--navy-700);
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
}
.link-arrow:hover { color: var(--navy-900); text-decoration: underline; }
.link-arrow .icon { transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Tarjeta base */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.card__title { font-size: var(--text-xl); color: var(--navy-900); }

/* Chips (índice de servicios) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { color: #fff; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); }

/* Enlace "saltar al contenido" */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--navy-900);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; }

/* Marca (logo + nombre) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--navy-900);
}
.brand__logo { width: auto; height: 2rem; }
.brand__text {
  display: flex;
  flex-direction: column;
  padding-left: var(--space-3);
  border-left: 1px solid var(--color-border);
  line-height: 1.25;
}
.brand__name { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy-900); }
.brand__tagline { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-text-muted); }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand__text { border-left-color: rgba(255, 255, 255, 0.2); }
.brand--light .brand__name { color: #fff; }
.brand--light .brand__tagline { color: var(--navy-300); }

/* Encabezado del sitio */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: rgba(255, 255, 255, 0.88); backdrop-filter: saturate(160%) blur(12px); }
}
.site-header.is-scrolled { border-bottom-color: var(--color-border); box-shadow: 0 6px 20px -12px rgba(14, 23, 38, 0.25); }
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-h);
}
.site-header__actions { display: flex; align-items: center; gap: var(--space-4); }

.nav__list { display: flex; gap: var(--space-2); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  color: var(--navy-900);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}
.nav__link:hover { color: var(--navy-600); }
.nav--desktop .nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 0.5rem;
  height: 2px;
  border-radius: 2px;
  background: var(--orange-500);
}

/* Selector de idioma */
.lang__list { display: flex; align-items: center; gap: var(--space-1); }
.lang__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0 var(--space-2);
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.lang__link:hover { color: var(--navy-900); background: var(--navy-50); }
.lang__link[aria-current='true'] { color: var(--navy-900); background: var(--navy-100); }

/* Botón de menú (móvil y tablet) */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}
.menu-toggle:hover { border-color: var(--navy-700); }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded='true'] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded='true'] .menu-toggle__close { display: block; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  background: #fff;
  box-shadow: 0 24px 32px -16px rgba(14, 23, 38, 0.25);
}
.mobile-menu.is-open { display: block; }
.mobile-menu__inner { padding-block: var(--space-4) var(--space-6); }
.nav--mobile .nav__list { flex-direction: column; gap: 0; }
.nav--mobile .nav__link {
  display: flex;
  min-height: 3.25rem;
  padding: 0 var(--space-2);
  border-bottom: 1px solid var(--color-border);
  font-size: 1.0625rem;
}
.nav--mobile .nav__link[aria-current='page'] { box-shadow: inset 3px 0 0 var(--orange-500); padding-left: var(--space-4); }
.mobile-menu__footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.lang--desktop, .site-header__cta, .nav--desktop { display: none; }

@media (min-width: 40em) {
  .site-header__cta { display: inline-flex; }
  .mobile-menu .btn--block { display: none; }
}
@media (min-width: 64em) {
  .nav--desktop, .lang--desktop { display: block; }
  .menu-toggle, .mobile-menu, .mobile-menu.is-open { display: none; }
}
@media (max-width: 29.99em) {
  .brand { gap: var(--space-2); }
  .brand__logo { height: 1.75rem; }
  .brand__text { padding-left: var(--space-2); }
  .brand__name { font-size: 0.75rem; letter-spacing: 0.1em; white-space: nowrap; }
  .brand__tagline { display: none; }
  .menu-toggle { padding: 0; width: 2.75rem; justify-content: center; }
  .menu-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 22.49em) {
  /* Pantallas muy angostas: el nombre se oculta a la vista pero sigue siendo el texto del enlace */
  .brand__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Pie del sitio */
.site-footer {
  background: var(--navy-950);
  color: var(--color-text-on-dark-muted);
  font-size: var(--text-sm);
  padding-block: var(--space-16) var(--space-8);
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer__grid { display: grid; gap: var(--space-10); }
.site-footer__text { max-width: 22rem; margin-top: var(--space-5); line-height: 1.65; }
.site-footer__title {
  margin-bottom: var(--space-4);
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer__list { display: grid; gap: var(--space-3); }
.site-footer__address { line-height: 1.6; }
.site-footer__maps { margin-top: var(--space-3); }
.site-footer__maps a { color: var(--navy-200); text-decoration: underline; text-underline-offset: 0.2em; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--text-xs);
}
.lang--footer .lang__link { color: var(--navy-200); }
.lang--footer .lang__link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lang--footer .lang__link[aria-current='true'] { background: rgba(255, 255, 255, 0.12); color: #fff; }

@media (min-width: 40em) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64em) {
  .site-footer__grid { grid-template-columns: 1.4fr 0.8fr 1.1fr 1fr; gap: var(--space-8); }
}

/* Redes sociales */
.social { display: flex; gap: var(--space-2); margin-top: var(--space-6); }
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  color: var(--navy-200);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.site-footer .social__link:hover { background: var(--orange-600); color: #fff; }
.social__link .icon { width: 1.25rem; height: 1.25rem; }
.social--dark { margin-top: var(--space-3); }
.social__link--dark { background: var(--navy-50); color: var(--navy-800); border: 1px solid var(--color-border); }
.social__link--dark:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* 6. Secciones ------------------------------------------------------------- */

/* Fondo azul común (hero y encabezados de páginas internas).
   La grilla fina evoca papel contable, sin imágenes externas. */
.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(44, 92, 158, 0.45), transparent 70%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: var(--color-text-on-dark);
}
.hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(105deg, transparent 30%, #000 75%);
  mask-image: linear-gradient(105deg, transparent 30%, #000 75%);
}

/* Hero de inicio */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-12);
  align-items: center;
  padding-block: clamp(3.5rem, 2.5rem + 5vw, 7rem);
}
.hero__title { font-size: var(--text-h1); color: #fff; max-width: 18ch; }
.hero__lead { margin-top: var(--space-6); max-width: 34rem; color: var(--color-text-on-dark-muted); font-size: var(--text-lg); line-height: 1.65; }
.hero .button-row { margin-top: var(--space-8); }
@media (max-width: 29.99em) {
  .hero .button-row .btn, .cta__actions .btn { width: 100%; }
  .cta__actions { justify-items: stretch; }
}

.hero__media { position: relative; isolation: isolate; }
/* Halo de luz detrás de la foto y borde claro: separan el recuadro del fondo oscuro */
.hero__media::before {
  content: '';
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(143, 166, 198, 0.32), transparent);
  pointer-events: none;
}
.hero__photo {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow-lg);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__facts {
  display: flex;
  margin: calc(-1 * var(--space-10)) var(--space-4) 0;
  position: relative;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.hero__fact { flex: 1; display: grid; gap: 0.125rem; padding: var(--space-4) var(--space-5); }
.hero__fact + .hero__fact { border-left: 1px solid var(--color-border); }
.hero__fact-value { font-family: var(--font-serif); font-weight: 600; font-size: 1.75rem; line-height: 1.1; color: var(--navy-900); }
.hero__fact-label { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 600; }
@media (min-width: 40em) { .hero__fact-label { white-space: nowrap; } }
.hero__fact:first-child { box-shadow: inset 3px 0 0 var(--orange-500); border-radius: var(--radius-md) 0 0 var(--radius-md); }

@media (min-width: 64em) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--space-16); }
  .hero__photo { aspect-ratio: 5 / 6; }
  .hero__facts { position: absolute; left: calc(-1 * var(--space-8)); bottom: var(--space-8); margin: 0; }
}

/* Clientes: cinta de logos en movimiento, en una sola fila y a color.
   Se detiene al pasar el mouse, al enfocarla con teclado o con el botón de pausa,
   y queda quieta si el sistema pide reducir el movimiento. */
.clients {
  padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  background: var(--color-bg-soft);
  border-block: 1px solid var(--color-border);
}
.clients__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.clients__header .eyebrow { margin-bottom: var(--space-2); }
.clients__title { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem); color: var(--navy-900); }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 70s linear infinite;
}
/* Separación con padding (no gap): así las dos mitades miden exactamente lo mismo
   y el salto del 50 % no se nota. */
.marquee__item { flex: none; padding-inline: clamp(1.25rem, 1rem + 1.25vw, 2.25rem); }
.marquee__item img {
  width: auto;
  height: clamp(2.75rem, 2.3rem + 1.4vw, 3.75rem);
  max-width: 11rem;
  object-fit: contain;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: var(--space-6); }
  .marquee__item[aria-hidden='true'] { display: none; }
}

/* El estudio */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-10); align-items: center; }
.about__media { overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--navy-50); }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__content .section-title { max-width: 20ch; }
.about__text { margin-top: var(--space-5); color: var(--color-text-muted); font-size: var(--text-lg); line-height: 1.7; max-width: 36rem; }
.vision { margin-top: var(--space-8); padding-left: var(--space-5); border-left: 3px solid var(--orange-500); max-width: 34rem; }
.vision__title { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy-600); }
.vision__quote { margin-top: var(--space-2); font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; line-height: 1.45; color: var(--navy-900); }
@media (min-width: 64em) {
  .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); }
}

/* Lista de servicios (inicio) */
.service-list { border-top: 1px solid var(--color-border-strong); }
.service-list li { border-bottom: 1px solid var(--color-border-strong); }
.service-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-6);
  align-items: center;
  padding: var(--space-6) var(--space-2);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}
.service-row:hover { background: #fff; color: inherit; }
.service-row__name { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); line-height: 1.2; color: var(--navy-900); }
.service-row__text { grid-column: 1; color: var(--color-text-muted); font-size: var(--text-sm); }
.service-row__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  color: var(--navy-800);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.service-row__arrow .icon { width: 1.125rem; height: 1.125rem; }
.service-row:hover .service-row__arrow { background: var(--orange-600); border-color: var(--orange-600); color: #fff; }
.service-list__help { margin-top: var(--space-6); color: var(--color-text-muted); }
.service-list__help a { font-weight: 700; color: var(--navy-700); }
@media (min-width: 48em) {
  .service-row { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto; padding: var(--space-8) var(--space-4); }
  .service-row__text { grid-column: 2; font-size: var(--text-base); }
  .service-row__arrow { grid-column: 3; grid-row: 1; }
}

/* Por qué elegirnos */
.why { display: grid; gap: var(--space-8) var(--space-6); }
.why__item { padding-top: var(--space-5); border-top: 3px solid var(--navy-900); }
.why__item:first-child { border-top-color: var(--orange-500); }
.why__title { font-size: var(--text-h3); color: var(--navy-900); }
.why__text { margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.65; }
@media (min-width: 40em) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .why { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Llamado a la acción final */
.section--cta { padding-top: 0; }
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  gap: var(--space-8);
  align-items: center;
  padding: clamp(2rem, 1.25rem + 3.5vw, 4rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--navy-950), var(--navy-800));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(40rem 20rem at 100% 0%, rgba(44, 92, 158, 0.5), transparent 70%);
}
.cta__title { font-size: var(--text-h2); }
.cta__text { margin-top: var(--space-3); color: var(--color-text-on-dark-muted); font-size: var(--text-lg); max-width: 34rem; }
.cta__actions { display: grid; gap: var(--space-4); justify-items: start; }
.cta__email { color: var(--color-text-on-dark-muted); font-size: var(--text-sm); }
.cta__email a { color: #fff; font-weight: 600; }
.cta__email a:hover { color: var(--orange-400); }
@media (min-width: 64em) {
  .cta { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-12); }
  .cta__actions { justify-items: end; text-align: right; }
}

/* Encabezado de páginas internas */
.page-hero { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.page-hero--compact { padding-block: clamp(3rem, 2.25rem + 3vw, 4.5rem); }
.page-hero__title { font-size: var(--text-h1); max-width: 22ch; }
.page-hero__lead { margin-top: var(--space-5); max-width: 40rem; color: var(--color-text-on-dark-muted); font-size: var(--text-lg); }
.page-hero__index { margin-top: var(--space-8); }

/* Detalle de servicios */
.service-detail { padding-block: var(--section-y); scroll-margin-top: var(--header-h); }
.service-detail--alt { background: var(--color-bg-soft); }
.service-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: center; }
.service-detail__media { overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--navy-50); }
.service-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.service-detail__title { font-size: var(--text-h2); color: var(--navy-900); }
.service-detail__text { margin-top: var(--space-4); max-width: 36rem; color: var(--color-text-muted); font-size: var(--text-lg); line-height: 1.65; }
.service-detail__subtitle {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-600);
}
.bullets { display: grid; gap: var(--space-2); }
.bullets li { position: relative; padding-left: var(--space-5); }
.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5rem;
  height: 2px;
  background: var(--orange-500);
}
.service-detail__ideal { margin-top: var(--space-6); color: var(--color-text-muted); font-size: var(--text-sm); }
.service-detail__ideal span { font-weight: 700; color: var(--navy-900); }
.service-detail__body .btn { margin-top: var(--space-6); }
@media (min-width: 40em) {
  .bullets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-8); }
}
@media (min-width: 64em) {
  .service-detail__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); }
  .service-detail--alt .service-detail__media { order: 2; }
}

/* Contacto */
.section--overlap { padding-top: var(--space-12); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.contact__aside { display: grid; gap: var(--space-6); }
@media (min-width: 64em) {
  .contact__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-8); }
}

.contact-list { display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.contact-list__item { display: grid; gap: 0.125rem; }
.contact-list dt { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-list dd { margin: 0; font-weight: 600; line-height: 1.5; }
.contact-list__item--featured { padding-bottom: var(--space-5); border-bottom: 1px solid var(--color-border); }
.contact-list__email { font-family: var(--font-serif); font-size: 1.25rem; color: var(--navy-700); word-break: break-word; }
.contact__social { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--color-border); }
.contact__social-title { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.map-card { padding: 0; overflow: hidden; }
.map-card__frame { display: block; width: 100%; height: 16rem; border: 0; background: var(--navy-50); }
.map-card__link { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--color-border); font-size: var(--text-sm); }
.map-card__link a { font-weight: 600; }

/* Formulario (patrones de GOV.UK: etiqueta, ayuda, error y campo, en ese orden) */
.form { display: grid; gap: var(--space-5); margin-top: var(--space-8); }
.form__row { display: grid; gap: var(--space-5); }
@media (min-width: 40em) { .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.field { display: grid; gap: var(--space-2); align-content: start; }
.field__label { font-weight: 700; font-size: var(--text-sm); color: var(--color-text); }
.field__optional { font-weight: 500; color: var(--color-text-muted); }
.field__hint { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.5; }
.field__error { color: var(--color-error); font-size: var(--text-sm); font-weight: 700; }
.input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid #6b7a90;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:hover { border-color: var(--navy-700); }
.input:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(29, 111, 224, 0.35); }
.input--textarea { min-height: 9rem; resize: vertical; }
.field--error .input { border-color: var(--color-error); border-width: 2px; }
.field--error { padding-left: var(--space-4); border-left: 4px solid var(--color-error); }

.select { position: relative; }
.select .input { appearance: none; padding-right: 2.75rem; cursor: pointer; }
.select__icon { position: absolute; right: 0.875rem; top: 50%; width: 1.125rem; height: 1.125rem; transform: translateY(-50%); pointer-events: none; color: var(--navy-700); }

.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__privacy { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.6; }
.form__submit { justify-self: start; }

.error-summary {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 3px solid var(--color-error);
  border-radius: var(--radius-sm);
}
.error-summary:focus { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.error-summary__title { font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 700; color: var(--color-text); }
.error-summary__list { margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.error-summary__list a { color: var(--color-error); font-weight: 700; }
.form-alert {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  background: var(--color-error-bg);
  border-left: 4px solid var(--color-error);
  color: #7a1810;
  font-weight: 600;
}

/* Páginas de estado (gracias, error, 404) */
.status { padding-block: clamp(4rem, 3rem + 5vw, 8rem); background: var(--color-bg-soft); }
.status__card {
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  text-align: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.status__card .eyebrow { justify-content: center; }
.status__icon { display: inline-flex; width: 3.5rem; height: 3.5rem; align-items: center; justify-content: center; margin-bottom: var(--space-5); border-radius: 50%; }
.status__icon .icon { width: 1.75rem; height: 1.75rem; }
.status__icon--success { background: var(--color-success-bg); color: var(--color-success); }
.status__icon--error { background: var(--color-error-bg); color: var(--color-error); }
.status__title { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); color: var(--navy-900); }
.status__text { margin-top: var(--space-4); color: var(--color-text-muted); font-size: var(--text-lg); }
.status .button-row { margin-top: var(--space-8); }

/* Texto largo (política de privacidad) */
.prose { max-width: 44rem; }
.prose h2 { margin-top: var(--space-10); margin-bottom: var(--space-3); font-size: 1.5rem; color: var(--navy-900); }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: var(--space-4); }
.prose p { color: #334155; line-height: 1.75; }

/* 7. Utilidades ------------------------------------------------------------ */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
[hidden] { display: none !important; }

/* 8. Movimiento reducido e impresión --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .skip-link, .mobile-menu, .site-footer .social, .cta__actions .btn, .map-card { display: none !important; }
  .hero, .page-hero, .cta { background: none !important; color: #000 !important; box-shadow: none !important; }
  .hero *, .page-hero *, .cta * { color: #000 !important; }
  body { font-size: 11pt; }
}
