/* Sitio Narvaja & Figueroa — Boutique aclarado, marca del Clásico (directivas CAMBIOS 3 y 4) */
:root {
  --bg: #3d3833;
  --bg-2: #46413b;
  --bg-3: #33302b;
  --ivory: #f3ede1;
  --muted: #cfc5b4;
  --bronze: #d9a877;
  --bronze-deep: #b08655;
  --edge: #8f8678;
  --ink: #2a2622;
  --line: rgba(243, 237, 225, 0.16);
  --veil: rgba(51, 48, 43, 0.62);
  --veil-strong: rgba(51, 48, 43, 0.86);
  --header-bg: rgba(51, 48, 43, 0.94);
  --marino: #11284A;
  --oro: #B08A47;
  --wa: #25D366;
  --wa-soft: #7fb58f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --brand-serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(1rem, 5vw, 4rem);
  --measure: 62ch;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.6rem; -webkit-text-size-adjust: 100%; color-scheme: dark; scrollbar-width: thin; scrollbar-color: var(--edge) var(--bg-3); }
body {
  margin: 0; background: var(--bg); color: var(--ivory);
  font-family: var(--sans); font-weight: 300; font-size: 0.97rem; line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--bronze); text-underline-offset: 0.25em; }
a:hover { color: var(--bronze); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
.wrap { padding-inline: var(--gutter); max-width: 80rem; margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--bronze); color: var(--ink); padding: 0.6rem 1rem; z-index: 100; font-weight: 500; }
.skip:focus { top: 1rem; color: var(--ink); }

/* Cabecera — sello y nombre con el diseño, tipografía y tamaño del modelo Clásico */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--header-bg); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ivory); }
.brand:hover { color: var(--ivory); }
/* Sello (CAMBIOS 4, punto 1): recuadro de 48 px y N F en cursiva. La cursiva vuelca la N hacia el filete y la F hacia el borde:
   el filete se corre 1 px y el par 0,3 px a la izquierda para que las dos letras queden a la misma distancia del marco (≈5 px). */
.mark { width: 44px; height: 44px; background: var(--marino); color: #F7F3EA; display: flex; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; font-family: var(--brand-serif); font-weight: 600; font-style: normal; font-size: 16px; line-height: 1; box-shadow: inset 0 0 0 3px var(--marino), inset 0 0 0 4px var(--oro); }
.mark i { width: 1px; height: 16px; background: var(--oro); display: block; }
.brand-name b { display: block; font-family: var(--brand-serif); font-size: 18px; letter-spacing: 1px; font-weight: 600; color: var(--ivory); line-height: 1.15; }
.brand-name small { display: block; font-size: 10px; letter-spacing: 3px; color: var(--muted); }
.nav-toggle { display: none; background: none; border: 1px solid var(--edge); color: var(--ivory); font: inherit; font-size: 0.9rem; min-height: 44px; padding: 0.45rem 1rem; cursor: pointer; }
.nav ul { display: flex; gap: clamp(0.9rem, 1.8vw, 1.8rem); list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 0.9rem; padding: 0.4rem 0; border-bottom: 1px solid transparent; transition: border-color 0.25s, color 0.25s; }
.nav a:hover, .nav a[aria-current] { color: var(--ivory); border-bottom-color: var(--bronze); }

/* Botones y enlaces de acción */
.btn { display: inline-block; padding: 0.85rem 1.5rem; background: var(--bronze); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.92rem; border: 1px solid var(--bronze); cursor: pointer; font-family: var(--sans); transition: background 0.25s, color 0.25s; }
.btn:hover { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ivory); border-color: var(--ivory); }
.btn.ghost:hover { background: var(--ivory); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.textlink { color: var(--bronze); text-decoration: underline; text-underline-offset: 0.3em; }
.textlink:hover { color: var(--ivory); }

/* Portada: compacta, con los botones a la vista desde el inicio */
.hero { position: relative; min-height: min(86svh, 46rem); display: flex; align-items: center; isolation: isolate; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; z-index: -2; }
/* Oscurecido suave: más denso a la izquierda, donde va el texto; deja ver el cuadro rojo */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(51, 48, 43, 0.82) 0%, rgba(51, 48, 43, 0.7) 50%, rgba(51, 48, 43, 0.22) 100%), linear-gradient(180deg, rgba(51, 48, 43, 0.35) 0%, transparent 30%, transparent 75%, rgba(51, 48, 43, 0.5) 100%); }
.hero .wrap { width: 100%; padding-block: 7rem 3.5rem; }
.kicker { display: inline-block; font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase; color: var(--bronze); border: 1px solid var(--line); padding: 0.45rem 1rem; margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 24ch; }
/* Dos líneas como en el Clásico: "Asesoramiento legal" / "con dedicación artesanal." */
.hero h1 em { display: block; color: var(--bronze); font-style: italic; }
.hero .lead { max-width: 52ch; color: var(--ivory); font-size: clamp(0.98rem, 1.3vw, 1.1rem); margin-top: 1.2rem; }
.hero .where { margin-top: 2rem; color: var(--muted); font-size: 0.88rem; }
/* Sombra difusa: separa el texto de los focos de luz de la pared sin oscurecer más la foto */
.hero .kicker, .hero h1, .hero .lead, .hero .where { text-shadow: 0 1px 18px rgba(36, 33, 30, 0.6); }
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hero > img { animation: fade 1.6s var(--ease) both; }
.hero .kicker, .hero h1 { animation: rise 1s var(--ease) 0.15s both; }
.hero .lead { animation: rise 1s var(--ease) 0.35s both; }
.hero .actions, .hero .where { animation: rise 1s var(--ease) 0.5s both; }

/* Secciones */
section { position: relative; }
.pad { padding-block: clamp(3.5rem, 7vw, 6rem); }
/* Al llegar desde un enlace (#areas, #contacto…), el título queda a 1.75rem bajo la cabecera, sin el aire superior de la sección */
.pad[id] { scroll-margin-top: calc(1.75rem - clamp(3.5rem, 7vw, 6rem)); }
.sec-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.2rem; }
.sec-intro { max-width: var(--measure); color: var(--muted); font-size: 1.02rem; }

/* Desplegables (áreas, equipo, trayectoria) */
.areas { background: var(--bg-2); }
.acc { margin-top: 2.25rem; border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-head { margin: 0; }
.acc-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1.1rem, 2.2vw, 1.6rem) 0; background: none; border: 0; color: var(--ivory); text-align: left; cursor: pointer; font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.65rem); line-height: 1.2; transition: color 0.3s, padding-left 0.4s var(--ease); }
@media (hover: hover) { .acc-btn:hover { color: var(--bronze); padding-left: 0.6rem; } }
.acc-icon { flex: none; width: 1.3rem; height: 1.3rem; position: relative; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--bronze); transition: transform 0.4s var(--ease); }
.acc-icon::after { transform: rotate(90deg); }
.acc-btn[aria-expanded="true"] { color: var(--bronze); }
.acc-btn[aria-expanded="true"] .acc-icon::after { transform: rotate(0deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.acc-panel[data-open="true"] { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; min-height: 0; }
.acc-body { padding: 0 0 1.8rem; max-width: var(--measure); }
.acc-body p { font-size: 1rem; }
.acc-body .textlink { font-size: 0.95rem; }
/* Áreas: "Consultar por [área]" con forma de botón (CAMBIOS 4, punto 2), en contorno bronce como las especialidades */
.areas .acc-body .textlink { display: inline-flex; align-items: center; min-height: 44px; margin: 0.3rem 0 0; padding: 0.5rem 1.25rem; border: 1px solid var(--bronze-deep); color: var(--bronze); text-decoration: none; font-size: 0.9rem; font-weight: 400; letter-spacing: 0.01em; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.areas .acc-body .textlink:hover { background: var(--bronze); border-color: var(--bronze); color: var(--ink); }

/* Salud */
.salud { min-height: min(90svh, 44rem); display: flex; align-items: center; isolation: isolate; overflow: hidden; }
.salud > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; z-index: -2; }
.salud::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(51, 48, 43, 0.82) 0%, rgba(51, 48, 43, 0.7) 45%, rgba(51, 48, 43, 0.18) 75%, rgba(51, 48, 43, 0.04) 100%); }
.salud .wrap { width: 100%; padding-block: 5rem; }
.salud h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); max-width: 24ch; text-wrap: balance; color: var(--ivory); }
.salud .cols { display: grid; gap: 2rem; margin-top: 2.25rem; max-width: 56rem; }
.salud .cols p { font-size: 1.02rem; max-width: 52ch; }
.salud .rule { width: 4rem; height: 1px; background: var(--bronze); margin: 1.75rem 0; border: 0; }

/* Equipo: solo nombres y especialidades; la ficha se abre con un clic */
.team-list { list-style: none; margin: 2.25rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.member { border-bottom: 1px solid var(--line); padding: clamp(1.1rem, 2.2vw, 1.6rem) 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem 2.5rem; align-items: center; }
.member h3 { font-size: clamp(1.3rem, 2.6vw, 2rem); }
.member-name { background: none; border: 0; padding: 0.6rem 0; margin: -0.6rem 0; color: var(--ivory); font: inherit; text-align: left; cursor: pointer; transition: color 0.3s, transform 0.4s var(--ease); }
.member-name::after { content: "+"; margin-left: 0.5rem; color: var(--bronze); font-family: var(--sans); font-weight: 300; }
.member-name[aria-expanded="true"] { color: var(--bronze); }
.member-name[aria-expanded="true"]::after { content: "−"; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.chip { position: relative; background: none; border: 1px solid var(--bronze-deep); color: var(--bronze); font: inherit; font-size: 0.85rem; font-weight: 400; letter-spacing: 0.01em; padding: 0.35rem 0.85rem; cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.chip::after { content: ""; position: absolute; inset: -4px 0; }
.chip[aria-expanded="true"] { border-color: var(--bronze); background: rgba(217, 168, 119, 0.12); }
@media (hover: hover) {
  .member-name:hover { color: var(--bronze); transform: translateX(0.4rem); }
  .chip:hover { background: var(--bronze); color: var(--ink); }
}
.member-panel { grid-column: 1 / -1; }
.member-detail { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; padding: 1.2rem 0 0.4rem; }
.member-detail .portrait { width: 100%; margin: 0; font-size: 2.4rem; }
.member-detail .role { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.6rem; }
.member-detail p { max-width: 56ch; }
@media (min-width: 800px) {
  .member { grid-template-columns: minmax(0, 1fr) auto; }
  .member-detail { grid-template-columns: 10rem minmax(0, 1fr); gap: 2.5rem; }
}

/* Publicaciones en home */
.pubs-home { background: var(--bg-2); }
.pub-row { display: grid; gap: 1.25rem 2.5rem; align-items: start; padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 2.25rem; }
.pub-thumb { display: block; max-width: 22rem; overflow: hidden; border: 1px solid var(--line); }
.pub-thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; filter: sepia(0.18) brightness(0.9); transition: filter 0.4s var(--ease), transform 0.6s var(--ease); }
.pub-row h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.25; }
.pub-row h3 a { text-decoration: none; }
.pub-row h3 a:hover { color: var(--bronze); }
.pub-meta { color: var(--bronze); font-size: 0.88rem; margin: 0 0 0.6rem; }
.pub-row p { max-width: 56ch; color: var(--muted); }
.pub-row .pub-meta { color: var(--bronze); }
.pub-row + .pub-row { margin-top: 0; border-top: 0; }
.pub-text p { margin-bottom: 0.9rem; }
.pubs-all { margin: 1.75rem 0 0; }
@media (hover: hover) {
  .pub-row:hover .pub-thumb img { filter: sepia(0.1) brightness(1); transform: scale(1.03); }
}
@media (min-width: 900px) {
  .pub-row { grid-template-columns: 14rem minmax(0, 1fr); }
  .pub-thumb { grid-row: span 2; }
}
@media (min-width: 1200px) {
  .pub-row { grid-template-columns: 15rem minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.25rem 3rem; }
  .pub-thumb { grid-row: auto; }
}

/* Trayectoria: el título despliega la lista */
.trayectoria { background: var(--bg-3); }
.fold-title .acc-btn { width: auto; font-size: inherit; padding: 0; min-height: 44px; justify-content: flex-start; }
.fold-title .acc-btn .acc-icon { margin-left: 0.4rem; }
.clients { list-style: none; margin: 1.5rem 0 0; padding: 0; column-gap: 3rem; font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; }
.clients li { break-inside: avoid; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.clients .more { column-span: all; padding-top: 0.9rem; font-style: italic; color: var(--muted); }
@media (min-width: 640px) { .clients { column-count: 2; } }
@media (min-width: 1000px) { .clients { column-count: 3; } }

/* Contacto */
.contacto { background: var(--bg-2); scroll-margin-top: 0; }
/* Franja de entrada: la foto de la puerta del estudio de fondo, oscurecida del lado del texto (como Salud) */
.contact-band { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(18rem, 34vw, 26rem); display: flex; align-items: flex-end; }
.contact-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 42%; z-index: -2; filter: sepia(0.15) brightness(0.92); }
.contact-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(51, 48, 43, 0.86) 0%, rgba(51, 48, 43, 0.62) 38%, rgba(51, 48, 43, 0.12) 70%, rgba(51, 48, 43, 0.05) 100%), linear-gradient(180deg, transparent 55%, rgba(48, 45, 40, 0.85) 100%); }
.contact-band .wrap { width: 100%; padding-block: 6rem 2.5rem; }
.contact-band .sec-title { color: var(--ivory); margin-bottom: 0.6rem; text-shadow: 0 1px 18px rgba(36, 33, 30, 0.6); }
.band-addr { margin: 0; color: var(--ivory); font-size: 0.95rem; text-shadow: 0 1px 14px rgba(36, 33, 30, 0.7); }
.contact-body { padding-block: 2.5rem clamp(3.5rem, 7vw, 6rem); }
.contact-grid { display: grid; gap: 3rem; }
/* Celular y tablet: el formulario va primero (orden del HTML), y los datos y el mapa debajo.
   Escritorio: datos y mapa en la columna izquierda, formulario a la derecha */
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-areas: "data form" "place form"; grid-template-rows: auto 1fr; gap: 1.5rem 5rem; }
  .contact-info { display: contents; }
  .contact-data { grid-area: data; }
  .contact-grid > form, .contact-grid > .form-done { grid-area: form; }
  .contact-grid .place { grid-area: place; margin-top: 0; }
}
.contact-data { font-style: normal; }
.contact-data dt { color: var(--muted); font-size: 0.85rem; }
.contact-data dd { margin: 0 0 1.1rem; font-family: var(--serif); font-size: 1.12rem; }
.contact-data a { text-decoration-color: var(--bronze-deep); }
/* WhatsApp: verde (CAMBIOS 3) pero apagado y sin relleno, para que no rompa la paleta */
.wa { display: inline-flex; align-items: center; gap: 0.75rem; }
.wa-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--wa-soft); color: var(--wa-soft); display: inline-grid; place-items: center; flex: none; transition: border-color 0.25s, color 0.25s; }
.wa-icon svg { width: 1.05rem; height: 1.05rem; }
.wa:hover { color: var(--ivory); }
.wa:hover .wa-icon { border-color: var(--wa); color: var(--wa); }
.place { display: grid; gap: 1rem; margin-top: 1.75rem; }
.map { position: relative; width: 100%; border: 1px solid var(--line); background: var(--bg-3); display: flex; flex-direction: column; }
.map iframe { display: block; width: 100%; flex: 1; min-height: 13rem; border: 0; pointer-events: none; filter: saturate(0.85); }
.map-cap { margin: 0; padding: 0.7rem 1rem; color: var(--ivory); font-size: 0.88rem; transition: background 0.25s, color 0.25s; }
.map-link { position: absolute; inset: 0; }
.map:hover .map-cap, .map:focus-within .map-cap { background: var(--bronze); color: var(--ink); }
form { display: grid; gap: 1.2rem; align-content: start; }
.field label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; background: var(--bg-3); color: var(--ivory); border: 1px solid var(--edge); padding: 0.75rem 0.9rem; font: inherit; font-size: max(16px, 1em); font-weight: 300; border-radius: 0; }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--bronze); outline-offset: 1px; border-color: var(--bronze); }
.two { display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[data-status] { margin: 0; min-height: 1.5em; font-size: 0.95rem; }
[data-status][data-state="ok"] { color: var(--bronze); }
[data-status][data-state="error"] { color: var(--ivory); border-left: 2px solid var(--bronze); padding-left: 0.8rem; }
form[data-form] .btn:disabled { opacity: 0.7; cursor: progress; }
form[data-form][hidden] { display: none; }
.form-done { align-self: start; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--line); border-top: 2px solid var(--bronze); background: var(--bg-2); outline: none; animation: done-in 0.6s var(--ease) both; }
.form-done[hidden] { display: none; }
.form-done p { color: var(--muted); max-width: 46ch; margin: 0 0 0.9rem; line-height: 1.6; }
.form-done .done-kicker { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bronze); margin-bottom: 0.4rem; }
.form-done .done-title { font-family: var(--serif); font-weight: normal; font-size: clamp(1.6rem, 3.5vw, 2.1rem); color: var(--ivory); margin: 0 0 1rem; line-height: 1.2; }
.form-done .done-urgent { font-size: 0.92rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.form-done .done-urgent a { color: var(--ivory); }
.form-done .btn { margin-top: 0.6rem; }
.done-mark { display: block; width: 2.6rem; height: 2.6rem; margin-bottom: 1.1rem; border: 1px solid var(--bronze); border-radius: 50%; position: relative; }
.done-mark::after { content: ""; position: absolute; left: 50%; top: 45%; width: 0.55rem; height: 1rem; border: solid var(--bronze); border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg); }
@keyframes done-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .form-done { animation: none; } }

/* Pie */
.site-footer { background: var(--bg-3); padding: 3.5rem 0 3rem; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
.foot { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .foot { grid-template-columns: 1.2fr 1fr 1fr; align-items: baseline; } }
/* Nombre del estudio con la tipografía de la marca, como en la cabecera (CAMBIOS 3: logo y nombre del Clásico) */
.foot-name { font-family: var(--brand-serif); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.5px; line-height: 1.3; color: var(--ivory); }
.site-footer a { color: var(--ivory); }
.site-footer p { margin: 0 0 0.5rem; }
.site-footer .foot-credit { grid-column: 1 / -1; margin: 0.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.8rem; line-height: 1.6; }
.foot-credit a { color: var(--muted); text-decoration-color: var(--bronze-deep); }
.foot-credit a:hover { color: var(--bronze); }

/* Páginas interiores */
.page-head { padding: 8.5rem 0 3rem; background: var(--bg-3); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 18ch; }
.page-head p { color: var(--muted); max-width: 52ch; margin-top: 1rem; font-size: 1.02rem; }
.profile { padding-block: clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--line); scroll-margin-top: calc(1.75rem - clamp(3rem, 6vw, 5rem)); }
.profile-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: 0.7fr 1.3fr; gap: 5rem; } .profile-side { position: sticky; top: 6.5rem; align-self: start; display: flex; flex-direction: column; } .profile-side .portrait { order: 1; margin: 0.5rem 0 0; } }
.portrait { aspect-ratio: 4 / 5; width: min(100%, 18rem); background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--serif); font-size: 4rem; color: var(--bronze); margin-bottom: 1.25rem; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.profile .role { color: var(--muted); margin: 0.5rem 0 1rem; }
.profile-text p { max-width: 62ch; font-size: 1rem; line-height: 1.75; }
.profile-text .short { font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.45; color: var(--ivory); margin-bottom: 1.6rem; }

/* Cabecera interior con foto de fondo y oscurecido hacia el lado del texto */
.page-head.has-photo { position: relative; isolation: isolate; overflow: hidden; padding: 10rem 0 4rem; }
.page-head.has-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; z-index: -2; }
.page-head.has-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--veil-strong) 0%, var(--veil) 50%, rgba(51, 48, 43, 0.3) 100%); }
.page-head.has-photo p { color: var(--ivory); }

/* Artículo: texto a la izquierda, síntesis fija a la derecha en escritorio */
.article { padding-block: clamp(3rem, 6vw, 5rem); scroll-margin-top: calc(1.75rem - clamp(3rem, 6vw, 5rem)); }
.article-head { max-width: 52rem; }
.article-head .kicker { margin-bottom: 1.1rem; }
.article h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); max-width: 30ch; }
.article .pub-meta { margin-top: 1.2rem; }
.article-grid { display: grid; gap: 3rem; margin-top: 2.5rem; }
.article-main { min-width: 0; max-width: 44rem; }
.article + .article { border-top: 1px solid var(--line); }
.article-sub { margin: 1rem 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 52ch; }
.article-figure { display: block; margin: 0; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }
#discapacidad .article-figure img { filter: sepia(0.18) brightness(0.9); }
.article-body { margin-top: 2rem; font-family: var(--serif); font-size: 1.05rem; line-height: 1.8; text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.article-body p:first-child::first-line { color: var(--bronze); }
.article-photo { margin: 2.25rem 0; }
.article-photo img { width: 100%; height: auto; border: 1px solid var(--line); }
.article-body strong { font-weight: 600; }
.article-body h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin: 2.5rem 0 1rem; text-align: left; }
.checklist { list-style: none; margin: 0 0 1.75rem; padding: 0; counter-reset: paso; border-top: 1px solid var(--line); }
.checklist li { counter-increment: paso; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); padding: 0.75rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.checklist li::before { content: counter(paso); color: var(--bronze); }
.article-photo figcaption, .article-figure figcaption { margin-top: 0.7rem; font-family: var(--sans); font-size: 0.85rem; line-height: 1.5; color: var(--muted); text-align: left; -webkit-hyphens: manual; hyphens: manual; }
.article-cta { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.article-aside { display: grid; gap: 1.25rem; align-content: start; }
.aside-card { background: var(--bg-2); border: 1px solid var(--line); padding: 1.5rem; }
.aside-card h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.tags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; margin: 0; padding: 0; list-style: none; }
.tags li { position: relative; padding-left: 0.95rem; font-size: 0.9rem; line-height: 1.4; }
.tags li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 5px; height: 5px; background: var(--bronze); transform: rotate(45deg); }
.facts { margin: 0; }
.facts dt { color: var(--bronze); font-size: 0.85rem; }
.facts dd { margin: 0.15rem 0 0.9rem; font-size: 0.92rem; line-height: 1.5; }
.facts dd:last-child { margin-bottom: 0; }
.aside-cta p:not(.aside-links) { color: var(--muted); font-size: 0.92rem; margin-top: -0.4rem; }
.aside-card .btn { display: block; text-align: center; }

/* Índice de publicaciones: tarjetas con foto que llevan a cada artículo */
.pub-index { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.pub-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pub-card { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); height: 100%; background: var(--bg-2); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.25s; }
.pub-card img { width: 100%; height: 100%; object-fit: cover; }
.pub-card-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 1rem; }
.pub-card-area { color: var(--bronze); font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; }
.pub-card-title { font-family: var(--serif); font-size: 1.02rem; line-height: 1.3; color: var(--ivory); transition: color 0.25s; }
.pub-card-more { display: none; margin-top: auto; padding-top: 0.5rem; font-size: 0.85rem; color: var(--bronze); }
.pub-card:hover { color: inherit; border-color: var(--bronze-deep); }
.pub-card:hover .pub-card-title { color: var(--bronze); }
@media (min-width: 760px) {
  .pub-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .pub-card { grid-template-columns: none; grid-template-rows: auto 1fr; }
  .pub-card img { height: auto; aspect-ratio: 16 / 9; }
  .pub-card-body { padding: 1.1rem 1.25rem 1.3rem; gap: 0.5rem; }
  .pub-card-title { font-size: 1.12rem; }
  .pub-card-more { display: block; }
}
.steps { margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.steps li { counter-increment: paso; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.93rem; }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li::before { content: counter(paso); font-family: var(--serif); color: var(--bronze); font-size: 1.05rem; line-height: 1.4; }
.aside-author .author { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.aside-author .portrait { width: 3.75rem; margin: 0; font-size: 1.35rem; flex: none; }
.aside-author .author p { margin: 0; line-height: 1.4; }
.aside-author .author b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.1rem; }
.aside-author .author span { color: var(--muted); font-size: 0.85rem; }
.aside-author .btn { display: block; text-align: center; }
.aside-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 1.1rem 0 0; font-size: 0.9rem; }
.pub-index:last-child { padding-bottom: clamp(3rem, 6vw, 5rem); }

/* Página de cada publicación: ruta arriba, anterior / siguiente al pie */
.article-page { padding-top: clamp(6.5rem, 10vw, 8rem); }
.article h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); max-width: 30ch; }
.crumbs ol { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 0.5rem; color: var(--edge); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--bronze); }
.pub-nav { border-top: 1px solid var(--line); padding-block: 2.5rem clamp(3rem, 6vw, 4.5rem); }
.pub-nav-pair { display: grid; gap: 1rem; }
.pub-nav-pair a { display: flex; flex-direction: column; gap: 0.45rem; padding: 1.25rem 1.5rem; background: var(--bg-2); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.25s; }
.pub-nav-pair a:hover { color: inherit; border-color: var(--bronze-deep); }
.pub-nav-pair span { color: var(--bronze); font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; }
.pub-nav-pair span::before { content: "‹ "; }
.pub-nav-next span::before { content: none; }
.pub-nav-next span::after { content: " ›"; }
.pub-nav-pair b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; line-height: 1.3; color: var(--ivory); transition: color 0.25s; }
.pub-nav-pair a:hover b { color: var(--bronze); }
.pub-nav .pubs-all { text-align: center; }
@media (min-width: 760px) {
  .pub-nav-pair { grid-template-columns: 1fr 1fr; }
  .pub-nav-next { grid-column: 2; align-items: flex-end; text-align: right; }
}
@media (min-width: 1000px) {
  .article-grid { grid-template-columns: minmax(0, 1fr) 20rem; gap: 4.5rem; }
  .article-aside { align-self: start; }
}
@media (min-width: 1000px) and (min-height: 820px) {
  .article-aside { position: sticky; top: 6.5rem; }
}
@media (max-width: 600px) {
  .page-head.has-photo { padding: 8.5rem 0 2.5rem; }
  .page-head.has-photo::before { background: linear-gradient(180deg, rgba(51, 48, 43, 0.35) 0%, var(--veil) 45%, var(--veil-strong) 100%); }
  .article-body { font-size: 1rem; line-height: 1.75; }
}

/* Navegación móvil */
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-3); border-bottom: 1px solid var(--line); display: none; }
  .nav[data-open="true"] { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 0.75rem var(--gutter) 1.5rem; }
  .nav a { display: block; padding: 0.8rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav-toggle[aria-expanded="true"] { border-color: var(--bronze); color: var(--bronze); }
}
@media (max-width: 899px) {
  /* Nombre y título centrados en bloque junto al retrato (las filas 1fr absorben el alto sobrante) */
  .profile-side { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; column-gap: 1rem; align-items: start; }
  .profile-side .portrait { grid-row: 1 / -1; grid-column: 1; width: 100%; margin: 0; font-size: 1.8rem; }
  .profile-side h2 { grid-row: 2; grid-column: 2; }
  .profile-side .role { grid-row: 3; grid-column: 2; }
  .profile .role { margin: 0.3rem 0 0; }
}
@media (max-width: 600px) {
  body { font-size: 0.95rem; }
  .brand-name b { font-size: 15px; letter-spacing: 0.5px; }
  .hero .wrap { padding-block: 5.75rem 2rem; }
  .kicker { font-size: 0.68rem; padding: 0.35rem 0.8rem; margin-bottom: 1rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero .lead { font-size: 0.92rem; margin-top: 0.9rem; }
  .hero .actions { margin-top: 1.25rem; gap: 0.6rem; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
  .hero .where { margin-top: 1.25rem; }
  .sec-title { font-size: 1.45rem; }
  .salud .wrap { padding-block: 3.5rem; }
  .salud h2 { font-size: 1.6rem; }
  /* Celular: oscurecido suave, más denso arriba (kicker y título) */
  .hero::before { background: linear-gradient(180deg, rgba(51, 48, 43, 0.78) 0%, rgba(51, 48, 43, 0.7) 30%, rgba(51, 48, 43, 0.56) 55%, rgba(51, 48, 43, 0.6) 78%, rgba(51, 48, 43, 0.78) 100%); }
  .hero .kicker { background: rgba(51, 48, 43, 0.45); }
  /* Salud: el texto ocupa todo el ancho; la carpeta con el escrito y la receta queda visible abajo */
  .salud > img { object-position: 74% 50%; }
  .salud::before { background: linear-gradient(180deg, rgba(51, 48, 43, 0.8) 0%, rgba(51, 48, 43, 0.66) 35%, rgba(51, 48, 43, 0.55) 60%, rgba(51, 48, 43, 0.6) 80%, rgba(51, 48, 43, 0.7) 100%); }
  .salud .btn.ghost { background: rgba(51, 48, 43, 0.55); }
  .salud .btn.ghost:hover { background: var(--ivory); }
  /* Contacto: recorte centrado en el cartel del estudio; texto abajo sobre el oscurecido */
  .contact-band { min-height: 17rem; }
  .contact-band > img { object-position: 78% 45%; }
  .contact-band::before { background: linear-gradient(180deg, rgba(51, 48, 43, 0.35) 0%, rgba(51, 48, 43, 0.2) 40%, rgba(48, 45, 40, 0.88) 100%); }
  .contact-band .wrap { padding-block: 5.5rem 1.75rem; }
  .band-addr { font-size: 0.88rem; }
  .contact-body { padding-top: 2rem; }
  .acc-btn { font-size: 1.05rem; }
  .member h3, .pub-row h3 { font-size: 1.15rem; }
  .salud .cols p, .sec-intro, .acc-body p, .clients { font-size: 0.93rem; }
  .clients li { padding: 0.4rem 0; }
  .member-detail { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
  .member-detail .portrait { font-size: 1.8rem; }
  .contact-data dd { font-size: 1rem; }
  .contact-data dd a, .site-footer a, .textlink { display: inline-block; padding-block: 0.65rem; margin-block: -0.65rem; }
  .member-name { padding-block: 0.75rem; margin-block: -0.75rem; }
  .map-cap { font-size: 0.8rem; padding: 0.6rem 0.8rem; }
  .map iframe { min-height: 14rem; }
  .foot-credit a { display: inline; padding: 0; margin: 0; }
  /* Teléfono y email del pie: más aire para que las áreas táctiles de 44px no se pisen */
  .foot > div p { margin-bottom: 1.25rem; }
  .foot > div p:last-child { margin-bottom: 0; }
  /* Celular: cada publicación se reduce a título + "Leer el artículo" (sin foto, autor ni resumen) para no alargar la página */
  .pub-row { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; padding: 1.25rem 0; }
  .pub-row .pub-thumb, .pub-row .pub-meta, .pub-text p { display: none; }
  .page-head { padding: 6.5rem 0 2.25rem; }
}
@media (max-width: 340px) {
  .brand-name b { font-size: 13px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
