/* =========================================================
   Pfeffer & Asociados — Estilos
   Lenguaje visual: blanco limpio, tipografía Geist grande y
   apretada, titulares en dos tonos, fotografía chilena a
   sangre, tarjetas redondeadas y botones píldora.
   ========================================================= */

:root {
  /* Marca: azul marino profundo y sobrio */
  --brand:      #0C2340;
  --brand-2:    #17375F;
  --brand-soft: #E9EEF5;
  --night:      #0A1520;

  /* Neutros */
  --white:  #FFFFFF;
  --paper:  #F5F6F7;
  --ink:    #101418;
  --ink-2:  #2B333B;
  --muted:  #5F6870;
  --muted-2:#9AA1A8;
  --line:   #E4E6E9;
  --line-2: #D3D8DD;

  --on-dark:       #FFFFFF;
  --on-dark-muted: rgba(255, 255, 255, 0.62);
  --on-dark-line:  rgba(255, 255, 255, 0.16);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.05), 0 2px 8px rgba(16, 20, 24, 0.04);
  --shadow-md: 0 10px 30px rgba(16, 20, 24, 0.08);
  --shadow-lg: 0 30px 80px rgba(10, 21, 32, 0.18);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 84px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.nav-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 500; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }
.ico { width: 16px; height: 16px; fill: currentColor; flex: none; }
.muted { color: var(--muted-2); font-weight: 400; }

/* ---------- Tipografía ---------- */
.display {
  font-size: clamp(2.05rem, 4.4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.display .mute { color: var(--muted-2); }
.display--light { color: var(--on-dark); }
.display--light .mute { color: rgba(255, 255, 255, 0.5); }
.lead-text { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink); letter-spacing: -0.01em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: .94rem; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--brand, .btn--gold { background: var(--brand); color: #fff; }
.btn--brand:hover, .btn--gold:hover { background: var(--brand-2); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #EEF1F4; }
.btn--glass { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.2); }
.btn--outline { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--ink); }

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(234, 241, 249, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid #D8E2EE;
  transition: box-shadow .25s var(--ease);
}
.header.is-scrolled { box-shadow: 0 1px 0 #D8E2EE, 0 6px 20px rgba(12, 35, 64, 0.06); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand__logo { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; flex: 1; justify-content: space-between; padding-left: 36px; }
.nav__list { display: flex; gap: 4px; margin: 0 auto; }
.nav__link { display: inline-block; padding: 8px 12px; border-radius: 999px; font-size: .9rem; color: var(--muted); transition: color .2s var(--ease), background-color .2s var(--ease); }
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); background: var(--paper); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__phone, .nav__cta { height: 40px; padding: 0 18px; font-size: .88rem; }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 999px; position: relative; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 21.5px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.nav-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(10, 21, 32, 0.35); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff; background: var(--night);
  min-height: min(880px, calc(100svh - var(--header-h)));
  display: flex; align-items: flex-end;
  padding: clamp(96px, 14vh, 150px) 0 clamp(56px, 8vh, 88px);
}
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__img, .hero__reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero__reel video { opacity: 0; transition: opacity 1s var(--ease); }
.hero__reel video.is-active { opacity: 1; }

/* Selector de clips (Santiago · Minería · Acuicultura · Infraestructura) */
.hero__reelnav-wrap { position: absolute; top: 26px; left: 0; right: 0; z-index: 2; display: flex; justify-content: flex-end; pointer-events: none; }
.hero__reelnav { display: flex; gap: 10px; pointer-events: auto; }
.hero__reelnav button { display: flex; flex-direction: column; gap: 8px; width: 108px; padding: 4px 0; text-align: left; font-size: .78rem; font-weight: 500; color: rgba(255, 255, 255, 0.6); transition: color .25s var(--ease); }
.hero__reelnav button:hover, .hero__reelnav button.is-active { color: #fff; }
.hero__reelnav i { position: relative; display: block; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.hero__reelnav i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(var(--p, 0)); }
.hero__reelnav button.is-done i::after { transform: scaleX(1); }
.no-reel .hero__reelnav-wrap { display: none; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 18, 30, 0.78) 0%, rgba(8, 18, 30, 0.45) 45%, rgba(8, 18, 30, 0.08) 75%),
    linear-gradient(180deg, rgba(8, 18, 30, 0.25) 0%, rgba(8, 18, 30, 0) 30%, rgba(8, 18, 30, 0.55) 100%);
}
.hero__inner { position: relative; }
.hero__kicker { font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); margin-bottom: 22px; }
.hero__title {
  font-size: clamp(2.25rem, 5.4vw, 4.4rem);
  font-weight: 600; line-height: 1; letter-spacing: -0.04em;
  max-width: 15ch; text-wrap: balance;
}
.hero__title span { color: rgba(255, 255, 255, 0.62); }
.hero__lead { margin-top: 26px; max-width: 560px; font-size: clamp(1.02rem, 1.5vw, 1.22rem); line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(48px, 8vh, 84px); padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.2); max-width: 980px; }
.hero__stat dt { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero__stat dd { font-size: .88rem; color: rgba(255, 255, 255, 0.68); margin-top: 4px; }

/* =========================================================
   SECCIONES
   ========================================================= */
.section { padding: clamp(80px, 11vw, 136px) 0; }
.section--tight-top { padding-top: 0; }
.section--paper { background: var(--paper); }
.section--light { background: var(--white); }
.section--navy { background: var(--brand); color: #fff; }

.section-head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 900px; }
.section-head--row { max-width: none; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.section-head__aside { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.section-head__aside p + .btn { margin-top: 18px; }

/* Compatibilidad: páginas de publicaciones */
.eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.section__title { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; color: var(--ink); text-wrap: balance; }
.section__title--light { color: #fff; }
.section__intro { margin-top: 16px; max-width: 640px; color: var(--muted); font-size: 1.05rem; }
.section__intro--light { color: var(--on-dark-muted); }

/* ---------- Nuestro estudio ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split__text p + p { margin-top: 18px; }
.split__text p:not(.lead-text) { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; padding: 8px 14px 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.badge .ico { color: var(--brand); }
.photo-wide { position: relative; margin-top: clamp(48px, 7vw, 80px); border-radius: var(--radius-xl); overflow: hidden; background: var(--paper); }
.photo-wide img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 35%; }
.photo-wide figcaption { position: absolute; left: 20px; bottom: 20px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: .8rem; color: var(--ink-2); }

/* ---------- Bento de industrias ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(220px, 21vw, 280px); gap: 14px; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--night); color: #fff; isolation: isolate; }
.tile--hero { grid-column: span 2; grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 21, 32, 0) 35%, rgba(10, 21, 32, 0.82) 100%); }
.tile:hover img { transform: scale(1.04); }
.tile__body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 2vw, 26px); }
.tile h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.tile--hero h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); letter-spacing: -0.03em; }
.tile p { margin-top: 6px; font-size: .88rem; line-height: 1.45; color: rgba(255, 255, 255, 0.8); max-width: 44ch; }

/* ---------- Pilares (pasos numerados) ---------- */
.steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 104px); align-items: start; }
.steps__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.steps__photo { margin-top: 40px; border-radius: var(--radius-xl); overflow: hidden; background: var(--night); }
.steps__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.steps__list { counter-reset: none; }
.step { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 4px; }
.step__num { font-size: clamp(2.6rem, 4vw, 3.5rem); font-weight: 600; line-height: .9; letter-spacing: -0.05em; color: var(--brand); }
.step h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.step p { margin-top: 10px; color: var(--muted); }
.step .step__meta { margin-top: 14px; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- Banner fotográfico ---------- */
.banner { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff; }
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; z-index: -2; }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 18, 30, 0.82) 0%, rgba(8, 18, 30, 0.5) 60%, rgba(8, 18, 30, 0.3) 100%); }
.banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: clamp(80px, 11vw, 132px); padding-bottom: clamp(80px, 11vw, 132px); }
.banner .display { max-width: 15ch; }

/* ---------- Áreas de práctica (tarjetas) ---------- */
.areas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column;
  padding: 26px 26px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__tag { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.card h3 { margin-top: 14px; font-size: 1.22rem; font-weight: 600; letter-spacing: -0.022em; line-height: 1.25; }
.card > p:not(.card__tag) { margin-top: 10px; font-size: .94rem; color: var(--muted); flex: 1; }
.card__foot { display: flex; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .86rem; font-weight: 500; color: var(--ink); }
.card__foot span { font-variant-numeric: tabular-nums; color: var(--muted-2); font-weight: 500; margin-right: auto; }
.card__foot::after { content: "→"; padding-left: 8px; transition: transform .2s var(--ease); }
.card:hover .card__foot::after { transform: translateX(3px); }

/* =========================================================
   EQUIPO
   ========================================================= */
.team__group { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 52px 0 18px; display: flex; align-items: center; gap: 14px; }
.team__group::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.team__group:first-child { margin-top: 0; }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.member {
  display: flex; flex-direction: column; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.member:hover, .member:focus-visible { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--line-2); }
.member__photo { aspect-ratio: 4 / 3.6; overflow: hidden; background: #E8EBEE; }
.member__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .6s var(--ease); }
.member:hover .member__photo img { transform: scale(1.03); }
.member__avatar { aspect-ratio: 4 / 3.6; display: grid; place-items: center; background: var(--brand-soft); }
.member__avatar::before { content: attr(data-initials); font-size: 2.2rem; font-weight: 600; letter-spacing: -0.03em; color: var(--brand); }
.member__avatar--lg { width: 120px; height: 120px; aspect-ratio: auto; border-radius: 16px; flex: none; }
.member__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.member__name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.member__role { margin-top: 2px; font-size: .84rem; color: var(--brand); font-weight: 500; }
.member__area { margin-top: 10px; font-size: .86rem; color: var(--muted); line-height: 1.5; flex: 1; }
.member__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .82rem; font-weight: 500; color: var(--ink); }
.member__cta svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.member:hover .member__cta svg { transform: translateX(3px); }

/* =========================================================
   CONFIANZA (sección oscura) + membresías
   ========================================================= */
.trust { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff; padding: clamp(84px, 11vw, 136px) 0; }
.trust__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .85; }
.trust::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 21, 32, 0.35) 0%, rgba(10, 21, 32, 0.7) 45%, rgba(10, 21, 32, 0.94) 85%); }
.trust .display { max-width: 18ch; }
.trust__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(48px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--on-dark-line); }
.trust__item h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.02em; }
.trust__item p { margin-top: 8px; font-size: .92rem; color: var(--on-dark-muted); }
.memberships { margin-top: clamp(48px, 6vw, 72px); display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.memberships__label { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-muted); }
.memberships__logos { display: flex; gap: 12px; flex-wrap: wrap; }
.membership { background: #fff; border-radius: 14px; padding: 10px 16px; height: 72px; display: grid; place-items: center; }
.membership img { max-height: 52px; width: auto; }

/* =========================================================
   PUBLICACIONES
   ========================================================= */
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.post {
  display: flex; flex-direction: column;
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.post:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post__tag { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.post__title { margin-top: 14px; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post__excerpt { margin-top: 10px; font-size: .9rem; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.post__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .84rem; }
.post__date { color: var(--muted-2); }
.post__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); }
.post__more svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.post:hover .post__more svg { transform: translateX(3px); }

/* =========================================================
   PREGUNTAS FRECUENTES
   ========================================================= */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq .display { position: sticky; top: calc(var(--header-h) + 32px); }
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__item:first-child { border-top: 1px solid var(--line-2); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.015em; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101418' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .25s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 48px 24px 0; color: var(--muted); }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.contact__intro { margin-top: 18px; color: var(--muted); max-width: 480px; font-size: 1.05rem; }
.contact-list { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; color: var(--muted); line-height: 1.5; }
.contact-list strong { display: block; color: var(--ink); font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.contact-list a:hover { color: var(--brand); }
.contact-list__ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); color: var(--brand); flex: none; }
.contact-list__ico svg { width: 18px; height: 18px; fill: currentColor; }
.map { margin-top: 32px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--paper); aspect-ratio: 16 / 9; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35); }

.contact-form { padding: clamp(24px, 3.5vw, 36px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-md); }
.contact-form__title { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.025em; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: .84rem; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: .98rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field--invalid input, .field--invalid textarea { border-color: #C0392B; }
.field__error { display: block; min-height: 0; font-size: .8rem; color: #C0392B; margin-top: 4px; }
.field__error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin: 6px 0 20px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.form-status { margin-top: 12px; font-size: .88rem; min-height: 1.2em; }
.form-status.is-ok { color: #1F7A4D; }
.form-status.is-err { color: #C0392B; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 48px; padding-top: 64px; padding-bottom: 48px; }
.brand__logo--footer { height: 38px; }
.footer__blurb { margin-top: 18px; max-width: 320px; }
.footer__contact { margin-top: 14px; line-height: 1.8; color: var(--ink-2); }
.footer__contact a:hover, .footer__nav a:hover { color: var(--ink); }
.footer__social { display: flex; gap: 8px; margin-top: 18px; }
.footer__social a { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); transition: border-color .2s var(--ease), color .2s var(--ease); }
.footer__social a:hover { border-color: var(--ink); color: var(--ink); }
.footer__nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer__nav h3 { font-size: .86rem; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.footer__nav a, .footer__nav p { display: block; margin-bottom: 10px; line-height: 1.5; }
.footer__bar { border-top: 1px solid var(--line); }
.footer__credits { flex-basis: 100%; font-size: .72rem; color: var(--muted-2); }
.footer__credits a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.footer__credits a:hover { color: var(--ink); }
.footer__bar-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; font-size: .78rem; color: var(--muted-2); }

/* ---------- Volver arriba ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center;
  background: var(--brand); color: #fff; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), background-color .2s var(--ease);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-2); }

/* =========================================================
   MODAL — perfil de abogado
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; visibility: hidden; opacity: 0; transition: opacity .25s var(--ease), visibility .25s; }
.modal.is-open { visibility: visible; opacity: 1; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10, 21, 32, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal__dialog { position: relative; width: min(760px, 100%); max-height: min(88vh, 900px); overflow-y: auto; background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.98); transition: transform .3s var(--ease); overscroll-behavior: contain; }
.modal.is-open .modal__dialog { transform: none; }
.modal__close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--paper); color: var(--ink); transition: background-color .2s var(--ease); }
.modal__close:hover { background: var(--line); }
.modal__close svg { width: 18px; height: 18px; }
.modal__body { padding: clamp(24px, 4vw, 40px); }
.modal__head { display: flex; gap: 22px; align-items: center; padding-right: 44px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.modal__photo { width: 120px; height: 120px; border-radius: 16px; overflow: hidden; flex: none; background: #E8EBEE; }
.modal__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.modal__name { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.modal__role { margin-top: 4px; color: var(--brand); font-weight: 500; }
.modal__email { display: inline-block; margin-top: 8px; font-size: .9rem; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.modal__email:hover { color: var(--ink); }
.modal__sections { display: grid; gap: 24px; padding-top: 24px; }
.modal__section-title { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.modal__section p, .modal__section li { color: var(--ink-2); font-size: .95rem; }
.modal__section ul { display: grid; gap: 6px; }
.modal__section li { position: relative; padding-left: 16px; }
.modal__section li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1.5px; background: var(--brand); }

/* =========================================================
   PÁGINAS DE PUBLICACIONES
   ========================================================= */
.pub-page { padding-top: clamp(28px, 4vh, 48px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted-2); }
.breadcrumb a { color: var(--muted); transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span[aria-current] { color: var(--ink); font-weight: 500; }
.pub { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vh, 48px); }
.pub__kicker { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 18px; }
.pub__title { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; color: var(--ink); margin-bottom: 14px; text-wrap: balance; }
.pub__ref { font-size: .95rem; line-height: 1.5; color: var(--muted, #5b6473); margin-bottom: 30px; max-width: 70ch; }
.prose p { font-size: 1.08rem; line-height: 1.8; color: var(--ink-2); margin-bottom: 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.pub__pdf { margin-top: 36px; }
.pub__pdf .btn svg { width: 16px; height: 16px; }
.pub__pdfview { width: 100%; height: min(78vh, 760px); margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.pub__back { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: .92rem; color: var(--ink); transition: gap .2s var(--ease); }
.link-arrow svg { width: 16px; height: 16px; transform: scaleX(-1); }
.link-arrow:hover { gap: 12px; }
.related { background: var(--paper); }
.related__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 30px; }
.pub-cta { text-align: center; background: var(--night); position: relative; }
.pub-cta .section__intro { margin-left: auto; margin-right: auto; }
.pub-cta .btn { margin-top: 30px; background: #fff; color: var(--ink); }
.pub-cta .btn:hover { background: #EEF1F4; }
.archive__head { max-width: 760px; margin: 18px 0 32px; }
.pubfilters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.pubfilter { height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .86rem; color: var(--ink-2); background: #fff; transition: all .2s var(--ease); }
.pubfilter:hover { border-color: var(--ink); }
.pubfilter.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.postcell { display: contents; }
#archiveGrid { padding-bottom: clamp(56px, 9vh, 104px); }

/* Prensa */
.press__outlets { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.press__year { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 40px 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.press__list { display: grid; }
.press__list:last-child { padding-bottom: clamp(56px, 9vh, 104px); }
.press-item { display: grid; grid-template-columns: 220px 1fr auto; gap: 6px 28px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.press-item__meta { grid-row: span 3; display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--muted); }
.press-item__outlet { font-weight: 600; color: var(--brand); font-size: .95rem; }
.press-item__title { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; color: var(--ink); }
.press-item__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.press-item__role { color: var(--ink-2); font-size: .95rem; grid-column: 2; }
.press-item__who { grid-column: 2; font-size: .86rem; color: var(--muted); }
.press-item__who a { color: var(--brand); }
.press-item__who a:hover { text-decoration: underline; }
.press-item__more { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 500; color: var(--brand); white-space: nowrap; }
.press-item__more svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.press-item__more:hover svg { transform: translateX(3px); }
@media (max-width: 720px) {
  .press-item { grid-template-columns: 1fr; }
  .press-item__meta { grid-row: auto; flex-direction: row; gap: 10px; }
  .press-item__role, .press-item__who, .press-item__more { grid-column: 1; grid-row: auto; }
}

/* =========================================================
   REVEAL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 50ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  .nav__phone { display: none; }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 95;
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 24px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .25s var(--ease), opacity .25s var(--ease), visibility .25s;
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; gap: 0; margin: 0; }
  .nav__link { display: block; padding: 14px 4px; border-radius: 0; font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav__link.is-active { background: none; }
  .nav__actions { flex-direction: column; align-items: stretch; margin-top: 18px; }
  .nav__phone { display: inline-flex; }
  .nav__phone, .nav__cta { height: 48px; font-size: .96rem; }

  .section-head--row, .split, .steps, .faq, .contact { grid-template-columns: minmax(0, 1fr); }
  .section-head--row { gap: 18px; }
  .steps__aside, .faq .display { position: static; }
  .steps__photo { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 240px; }
  .tile--hero { grid-column: span 2; grid-row: span 1; height: auto; }
  .tile--wide { grid-column: span 2; }
  .areas-grid, .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner__inner { flex-direction: column; align-items: flex-start; }
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --header-h: 70px; }
  .hero { min-height: auto; padding-top: 84px; padding-bottom: 48px; }
  .hero__img, .hero__reel video { object-position: center; }
  .hero__reelnav-wrap { top: 14px; justify-content: flex-start; }
  .hero__reelnav { gap: 6px; width: 100%; }
  .hero__reelnav li { flex: 1; }
  .hero__reelnav button { width: 100%; font-size: .68rem; gap: 6px; }
  .hero__bg::after { background: linear-gradient(180deg, rgba(8, 18, 30, 0.55) 0%, rgba(8, 18, 30, 0.55) 40%, rgba(8, 18, 30, 0.85) 100%); }
  .hero__kicker { font-size: .66rem; letter-spacing: .14em; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .member__body { padding: 14px 14px 16px; }
  .member__name { font-size: .96rem; }
  .member__area { display: none; }
  .member__cta { margin-top: 8px; }
  .photo-wide img { aspect-ratio: 4 / 3; }
  .photo-wide figcaption { left: 12px; bottom: 12px; right: 12px; text-align: center; }
  .contact-list { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { padding: 0; place-items: end center; }
  .modal__dialog { border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92vh; }
  .modal__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .modal__photo { width: 96px; height: 96px; }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 220px; gap: 10px; }
  .tile--hero, .tile--wide { grid-column: auto; }
  .areas-grid, .posts-grid, .trust__grid { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 28px 0; }
  .memberships { flex-direction: column; align-items: flex-start; gap: 16px; }
  .membership { height: 62px; padding: 8px 12px; }
  .membership img { max-height: 44px; }
  .faq__item p { padding-right: 0; }
  .brand__logo { height: 36px; }
}

/* ---------- Minutas legales ---------- */
.pub__ref a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.minuta__lead { font-size: 1.12rem; line-height: 1.6; color: var(--ink); }
.minuta__source { margin-top: 36px; padding: 22px 24px; border: 1px solid var(--line-2); border-radius: 16px; background: #f7f8fa; }
.minuta__source-label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.minuta__source p:not(.minuta__source-label) { color: var(--ink); line-height: 1.5; }
.minuta__source-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 14px; }
.minuta__source-links svg { width: 15px; height: 15px; }
.minuta__disclaimer { margin-top: 22px; font-size: .85rem; color: var(--muted); }
.pubfilter__n { opacity: .55; margin-left: 4px; font-size: .8em; }

/* ---------- Perfil de abogado (/equipo/<slug>) ---------- */
.lawyer { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 6vh, 64px); }
.lawyer__photo { position: sticky; top: 100px; border-radius: var(--radius-lg, 16px); overflow: hidden; background: #E8EBEE; aspect-ratio: 4 / 4.6; }
.lawyer__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.lawyer__lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.lawyer__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 8px; }
.lawyer__actions .btn svg { width: 16px; height: 16px; }
.lawyer__sections { margin-top: 26px; }
.lawyer__block { padding: 26px 0; border-top: 1px solid var(--line); }
.lawyer__block h2 { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.lawyer__block p, .lawyer__block li { font-size: 1.02rem; line-height: 1.7; color: var(--ink-2); }
.lawyer__block ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lawyer__block li { position: relative; padding-left: 18px; }
.lawyer__block li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.lawyer__more { margin-top: 28px; }
a.member { display: block; color: inherit; text-decoration: none; }
.section-head__aside a, .modal__more a { text-decoration: underline; text-underline-offset: 3px; }
.modal__more { margin-top: 22px; }
.modal__more a.btn { text-decoration: none; }
@media (max-width: 860px) {
  .lawyer { grid-template-columns: 1fr; }
  .lawyer__photo { position: static; max-width: 340px; }
}

/* ---------- Collage de oficinas (sección Estudio) ---------- */
.collage { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 16vw, 230px); gap: 10px; margin-top: clamp(36px, 6vw, 64px); }
.collage__item { margin: 0; overflow: hidden; border-radius: 14px; background: #E8EBEE; }
.collage__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.collage__item:hover img { transform: scale(1.04); }
.collage__item.t-big { grid-column: span 2; grid-row: span 2; }
.collage__item.t-wide { grid-column: span 2; }
.collage__caption { margin-top: 14px; font-size: .85rem; color: var(--muted); }
@media (max-width: 720px) {
  .collage { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 8px; }
  .collage__item.t-big { grid-column: span 2; grid-row: span 2; }
  .collage__item.t-wide { grid-column: span 2; }
}
