/* =========================================================
   Estudio Jurídico García & Baigorria
   Arquetipo: editorial de periódico — papel, tinta y bordó
   ========================================================= */

:root {
  --bg:       #f7f3ea;   /* papel */
  --bg-2:     #efe8d9;
  --paper:    #fbf8f1;
  --ink:      #1a1611;   /* tinta cálida */
  --ink-soft: #3b342b;
  --ink-mute: #6f665a;
  --accent:   #6e1a26;   /* bordó */
  --accent-2: #8e2a37;
  --gold:     #a8834a;
  --line:     #1a1611;
  --line-soft: rgba(26, 22, 17, 0.16);
  --wa:       #1f8f4e;

  --f-display: "Playfair Display", "Bodoni 72", Georgia, serif;
  --f-body:    "Source Serif 4", Georgia, serif;
  --f-sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1180px;
  --nav-h: 60px;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.075rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* grano de papel muy sutil */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; }
em { font-style: italic; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; margin: 0; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.kicker {
  font-family: var(--f-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
}

.hairline { border-top: 1px solid var(--line); }
.hairline.double { border-top: 3px double var(--line); height: 0; }

/* ---------- Barra superior ---------- */
.topbar {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--f-sans);
  font-size: .78rem;
}
.topbar-inner {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-block: .5rem;
}
.topbar-links { display: flex; gap: 1.4rem; }
.topbar a { text-decoration: none; opacity: .85; transition: opacity .2s; }
.topbar a:hover { opacity: 1; }

/* ---------- Cabecera tipo periódico ---------- */
.masthead { padding-top: 1.6rem; }
.masthead-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 1.2rem 1.1rem;
}
.masthead-meta {
  margin: 0;
  font-family: var(--f-sans);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.masthead-meta.right { text-align: right; }
.brand { text-decoration: none; text-align: center; display: block; }
.brand-kicker {
  display: block;
  font-family: var(--f-sans);
  font-size: .72rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .35rem;
}
.brand-name {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -.01em;
}
.brand-name em, .nav-mark em, .footer-brand em { color: var(--accent); font-weight: 500; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease-out);
}
@supports (backdrop-filter: blur(8px)) {
  .nav { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.nav.is-scrolled { box-shadow: 0 8px 24px -18px rgba(26,22,17,.5); }
.nav-inner {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--nav-h);
  position: relative;
}
.nav-mark {
  position: absolute; left: 0;
  font-family: var(--f-display); font-weight: 700; font-size: 1.35rem;
  text-decoration: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s var(--ease-out);
}
.nav.is-scrolled .nav-mark { opacity: 1; transform: none; }
.nav-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: clamp(.9rem, 2.2vw, 2rem); align-items: center;
  font-family: var(--f-sans); font-size: .82rem; font-weight: 500;
  letter-spacing: .04em;
}
.nav-links a {
  text-decoration: none;
  position: relative;
  padding-block: .3rem;
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--accent); }
.nav-cta {
  background: var(--accent); color: var(--paper) !important;
  padding: .5rem .95rem !important;
  transition: background .2s;
}
.nav-cta:hover { background: var(--ink); }
.nav-toggle { display: none; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-family: var(--f-sans); font-size: .9rem; font-weight: 600;
  letter-spacing: .02em;
  padding: .9rem 1.4rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s var(--ease-out), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -14px rgba(26,22,17,.6); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.link {
  font-family: var(--f-sans); font-size: .88rem; font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease-out);
}
.link:hover { background-size: 100% 1px; }

/* ---------- Portada ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem) 2.5rem;
}
.hero-title {
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  text-wrap: balance;
  max-width: 16ch;
  margin-bottom: 1.4rem;
}
.hero-title em, .section-head h2 em { color: var(--accent); font-weight: 500; }
.deck {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 44ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-figure { margin: 0; }
.hero-img {
  overflow: hidden;
  aspect-ratio: 4 / 3.2;
  border: 1px solid var(--line);
  padding: 8px;
  background: var(--paper);
}
.hero-img img {
  width: 100%; height: 108%;
  object-fit: cover;
  filter: sepia(.12) saturate(.95) contrast(1.03);
  will-change: transform;
}
figcaption {
  font-family: var(--f-body);
  font-style: italic;
  font-size: .85rem;
  color: var(--ink-mute);
  margin-top: .6rem;
}

/* cifras */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.fact {
  padding: 1.4rem 1.2rem;
  display: flex; flex-direction: column; gap: .3rem;
}
.fact + .fact { border-left: 1px solid var(--line-soft); }
.fact-num {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
}
.fact-amp { color: var(--accent); margin-inline: .15em; font-weight: 500; }
.fact-label {
  font-family: var(--f-sans); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- Secciones ---------- */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--line);
}
.facts + .section { border-top: 0; }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.section-sub { color: var(--ink-soft); margin-top: 1rem; max-width: 56ch; }

/* El Estudio: columnas de diario */
.columns {
  column-count: 2;
  column-gap: 3rem;
  column-rule: 1px solid var(--line-soft);
  text-align: justify;
  hyphens: auto;
}
.columns p { break-inside: avoid-column; }
.dropcap::first-letter {
  float: left;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 4.6em;
  line-height: .82;
  padding: .06em .12em 0 0;
  color: var(--accent);
}
.pullquote {
  margin: 3rem auto 0;
  max-width: 820px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 1rem;
  position: relative;
}
.pullquote::before {
  content: "“";
  position: absolute; top: -.62em; left: 50%; transform: translateX(-50%);
  font-family: var(--f-display); font-size: 4.5rem; line-height: 1;
  color: var(--accent);
  background: var(--bg);
  padding-inline: .2em;
}
.pullquote p {
  margin: 0;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.3;
}

/* Áreas */
.fueros {
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.fueros span {
  flex: 1 1 0;
  min-width: 140px;
  text-align: center;
  padding: 1rem .8rem;
  font-family: var(--f-display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-style: italic;
}
.fueros span + span { border-left: 1px solid var(--line-soft); }

.areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.area {
  padding: 1.8rem 1.6rem 1.6rem;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  transition: background .3s var(--ease-out);
}
.area::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform .4s var(--ease-out);
}
.area:hover { background: var(--paper); }
.area:hover::before { transform: scaleY(1); }
.area-num {
  font-family: var(--f-sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; color: var(--accent);
}
.area h3 { font-size: 1.45rem; margin: .6rem 0 .6rem; }
.area p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.fees {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
  margin-top: 2.5rem;
  padding: 1.8rem 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 6px 6px 0 var(--bg-2);
}
.fees p:last-child { margin: 0; }

/* Equipo */
.gen + .gen { margin-top: 3rem; }
.gen-label {
  font-family: var(--f-display); font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: .6rem;
  margin-bottom: 1.6rem;
}
.people { display: grid; gap: 1.6rem; }
.people-2 { grid-template-columns: repeat(2, 1fr); max-width: 780px; }
.people-3 { grid-template-columns: repeat(3, 1fr); }
.person {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1.1rem;
  align-items: center;
}
.monogram {
  grid-row: span 2;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--f-display); font-size: 1.3rem; font-style: italic;
  color: var(--accent);
  transition: background .3s, color .3s;
}
.person:hover .monogram { background: var(--accent); color: var(--paper); }
.person h3 { font-size: 1.3rem; align-self: end; }
.btn-wa {
  justify-self: start; align-self: start;
  margin-top: .45rem;
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--wa); color: #fff;
  font-family: var(--f-sans); font-size: .82rem; font-weight: 600;
  padding: .45rem .9rem .45rem .75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s, transform .2s var(--ease-out);
}
.btn-wa::before {
  content: ""; width: 16px; height: 16px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3C9.4 3 4 8.4 4 15c0 2.1.6 4.2 1.6 6L4 29l8.3-2.2c1.2.4 2.5.6 3.8.6C22.7 27.4 28 22.1 28 15.5 28 8.9 22.7 3 16 3Zm5.5 14.8c-.3-.1-1.8-.9-2-1-.3-.1-.5-.1-.7.2-.2.3-.8 1-.9 1.2-.2.2-.4.2-.7.1-.3-.1-1.3-.5-2.4-1.5-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6l.5-.5c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5l-.9-2.2c-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4-.3.3-1 1-1 2.5s1.1 2.9 1.2 3.1c.1.2 2.1 3.2 5.1 4.5.7.3 1.3.5 1.7.6.7.2 1.4.2 1.9.1.6-.1 1.8-.7 2-1.4.2-.7.2-1.3.2-1.4-.1-.2-.3-.2-.6-.4Z'/%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 32 32'%3E%3Cpath d='M16 3C9.4 3 4 8.4 4 15c0 2.1.6 4.2 1.6 6L4 29l8.3-2.2c1.2.4 2.5.6 3.8.6C22.7 27.4 28 22.1 28 15.5 28 8.9 22.7 3 16 3Zm5.5 14.8c-.3-.1-1.8-.9-2-1-.3-.1-.5-.1-.7.2-.2.3-.8 1-.9 1.2-.2.2-.4.2-.7.1-.3-.1-1.3-.5-2.4-1.5-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6l.5-.5c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5l-.9-2.2c-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4-.3.3-1 1-1 2.5s1.1 2.9 1.2 3.1c.1.2 2.1 3.2 5.1 4.5.7.3 1.3.5 1.7.6.7.2 1.4.2 1.9.1.6-.1 1.8-.7 2-1.4.2-.7.2-1.3.2-1.4-.1-.2-.3-.2-.6-.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-wa:hover { background: #187a41; transform: translateY(-2px); }

.fueros-label {
  font-family: var(--f-sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .7rem;
}

.person-links {
  margin: .25rem 0 0; align-self: start;
  display: flex; flex-wrap: wrap; gap: .3rem 1rem;
  font-family: var(--f-sans); font-size: .85rem;
}
.person-links a { text-decoration: none; color: var(--ink-mute); transition: color .2s; }
.person-links a:hover { color: var(--accent); }
.person-links a + a { color: var(--wa); font-weight: 600; }

/* Sedes */
.sede {
  display: grid;
  grid-template-columns: 1.05fr .9fr 1.25fr;
  gap: 1.8rem;
  align-items: stretch;
  padding-block: 2rem;
  border-top: 1px solid var(--line-soft);
}
.sede:first-of-type { border-top: 1px solid var(--line); }
.sede-img { margin: 0; display: flex; flex-direction: column; }
.sede-img img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  filter: sepia(.12) saturate(.95);
  transition: filter .5s var(--ease-out), transform .6s var(--ease-out);
}
.sede-img { overflow: hidden; }
.sede:hover .sede-img img { filter: none; transform: scale(1.03); }
.sede-body h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: .9rem; }
.addr { font-size: 1.05rem; color: var(--ink-soft); }
.sede-map {
  min-height: 240px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.sede-map iframe {
  width: 100%; height: 100%; min-height: 240px;
  border: 0; display: block;
  filter: grayscale(.35) sepia(.1);
}

/* Noticias */
.news {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  border-top: 1px solid var(--line);
}
.news-item {
  padding: 1.6rem 1.6rem 1.4rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.news-item:not(.news-lead) { padding-left: 1.6rem; border-left: 1px solid var(--line-soft); }
.news-lead { grid-row: span 3; padding-right: 2rem; border-bottom: 0; }
.news-item:not(.news-lead):nth-child(2) { grid-column: 2 / 4; }
.news-meta {
  font-family: var(--f-sans); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .7rem;
}
.news-meta span { color: var(--accent); font-weight: 600; }
.news-item h3 { font-size: 1.35rem; margin-bottom: .7rem; line-height: 1.2; }
.news-lead h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.1; }
.news-lead p:last-child::first-letter {
  float: left; font-family: var(--f-display); font-weight: 700;
  font-size: 3.4em; line-height: .85; padding: .05em .1em 0 0; color: var(--accent);
}
.news-item p:last-child { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.news-lead p:last-child { font-size: 1.08rem; }
.news-more { margin-top: 1.6rem; }

/* Consulta online */
.form-frame {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 8px;
  max-width: 820px;
}
.form-frame iframe {
  width: 100%; height: 1100px; border: 0; display: block; background: #fff;
}
.form-alt { margin-top: 1rem; font-size: .95rem; color: var(--ink-mute); }

/* Referencias */
.review {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2rem;
  max-width: 820px;
  padding: 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 6px 6px 0 var(--bg-2);
}
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field legend {
  font-family: var(--f-sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: .7rem .8rem;
  border-radius: 0;
  transition: background .2s, border-color .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; border-bottom-color: var(--accent);
  box-shadow: 0 2px 0 var(--accent);
}
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--accent); background: #f6e7e7; }

.stars { border: 0; padding: 0; margin: 0; }
.stars legend { padding: 0; margin-bottom: .4rem; }
.stars-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label {
  font-size: 2rem; line-height: 1; cursor: pointer;
  color: var(--line-soft);
  letter-spacing: 0; text-transform: none;
  transition: color .15s, transform .15s var(--ease-out);
}
.stars input:checked ~ label,
.stars-row label:hover,
.stars-row label:hover ~ label { color: var(--gold); }
.stars label:hover { transform: scale(1.15); }
.stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.review-msg { margin: 0; font-size: .95rem; font-style: italic; color: var(--accent); flex-basis: 100%; min-height: 1.4em; }

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1fr;
  gap: 2.5rem;
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dotted var(--line-soft);
}
.contact-list span { color: var(--ink-mute); }
.contact-list a { text-decoration: none; font-family: var(--f-sans); font-weight: 500; font-size: .95rem; }
.contact-list a:hover { color: var(--accent); }
.mail {
  font-family: var(--f-display); font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  text-decoration: none;
  word-break: break-all;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease-out), color .2s;
}
.mail:hover { background-size: 100% 1px; color: var(--accent); }
.kicker.spaced { margin-top: 1.8rem; }
.mail-alt { font-family: var(--f-sans); font-size: .82rem; color: var(--ink-mute); margin-top: -.4rem; }
.mail-alt a { color: inherit; word-break: break-all; }
.mail-alt a:hover { color: var(--accent); }

/* Pie */
.footer { padding: 2rem 0 6rem; font-family: var(--f-sans); font-size: .82rem; color: var(--ink-mute); }
.footer-row {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .6rem 2rem;
  padding-block: 1.2rem;
}
.footer-row p { margin: 0; }
.footer-brand { font-family: var(--f-display); font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.credits, .copy { font-size: .75rem; line-height: 1.55; max-width: 90ch; }
.credits a { color: inherit; }

/* ---------- WhatsApp flotante ---------- */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  display: flex; flex-direction: column; align-items: flex-end; gap: .7rem;
}
.wa-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--wa); color: #fff;
  text-decoration: none;
  font-family: var(--f-sans); font-weight: 600; font-size: .9rem;
  padding: .75rem 1.1rem .75rem .85rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.45);
  transition: transform .25s var(--ease-out), background .2s;
}
.wa-btn:hover { transform: translateY(-3px) scale(1.03); background: #187a41; }
.wa-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid var(--wa);
  animation: waPulse 3.2s var(--ease-out) infinite;
  pointer-events: none;
}
.wa-btn { position: relative; }
@keyframes waPulse {
  0% { transform: scale(1); opacity: .6; }
  70%, 100% { transform: scale(1.35); opacity: 0; }
}
.wa-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.45);
  min-width: 250px;
  padding: .4rem 0;
  font-family: var(--f-sans);
  transform-origin: bottom right;
  animation: waIn .25s var(--ease-out);
}
.wa-panel[hidden] { display: none; }
@keyframes waIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.wa-title {
  margin: 0; padding: .6rem 1rem .5rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line-soft);
}
.wa-panel a {
  display: block; padding: .65rem 1rem;
  text-decoration: none; font-size: .92rem;
  transition: background .15s, color .15s;
}
.wa-panel a:hover { background: var(--bg); color: var(--wa); }

/* ---------- Revelado al hacer scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wa-btn::after { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sede { grid-template-columns: 1fr 1fr; }
  .sede-map { grid-column: 1 / -1; }
  .people-3 { grid-template-columns: repeat(2, 1fr); }
  .news { grid-template-columns: 1fr 1fr; }
  .news-lead { grid-column: 1 / -1; grid-row: auto; padding-right: 0; border-bottom: 1px solid var(--line-soft); }
  .news-item:not(.news-lead) { padding-left: 0; border-left: 0; padding-right: 1.4rem; }
  .news-item:not(.news-lead):nth-child(2) { grid-column: 1 / -1; }
  .news-item:not(.news-lead):nth-child(4) { padding-left: 1.4rem; border-left: 1px solid var(--line-soft); padding-right: 0; }
}

@media (max-width: 860px) {
  .topbar-inner > span:first-child { display: none; }
  .topbar-inner { justify-content: center; }
  .masthead-row { grid-template-columns: 1fr; text-align: center; gap: .6rem; }
  .masthead-meta, .masthead-meta.right { text-align: center; }
  .masthead-meta:first-child { order: 2; }
  .masthead-meta.right { order: 3; }

  .nav-inner { justify-content: space-between; }
  .nav-mark { position: static; opacity: 1; transform: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 6px;
    background: none; border: 0; padding: 12px 4px; cursor: pointer;
  }
  .nav-toggle span:not(.sr) { width: 26px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-out); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }
  .nav-links {
    position: absolute; top: 100%; left: -16px; right: -16px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
    max-height: 0; overflow: hidden;
    transition: max-height .4s var(--ease-out);
  }
  .nav-links.is-open { max-height: 520px; }
  .nav-links li { border-top: 1px solid var(--line-soft); }
  .nav-links a { display: block; padding: .95rem 16px; }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-cta { margin: .6rem 16px 1rem; text-align: center; }

  .hero { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .hero-title { max-width: 18ch; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line-soft); }

  .columns { column-count: 1; text-align: left; }
  .areas { grid-template-columns: 1fr 1fr; }
  .fees { grid-template-columns: 1fr; gap: 1.2rem; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 1.02rem; }
  .areas { grid-template-columns: 1fr; }
  .fueros span { flex-basis: 50%; }
  .fueros span:nth-child(3) { border-left: 0; }
  .fueros span:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .people-2, .people-3 { grid-template-columns: 1fr; }
  .sede { grid-template-columns: 1fr; gap: 1.2rem; }
  .news { grid-template-columns: 1fr; }
  .news-item:not(.news-lead), .news-item:not(.news-lead):nth-child(4) { padding: 1.4rem 0; border-left: 0; }
  .review { grid-template-columns: 1fr; padding: 1.4rem; }
  .review-actions .btn { flex: 1 1 100%; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-frame iframe { height: 1250px; }
  .wa-label { display: none; }
  .wa-btn { padding: .8rem; }
  .fees { padding: 1.4rem; }
}

/* barra superior: el correo largo no entra en pantallas chicas */
@media (max-width: 860px) {
  .topbar-links { flex-wrap: wrap; justify-content: center; gap: .2rem 1.2rem; }
}
@media (max-width: 600px) {
  .topbar-links a[href^="mailto"] { display: none; }
}
