/* =============================================================================
   Spiza Solutions — hoja de estilos principal
   -----------------------------------------------------------------------------
   Orden: tokens · reset · tipografia · layout · componentes · secciones · utilidades
   Principio: baja especificidad, tokens reutilizables, sin decoracion competitiva.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. Tokens
   Contraste verificado (WCAG 2.2 AA) — no usar los tonos de marca puros para
   texto pequeno sobre fondos claros:
     --steel   #8795AA sobre --ink    = 5.43:1  OK (no sobre el encabezado translucido)
     --steel   #8795AA sobre blanco   = 3.04:1  SOLO bordes / iconos decorativos
     --muted   #5A6A80 sobre blanco   = 5.57:1  OK  (texto secundario en claro)
     --blue    #2F6BFF sobre blanco   = 4.54:1  trazos, bordes, foco e iconos
     --blue-action #2A63F2 con texto blanco = 5.00:1  OK  (fondo de los botones:
                el azul de marca queda en 4.49:1, justo por debajo del minimo)
     --blue-ink #1D4FD8 sobre --cloud = 6.29:1  OK  (enlaces sobre fondo claro)
     --teal    #18BFA5 sobre --ink    = 8.21:1  OK
     --teal-ink #0B7A68 sobre blanco  = 5.25:1  OK  (estado exitoso en claro)
-------------------------------------------------------------------------------- */
:root {
  /* Marca */
  --ink: #07111F;
  --blue: #2F6BFF;
  --teal: #18BFA5;
  --cloud: #F6F9FC;
  --white: #FFFFFF;
  --steel: #8795AA;

  /* Derivados accesibles */
  --ink-2: #0D1B2E;
  --muted: #5A6A80;
  --blue-action: #2A63F2;
  --blue-ink: #1D4FD8;
  --blue-hover: #1B57E8;
  --teal-ink: #0B7A68;
  --danger-ink: #B4231F;
  --on-dark: #C4D0DE;
  --on-dark-strong: #D5DDE8;
  /* Tono atenuado del logotipo: 5.7:1 incluso sobre el encabezado translucido. */
  --brand-muted: #A9B6C7;

  /* Superficies y bordes */
  --line-light: #E2E8F0;
  --line-dark: rgba(135, 149, 170, .22);

  /* Tipografia */
  --font-display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-utility: 'Montserrat', 'Segoe UI', system-ui, sans-serif;

  /* Escala tipografica fluida */
  --fs-display: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.35vw, 2.15rem);
  --fs-h3: clamp(1.125rem, 1.03rem + .41vw, 1.3125rem);
  --fs-lead: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-body: 1rem;
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;

  /* Espaciado — multiplos de 4 / 8 */
  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --section-y: clamp(2.5rem, 1.8rem + 2.8vw, 4.25rem);

  /* Composicion */
  --container: 1200px;
  --measure: 65ch;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --header-h: 68px;

  /* Una sombra de reposo y una sola elevación protagonista. */
  --shadow-card: 0 1px 2px rgb(7 17 31 / .05), 0 10px 28px -22px rgb(7 17 31 / .28);
  --shadow-lift: 0 2px 4px rgb(7 17 31 / .08), 0 22px 52px -28px rgb(7 17 31 / .32);

  /* Movimiento */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 180ms;

  --focus: 0 0 0 3px var(--white), 0 0 0 6px var(--blue);
  --focus-dark: 0 0 0 3px var(--ink), 0 0 0 6px var(--teal);
}

/* -----------------------------------------------------------------------------
   2. Reset
-------------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.02em;
  text-wrap: balance;
}

p, ul, ol, dl, figure { margin: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--blue-hover); }
ul[class], ol[class] { list-style: none; padding: 0; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.hero :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.page-hero :focus-visible { box-shadow: var(--focus-dark); }

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

/* -----------------------------------------------------------------------------
   3. Layout
-------------------------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--s-5), var(--container));
  margin-inline: auto;
}

@media (max-width: 480px) {
  .container { width: min(100% - 2 * var(--s-4), var(--container)); }
}

.section { padding-block: var(--section-y); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 200;
  transform: translateY(-250%);
  background: var(--white);
  color: var(--ink);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(7, 17, 31, .28);
}

.skip-link:focus-visible { transform: translateY(0); }

/* -----------------------------------------------------------------------------
   4. Tipografia auxiliar
-------------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-utility);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin: 0 0 var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  flex: none;
}

.lead { font-size: var(--fs-lead); color: var(--muted); max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s-4); }
.prose ul { list-style: disc; padding-left: 1.25em; }
.prose li + li { margin-top: var(--s-2); }

/* -----------------------------------------------------------------------------
   5. Botones y acciones
-------------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--blue-action);
  --btn-fg: var(--white);
  --btn-bd: var(--blue-action);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: var(--s-3) var(--s-5);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn:hover { --btn-bg: var(--blue-hover); --btn-bd: var(--blue-hover); color: var(--white); }
.btn:active { transform: translateY(1px); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: #CBD5E1; }
.btn--ghost:hover { --btn-bg: var(--cloud); --btn-bd: var(--steel); color: var(--ink); }

.hero .btn--ghost,
.page-hero .btn--ghost { --btn-fg: var(--white); --btn-bd: rgba(214, 224, 238, .38); }

.hero .btn--ghost:hover,
.page-hero .btn--ghost:hover { --btn-bg: rgba(255, 255, 255, .08); --btn-bd: var(--steel); color: var(--white); }

.btn[aria-disabled="true"],
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn[aria-disabled="true"]:active { transform: none; }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

@media (max-width: 520px) {
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
}

/* -----------------------------------------------------------------------------
   6. Encabezado y navegacion
-------------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(7 17 31 / .94);
  border-bottom: 1px solid var(--line-dark);
  color: var(--white);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgb(7 17 31 / .9); backdrop-filter: saturate(140%) blur(10px); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  /* Valor fijo, no var(--header-h): esa variable se recalcula desde la altura
     real del encabezado (ver main.js). Referenciarla aqui creaba un bucle de
     realimentacion con ResizeObserver que hacia crecer el header sin limite. */
  min-height: 68px;
}

.site-header .brand { margin-inline-end: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.brand__logo { display: block; width: auto; object-fit: contain; }
.brand__logo--header { height: 2rem; }
.brand__logo--footer { height: 3.25rem; }

.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav__list { display: flex; align-items: center; gap: var(--s-5); margin: 0; }

.nav__link {
  display: inline-block;
  color: var(--on-dark-strong);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: var(--s-2) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav__link:hover { color: var(--white); border-bottom-color: var(--teal); }
.nav__link[aria-current="true"] { color: var(--white); border-bottom-color: var(--blue); }

/* Selector de idioma. Vive fuera del <nav> para seguir visible cuando el menu
   se colapsa: quien llega en el idioma equivocado no deberia abrir un menu
   para cambiarlo. Son dos enlaces, no un desplegable: con dos idiomas el
   destino cabe a la vista y se llega en un solo clic. */
.lang-switch {
  --lang-fg: var(--on-dark);
  --lang-fg-strong: var(--white);
  --lang-surface: rgb(255 255 255 / .07);
  --lang-border: rgb(213 221 232 / .2);
  --lang-hover: rgb(255 255 255 / .1);
  --lang-current-bg: var(--white);
  --lang-current-fg: var(--ink);
  --lang-current-shadow: 0 1px 2px rgb(0 0 0 / .25);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 3px;
  background: var(--lang-surface);
  border: 1px solid var(--lang-border);
  border-radius: var(--radius-pill);
}

.lang-switch__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2rem;
  padding-inline: .55rem;
  border-radius: var(--radius-pill);
  color: var(--lang-fg);
  font-family: var(--font-utility);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.lang-switch__option:hover { color: var(--lang-fg-strong); background: var(--lang-hover); }

.lang-switch__option[aria-current="page"] {
  background: var(--lang-current-bg);
  color: var(--lang-current-fg);
  box-shadow: var(--lang-current-shadow);
}

.nav-toggle { display: none; }

/* La barra colapsa en menu a 1080px, no a 860px. Entre ambos anchos ya no cabe
   en una linea la marca, los cinco enlaces, el selector de idioma y la llamada
   a la accion: antes el boton se partia en dos lineas y con el selector pasaba
   a tres. Vale mas mostrar el menu antes que apilar el encabezado. */
@media (max-width: 1080px) {
  .site-header__inner { gap: var(--s-4); }
  .nav { gap: var(--s-4); }
  .nav__list { gap: var(--s-4); }
  .nav__link { white-space: nowrap; }
  .lang-switch__option { min-height: 2.75rem; }
}

@media (max-width: 620px) {
  .site-header__inner { gap: var(--s-2); }
  .lang-switch__option { min-width: 2.5rem; }
}

@media (max-width: 360px) {
  .brand__logo--header { height: 1.65rem; }
  .lang-switch__option { min-width: 2.35rem; padding-inline: .4rem; }
  .js .nav-toggle { padding-inline: var(--s-2); }
}

@media (max-width: 1080px) {
  /* Sin JavaScript la navegacion permanece visible y utilizable: se apila en
     varias filas en lugar de desbordarse fuera de la pantalla. */
  .no-js .site-header__inner { flex-wrap: wrap; padding-block: var(--s-3); }
  .no-js .nav { order: 1; flex-wrap: wrap; justify-content: flex-start; width: 100%; gap: var(--s-4); }
  .no-js .nav__list { flex-wrap: wrap; row-gap: var(--s-2); }
  .no-js .nav .btn { flex: none; }

  .js .site-header__inner { padding-block: 0; }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 44px;
    padding: var(--s-2) var(--s-3);
    background: transparent;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    color: var(--white);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
  }

  .js .nav-toggle__bars { position: relative; width: 18px; height: 12px; flex: none; }

  .js .nav-toggle__bars::before,
  .js .nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
  }

  .js .nav-toggle__bars::before { top: 1px; }
  .js .nav-toggle__bars::after { top: 9px; }
  .js .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
  .js .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }

  /* Solo el nav emparejado con el boton hamburguesa se convierte en panel.
     Las paginas de confirmacion usan un nav compacto sin dicho control. */
  .js .nav-toggle + .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: block;
    width: auto;
    padding: var(--s-5) var(--s-5) var(--s-7);
    background: var(--ink);
    border-bottom: 1px solid var(--line-dark);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

  .js .nav-toggle + .nav[hidden] { display: none; }
  .js .nav-toggle + .nav .nav__list { display: block; }
  .js .nav-toggle + .nav .nav__link { display: block; font-size: 1.125rem; padding: var(--s-3) 0; border-bottom: 1px solid var(--line-dark); }
  .js .nav-toggle + .nav .btn { display: flex; width: 100%; margin-top: var(--s-5); }
}

/* -----------------------------------------------------------------------------
   7. Portada
-------------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  padding-block: clamp(2.25rem, 1.5rem + 3vw, 3.75rem) clamp(2.5rem, 1.75rem + 3vw, 4rem);
}

.hero::before {
  /* Halo sobrio; no es un degradado de seccion completa. */
  content: "";
  position: absolute;
  top: -35%;
  right: -12%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgb(47 107 255 / .2), transparent 68%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}

.hero__copy { max-width: 36rem; }

.hero__tagline {
  font-family: var(--font-utility);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 var(--s-5);
}

.hero h1 { font-size: var(--fs-display); letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero__text { margin-top: var(--s-5); font-size: var(--fs-lead); color: var(--on-dark); max-width: 46ch; }
.hero .actions { margin-top: var(--s-5); }

.hero__note {
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-sm);
  color: var(--steel);
  max-width: 42ch;
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero__copy { max-width: none; }
}

/* -----------------------------------------------------------------------------
   13. Contacto y formulario
-------------------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.75rem, 1.25rem + 2.5vw, 3.25rem);
  align-items: start;
}

.contact__aside > * + * { margin-top: var(--s-5); }
.contact__channels { display: grid; gap: var(--s-3); }

.channel {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.channel:hover { border-color: var(--blue); background: var(--cloud); color: var(--ink); }
.channel__icon { width: 22px; height: 22px; flex: none; color: var(--blue-ink); }
.channel__label { font-weight: 600; }
.channel__value { display: block; font-size: var(--fs-sm); color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }

.form {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgb(7 17 31 / .04), 0 12px 32px -24px rgb(7 17 31 / .3);
}

.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label { font-size: var(--fs-sm); font-weight: 600; }
.field__hint { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--s-3) var(--s-4);
  background: var(--white);
  border: 1px solid #CBD5E1;
  border-radius: var(--radius);
  font-size: var(--fs-body);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.field input::placeholder,
.field textarea::placeholder { color: #8496AC; }
.field input:hover,
.field textarea:hover { border-color: var(--steel); }
.field input:focus-visible,
.field textarea:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(47 107 255 / .22); }
.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea { border-color: var(--danger-ink); }
.field__error { font-size: var(--fs-xs); font-weight: 600; color: var(--danger-ink); display: none; }
.field__error::before { content: "\26A0\FE0E"; margin-right: .35em; }
.field[data-invalid="true"] .field__error { display: block; }

.consent { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; }
.consent input[type="checkbox"] { width: 24px; height: 24px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--blue); flex: none; }
.consent label { font-size: var(--fs-sm); }
.consent .field__error { grid-column: 2; }

/* Honeypot: fuera de pantalla, no oculto con display:none. */
.hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

.form__footer { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.form__legal { font-size: var(--fs-xs); color: var(--muted); max-width: 34ch; }
.form__status { margin-top: var(--s-4); }
.form__status:empty { margin-top: 0; }

.status {
  display: block;
  padding: var(--s-4);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  border: 1px solid;
}

.status--ok { background: #ECFBF7; border-color: #9FE3D5; color: var(--teal-ink); }
.status--error { background: #FDEEEE; border-color: #F2B8B6; color: var(--danger-ink); }
.status--busy { background: var(--cloud); border-color: var(--line-light); color: var(--muted); }
.status strong { display: block; color: inherit; margin-bottom: var(--s-1); }
.status a { color: inherit; font-weight: 600; }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .form__grid { grid-template-columns: 1fr; }
  .form__footer .btn { width: 100%; }
  .form__legal { max-width: none; }
}

/* -----------------------------------------------------------------------------
   14. Pie de pagina
-------------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--on-dark); padding-block: var(--s-7) var(--s-5); }

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, .85fr));
  gap: var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--line-dark);
}

.site-footer h2 {
  font-size: var(--fs-xs);
  font-family: var(--font-utility);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: var(--s-4);
}

.site-footer__about { font-size: var(--fs-sm); max-width: 38ch; margin-top: var(--s-4); }
.site-footer ul { display: grid; gap: var(--s-2); list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--on-dark-strong); text-decoration: none; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

.site-footer__bottom {
  padding-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
}

.site-footer__bottom p { color: var(--steel); }
.site-footer__philosophy { font-family: var(--font-display); font-weight: 500; color: var(--teal); }

@media (max-width: 760px) {
  .site-footer__top { grid-template-columns: 1fr; gap: var(--s-6); }
  .site-footer li + li { margin-top: 0; }
  .site-footer a:not(.brand) { display: inline-flex; align-items: center; min-height: 44px; }
}

/* -----------------------------------------------------------------------------
   15. Paginas simples (privacidad, 404)
-------------------------------------------------------------------------------- */
.page-hero { background: var(--ink); color: var(--white); padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.page-hero h1 { font-size: var(--fs-h2); }
.page-hero p { margin-top: var(--s-4); color: var(--on-dark); max-width: var(--measure); }
.page-hero__meta { margin-top: var(--s-5); font-family: var(--font-utility); font-size: var(--fs-xs); color: var(--steel); letter-spacing: .06em; }

.legal { padding-block: var(--section-y); }
.legal h2 { font-size: 1.375rem; margin-top: var(--s-7); }
.legal h2:first-of-type { margin-top: 0; }
.legal p,
.legal ul { margin-top: var(--s-4); }
.legal ul { list-style: disc; padding-left: 1.25em; }
.legal li + li { margin-top: var(--s-2); }
.legal dt { font-weight: 600; margin-top: var(--s-4); }
.legal dd { margin: var(--s-1) 0 0; color: var(--muted); }

.error-page { display: grid; place-items: center; text-align: center; padding-block: clamp(4rem, 3rem + 8vw, 8rem); }
.error-page__code { font-family: var(--font-utility); font-size: var(--fs-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--teal-ink); }
.error-page h1 { font-size: var(--fs-h2); margin-top: var(--s-4); }
.error-page p { margin-top: var(--s-4); color: var(--muted); max-width: 48ch; }
.error-page .actions { margin-top: var(--s-6); justify-content: center; }
.error-page__mark { width: 7rem; height: 7rem; margin-bottom: var(--s-5); object-fit: contain; }
.error-page__links { margin-top: var(--s-7); font-size: var(--fs-sm); color: var(--muted); }

/* -----------------------------------------------------------------------------
   16. Utilidades
-------------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.no-scroll { overflow: hidden; }

/* -----------------------------------------------------------------------------
   17. Movimiento reducido — se muestra el estado final sin animacion
-------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

}

/* -----------------------------------------------------------------------------
   18. Impresion
-------------------------------------------------------------------------------- */
@media print {
  .site-header,
  .nav-toggle,
  .form,
  .site-footer__top { display: none; }

  body { color: #000; background: #fff; }
  .hero,
  .page-hero,
  .site-footer { background: #fff !important; color: #000 !important; }
  .hero__text,
  .page-hero p { color: #000 !important; }
}
