/* ==========================================================================
   Tipografías (OFL, archivos locales en assets/fonts, sin pedidos externos)
   ========================================================================== */
@font-face {
  font-family: "Ibarra Real Nova";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/ibarra-real-nova-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../assets/fonts/schibsted-grotesk-latin.woff2") format("woff2");
}

/* ==========================================================================
   Tokens: todo el sistema visual vive aquí
   ========================================================================== */
:root {
  /* Paleta: 1 base profunda + 1 neutro claro + 1 acento */
  --basalto: #132022;      /* base profunda: texto y banda oscura */
  --pomez: #edf0eb;        /* neutro claro: fondo */
  --lago: #0a756f;         /* acento: acciones y anillo destacado */

  /* Tonos derivados de esas tres */
  --lago-hover: #075d59;
  --lago-claro: #6ccfc4;   /* acento sobre fondo oscuro */
  --texto: var(--basalto);
  --texto-suave: #4a5859;  /* 6.45:1 sobre pómez */
  --texto-oscuro-suave: #b9c4c1; /* 9.33:1 sobre basalto */
  --superficie: #f7f8f5;
  --campo: #ffffff;
  --borde-campo: #7a8786;  /* 3.24:1 sobre pómez (componente no textual) */
  --linea: rgb(19 32 34 / 0.14);
  --linea-oscura: rgb(237 240 235 / 0.16);
  --error: #a3261b;        /* solo para estados de error, siempre con texto e ícono */

  /* Tipografía */
  --font-display: "Ibarra Real Nova", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-text: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.07rem + 0.4vw, 1.375rem);
  --step-2: clamp(1.4rem, 1.22rem + 0.9vw, 1.95rem);
  --step-3: clamp(1.95rem, 1.5rem + 2.1vw, 3.25rem);
  --step-4: clamp(2.45rem, 1.55rem + 4.3vw, 5.5rem);

  --leading-tight: 1.04;
  --leading-heading: 1.12;
  --leading-body: 1.6;

  /* Espaciado */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: clamp(4.5rem, 3rem + 7vw, 9rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 76rem;
  --header-h: 4.25rem;

  /* Radios */
  --radius-s: 4px;
  --radius-m: 10px;

  /* Movimiento */
  --dur-press: 120ms;
  --dur-fast: 180ms;
  --dur-base: 240ms;
  --dur-reveal: 700ms;
  --dur-hero: 1600ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  color-scheme: light;
  accent-color: var(--lago);
  scrollbar-color: rgb(19 32 34 / 0.35) var(--pomez);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--pomez);
  color: var(--texto);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

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

[hidden] { display: none !important; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-heading);
  text-wrap: balance;
}
h2 { font-size: var(--step-3); letter-spacing: -0.012em; }
h3 { font-size: var(--step-2); letter-spacing: -0.006em; }

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

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

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

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

.section { padding-block: var(--space-3xl); }

.section-head {
  display: grid;
  gap: var(--space-s);
  max-width: 44rem;
  margin-bottom: var(--space-2xl);
}
.section-head p { color: var(--texto-suave); font-size: var(--step-1); line-height: 1.5; }

main:focus { outline: none; }

/* Enlace para saltar al contenido */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--basalto);
  color: var(--pomez);
  border-radius: var(--radius-s);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
  outline-color: var(--lago-claro);
}

/* ==========================================================================
   Botones y enlaces
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font: 600 1rem/1.2 var(--font-text);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    transform var(--dur-press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--lago); color: #fff; }
.btn-primary:hover { background: var(--lago-hover); }

.btn-secondary {
  background: transparent;
  color: var(--texto);
  border-color: var(--borde-campo);
}
.btn-secondary:hover { border-color: var(--basalto); background: rgb(19 32 34 / 0.04); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: scale(0.97); }
}

/* Enlace discreto con subrayado que se dibuja */
.link-quiet {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 3rem;
  font-weight: 600;
  text-decoration: none;
}
.link-quiet span { position: relative; }
.link-quiet span::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.15em;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transition: opacity var(--dur-base) ease;
}
.link-quiet:hover span::after,
.link-quiet:focus-visible span::after { opacity: 1; }
.link-quiet svg {
  width: 1.1rem; height: 1.1rem;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .link-quiet:hover svg { transform: translateY(2px); }
}

/* ==========================================================================
   Encabezado y navegación
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--pomez);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) ease;
}
.site-header.is-scrolled { border-bottom-color: var(--linea); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  text-decoration: none;
  color: var(--texto);
}
.monogram { width: 2.25rem; height: 2.25rem; flex: none; }
.monogram rect { fill: var(--basalto); }
.monogram text {
  fill: var(--pomez);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.monogram-ring { fill: none; stroke: var(--lago-claro); stroke-width: 1.6; stroke-linecap: round; }
.wordmark-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-3xs);
  list-style: none;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.85rem;
  font-weight: 500;
  font-size: 0.975rem;
  text-decoration: none;
}
.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0.85rem; right: 0.85rem; bottom: 0.6rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav a:not(.nav-cta):hover::after,
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }

.site-nav .nav-cta {
  margin-left: var(--space-2xs);
  border: 1px solid var(--basalto);
  border-radius: var(--radius-s);
  padding-inline: 1.1rem;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.site-nav .nav-cta:hover { background: var(--basalto); color: var(--pomez); }

.site-nav { display: flex; align-items: center; gap: var(--space-2xs); }

.lang-toggle {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--texto-suave);
  font: 600 0.875rem/1 var(--font-text);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.lang-toggle:hover { color: var(--texto); background: rgb(19 32 34 / 0.06); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.9rem 0 0.7rem;
  border: 1px solid var(--linea);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--texto);
  font: 600 0.95rem/1 var(--font-text);
  cursor: pointer;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.nav-toggle path { transition: transform var(--dur-base) var(--ease-out); transform-origin: center; }
.nav-toggle[aria-expanded="true"] .l1 { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .l2 { transform: translateY(-4px) rotate(-45deg); }

/* Menú móvil: solo con JavaScript. Sin JS, la lista se muestra completa. */
@media (max-width: 52rem) {
  .js .nav-toggle { display: inline-flex; }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-s);
    padding: var(--space-s) var(--gutter) var(--space-l);
    background: var(--pomez);
    border-bottom: 1px solid var(--linea);
    box-shadow: 0 18px 30px -18px rgb(19 32 34 / 0.25);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s;
  }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav li { border-bottom: 1px solid var(--linea); }
  .js .site-nav a { display: flex; min-height: 3.25rem; padding-inline: 0; font-size: 1.125rem; }
  .js .site-nav a:not(.nav-cta)::after { display: none; }
  .js .site-nav li:last-child { border-bottom: 0; padding-top: var(--space-s); }
  .js .site-nav .nav-cta { margin-left: 0; justify-content: center; }
  .js .lang-toggle { align-self: flex-start; }

  .no-js .header-inner { flex-wrap: wrap; padding-block: var(--space-2xs); }
  .no-js .site-nav ul { flex-wrap: wrap; }
}

/* ==========================================================================
   Hero: campo de curvas de nivel
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - var(--header-h)), 54rem);
  padding-block: var(--space-2xl) var(--space-3xl);
  overflow: hidden;
}

.hero-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Las curvas se desvanecen hacia el texto para no competir con él */
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, rgb(0 0 0 / 0.35) 42%, #000 66%);
  mask-image: linear-gradient(90deg, transparent 18%, rgb(0 0 0 / 0.35) 42%, #000 66%);
}

.relieve {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 1200px);
  max-width: none;
  height: auto;
  aspect-ratio: 4 / 3;
  min-height: 100%;
  transform: translate(-34%, -50%);
  fill: none;
  stroke: var(--basalto);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.relieve .capa { stroke-opacity: 0.26; stroke-width: 1; }
.relieve .indice { stroke-opacity: 0.42; stroke-width: 1.6; }
.relieve .anillo { stroke: var(--lago); stroke-width: 2.4; stroke-opacity: 1; }

.hero-inner { position: relative; }

.hero-title {
  max-width: 15.5ch;
  font-size: var(--step-4);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.018em;
}

.hero-lead {
  max-width: 36rem;
  margin-top: var(--space-l);
  color: var(--texto-suave);
  font-size: var(--step-1);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s) var(--space-l);
  margin-top: var(--space-xl);
}

@media (max-width: 52rem) {
  .hero { align-items: flex-end; min-height: min(calc(100svh - var(--header-h)), 46rem); }
  .hero-field {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 14%, transparent 36%);
    mask-image: linear-gradient(180deg, #000 0%, #000 14%, transparent 36%);
  }
  .relieve { width: 900px; min-height: 0; top: 0; transform: translate(-60%, -24%); }
  .relieve .capa { stroke-opacity: 0.34; }
  .relieve .indice { stroke-opacity: 0.5; }
  .hero-inner { padding-top: 9rem; }
}
@media (max-width: 30rem) {
  .hero-actions .btn { width: 100%; }
}

/* Entrada del relieve: solo opacidad y escala, una vez */
@media (prefers-reduced-motion: no-preference) {
  .relieve .capa,
  .relieve .anillo {
    transform-box: view-box;
    transform-origin: 68% 40%;
    animation: relieve-in var(--dur-hero) var(--ease-out) both;
  }
  .relieve .capa-2 { animation-delay: 140ms; }
  .relieve .capa-3 { animation-delay: 280ms; }
  .relieve .anillo {
    animation:
      relieve-in var(--dur-hero) var(--ease-out) 650ms both,
      anillo-pulso 2400ms ease-in-out 2250ms 2;
  }
  .hero-title,
  .hero-lead,
  .hero-actions { animation: texto-in 900ms var(--ease-out) both; }
  .hero-lead { animation-delay: 90ms; }
  .hero-actions { animation-delay: 180ms; }
}
@keyframes relieve-in {
  from { opacity: 0; transform: scale(0.965); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes anillo-pulso {
  50% { opacity: 0.35; }
}
@keyframes texto-in {
  from { opacity: 0; transform: translateY(10px); }
}

/* ==========================================================================
   Quién está detrás (banda oscura)
   ========================================================================== */
.quien {
  background: var(--basalto);
  color: var(--pomez);
  padding-block: var(--space-2xl);
}
.quien :focus-visible { outline-color: var(--lago-claro); }

.quien-inner {
  display: grid;
  gap: var(--space-xl);
}
.quien-head { display: grid; gap: var(--space-2xs); }
.quien-head h2 { font-size: var(--step-2); }
.quien-head p { color: var(--texto-oscuro-suave); }

.claims {
  display: grid;
  gap: var(--space-l);
}
.claim {
  padding-top: var(--space-m);
  border-top: 1px solid var(--linea-oscura);
}
.claim p {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.22;
  max-width: 18ch;
}

@media (min-width: 56rem) {
  .quien-inner { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
  .claims { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-l); }
}

/* ==========================================================================
   Servicios: filas, no tarjetas
   ========================================================================== */
.services { border-bottom: 1px solid var(--linea); }

.service {
  display: grid;
  gap: var(--space-s) var(--space-xl);
  padding-block: var(--space-l) var(--space-xl);
  border-top: 1px solid var(--linea);
}
.service-name {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-s);
  align-items: start;
}
.service-icon {
  width: 2.5rem; height: 2.5rem;
  fill: none; stroke: var(--lago); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.service-name h3 { max-width: 22ch; }
.service-body { display: grid; gap: var(--space-s); max-width: 38rem; }
.service-body > p:first-child { font-size: var(--step-1); line-height: 1.55; }
.service-fit { color: var(--texto-suave); }
.fit-label,
.out-label {
  font-weight: 600;
  color: var(--texto);
}
.fit-label::after,
.out-label::after { content: ":"; }

@media (min-width: 56rem) {
  .service { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .service-name { grid-template-columns: 3rem 1fr; }
}

/* ==========================================================================
   Proceso: dos etapas con línea de progreso
   ========================================================================== */
.proceso { border-top: 1px solid var(--linea); }

.stepper {
  position: relative;
  --marker: 2.75rem;
}
.stepper-track {
  position: absolute;
  top: calc(var(--marker) / 2);
  bottom: 0;
  left: calc(var(--marker) / 2 - 1px);
  width: 2px;
  background: var(--linea);
  border-radius: 2px;
  overflow: hidden;
}
.stepper-fill {
  position: absolute;
  inset: 0;
  background: var(--lago);
  transform-origin: top;
  /* Sin JS la línea se ve completa. Con JS, main.js la llena según el scroll. */
}

.stages { display: grid; gap: var(--space-2xl); }

.stage {
  position: relative;
  display: grid;
  gap: var(--space-m) var(--space-xl);
  padding-left: calc(var(--marker) + var(--space-m));
}
.stage-head { position: relative; }
.stage-marker {
  position: absolute;
  top: 0;
  left: calc(-1 * (var(--marker) + var(--space-m)));
  display: grid;
  place-items: center;
  width: var(--marker);
  height: var(--marker);
  border-radius: 50%;
  background: var(--pomez);
  border: 1.5px solid var(--basalto);
  color: var(--basalto);
  font: 600 1.05rem/1 var(--font-display);
  transition: background-color var(--dur-base) ease, border-color var(--dur-base) ease, color var(--dur-base) ease;
}
.stage-marker > * { grid-area: 1 / 1; }
.stage-marker svg {
  width: 1.25rem; height: 1.25rem;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.stage-num { transition: opacity var(--dur-fast) ease; }
.stage-head h3 { padding-top: 0.35rem; font-size: var(--step-3); }

.stage.is-reached .stage-marker { background: var(--lago); border-color: var(--lago); color: #fff; }
.stage.is-reached .stage-marker svg { opacity: 1; transform: none; }
.stage.is-reached .stage-num { opacity: 0; }

.stage-body { display: grid; gap: var(--space-m); max-width: 38rem; }
.stage-body > p:first-child { font-size: var(--step-1); line-height: 1.55; }

.steps { display: grid; gap: 0; list-style: none; border-top: 1px solid var(--linea); }
.steps li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.75rem;
  border-bottom: 1px solid var(--linea);
}
.steps li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.45rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 1.5px solid var(--lago);
  border-radius: 50%;
}
.stage-out { color: var(--texto-suave); }

/* La frase más honesta de la página, con su propio momento */
.proceso-note {
  margin-top: var(--space-3xl);
  padding-top: var(--space-l);
  border-top: 2px solid var(--lago);
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.3;
  letter-spacing: -0.012em;
  max-width: 22ch;
  text-wrap: balance;
}

@media (min-width: 56rem) {
  .stepper { --marker: 3rem; }
  .stage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ==========================================================================
   Contacto y formulario
   ========================================================================== */
.contacto { border-top: 1px solid var(--linea); }

.contacto-inner { display: grid; gap: var(--space-xl); }
.contacto-text { display: grid; gap: var(--space-m); align-content: start; max-width: 32rem; }
.contacto-text > p:nth-child(2) { font-size: var(--step-1); line-height: 1.55; color: var(--texto-suave); }
.contacto-mail a {
  font-weight: 600;
  color: var(--lago);
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.contacto-mail a:hover { color: var(--lago-hover); text-decoration-thickness: 2px; }

.proto-note {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: var(--space-s);
  border: 1px dashed var(--borde-campo);
  border-radius: var(--radius-s);
  color: var(--texto-suave);
  font-size: var(--step--1);
  line-height: 1.5;
}
.proto-note svg {
  width: 1.15rem; height: 1.15rem; flex: none; margin-top: 0.1rem;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
}

.form-card {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radius-m);
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  box-shadow: 0 1px 2px rgb(19 32 34 / 0.04), 0 18px 40px -24px rgb(19 32 34 / 0.18);
}

.contact-form { display: grid; gap: var(--space-m); }

.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; }
.field-hint { color: var(--texto-suave); font-size: var(--step--1); line-height: 1.45; }

.field input,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--borde-campo);
  border-radius: var(--radius-s);
  background: var(--campo);
  color: var(--texto);
  font: 400 1rem/1.5 var(--font-text);
  caret-color: var(--lago);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover,
.field textarea:hover { border-color: var(--basalto); }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--lago);
  outline-offset: 1px;
  border-color: var(--lago);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.field-error,
.form-summary {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  color: var(--error);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.45;
}
.field-error[hidden],
.form-summary[hidden] { display: none; }
.field-error::before,
.form-summary::before {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm-.9 3.5h1.8l-.3 5H7.4zM8 10.7a1 1 0 1 1 0 2 1 1 0 0 1 0-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm-.9 3.5h1.8l-.3 5H7.4zM8 10.7a1 1 0 1 1 0 2 1 1 0 0 1 0-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.form-summary {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--error);
  border-radius: var(--radius-s);
  background: #fff;
}

.btn-submit { justify-self: start; min-width: 12rem; }

.form-confirm {
  display: grid;
  gap: var(--space-s);
  justify-items: start;
  padding-block: var(--space-l);
}
.form-confirm[hidden] { display: none; }
.form-confirm h3:focus { outline: none; }
.form-confirm h3 { font-size: var(--step-3); }
.form-confirm p { font-size: var(--step-1); color: var(--texto-suave); max-width: 30rem; }
.confirm-mark {
  width: 3rem; height: 3rem;
  fill: none; stroke: var(--lago); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
@media (prefers-reduced-motion: no-preference) {
  .form-confirm:not([hidden]) { animation: texto-in 600ms var(--ease-out) both; }
}

@media (min-width: 56rem) {
  .contacto-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); }
}
@media (max-width: 30rem) {
  .btn-submit { width: 100%; }
}

/* ==========================================================================
   Pie de página
   ========================================================================== */
.site-footer {
  background: var(--basalto);
  color: var(--pomez);
  padding-block: var(--space-2xl) var(--space-xl);
}
.site-footer :focus-visible { outline-color: var(--lago-claro); }
.footer-inner {
  display: grid;
  gap: var(--space-l);
}
.footer-brand { display: grid; gap: var(--space-xs); }
.wordmark-footer { color: var(--pomez); }
.wordmark-footer .monogram rect { fill: var(--pomez); }
.wordmark-footer .monogram text { fill: var(--basalto); }
.wordmark-footer .monogram-ring { stroke: var(--lago); }
.footer-tagline { color: var(--texto-oscuro-suave); }

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-m); }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  text-decoration: none;
  color: var(--pomez);
}
.footer-nav a:hover { text-decoration: underline; }

.footer-legal {
  padding-top: var(--space-m);
  border-top: 1px solid var(--linea-oscura);
  color: var(--texto-oscuro-suave);
  font-size: var(--step--1);
}

@media (min-width: 56rem) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer-legal { grid-column: 1 / -1; }
}

/* ==========================================================================
   Aparición al hacer scroll (la clase .is-pending la pone main.js; sin JS todo se ve)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal.is-pending {
    opacity: 0;
    transform: translateY(14px);
  }
  .reveal.is-shown {
    opacity: 1;
    transform: none;
    transition:
      opacity var(--dur-reveal) var(--ease-out) var(--reveal-delay, 0ms),
      transform var(--dur-reveal) var(--ease-out) var(--reveal-delay, 0ms);
  }
}

/* ==========================================================================
   Movimiento reducido: estados finales inmediatos
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --linea: rgb(19 32 34 / 0.45);
    --texto-suave: #2f3b3c;
  }
  .relieve .capa { stroke-opacity: 0.4; }
}

@media print {
  .site-header, .hero-field, .nav-toggle { display: none; }
  body { background: #fff; }
}
