/* ==========================================================================
   Nova Solutions Abogados — hoja de estilos
   ========================================================================== */

:root {
  --paper: #f6f4ef;
  --paper-glass: rgba(246, 244, 239, .94);
  --sand: #ece8e0;
  --sand-hover: #efebe4;
  --white: #fff;
  --ink: #1c1a18;
  --text-2: #4b4640;
  --muted: #847d74;
  --muted-2: #a39b90;
  --placeholder-text: #6d665d;
  --line: #ddd7cc;
  --line-2: #cfc8bb;
  --line-3: #bdb5a7;
  --photo-bg: #e4dfd5;
  --ph-bg: #e9e4da;
  --red: #b3001b;
  --red-dark: #8f0015;
  --dark: #191715;
  --black: #0b0a09;
  --graphite: #252422;
  --on-dark: #f3efe8;
  --on-dark-2: #b9b2a7;
  --on-dark-3: #d6d0c6;
  --on-dark-4: #7c756c;
  --on-dark-5: #8f887e;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --mono: ui-monospace, Menlo, monospace;

  --max: 1360px;
  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 84px;

  --hatch: repeating-linear-gradient(135deg, rgba(28, 26, 24, .07) 0 1px, transparent 1px 11px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
::selection { background: var(--red); color: #fff; }
button, input, select, textarea { font-family: inherit; }
button { color: inherit; }
[id] { scroll-margin-top: var(--header-h); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; font: 500 14px/1 var(--sans);
}
.skip-link:focus { top: 16px; color: var(--paper); }

@keyframes nsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nsSlide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section-sand { background: var(--sand); }

/* ---------- Tipografía reutilizable ---------- */
.eyebrow {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
h2.eyebrow { margin-top: 0; margin-bottom: 0; }
.eyebrow--rule { display: flex; align-items: center; gap: 14px; line-height: 1; }
.eyebrow--rule::before { content: ""; width: 28px; height: 1px; background: var(--red); flex: none; }
.eyebrow--on-dark { color: var(--on-dark-2); }

.label {
  font: 500 11px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--red { color: var(--red); }

.mono { font-family: var(--mono); }

.h-section {
  margin: 24px 0 0;
  font: 300 clamp(40px, 5vw, 72px)/1.02 var(--serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}
.h-page {
  margin: 28px 0 0;
  font: 300 clamp(52px, 8.6vw, 132px)/.95 var(--serif);
  letter-spacing: -.03em;
}
em.italic, .h-page em, .h-section em { font-style: italic; }

.role {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  border: 0;
  padding: 20px 30px;
  font: 500 14px/1 var(--sans);
  letter-spacing: .04em;
  cursor: pointer;
  text-align: center;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--outline-dark { color: var(--on-dark); border-color: var(--on-dark-3); }
.btn--outline-dark:hover { background: var(--on-dark); color: var(--dark); }
.btn--block { display: block; width: 100%; }

.link-line {
  display: inline-block;
  background: none; border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 6px;
  font: 500 14px/1 var(--sans);
  letter-spacing: .02em;
  color: var(--ink);
  cursor: pointer;
}
.link-line:hover { color: var(--red); border-color: var(--red); }

.arrow-circle {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.more { font: 500 13px/1 var(--sans); color: var(--red); }

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 42px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 36px; height: 100%; }
.main-nav__link {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  height: 100%;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  font: 500 14px/1 var(--sans);
  letter-spacing: .01em;
  color: var(--ink);
}
.main-nav__link:hover { color: var(--red); }
.main-nav__link[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--red);
}
.main-nav__caret { font-size: 10px; color: var(--muted); }

.nav-dd { position: relative; height: 100%; display: flex; align-items: center; }
.nav-dd__panel {
  position: absolute; top: 100%; left: -28px;
  width: 400px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(28, 26, 24, .25);
  padding: 12px;
  animation: nsFade .18s ease;
}
.nav-dd__panel[hidden] { display: none; }
.nav-dd__item {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: 8px;
  padding: 14px 16px;
  color: var(--ink);
}
.nav-dd__item:hover { background: var(--paper); color: var(--red); }
.nav-dd__name { font: 400 21px/1.2 var(--serif); }
.nav-dd__arrow { font-size: 14px; }

.site-header__actions { display: flex; align-items: center; gap: 20px; }
.site-header__cta {
  background: var(--ink); color: var(--paper);
  padding: 14px 22px;
  font: 500 13px/1 var(--sans);
  letter-spacing: .04em;
  transition: background .2s;
}
.site-header__cta:hover { background: var(--red); color: var(--paper); }

.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--ink);
  width: 48px; height: 48px;
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 16px var(--gutter) 32px;
  display: flex; flex-direction: column;
  animation: nsFade .2s ease;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__link {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  font: 400 26px/1.1 var(--serif);
  color: var(--ink);
}
.mobile-menu__sub {
  display: flex; gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0 14px 20px;
  font: 400 18px/1.2 var(--serif);
  color: var(--text-2);
}
.mobile-menu__link:hover, .mobile-menu__sub:hover { color: var(--red); }
.mobile-menu__cta {
  margin-top: 24px;
  background: var(--red); color: #fff;
  padding: 18px;
  font: 500 14px/1 var(--sans);
  letter-spacing: .04em;
  text-align: center;
}
.mobile-menu__cta:hover { color: #fff; background: var(--red-dark); }

/* Home: la cabecera se funde con el hero negro mientras está encima de él */
.site-header__logo-white { display: none !important; }
.site-header--home { transition: background-color .35s ease, border-color .35s ease; }
.site-header.is-on-dark { background: var(--black); border-bottom-color: rgba(243, 239, 232, .1); }
.site-header.is-on-dark .site-header__logo-ink { display: none; }
.site-header.is-on-dark .site-header__logo-white { display: block !important; }
.site-header.is-on-dark .main-nav__link { color: var(--on-dark-3); }
.site-header.is-on-dark .main-nav__link:hover { color: #fff; }
.site-header.is-on-dark .main-nav__caret { color: var(--on-dark-4); }
.site-header.is-on-dark .site-header__cta { background: var(--on-dark); color: var(--black); }
.site-header.is-on-dark .site-header__cta:hover { background: var(--red); color: #fff; }
.site-header.is-on-dark .menu-toggle { border-color: var(--on-dark-3); }
.site-header.is-on-dark .menu-toggle span { background: var(--on-dark); }

@media (max-width: 979.98px) {
  .main-nav, .site-header__cta { display: none; }
  .menu-toggle { display: flex; }
}
@media (min-width: 980px) {
  .mobile-menu { display: none !important; }
}


/* ==========================================================================
   HOME
   ========================================================================== */
/* Hero: frase sobre negro y, al hacer scroll, las dos oficinas en vídeo.
   Sin JS (o en móvil / movimiento reducido) son dos bloques seguidos;
   motion.js añade .is-pinned y convierte el conjunto en una secuencia fijada. */
.hero {
  position: relative;
  background: var(--black);
  color: var(--on-dark);
}
.hero__intro {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(40px, 6vh, 72px) 0 clamp(32px, 5vh, 56px);
}
.hero__intro-inner { width: 100%; }
.hero__title {
  margin: clamp(40px, 8vh, 96px) 0 0;
  font-weight: 300;
  font-family: var(--serif);
  color: var(--on-dark);
}
.hero__title-lead {
  display: block;
  max-width: 17em;
  font-size: clamp(26px, 3.1vw, 46px);
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--on-dark-3);
}
.hero__mask { display: inline-block; overflow: hidden; vertical-align: top; }
.hero__mask > * { display: inline-block; }
.hero__mask--word { display: block; padding: 0 .06em .08em 0; margin-top: -.02em; }
.hero__title-word {
  font-style: italic;
  font-size: clamp(72px, 15.4vw, 250px);
  line-height: .98;
  letter-spacing: -.04em;
  color: var(--on-dark);
}
.hero__foot { width: 100%; display: flex; justify-content: center; }
.hero__cue {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  font: 500 11px/1 var(--sans);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--on-dark-2);
}
.hero__cue-line {
  position: relative; overflow: hidden;
  width: 1px; height: 56px;
  background: rgba(243, 239, 232, .18);
}
.hero__cue-line::after {
  content: ""; position: absolute; left: 0; top: 0;
  width: 1px; height: 100%;
  background: var(--red);
  animation: heroCue 2.2s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes heroCue {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* Las dos oficinas */
.hero__cities {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 520px;
  background: var(--black);
}
.hero__city { position: relative; margin: 0; overflow: hidden; }
.hero__city-media { position: absolute; inset: 0; }
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  background: var(--black);
  filter: brightness(.78) saturate(.85) contrast(1.05);
}
.hero__city--mad .hero__video { object-position: 50% 30%; }
.hero__city--bcn .hero__video { object-position: 57% 50%; }
.hero__city::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 10, 9, .35) 0%, rgba(11, 10, 9, 0) 30%, rgba(11, 10, 9, 0) 55%, rgba(11, 10, 9, .82) 100%);
}
.hero__city-cap {
  position: absolute; z-index: 1;
  left: clamp(24px, 3.4vw, 56px); right: clamp(24px, 3.4vw, 56px); bottom: clamp(28px, 5vh, 56px);
  display: flex; flex-direction: column; gap: 10px;
}
.hero__city--bcn .hero__city-cap { align-items: flex-end; text-align: right; }
.hero__city-coord {
  font: 500 11px/1 var(--sans);
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
  color: var(--on-dark-3);
}
.hero__city-name {
  font: 300 clamp(52px, 7vw, 116px)/.95 var(--serif);
  letter-spacing: -.03em;
  color: var(--on-dark);
}
.hero__city-addr { font: 400 14px/1.4 var(--sans); color: var(--on-dark-3); }

/* La costura entre las dos ciudades */
.hero__seam {
  position: absolute; z-index: 2;
  top: 0; bottom: 0; left: 50%;
  width: 1px; margin-left: -.5px;
  background: var(--red);
  pointer-events: none;
}

.hero__mute {
  position: absolute; right: var(--gutter); top: 22px; z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(243, 239, 232, .4);
  background: rgba(11, 10, 9, .45);
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.hero__mute:hover { border-color: var(--on-dark); background: rgba(11, 10, 9, .75); }

/* Secuencia fijada (solo con GSAP, ≥880px y movimiento permitido) */
.hero.is-pinned {
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  overflow: hidden;
}
.hero.is-pinned .hero__intro { height: 100%; min-height: 0; }
.hero.is-pinned .hero__cities { position: absolute; inset: 0; height: auto; min-height: 0; background: none; pointer-events: none; }
.hero.is-pinned .hero__mute { pointer-events: auto; }

@media (max-width: 600px) {
  .hero__title-word { font-size: 19.6vw; }
}
@media (max-width: 879.98px) {
  .hero__cities { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .hero__city { height: 72svh; min-height: 420px; }
  .hero__city--bcn .hero__city-cap { align-items: flex-start; text-align: left; }
  .hero__seam { display: none; }
}

/* El despacho */
.despacho { padding: clamp(120px, 14vw, 200px) 0 clamp(96px, 11vw, 160px); }
.despacho__lead {
  margin: 0 auto;
  max-width: 17em;
  text-align: center;
  font: 300 clamp(40px, 4.9vw, 80px)/1.1 var(--serif);
  letter-spacing: -.025em;
  color: var(--ink);
  text-wrap: balance;
}
.despacho__lead em { font-style: italic; color: var(--red); }
/* Líneas generadas por SplitText para el barrido rojo */
[data-sweep] .sweep-line { position: relative; display: table !important; width: auto !important; margin: 0 auto; }
.sweep-bar {
  position: absolute; left: -.08em; right: -.08em; top: .08em; bottom: .02em;
  background: var(--red);
  transform: scaleX(0); transform-origin: left center;
  pointer-events: none;
}
.despacho__intro { margin-top: clamp(56px, 6vw, 88px); }
.despacho__statement {
  margin: 0 auto; max-width: 30em;
  text-align: center;
  font: 300 clamp(24px, 2.2vw, 34px)/1.3 var(--serif);
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.despacho__statement em { font-style: italic; }
/* Página interior de El despacho (borrador): los dos párrafos del protocolo */
.despacho--page { padding-top: clamp(56px, 6vw, 88px); }
.despacho--page .despacho__intro { margin-top: 0; }
.despacho__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px clamp(48px, 6vw, 96px);
  font: 400 16px/1.7 var(--sans);
  color: var(--text-2);
}
.despacho__cols p { margin: 0; text-wrap: pretty; }

.steps {
  margin-top: clamp(72px, 8vw, 120px);
}
/* Los tres pasos como línea de tiempo: una línea fina con un punto por paso.
   Con GSAP, un trazo rojo la recorre y cada paso aparece cuando el trazo llega a su punto. */
.steps__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.steps__track {
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--line-2);
}
.steps__fill {
  position: absolute; inset: 0;
  background: var(--red);
  transform-origin: left center;
}
.step { position: relative; padding: 44px 40px 8px 0; }
@media (min-width: 880px) {
  .steps__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 879.98px) {
  .steps__grid { grid-template-columns: minmax(0, 1fr); }
  .steps__track { left: 5px; right: auto; top: 6px; bottom: 0; width: 1px; height: auto; }
  .steps__fill { transform-origin: top center; }
  .step { padding: 0 0 44px 36px; }
  .step:last-child { padding-bottom: 8px; }
  .step::before { left: 0; top: 7px; }
}
.step::before {
  content: ""; position: absolute; left: 0; top: -5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--red); border: 1px solid var(--red);
  transition: background .4s ease, border-color .4s ease, transform .4s ease;
}
/* Estado inicial cuando la animación está preparada (motion.js añade .is-armed) */
.steps__grid.is-armed .step::before { background: var(--timeline-bg, var(--paper)); border-color: var(--line-3); }
.steps__grid.is-armed .step.is-reached::before { background: var(--red); border-color: var(--red); transform: scale(1.1); }

.step__title { margin: 0; font: 400 28px/1.15 var(--serif); letter-spacing: -.01em; }
.step__text {
  margin: 16px 0 0; max-width: 26em;
  font: 400 15px/1.65 var(--sans);
  color: var(--text-2);
  text-wrap: pretty;
}

/* Cabecera de sección reutilizable */
.section-head {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section-head__aside {
  margin: 0; max-width: 24em;
  font: 400 16px/1.65 var(--sans);
  color: var(--text-2);
}
/* Áreas de práctica: texto a la izquierda, foto a sangre a la derecha.
   Con GSAP (≥880px) la sección se fija y cada área entra con un barrido de foto. */
.practice { background: var(--black); color: var(--on-dark); isolation: isolate; }
.practice__stage {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
}
/* Sin z-index propio: así el nombre del área puede fundirse (difference) con la foto que invade */
.practice__text {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(48px, 8vh, 88px) clamp(32px, 4vw, 64px) clamp(48px, 8vh, 88px) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.practice .eyebrow { color: var(--on-dark-2); }
.practice__title {
  margin: 22px 0 0; max-width: 11em;
  font: 300 clamp(34px, 3.1vw, 47px)/1.08 var(--serif);
  letter-spacing: -.02em;
  color: var(--on-dark);
  text-wrap: balance;
}
.practice__rail { display: none; }
.practice__rail-btn {
  display: flex; align-items: center; gap: 0;
  background: none; border: 0; padding: 7px 0;
  font: 500 13px/1 var(--sans); letter-spacing: .04em;
  color: var(--on-dark-4);
  cursor: pointer; text-align: left;
  transition: color .3s ease, gap .3s ease;
}
.practice__rail-btn::before {
  content: ""; width: 0; height: 1px; background: var(--red);
  transition: width .35s ease;
}
.practice__rail-btn:hover { color: var(--on-dark-3); }
.practice__rail-btn.is-active { color: var(--on-dark); gap: 12px; }
.practice__rail-btn.is-active::before { width: 22px; }

.practice__list {
  list-style: none; margin: auto 0 0; padding: 48px 0 0;
  display: grid; gap: 56px;
}
.practice__item { margin: 0; }
.practice__link { display: block; color: inherit; }
.practice__link:hover { color: inherit; }
.practice__kicker {
  display: block;
  font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--on-dark-2);
}
.practice__mask { display: block; overflow: hidden; padding: .04em .1em .08em 0; margin-top: 10px; }
.practice__name {
  display: inline-block;
  font: 300 clamp(64px, 8.2vw, 136px)/1 var(--serif);
  letter-spacing: -.035em;
  white-space: nowrap;
  color: var(--on-dark);
  mix-blend-mode: difference;
}
.practice__desc {
  display: block; margin-top: 18px; max-width: 24em;
  font: 400 16px/1.6 var(--sans);
  color: var(--on-dark-3);
}
.practice__more {
  display: inline-block; margin-top: 22px;
  font: 500 14px/1 var(--sans); letter-spacing: .02em;
  color: var(--on-dark);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--red);
  transition: color .2s;
}
.practice__link:hover .practice__more { color: #fff; }

.practice__media { position: relative; z-index: -1; overflow: hidden; background: var(--black); }
.practice__media::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(11, 10, 9, .6) 0%, rgba(11, 10, 9, 0) 45%);
}
.practice__img { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.practice__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: grayscale(.3) contrast(1.06) brightness(.82);
}
.practice__progress {
  position: absolute; z-index: 3; left: 0; top: 0; bottom: 0;
  width: 1px; background: var(--red);
  transform: scaleY(0); transform-origin: top;
}

/* Modo fijado (motion.js añade .is-pinned) */
.practice.is-pinned .practice__stage { height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); min-height: 0; }
.practice.is-pinned .practice__rail { display: flex; flex-direction: column; align-items: flex-start; margin-top: clamp(28px, 5vh, 56px); }
.practice.is-pinned .practice__list { display: grid; gap: 0; }
.practice.is-pinned .practice__item { grid-area: 1 / 1; }

@media (max-width: 879.98px) {
  .practice__stage { grid-template-columns: minmax(0, 1fr); }
  /* Sin la secuencia fijada, las 5 áreas van una debajo de otra: el nombre puede partirse por el guion */
  .practice__name { font-size: clamp(40px, 12.5vw, 80px); white-space: normal; overflow-wrap: break-word; }
  .practice__text { min-width: 0; }
  .practice__media { display: none; } /* las 5 fotos solo tienen sentido con la secuencia fijada (≥880px) */
}

/* Filosofía */
.philosophy { background: var(--dark); color: var(--on-dark); padding: clamp(96px, 11vw, 168px) 0; }
.philosophy .eyebrow { color: var(--muted-2); }
.philosophy .eyebrow--rule::before { background: #c30017; }
.philosophy__quote {
  margin: 40px 0 0;
  font: 300 clamp(32px, 4.4vw, 64px)/1.14 var(--serif);
  letter-spacing: -.018em;
  max-width: 18em;
  text-wrap: pretty;
}
.philosophy__quote em { font-style: italic; color: #c30017; }
.philosophy__text { margin: 40px 0 0; max-width: 38em; font: 400 17px/1.7 var(--sans); color: var(--on-dark-2); text-wrap: pretty; }

/* Los tres pilares: tres círculos que se solapan; donde coinciden los tres, el compromiso */
.pillars {
  margin-top: clamp(80px, 9vw, 136px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px clamp(56px, 8vw, 140px);
  align-items: center;
}
.pillars__figure { margin: 0; }
@media (max-width: 979.98px) {
  .pillars { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .pillars__svg { max-width: 460px; margin: 0 auto; }
}
.pillars__svg { display: block; width: 100%; max-width: 560px; overflow: visible; }
.pillars__ring {
  fill: rgba(243, 239, 232, .03);
  stroke: rgba(243, 239, 232, .42);
  stroke-width: 1.1;
  transition: stroke .35s ease, fill .35s ease;
}
.pillars__core-fill { fill: #c30017; }
.pillars__label {
  font-family: var(--serif); font-size: 21px; font-weight: 400;
  fill: var(--on-dark-2);
  text-anchor: middle; dominant-baseline: middle;
  transition: fill .35s ease;
}
.pillars__core-label {
  font-family: var(--serif); font-size: 17px; font-style: italic;
  fill: #fff;
  text-anchor: middle; dominant-baseline: middle;
  letter-spacing: .01em;
}
.pillars__figure[data-active] .pillars__ring { stroke: rgba(243, 239, 232, .2); }
.pillars__figure[data-active="emp"] [data-ring="emp"],
.pillars__figure[data-active="ada"] [data-ring="ada"],
.pillars__figure[data-active="esp"] [data-ring="esp"] { stroke: var(--on-dark); fill: rgba(243, 239, 232, .07); }
.pillars__figure[data-active="emp"] [data-label="emp"],
.pillars__figure[data-active="ada"] [data-label="ada"],
.pillars__figure[data-active="esp"] [data-label="esp"] { fill: var(--on-dark); }

.pillar {
  position: relative;
  border-top: 1px solid rgba(243, 239, 232, .16);
  padding: 26px 0 24px 34px;
  transition: border-color .35s ease;
}
.pillar::before {
  content: ""; position: absolute; left: 0; top: 40px;
  width: 18px; height: 1px; background: #c30017;
  transform: scaleX(.45); transform-origin: left;
  transition: transform .35s ease;
}
.pillar h3 { margin: 0; font: 400 28px/1.2 var(--serif); color: var(--on-dark); }
.pillar p { margin: 12px 0 0; max-width: 30em; font: 400 15px/1.65 var(--sans); color: var(--on-dark-2); text-wrap: pretty; }
.pillar.is-active { border-color: rgba(243, 239, 232, .45); }
.pillar.is-active::before { transform: scaleX(1); }
.pillars__note {
  margin: 0; padding: 28px 0 0 34px;
  border-top: 1px solid rgba(243, 239, 232, .16);
  font: 300 22px/1.4 var(--serif);
  color: var(--on-dark-3);
}
.pillars__note em { font-style: italic; color: #fff; }

/* 04 — Equipo (home) */
.team-preview { padding: clamp(96px, 10vw, 144px) 0; }
.team-preview .section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.team-preview .h-section { max-width: 12em; }

/* Tarjeta de abogado */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 48px 32px;
}
.person-grid--lg {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 64px 32px;
}
.person-card {
  display: flex; flex-direction: column;
  color: var(--ink);
  animation: nsFade .35s ease;
}
.person-card:hover { color: var(--red); }
.person-card[hidden] { display: none; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5; width: 100%;
  overflow: hidden;
  background: var(--photo-bg);
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 20%;
  display: block;
  filter: grayscale(1) contrast(1.02);
  transition: filter .4s, transform .6s;
}
.person-card:hover .portrait img { filter: grayscale(0); transform: scale(1.02); }
.portrait--empty {
  background: var(--hatch), var(--photo-bg);
  display: flex; align-items: center; justify-content: center;
}
.portrait__initials { font: 300 72px/1 var(--serif); color: var(--muted-2); }
.person-card__name { margin-top: 22px; font: 400 26px/1.15 var(--serif); }
.person-card .role { margin-top: 8px; }
.person-grid--lg .person-card__name { margin-top: 24px; font-size: 28px; line-height: 1.12; letter-spacing: -.01em; }
.tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font: 500 12px/1 var(--sans);
  color: var(--text-2);
  border: 1px solid var(--line);
  padding: 7px 10px;
}
.person-card .more { margin-top: 22px; }

/* Oficinas */
.offices { padding: clamp(104px, 11vw, 168px) 0; background: var(--graphite); color: var(--on-dark); }
.offices .eyebrow { color: var(--on-dark-2); }
.offices .h-section { color: var(--on-dark); }
.offices__head { margin-bottom: clamp(48px, 5vw, 80px); }
.offices__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 72px 140px;
  align-items: start;
}
.office-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  /* muesca en la esquina inferior derecha */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), calc(100% - 56px) 100%, 0 100%);
  overflow: hidden;
  background: #2f2d2a;
}
.office-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.9) contrast(1.03);
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.office:hover .office-photo img { transform: scale(1.035); }
.office__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px 32px;
  margin-top: 32px;
}
.office__city { grid-column: 1; margin: 0; font: 300 clamp(40px, 3.6vw, 56px)/1 var(--serif); letter-spacing: -.025em; }
.office__addr { grid-column: 1; margin: 0; font: 400 16px/1.6 var(--sans); color: var(--on-dark-2); font-style: normal; }
.office__maps {
  grid-column: 2; grid-row: 1 / span 2; align-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(243, 239, 232, .5);
  padding: 14px 20px;
  font: 500 13px/1 var(--sans); letter-spacing: .04em;
  color: var(--on-dark);
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
@media (max-width: 599.98px) {
  .office__body { grid-template-columns: minmax(0, 1fr); }
  .office__maps { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
}
.office__maps:hover { background: var(--on-dark); border-color: var(--on-dark); color: var(--graphite); }

/* Cierre de la home: invitación a contactar */
.closing { padding: clamp(120px, 13vw, 200px) 0; text-align: center; }
.closing__inner { display: flex; flex-direction: column; align-items: center; }
.closing__eyebrow { justify-content: center; }
.closing__eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--red); flex: none; }
.closing__title {
  margin: 32px 0 0;
  font: 300 clamp(60px, 7.6vw, 124px)/1 var(--serif);
  letter-spacing: -.03em;
  color: var(--ink);
}
.closing__title em { font-style: italic; color: var(--red); }
.closing__text {
  margin: 32px 0 0; max-width: 30em;
  font: 400 17px/1.65 var(--sans);
  color: var(--text-2);
  text-wrap: balance;
}
.closing__cta {
  margin-top: 52px;
  display: inline-flex; align-items: center; gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font: 500 15px/1 var(--sans); letter-spacing: .03em;
  color: var(--ink);
  transition: color .25s, border-color .25s;
}
.closing__arrow { display: inline-block; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.closing__cta:hover { color: var(--red); border-color: var(--red); }
.closing__cta:hover .closing__arrow { transform: translateX(8px); }

/* Formulario (contacto.html) */
.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 32px;
}
.form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field--full { grid-column: 1 / -1; }
.field__label {
  font: 500 12px/1 var(--sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-2);
}
.field__input {
  background: transparent;
  border: 0; border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 10px 0;
  font: 400 18px/1.3 var(--sans);
  color: var(--ink);
  outline: none;
}
.field__input:focus { border-bottom-color: var(--red); box-shadow: 0 1px 0 var(--red); }
select.field__input { cursor: pointer; }
textarea.field__input { line-height: 1.5; resize: vertical; }
.field__error { font: 400 13px/1 var(--sans); color: var(--red); }
.field__error[hidden] { display: none; }


.form__footer {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
  gap: 24px;
}
.consent { display: flex; align-items: flex-start; gap: 12px; max-width: 30em; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.consent__text { font: 400 14px/1.5 var(--sans); color: var(--text-2); }
.consent__text a { text-decoration: underline; }
.consent__text .field__error { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; }
.consent__text .field__error[hidden] { display: none; }
.form__submit { padding: 20px 36px; }

/* ==========================================================================
   ÁREA DE PRÁCTICA
   ========================================================================== */
.page-head { padding: 0; }
.page-head__eyebrow { margin-top: clamp(72px, 9vw, 128px); }
.area-head__row {
  margin-top: clamp(40px, 5vw, 64px);
  display: flex; flex-wrap: wrap;
  gap: 40px 80px;
  justify-content: space-between; align-items: flex-end;
}
.area-head__lead {
  margin: 0; flex: 1 1 480px; max-width: 36em;
  font: 300 clamp(22px, 2vw, 28px)/1.4 var(--serif);
  color: var(--ink);
  text-wrap: pretty;
}
/* Cabecera de las áreas: texto a la izquierda, foto a la derecha que se funde con el fondo negro */
.area-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(440px, 62vh, 640px);
  background: var(--black); color: var(--on-dark);
}
.area-hero__media { position: absolute; top: 0; right: 0; bottom: 0; width: 54%; }
.area-hero__media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.82) saturate(.9) contrast(1.04);
}
.area-hero__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--black) 0%, rgba(11, 10, 9, .72) 22%, rgba(11, 10, 9, 0) 62%);
}
.area-hero__inner { position: relative; z-index: 1; width: 100%; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.area-hero .page-head__eyebrow { margin-top: 0; color: var(--on-dark-2); }
.area-hero .h-page { color: var(--on-dark); font-size: clamp(44px, 6.2vw, 96px); max-width: 8.5em; }
.area-hero .area-head__row { margin-top: clamp(28px, 3.5vw, 48px); }
.area-hero .area-head__lead { flex: 0 1 auto; max-width: 22em; color: var(--on-dark-3); }
.page-head--photo .area-tabs { margin-top: 0; border-top: 0; }
@media (max-width: 879.98px) {
  .area-hero { flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 0; }
  .area-hero__media { position: relative; width: 100%; height: 42svh; min-height: 240px; max-height: 420px; }
  .area-hero__media::after { background: linear-gradient(180deg, rgba(11, 10, 9, 0) 45%, var(--black) 100%); }
  .area-hero__inner { padding-top: 8px; }
}

.area-tabs {
  margin-top: clamp(56px, 6vw, 88px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.area-tabs__inner { display: flex; gap: 36px; white-space: nowrap; }
.area-tabs__item {
  padding: 22px 0;
  font: 500 14px/1 var(--sans);
  color: var(--muted);
}
.area-tabs__item:hover { color: var(--ink); }
.area-tabs__item[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }

.area-body { padding: clamp(72px, 8vw, 120px) 0; }
.area-body__inner {
  display: flex; flex-wrap: wrap;
  gap: 64px clamp(48px, 6vw, 112px);
  align-items: flex-start;
}
.services { flex: 1 1 580px; min-width: 0; }
.services .eyebrow { margin-bottom: 28px; }
.services__list { border-top: 1px solid var(--ink); list-style: none; margin: 0; padding: 0; }
.service {
  padding: 36px 0 40px;
  border-bottom: 1px solid var(--line);
}
.service__title { margin: 0; font: 400 clamp(26px, 2.4vw, 34px)/1.15 var(--serif); letter-spacing: -.01em; }
.service__text {
  margin: 14px 0 0; max-width: 38em;
  font: 400 16px/1.7 var(--sans);
  color: var(--text-2);
  text-wrap: pretty;
}

.consult-card {
  flex: 0 1 380px;
  position: sticky; top: 116px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 40px 36px;
}
.consult-card__title { margin: 18px 0 0; font: 400 28px/1.2 var(--serif); letter-spacing: -.01em; }
.consult-card__text { margin: 14px 0 0; font: 400 15px/1.6 var(--sans); color: var(--text-2); }
.consult-card .btn { margin-top: 28px; padding: 18px; }
.consult-card__offices {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  font: 400 14px/1.5 var(--sans);
  color: var(--text-2);
}
.consult-card__offices strong { font-weight: 600; color: var(--ink); }
@media (max-width: 1080px) {
  .consult-card { position: static; flex-basis: 100%; }
}

.method { background: var(--sand); padding: clamp(80px, 9vw, 128px) 0; }
.method__title {
  margin: 20px 0 0;
  font: 300 clamp(34px, 4vw, 56px)/1.05 var(--serif);
  letter-spacing: -.02em;
  max-width: 14em;
  text-wrap: balance;
}
.method { --timeline-bg: var(--sand); }
.method__grid { margin-top: 64px; }

@media (max-width: 799.98px) {
    }

/* ==========================================================================
   EQUIPO
   ========================================================================== */
.team-head__row {
  margin-top: clamp(56px, 7vw, 96px);
  display: flex; flex-wrap: wrap;
  gap: 40px 80px;
  justify-content: space-between; align-items: flex-end;
}
.team-head__text {
  margin: 0; max-width: 26em;
  font: 400 17px/1.65 var(--sans);
  color: var(--text-2);
  text-wrap: pretty;
}
.team-list { padding: clamp(72px, 8vw, 112px) 0 clamp(96px, 10vw, 144px); }

.cta-band { background: var(--sand); padding: clamp(80px, 9vw, 128px) 0; }
.cta-band__inner {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: flex-end;
  gap: 40px;
}
.cta-band .h-section { margin: 0; max-width: 12em; }
.cta-band .btn { padding: 20px 32px; }

/* Panel de perfil */
.profile {
  position: fixed; inset: 0; z-index: 100;
  display: flex; justify-content: flex-end;
}
.profile[hidden] { display: none; }
.profile__backdrop {
  position: absolute; inset: 0;
  background: rgba(25, 23, 21, .55);
  animation: nsFade .25s ease;
}
.profile__panel {
  position: relative;
  width: min(680px, 100%); height: 100%;
  overflow-y: auto;
  background: var(--paper);
  animation: nsSlide .35s cubic-bezier(.2, .7, .2, 1);
}
.profile__close {
  position: sticky; top: 0; float: right; z-index: 2;
  margin: 20px 20px 0 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 20px;
  color: var(--ink);
}
.profile__close:hover { background: var(--ink); color: var(--paper); }
.profile__body { padding: clamp(28px, 5vw, 56px); }
.profile__top { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; }
.profile__photo {
  flex: none; width: 180px; aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--photo-bg);
  display: flex; align-items: center; justify-content: center;
}
.profile__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.profile__photo span { font: 300 56px/1 var(--serif); color: var(--muted-2); }
.profile__id { flex: 1 1 240px; }
.profile__role {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--red);
}
.profile__name {
  margin: 12px 0 0;
  font: 300 clamp(36px, 4vw, 52px)/1.02 var(--serif);
  letter-spacing: -.02em;
}
.profile .tags { margin-top: 32px; }
.profile .tag { border-color: var(--line-2); padding: 8px 11px; }
.profile__bio {
  margin-top: 40px;
  border-top: 1px solid var(--ink);
  padding-top: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.profile__bio p { margin: 0; font: 400 16px/1.75 var(--sans); color: var(--text-2); text-wrap: pretty; }
.profile__edu { margin-top: 40px; }
.profile__edu ul { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.profile__edu li { padding: 16px 0; border-bottom: 1px solid var(--line); font: 400 19px/1.35 var(--serif); }
.profile__lang { margin-top: 32px; display: flex; gap: 16px; align-items: baseline; }
.profile__lang span:last-child { font: 400 16px/1.4 var(--sans); }
.profile .btn { margin-top: 48px; padding: 20px; }

/* ==========================================================================
   EL DESPACHO
   ========================================================================== */
.firm { padding: clamp(96px, 11vw, 160px) 0; border-top: 1px solid var(--line); margin-top: clamp(56px, 6vw, 88px); }
.firm__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px clamp(56px, 8vw, 140px);
  align-items: start;
}
.firm__statement {
  margin: 0;
  font: 300 clamp(30px, 3vw, 44px)/1.22 var(--serif);
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: pretty;
}
.firm__statement em { font-style: italic; }
.firm__cols { display: grid; gap: 22px; font: 400 16px/1.75 var(--sans); color: var(--text-2); }
.firm__cols p { margin: 0; text-wrap: pretty; }
.firm__steps { margin-top: clamp(88px, 9vw, 136px); }

/* ==========================================================================
   OFICINAS
   ========================================================================== */
.office-detail {
  margin-top: clamp(56px, 6vw, 88px);
  padding: clamp(104px, 11vw, 168px) 0;
  background: var(--graphite); color: var(--on-dark);
}
.office-detail__inner { display: grid; gap: clamp(112px, 12vw, 180px); }
.office-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px clamp(64px, 9vw, 140px);
  align-items: stretch;
}
.office-block__info { display: flex; flex-direction: column; justify-content: space-between; gap: 56px; }
.office-block__foot { padding-top: 32px; border-top: 1px solid rgba(243, 239, 232, .18); }
.office-block__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #2f2d2a;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), calc(100% - 56px) 100%, 0 100%);
}
.office-block__video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: brightness(.85) saturate(.9);
}
.video-toggle {
  position: absolute; right: 18px; top: 18px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(243, 239, 232, .45);
  background: rgba(11, 10, 9, .45);
  color: var(--on-dark);
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.video-toggle:hover { background: rgba(11, 10, 9, .75); border-color: var(--on-dark); }
.office-block__coord {
  display: block;
  font: 500 11px/1 var(--sans); letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
  color: var(--on-dark-2);
}
.office-block__city {
  margin: 18px 0 0;
  font: 300 clamp(64px, 7vw, 116px)/.95 var(--serif);
  letter-spacing: -.035em;
  color: var(--on-dark);
}
.office-block__addr {
  margin: 0 0 32px;
  font: 400 clamp(18px, 1.6vw, 22px)/1.55 var(--sans); font-style: normal;
  color: var(--on-dark-3);
}
.office-block .office__maps { grid-column: auto; grid-row: auto; display: inline-flex; }
/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-page {
  margin-top: clamp(56px, 6vw, 88px);
  padding: clamp(80px, 9vw, 128px) 0 clamp(104px, 11vw, 160px);
  border-top: 1px solid var(--line);
}
.contact-page__inner {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 64px clamp(64px, 9vw, 150px);
  align-items: start;
}
.contact-aside { position: sticky; top: calc(var(--header-h) + 40px); }
.contact-aside__office { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.contact-aside__office:first-of-type { margin-top: 24px; }
.contact-aside__city { margin: 0; font: 300 36px/1 var(--serif); letter-spacing: -.02em; }
.contact-aside address { margin-top: 14px; font: 400 15px/1.6 var(--sans); font-style: normal; color: var(--text-2); }
.contact-aside__map { display: inline-block; margin-top: 14px; font: 500 13px/1 var(--sans); letter-spacing: .02em; }
.contact-form { min-width: 0; }
.contact-form .form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; }
/* Mensajes de validación de FvForms (jQuery Form Validator) */
.contact-form .help-block,
.contact-form .form-error { display: block; margin-top: 2px; font: 400 13px/1.4 var(--sans); color: var(--red); }
.contact-form .has-error .field__input,
.contact-form .field__input.error { border-bottom-color: var(--red); }
.contact-form .has-error .consent__text { color: var(--red); }
.form-status {
  margin-top: 32px;
  padding: 24px 28px;
  border-left: 2px solid var(--ink);
  background: var(--white);
  font: 400 16px/1.6 var(--sans);
  color: var(--text-2);
}
.form-status__title { display: block; margin-bottom: 4px; font: 400 26px/1.2 var(--serif); color: var(--ink); }
.form-status--ok { border-left-color: var(--red); }
.form-status--error { border-left-color: var(--red); background: #fbf1f1; }

@media (max-width: 879.98px) {
  .firm__intro, .office-block, .contact-page__inner { grid-template-columns: minmax(0, 1fr); }
  .office-block__info { gap: 36px; }
  .contact-aside { position: static; order: 2; }
  .contact-form .form { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PÁGINAS LEGALES
   ========================================================================== */
.legal {
  margin-top: clamp(56px, 6vw, 88px);
  padding: clamp(72px, 8vw, 112px) 0 clamp(104px, 11vw, 160px);
  border-top: 1px solid var(--line);
}
.legal__inner {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 56px clamp(56px, 8vw, 140px);
  align-items: start;
}
.legal__toc { position: sticky; top: calc(var(--header-h) + 40px); }
.legal__toc ul { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.legal__toc li { border-bottom: 1px solid var(--line); }
.legal__toc a { display: block; padding: 12px 0; font: 400 14px/1.4 var(--sans); color: var(--text-2); }
.legal__toc a:hover { color: var(--red); }
.legal__body { max-width: 44em; min-width: 0; }
/* Las tablas del texto editable hacen scroll horizontal dentro de su caja, nunca en la página */
.legal__scroll { overflow-x: auto; margin-top: 24px; -webkit-overflow-scrolling: touch; }
.legal__scroll table { margin-top: 0; min-width: 520px; }
.legal__body h2 {
  margin: 64px 0 0;
  font: 300 clamp(28px, 2.4vw, 36px)/1.15 var(--serif);
  letter-spacing: -.015em;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 32px);
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body p, .legal__body li { font: 400 16px/1.75 var(--sans); color: var(--text-2); text-wrap: pretty; }
.legal__body p { margin: 18px 0 0; }
.legal__body ul { margin: 18px 0 0; padding-left: 20px; }
.legal__body li + li { margin-top: 8px; }
.legal__body li::marker { color: var(--red); }
.legal__body strong { font-weight: 600; color: var(--ink); }
.legal__body a { text-decoration: underline; text-underline-offset: 3px; }
/* Tablas del editor: la de datos (clase legal__data) y cualquier otra, p. ej. el listado de cookies */
.legal__body .tableWrapper { overflow-x: auto; margin-top: 24px; }
.legal__body table { width: 100%; margin-top: 24px; border-collapse: collapse; font: 400 15px/1.55 var(--sans); color: var(--text-2); }
.legal__body .tableWrapper table { margin-top: 0; }
.legal__body th, .legal__body td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal__body th {
  font: 500 11px/1.6 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.legal__body td p, .legal__body th p { margin: 0; font: inherit; color: inherit; }
.legal__body tr:first-child > th, .legal__body tr:first-child > td { border-top: 1px solid var(--line); }
.legal__body table:not(.legal__data) tr:first-child > th { border-top: 0; border-bottom-color: var(--ink); }
.legal__body .legal__data th { width: 180px; }
.legal__body .legal__data td { font-size: 16px; color: var(--ink); }
.legal__body code { font: 400 14px var(--mono); color: var(--ink); }
.legal__body h3 { margin: 36px 0 0; font: 400 22px/1.25 var(--serif); color: var(--ink); }
.legal__pending {
  background: none; color: var(--red);
  border-bottom: 1px dashed var(--red);
  font-style: italic;
}
.legal__inner--single { grid-template-columns: minmax(0, 1fr); }
/* Botón «Configurar cookies» al final de la política de cookies */
.legal__cookie-settings { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
@media (max-width: 879.98px) {
  .legal__inner { grid-template-columns: minmax(0, 1fr); }
  .legal__toc { position: static; }
}

/* ==========================================================================
   PÁGINA 404
   ========================================================================== */
.notfound { min-height: calc(100vh - var(--header-h) - 120px); padding-bottom: clamp(96px, 11vw, 160px); }
.notfound__actions { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Pie
   ========================================================================== */
.site-footer { background: var(--dark); color: var(--on-dark-2); padding: clamp(72px, 8vw, 112px) 0 40px; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 48px 40px;
}
.site-footer__logo { height: 48px; width: auto; display: block; }
.site-footer__claim { margin: 28px 0 0; max-width: 18em; font: 300 20px/1.4 var(--serif); color: var(--on-dark); }
.site-footer .label { color: var(--on-dark-4); }
.site-footer__links { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.site-footer__links a { font: 400 15px/1.3 var(--sans); color: var(--on-dark-3); }
.site-footer__links a:hover { color: #fff; }
.site-footer__offices {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 20px;
  font: 400 15px/1.5 var(--sans);
  color: var(--on-dark-3);
}
.site-footer__offices address { font-style: normal; }
.site-footer__offices strong { font-weight: 400; color: var(--on-dark); }
/* Banner Kit Digital (obligatorio en webs financiadas por el programa) */
.site-footer__funding {
  margin-top: clamp(64px, 7vw, 96px);
  padding-top: 36px;
  border-top: 1px solid rgba(243, 239, 232, .14);
}
.site-footer__funding img { display: block; width: 100%; max-width: 680px; height: auto; }
.site-footer__bottom {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(243, 239, 232, .14);
  display: flex; flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font: 400 13px/1.4 var(--sans);
  color: var(--on-dark-5);
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer__legal a { color: var(--on-dark-5); }
.site-footer__legal a:hover { color: #fff; }

/* ==========================================================================
   Volver arriba (todas las páginas)
   ========================================================================== */
.to-top {
  position: fixed; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); z-index: 60;
  width: 52px; height: 52px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 30px -12px rgba(11, 10, 9, .45);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s, background .25s, color .25s;
}
.to-top.is-visible {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .35s ease, transform .35s ease, visibility 0s, background .25s, color .25s;
}
.to-top__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top__track, .to-top__progress { fill: none; stroke-width: 1.5; }
.to-top__track { stroke: rgba(28, 26, 24, .12); }
.to-top__progress { stroke: var(--red); stroke-dasharray: 150.8; stroke-dashoffset: 150.8; }
.to-top__arrow { position: relative; font: 400 18px/1 var(--sans); transition: transform .3s ease; }
.to-top:hover { background: var(--red); color: #fff; }
.to-top:hover .to-top__progress { stroke: #fff; }
.to-top:hover .to-top__arrow { transform: translateY(-3px); }

