/* ==========================================================================
   LADOZE · hoja de estilos
   Paleta azul institucional, títulos en Newsreader y texto en Inter.
   Todo el cuerpo sobre el mismo blanco roto; las secciones se separan con
   una línea fina y el título en su propia columna. Lo oscuro queda en la
   foto de portada y en el pie. Solo se anima opacidad y transform.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #F7F8FA;
  --mist: #E9EDF3;
  --line: #D9DFE8;
  --ink: #12213D;
  --text: #4C5566;
  --slate: #46618A;
  --footer: #0E1A30;
  --hero-scrim: #12213D;
  --gold: #C2A56E;
  --on-dark: #F7F8FA;
  --on-dark-soft: #B9C4D6;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --logo: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --tracking-logo: 0.30em;
  --tracking-label: 0.18em;

  --gutter: clamp(1rem, 0.6rem + 2.4vw, 4rem);
  --max: 1320px;
  --header-h: 76px;
  --sec-py: clamp(4.5rem, 3rem + 5vw, 8.5rem);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (max-width: 759px) { :root { --header-h: 64px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  --mark-hl: var(--ink);
}
h1, h2, h3, h4, p, figure, ul, ol, li, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  letter-spacing: -0.015em; line-height: 1.08; text-wrap: balance;
}
h1 em, h2 em, h3 em { font-style: italic; }
p { max-width: 62ch; }
strong, b { font-weight: 500; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a, button, input, textarea, select { outline-color: var(--focus, var(--slate)); }
:focus-visible { outline-style: solid; outline-width: 2px; outline-offset: 3px; }
.hero, .site-header:not(.is-stuck), .mobile-menu, .site-footer, .consent { --focus: var(--gold); }
::selection { background: var(--ink); color: var(--on-dark); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ldz-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 300;
  background: var(--ink); color: var(--on-dark); padding: 0.7rem 1.1rem; font-size: 0.9375rem;
}
.skip-link:focus { top: 12px; }

/* ---------- Etiquetas y textos ---------- */
.label {
  display: inline-flex; align-items: center; gap: 0.65em;
  font: 500 0.72rem/1.35 var(--sans); letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--slate); max-width: none;
}
.label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.label--light { color: var(--on-dark-soft); }
.lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem); line-height: 1.6; color: var(--text); }
.divider { border: 0; border-top: 1px solid var(--line); margin: clamp(1.8rem, 3vw, 2.6rem) 0; }

/* ---------- Logotipo (no cambia: símbolo real y palabra LADOZE) ---------- */
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 0.42em; line-height: 1; }
.logo-word, .logo-inline__word, .footer-giant__word {
  font-family: var(--logo); font-weight: 200; font-style: normal;
  letter-spacing: var(--tracking-logo); text-transform: uppercase;
}
.logo-word { display: block; font-size: var(--logo-size, 1.24rem); white-space: nowrap; }
.logo-sub { font: 500 0.56rem/1 var(--sans); letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.72; }
.logo-inline { white-space: nowrap; }
.logo-inline__word, .footer-giant__word { margin-right: calc(var(--tracking-logo) * -1); }
.aperture {
  display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.165em;
  overflow: visible; max-width: none; color: var(--gold);
  /* Mismo hueco a los dos lados del símbolo: el espaciado de la D más su blanco lateral */
  margin: 0 calc(var(--tracking-logo) + 0.028em) 0 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75em;
  padding: 0.95rem 1.5rem; border: 1px solid var(--ink);
  font: 500 0.76rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--ink); color: var(--on-dark);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-arrow { width: 1em; height: 1em; flex: none; }
.btn--light { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.btn--ghost-light { background: transparent; color: var(--on-dark); border-color: rgba(247, 248, 250, 0.55); }
.btn--sm { padding: 0.75rem 1.1rem; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--slate); border-color: var(--slate); }
  .btn--light:hover { background: var(--mist); border-color: var(--mist); color: var(--ink); }
  .btn--ghost-light:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
}
.btn:active { transform: translateY(1px); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(1.6rem, 2.5vw, 2.2rem); }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  display: flex; align-items: center; color: var(--on-dark);
  --mark-hl: var(--on-dark);
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-stuck { background: var(--bg); color: var(--ink); box-shadow: 0 1px 0 var(--line); --mark-hl: var(--ink); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.main-nav { display: flex; gap: clamp(1.6rem, 3vw, 2.8rem); }
.nav-link {
  position: relative; padding-block: 0.4rem;
  font: 500 0.76rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav-link:hover::after { transform: scaleX(1); } }
.menu-toggle { display: none; width: 44px; height: 44px; position: relative; color: inherit; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform 0.25s var(--ease); }
.menu-toggle span:first-child { top: 18px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 759px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .logo-word { --logo-size: 1.08rem; }
}
/* Con el menú abierto la cabecera queda sobre el panel oscuro */
.menu-open .site-header { background: transparent; color: var(--on-dark); box-shadow: none; --mark-hl: var(--on-dark); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--ink); color: var(--on-dark);
  padding: calc(var(--header-h) + 2.5rem) var(--gutter) 2.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.mobile-menu nav a {
  display: block; padding-block: 0.35rem;
  font: 400 clamp(2.4rem, 10vw, 3.6rem)/1.1 var(--serif); letter-spacing: -0.015em;
}
.mm-foot { font-size: 0.9375rem; color: var(--on-dark-soft); }
.mm-foot a { color: var(--on-dark); }

/* ---------- Portada y cabeceras interiores ---------- */
.hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: 100svh; background: var(--hero-scrim); color: var(--on-dark); overflow: hidden;
}
.hero--inner { min-height: 72svh; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 33, 61, 0.86) 0%, rgba(18, 33, 61, 0.55) 52%, rgba(18, 33, 61, 0.18) 100%),
    linear-gradient(0deg, rgba(18, 33, 61, 0.55) 0%, rgba(18, 33, 61, 0) 45%),
    linear-gradient(180deg, rgba(18, 33, 61, 0.78) 0, rgba(18, 33, 61, 0.5) 110px, rgba(18, 33, 61, 0) 240px);
}
.hero__inner { position: relative; padding-block: calc(var(--header-h) + 3rem) clamp(3.5rem, 8vh, 6.5rem); }
.hero__copy { max-width: 46rem; }
.hero__title { margin-top: 1.1rem; color: var(--on-dark); font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem); line-height: 1.04; }
.hero--inner .hero__title { font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4.4rem); }
/* Portada y servicios: titular en mayúsculas, más grande y sin cursiva */
.hero__title:first-child { margin-top: 0; }
.hero--caps .hero__title { font-family: "Roboto", var(--sans); font-weight: 700; text-transform: uppercase; font-style: normal; letter-spacing: 0; line-height: 1.18; }
.hero--home.hero--caps .hero__copy { max-width: 62rem; }
.hero--home.hero--caps .hero__title { font-size: clamp(2.2rem, 1.1rem + 4.3vw, 5.2rem); }
/* «Nuestros servicios.» siempre en una sola línea */
.hero--inner.hero--caps .hero__title { font-size: clamp(1.35rem, 8vw, 4.6rem); white-space: nowrap; }
.hero__sub { margin-top: 1.4rem; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: var(--on-dark-soft); }
.hero__sub strong { color: var(--on-dark); }

/* ---------- Secciones: título en su columna y línea fina entre ellas ---------- */
.sec { padding-block: var(--sec-py); border-top: 1px solid var(--line); }
.hero + .sec, .hero + .stage { border-top: 0; }
.sec__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.sec__title { font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3.5rem); max-width: 14ch; }
@media (min-width: 900px) { .sec__grid > .sec__title { position: sticky; top: calc(var(--header-h) + 2.5rem); } }
@media (max-width: 899px) { .sec__grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; } }

.figure { overflow: hidden; background: var(--mist); }
.figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- «Qué resolvemos» y «Por qué elegirnos»: una sola sección ----------
   La foto vertical se queda fija a la izquierda mientras se recorren los dos
   bloques; a la derecha, los títulos y las razones en recuadros apaisados. */
.unified__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.unified__media {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  height: min(calc(100vh - var(--header-h) - 3rem), 760px);
  overflow: hidden; border-radius: 18px; background: var(--mist);
}
.unified__media img { width: 100%; height: 100%; object-fit: cover; }
.unified__body .sec__title { max-width: none; margin-bottom: clamp(1.4rem, 2.5vw, 2rem); }
.unified__second { margin-top: clamp(3.5rem, 6vw, 5.5rem); }
.cards { display: grid; gap: clamp(0.7rem, 1.2vw, 1rem); }
.card {
  display: flex; align-items: center; min-height: 6.5rem;
  padding: clamp(1.3rem, 1rem + 1vw, 1.9rem) clamp(1.4rem, 1rem + 1.6vw, 2.4rem);
  background: var(--mist); border-radius: 18px;
}
.card p { font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem); line-height: 1.5; color: var(--ink); max-width: 52ch; }
@media (max-width: 899px) {
  .unified__grid { grid-template-columns: minmax(0, 1fr); }
  .unified__media { position: relative; top: auto; height: auto; aspect-ratio: 4 / 5; max-height: 72vh; width: 100%; }
}
.quote {
  margin-top: clamp(2rem, 4vw, 3rem); padding-left: 1.4rem; border-left: 2px solid var(--slate);
  font: italic 400 clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem)/1.2 var(--serif); color: var(--ink); max-width: 24ch;
}
.svc-text { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem); line-height: 1.6; color: var(--text); max-width: 46ch; }

.svc-text { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem); line-height: 1.6; color: var(--text); max-width: 46ch; }

/* ---------- «La gestión mediática puede afectar al trabajo jurídico» ----------
   La foto arranca a pantalla completa y se reduce a su hueco (stage.js). */
.stage { overflow: hidden; }
.stage__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.stage.is-staged { min-height: 100vh; display: flex; align-items: center; padding-block: calc(var(--header-h) + 2rem) 2rem; }
.stage.is-staged .stage__grid { width: 100%; }
.stage__title { margin-top: 1.1rem; font-size: clamp(2.3rem, 1.4rem + 3vw, 4.2rem); max-width: 15ch; }
.stage .w { display: inline-block; }
.stage__slot { position: relative; aspect-ratio: 1180 / 780; }
.stage__media { position: absolute; inset: 0; overflow: hidden; border-radius: 18px; transform-origin: 50% 50%; will-change: transform; z-index: 2; }
.stage__media img { width: 100%; height: 100%; object-fit: cover; }
.stage__lead { margin-top: 1.4rem; max-width: 40ch; }
@media (max-width: 899px) { .stage__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Fases de la gestión mediática ----------
   Fotos grandes en fila; solo se pasan con las flechas (el scroll de la
   página no las mueve). Debajo de cada foto, su nombre; la explicación
   aparece sobre la foto al pasar el ratón o al llegar con el teclado.
   En pantallas táctiles, sin ratón, la explicación se ve siempre. */
.phases-head { margin-bottom: clamp(2rem, 3.5vw, 3rem); }
.phases-title { max-width: 20ch; }
.phases__viewport { position: relative; overflow: hidden; }
.phases__track {
  display: flex; gap: clamp(1rem, 2vw, 1.8rem); margin: 0;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.phase {
  flex: none; width: clamp(270px, 40vw, 640px);
  display: grid; grid-template-areas: "media" "title"; grid-template-rows: auto auto;
  border-radius: 18px; outline-offset: 4px;
}
.phase__media { grid-area: media; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 18px; background: var(--mist); }
.phase__media img { width: 100%; height: 100%; object-fit: cover; }
.phase h3 { grid-area: title; margin-top: 1rem; font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2.1rem); }
.phase__info {
  grid-area: media; align-self: stretch; z-index: 1;
  display: flex; align-items: flex-end; max-width: none;
  padding: clamp(1.2rem, 1rem + 1.4vw, 2.2rem); border-radius: 18px;
  background: linear-gradient(0deg, rgba(18, 33, 61, 0.94) 0%, rgba(18, 33, 61, 0.78) 55%, rgba(18, 33, 61, 0.55) 100%);
  color: var(--on-dark); font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem); line-height: 1.5;
  opacity: 0; transition: opacity 0.3s ease;
}
.phase:hover .phase__info, .phase:focus-within .phase__info, .phase:focus .phase__info { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .phase { grid-template-areas: "media" "title" "info"; }
  .phase__info { grid-area: info; opacity: 1; background: none; color: var(--text); padding: 0.4rem 0 0; font-size: 1rem; }
}
.phases__nav { display: flex; align-items: center; gap: 0.75rem; margin-top: clamp(1.6rem, 3vw, 2.4rem); }
.phases__progress { flex: 1; height: 2px; background: var(--line); margin-right: 1rem; position: relative; overflow: hidden; }
.phases__progress span { position: absolute; inset: 0; background: var(--slate); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.phases__arrow {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--ink); color: var(--ink); transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.phases__arrow svg { width: 16px; height: 16px; }
.phases__arrow[disabled] { opacity: 0.3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .phases__arrow:not([disabled]):hover { background: var(--ink); color: var(--on-dark); } }


/* ---------- Modelo de coordinación: bloque destacado ---------- */
.hub-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--mist); border-radius: 18px; overflow: hidden; }
.hub-panel__media { min-height: 100%; overflow: hidden; }
.hub-panel__media img { width: 100%; height: 100%; object-fit: cover; }
.hub-panel__body { padding: clamp(2rem, 1rem + 4vw, 4.5rem); }
.hub-panel .sec__title { max-width: none; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
@media (max-width: 899px) {
  .hub-panel { grid-template-columns: minmax(0, 1fr); }
  .hub-panel__media { aspect-ratio: 3 / 2; }
}

/* Diagrama: un solo trazo uniforme por el que viaja la luz (services.js).
   Los tres nombres comparten línea, centrados bajo su punto. */
.hub { position: relative; aspect-ratio: 640 / 380; }
.hub__svg { position: absolute; inset: 0 0 auto; width: 100%; height: auto; aspect-ratio: 640 / 300; overflow: visible; }
.hub__path { fill: none; stroke: var(--slate); stroke-opacity: 0.45; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.hub__marker { fill: var(--slate); }
.hub__marker--ring { fill: none; stroke: var(--slate); stroke-opacity: 0.4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hub__core { fill: var(--bg); stroke: var(--slate); stroke-opacity: 0.35; vector-effect: non-scaling-stroke; }
.hub__light { fill: var(--gold); }
.hub__halo { fill: var(--gold); opacity: 0.28; }
.hub__line { display: none; }
.hub__nodes { position: absolute; left: 0; right: 0; top: 70.5%; }
.hub__node { position: absolute; top: 0; width: 30%; transform: translateX(-50%); text-align: center; }
.hub__node--a { left: 12.5%; }
.hub__node--c { left: 50%; }
.hub__node--b { left: 87.5%; }
.hub__node h3 { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.3; }
.hub__node h3 .logo-inline__word { font-size: 0.92em; }
.hub__node p { margin: 0.25rem auto 0; font-size: 0.9rem; color: var(--text); }
@media (max-width: 899px) {
  .hub { aspect-ratio: auto; padding-left: 2.2rem; }
  .hub__svg { display: none; }
  .hub__line { display: block; position: absolute; left: 0.45rem; top: 0.55rem; bottom: 0.55rem; width: 1px; background: var(--slate); opacity: 0.5; transform-origin: center top; }
  .hub__nodes { position: relative; top: auto; display: grid; gap: 1.8rem; }
  .hub__node { position: relative; left: auto; width: auto; transform: none; text-align: left; }
  .hub__node::before {
    content: ""; position: absolute; left: -2.1rem; top: 0.45rem; width: 9px; height: 9px;
    border-radius: 50%; background: var(--slate); box-shadow: 0 0 0 5px var(--mist);
  }
}

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); }
@media (max-width: 899px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-line { display: flex; align-items: center; gap: 0.9rem; font-size: 1.05rem; color: var(--ink); max-width: none; }
.contact-line + .contact-line { margin-top: 1rem; }
.contact-line svg { width: 1.05rem; height: 1.05rem; color: var(--slate); flex: none; }
@media (hover: hover) and (pointer: fine) { .contact-line a:hover { color: var(--slate); } }
.contact-xl { margin-top: 1.4rem; }
.contact-line--xl { font: 400 clamp(1.5rem, 1.15rem + 1.3vw, 2.2rem)/1.2 var(--serif); }
.contact-line--xl + .contact-line--xl { margin-top: 1.1rem; }
.contact-line--xl a { overflow-wrap: anywhere; }
.sec--cta .contact-lines { padding-top: 0.6rem; }

.form { margin-top: 1.4rem; display: grid; gap: 1.6rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
@media (max-width: 599px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 0.4rem; }
.field__control { display: flex; flex-direction: column-reverse; gap: 0.45rem; }
.field label { font: 500 0.72rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.field input, .field textarea {
  width: 100%; padding: 0.7rem 0; border: 0; border-bottom: 1px solid #8591A6; background: transparent;
  color: var(--ink); font-size: 1rem; border-radius: 0; transition: border-color 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #69748A; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field textarea { resize: vertical; min-height: 140px; }
.field-hint { font-size: 0.8125rem; color: var(--text); }
.field-error { font-size: 0.8125rem; color: #9B2C2C; display: none; }
.field.has-error input, .field.has-error textarea { border-bottom-color: #9B2C2C; }
.field.has-error .field-error { display: block; }
.form-status { display: none; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.2rem; background: var(--mist); color: var(--ink); font-size: 0.95rem; }
.form-status.is-on { display: flex; }
.form-status p { margin: 0; }
.form-status svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--slate); margin-top: 0.2rem; }
.btn.is-busy { pointer-events: none; opacity: 0.6; }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pie ---------- */
.site-footer { background: var(--footer); color: var(--on-dark-soft); padding-top: clamp(4rem, 3rem + 4vw, 6.5rem); --mark-hl: var(--on-dark); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 899px) { .footer-top { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; } }
.site-footer .logo { color: var(--on-dark); align-items: flex-start; }
.footer-claim { margin-top: 1.4rem; font-size: 0.9375rem; }
.footer-head { font: 500 0.7rem/1.3 var(--sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--on-dark-soft); margin-bottom: 1.1rem; }
.footer-col li + li { margin-top: 0.55rem; }
.footer-col a { color: var(--on-dark); font-size: 0.9375rem; }
.footer-col span { font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) { .footer-col a:hover, .footer-bottom a:hover, .footer-cookies:hover { color: var(--gold); } }

.footer-giant { overflow: hidden; line-height: 0; margin-top: clamp(2.6rem, 2rem + 3vw, 4.6rem); padding-top: clamp(1.2rem, 2vw, 2rem); border-top: 1px solid rgba(185, 196, 214, 0.18); }
.footer-giant__word { display: inline-block; white-space: nowrap; line-height: 0.82; font-size: 17vw; color: rgba(247, 248, 250, 0.92); will-change: transform; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: clamp(2rem, 3vw, 3rem); padding-block: 1.6rem 2rem; border-top: 1px solid rgba(185, 196, 214, 0.18);
  font-size: 0.8125rem;
}
.footer-bottom a { color: var(--on-dark); }
.footer-cookies { color: var(--on-dark); font-size: inherit; }
.to-top {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(185, 196, 214, 0.45); color: var(--on-dark);
}
.to-top svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .to-top:hover { background: var(--on-dark); color: var(--ink); } }

/* ---------- Aviso de cookies ---------- */
.consent {
  position: fixed; z-index: 300; left: var(--gutter); bottom: clamp(1rem, 2vw, 1.6rem);
  width: min(26rem, calc(100% - 2 * var(--gutter)));
  padding: 1.25rem 1.3rem 1.2rem; background: var(--footer); color: var(--on-dark);
  box-shadow: 0 18px 50px rgba(14, 26, 48, 0.35);
  opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.consent.is-in { opacity: 1; transform: none; }
.consent[hidden] { display: none; }
.consent__text { font-size: 0.9375rem; line-height: 1.5; color: var(--on-dark-soft); max-width: none; }
.consent__actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.consent__actions .btn { flex: 1; }
@media (max-width: 599px) { .consent { left: 16px; right: 16px; width: auto; bottom: 16px; } }

/* ---------- Aparición suave del texto ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.no-anim [data-reveal] { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transform: none; transition: opacity 0.3s ease; }
  .consent { transform: none; transition: opacity 0.3s ease; }
  .nav-link::after, .menu-toggle span { transition: none; }
}

/* La foto de portada tiene el capitel a la derecha: que no se pierda al recortar en vertical */
.hero--home .hero__media img { object-position: 78% center; }
.hub-panel__body { display: flex; flex-direction: column; justify-content: center; }

/* Con el menú móvil abierto el aviso de cookies espera: tapaba el teléfono y el correo */
.menu-open .consent { visibility: hidden; }

/* Portada: titular en tres filas, en la parte alta de la foto */
.hero--home { align-items: flex-start; }
.hero--home .hero__inner { padding-block: calc(var(--header-h) + 16vh) 2.5rem; }
.hero--home.hero--caps .hero__copy { max-width: none; }
.hero--home.hero--caps .hero__title { max-width: 10.5em; line-height: 1.3; text-wrap: wrap; }

/* Servicios: franja de foto más baja; la cabecera va encima, transparente,
   y pasa a blanca al bajar como en el resto de la web */
.hero--band { min-height: clamp(300px, 46svh, 500px); align-items: center; }
.hero--band .hero__inner { padding-block: calc(var(--header-h) + 1rem) 2.2rem; }
@media (max-width: 899px) { .hero--band { min-height: clamp(300px, 40svh, 440px); } }
/* En el móvil, letra ajustada al ancho para mantener las tres filas */
@media (max-width: 599px) { .hero--home.hero--caps .hero__title { font-size: clamp(1.5rem, 7.6vw, 2.2rem); } }

/* ==========================================================================
   SERVICIOS EN TARJETAS (deck.js)
   Tres tarjetas en fila que reparten el ancho con flex-grow: al llegar,
   iguales; al abrir una, crece y las demás quedan como franjas de 56 px.
   Bajo 900 px se apilan, todas abiertas.
   ========================================================================== */
.deck-sec { --deck-side: max(var(--gutter), 72px); --deck-pad: clamp(1.4rem, 2.2vw, 2.4rem); --deck-h: clamp(32.5rem, 78vh, 45rem); }
.deck-wrap { position: relative; max-width: var(--max); margin-inline: auto; padding-inline: var(--deck-side); }
.deck { display: flex; gap: 14px; height: var(--deck-h); }
.deck__card {
  flex: 1 1 0; min-width: 56px; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--mist); border-radius: 18px; padding: var(--deck-pad);
  cursor: pointer; container-type: inline-size;
  transition: flex-grow 0.5s var(--ease);
}
.deck.has-open .deck__card:not(.is-open) { flex-grow: 0; }
.deck__card > * { transition: opacity 0.25s ease; }
.deck.has-open .deck__card:not(.is-open) > * { opacity: 0; }
/* Franjas cerradas: el nombre del servicio en vertical, como el lomo de un libro */
.deck.has-open .deck__card:not(.is-open) { padding: 1.4rem 0; align-items: center; }
.deck.has-open .deck__card:not(.is-open) .deck__thumb { display: none; }
.deck.has-open .deck__card:not(.is-open) .deck__title {
  opacity: 1; writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 1.05rem; max-width: none; white-space: nowrap; line-height: 1;
}
.deck__title { font-size: clamp(1.7rem, 1.2rem + 1.2vw, 2.4rem); max-width: 16ch; flex: none; }
.deck__card.is-open { cursor: default; }
.deck__card.is-open .deck__title { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.9rem); max-width: 28ch; }
.deck__thumb {
  flex: 1; min-height: 0; overflow: hidden;
  margin: 1.4rem calc(-1 * var(--deck-pad)) calc(-1 * var(--deck-pad));
}
.deck__thumb img, .deck__photo img { width: 100%; height: 100%; object-fit: cover; }
/* Cerrada: el contenido se oculta solo a la vista (sigue para lectores de
   pantalla y para el tabulador, que abre la tarjeta al entrar) */
.deck.is-ready .deck__card:not(.is-open) .deck__body {
  position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
/* Sin deck.js (o antes de cargar) se ve el contenido y no la miniatura */
.deck:not(.is-ready) .deck__thumb { display: none; }
.deck__card.is-open .deck__thumb { display: none; }
.deck__card.is-open .deck__body { flex: 1; min-height: 0; margin-top: clamp(1rem, 2vw, 1.8rem); animation: deckIn 0.4s 0.2s both; }
.deck__card.is-open .deck__body--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.deck__rows { align-self: start; }
.deck__rows li { padding-block: 1rem; border-bottom: 1px solid #C9D2DE; color: var(--ink); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.18rem); line-height: 1.5; }
.deck__rows li:first-child { border-top: 1px solid #C9D2DE; }
.deck__photo { border-radius: 14px; overflow: hidden; min-height: 0; height: 100%; }
.deck__arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--ink); color: var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.deck__arrow svg { width: 18px; height: 18px; }
.deck__arrow--prev { left: calc((var(--deck-side) - 48px) / 2); }
.deck__arrow--next { right: calc((var(--deck-side) - 48px) / 2); }
.deck__arrow[aria-disabled="true"] { opacity: 0.3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .deck__arrow:not([aria-disabled="true"]):hover { background: var(--ink); color: var(--on-dark); } }
@keyframes deckIn { from { opacity: 0; } to { opacity: 1; } }

/* Fases dentro de su tarjeta: flechas a media altura de las fotos */
.deck .phases-frame { position: relative; --pw: clamp(220px, min(58cqi, (var(--deck-h) - 18.125rem) * 1.5), 640px); }
.deck .phases__track { padding-inline: 0; }
.deck .phase { width: var(--pw); }
.deck .phases-frame .phases__arrow { position: absolute; z-index: 2; top: calc(var(--pw) / 3); translate: 0 -50%; background: var(--bg); }
.deck .phases-frame [data-phases-prev] { left: 10px; }
.deck .phases-frame [data-phases-next] { right: 10px; }
.deck .phases__progress { margin: clamp(1rem, 2vw, 1.6rem) 0 0; }

@media (prefers-reduced-motion: reduce) {
  .deck__card, .deck__card > * { transition: none; }
  .deck__card.is-open .deck__body { animation: none; }
}
@media (max-width: 899.98px), (max-height: 559.98px) {
  .deck-sec { --deck-side: var(--gutter); }
  .deck { flex-direction: column; height: auto; gap: 1rem; }
  .deck__card { flex: none; cursor: default; }
  .deck__thumb, .deck__arrow { display: none; }
  .deck__body, .deck__card.is-open .deck__body, .deck.is-ready .deck__card:not(.is-open) .deck__body { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; display: block; margin-top: 1.4rem; animation: none; }
  .deck__body--split, .deck__card.is-open .deck__body--split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .deck__photo { aspect-ratio: 4 / 5; height: auto; max-height: 70vh; }
  .deck .phases-frame { --pw: clamp(220px, 78cqi, 520px); }
}
