/* ==========================================================
   Caro y Cía. Abogados Asociados
   Lenguaje editorial: tipografía protagonista, líneas finas,
   esquinas rectas, mucho aire. Un solo acento (rojo).
   ========================================================== */

:root {
  /* Paleta */
  --petroleo-900: #0a2a2e;
  --petroleo: #0e3a3f;
  --petroleo-2: #15505a;
  --petroleo-3: #1f6670;
  --rojo: #8f1d1d;
  --rojo-2: #a82424;
  --bg: #f2f4f2;          /* hueso frío */
  --bg-2: #e7ecea;        /* bruma petróleo */
  --surface: #fbfcfb;
  --ink: #132326;
  --muted: #53656a;
  --line: rgba(14, 58, 63, .14);
  --line-strong: rgba(14, 58, 63, .28);
  --on-dark: #e9f0ef;
  --on-dark-muted: #a9c1c1;

  /* Tipografía */
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Medidas */
  --header-h: 80px;
  --header-h-sm: 64px;
  --radius: 2px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Sombras teñidas */
  --shadow: 0 1px 2px rgba(10, 42, 46, .06), 0 18px 40px -24px rgba(10, 42, 46, .35);

  /* Movimiento */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.32, .72, 0, 1);

  /* Capas */
  --z-grain: 40;
  --z-header: 50;
  --z-progress: 55;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.03rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grano fino fijo, no interfiere con clics */
body::after {
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none;
  opacity: .05;
  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 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--petroleo-3); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
svg { flex: none; }
::selection { background: var(--petroleo); color: #fff; }

:focus-visible { outline: 2px solid var(--rojo-2); outline-offset: 4px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 14px;
}
.skip:focus { top: 12px; }

/* Etiqueta de sección: cursiva serif con filete rojo */
.label, .eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.2rem; line-height: 1.2; color: var(--rojo);
}
.label::before, .eyebrow::before {
  content: ""; width: 36px; height: 1px; background: currentColor;
  transform-origin: left; transition: transform 1s var(--ease) .1s;
}

/* ---------- Barra de progreso (animación ligada al scroll, sin JS) ---------- */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress {
    display: block; position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 2px;
    z-index: var(--z-progress); pointer-events: none;
  }
  .progress span {
    display: block; height: 100%; background: var(--rojo-2);
    transform-origin: left; transform: scaleX(0);
    animation: progress-grow linear both; animation-timeline: scroll(root);
  }
}
@keyframes progress-grow { to { transform: scaleX(1); } }

/* ---------- Botones ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px; padding: 14px 28px;
  font: 500 .98rem/1.2 var(--sans); letter-spacing: .02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: color .45s var(--ease), border-color .45s var(--ease), background-color .45s var(--ease), transform .25s var(--ease);
}
/* Relleno que sube desde abajo */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--ease);
}
.btn:hover::before { transform: scaleY(1); }
.btn:active { transform: scale(.985); }

/* Flecha de línea fina que se alarga */
.btn-arrow {
  position: relative; display: inline-block; width: 18px; height: 1px; background: currentColor;
  transition: width .45s var(--ease);
}
.btn-arrow::after {
  content: ""; position: absolute; right: 0; top: -3.5px; width: 7px; height: 7px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg);
}
.btn:hover .btn-arrow, .btn-profile:hover .btn-arrow, .member:hover .btn-arrow { width: 28px; }

.btn-primary { background: var(--rojo); color: #fff; }
.btn-primary::before { background: var(--rojo-2); }

.btn-ghost { color: var(--on-dark); border-color: rgba(233, 240, 239, .35); }
.btn-ghost::before { background: var(--on-dark); }
.btn-ghost:hover { color: var(--petroleo); border-color: var(--on-dark); }

.btn-outline { color: var(--petroleo); border-color: var(--line-strong); }
.btn-outline::before { background: var(--petroleo); }
.btn-outline:hover { color: #fff; border-color: var(--petroleo); }

.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  font-weight: 500; color: var(--petroleo); text-decoration: none;
  padding-bottom: 4px;
  background: linear-gradient(var(--rojo), var(--rojo)) left bottom / 0 1px no-repeat,
              linear-gradient(var(--line-strong), var(--line-strong)) left bottom / 100% 1px no-repeat;
  transition: background-size .55s var(--ease);
}
.link-arrow::after { content: "→"; transition: transform .45s var(--ease); }
.link-arrow:hover { background-size: 100% 1px, 100% 1px; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--petroleo);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background-color .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.site-header.is-overlay:not(.is-scrolled):not(.menu-open) { background: transparent; border-bottom-color: transparent; }
.site-header.is-scrolled {
  background: rgba(10, 42, 46, .95);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  border-bottom-color: rgba(255,255,255,.08);
  box-shadow: 0 16px 40px -28px rgba(0, 0, 0, .7);
}

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  transition: height .5s var(--ease);
}
.is-scrolled .header-inner { height: var(--header-h-sm); }

.brand { display: flex; flex-direction: column; text-decoration: none; color: #fff; line-height: 1; }
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: .005em; }
.brand-sub { font-size: .62rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--on-dark-muted); margin-top: 6px; }

.nav-toggle {
  position: relative; width: 46px; height: 46px; padding: 0;
  background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 1px; background: #fff;
  transition: transform .5s var(--ease), opacity .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; flex-direction: column;
  padding: 8px var(--gutter) 28px;
  background: var(--petroleo-900);
  border-bottom: 1px solid rgba(255,255,255,.08);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .35s var(--ease), transform .5s var(--ease), visibility 0s .5s;
}
.nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .35s var(--ease), transform .5s var(--ease); }
.nav a {
  color: var(--on-dark); text-decoration: none;
  font-family: var(--serif); font-size: 1.6rem; font-weight: 500;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav a.nav-cta {
  margin-top: 20px; border: 0; text-align: center; background: var(--rojo); color: #fff;
  font-family: var(--sans); font-size: 1rem; font-weight: 500; padding: 16px;
}

@media (max-width: 1023px) {
  .nav a { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .55s var(--ease); }
  .nav.is-open a { opacity: 1; transform: none; }
  .nav.is-open a:nth-child(2) { transition-delay: .05s; }
  .nav.is-open a:nth-child(3) { transition-delay: .1s; }
  .nav.is-open a:nth-child(4) { transition-delay: .15s; }
  .nav.is-open a:nth-child(5) { transition-delay: .2s; }
  .nav.is-open a:nth-child(6) { transition-delay: .25s; }
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav {
    position: static; flex-direction: row; align-items: center; gap: 6px;
    padding: 0; background: none; border: 0;
    visibility: visible; opacity: 1; transform: none;
  }
  .nav a {
    position: relative; padding: 8px 14px; border: 0;
    font-family: var(--sans); font-size: .93rem; font-weight: 500; letter-spacing: .02em;
    color: var(--on-dark-muted); transition: color .35s var(--ease);
  }
  .nav a:hover, .nav a.is-active { color: #fff; }
  .nav a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 1px;
    background: var(--rojo-2); transform: scaleX(0); transform-origin: right;
    transition: transform .55s var(--ease);
  }
  .nav a:not(.nav-cta):hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
  .nav a.nav-cta {
    margin: 0 0 0 14px; padding: 11px 22px; color: #fff;
    border: 1px solid rgba(255,255,255,.3); background: transparent;
    transition: background-color .4s var(--ease), border-color .4s var(--ease);
  }
  .nav a.nav-cta:hover { background: var(--rojo); border-color: var(--rojo); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--on-dark);
  background: var(--petroleo-900);
  min-height: min(100dvh, 940px);
  display: flex; align-items: flex-end;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 48px);
  padding-bottom: clamp(56px, 9vh, 96px);
}
.hero-bg { position: absolute; inset: -15% 0 -15% 0; z-index: -1; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 18% 20%, rgba(52, 120, 124, .55), transparent 70%),
    radial-gradient(60% 70% at 95% 100%, rgba(4, 20, 22, .9), transparent 70%),
    linear-gradient(180deg, #0e3a3f 0%, #0a2a2e 100%);
}
.hero-glow {
  position: absolute; width: 70vmax; height: 70vmax; left: -20vmax; top: -30vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 180, 178, .22), transparent 60%);
  animation: drift 28s var(--ease-soft) infinite alternate;
}
@keyframes drift { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.1); } }

.hero-grid { position: relative; display: grid; gap: 56px; width: 100%; }

.hero-kicker {
  font-size: .74rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: #e3b3ae;
}
.hero h1 {
  margin-top: 26px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.6rem, 12vw, 8.4rem);
  line-height: .95; letter-spacing: -.02em; color: #fff;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero h1 .line--sub {
  margin-top: .08em;
  font-size: .5em; line-height: 1.1; letter-spacing: 0; color: var(--on-dark-muted);
}
.hero h1 em { font-style: italic; font-weight: 400; }
.hero-lead {
  margin-top: 30px; max-width: 30ch;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.55; color: #cddcdb;
}
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.hero-phone {
  margin-left: 8px; padding: 6px 0;
  color: var(--on-dark); text-decoration: none; font-weight: 500; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.hero-phone:hover { background-size: 100% 1px; }

/* Entrada escalonada */
.hero-in { animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--d, 0) * 130ms + 150ms); }
.hero h1 .line > .hero-in { display: inline-block; animation-name: line-up; animation-duration: 1.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes line-up { from { transform: translateY(110%); } }

.hero-index { align-self: end; }
.hero-index-title {
  font-size: .72rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--on-dark-muted);
  padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.16);
}
.hero-index a {
  position: relative; display: flex; gap: 20px; align-items: baseline;
  padding: 18px 0;
  color: #fff; text-decoration: none;
  font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.55rem); font-weight: 400; line-height: 1.25;
  border-bottom: 1px solid rgba(255,255,255,.12);
  transition: padding-left .55s var(--ease);
}
.hero-index a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--rojo-2); transform: scaleX(0); transform-origin: left; transition: transform .65s var(--ease);
}
.hero-index a span { font-family: var(--sans); font-size: .78rem; font-weight: 500; letter-spacing: .1em; color: #e3b3ae; font-variant-numeric: tabular-nums; }
.hero-index a:hover { padding-left: 10px; }
.hero-index a:hover::after { transform: scaleX(1); }

/* Parallax del hero ligado al scroll (sin JS) */
@supports (animation-timeline: scroll()) {
  .hero-bg { animation: hero-bg-par linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  .hero-copy { animation: hero-copy-par linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
}
@keyframes hero-bg-par { to { transform: translate3d(0, 22%, 0); } }
@keyframes hero-copy-par { to { transform: translate3d(0, 80px, 0); opacity: .15; } }

@media (min-width: 1024px) {
  .hero { padding-top: calc(var(--header-h) + 72px); }
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 96px; align-items: end; }
}

/* ---------- Secciones ---------- */
.section { position: relative; padding-block: clamp(88px, 12vw, 160px) clamp(96px, 13vw, 176px); }

.section-head { max-width: 820px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head h2 {
  margin-top: 20px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.5rem, 5.6vw, 4.4rem); line-height: 1.04; letter-spacing: -.015em;
  color: var(--petroleo);
}
.section-lead { margin-top: 18px; color: var(--muted); }

/* ---------- Aparición al hacer scroll ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .section-head[data-reveal] .label::before { transform: scaleX(0); }
.js .section-head[data-reveal].is-in .label::before { transform: scaleX(1); }

/* ---------- Nosotros ---------- */
.about-grid { display: grid; gap: 64px; }
.mission h3, .about-team h3 {
  font-family: var(--sans); font-size: .74rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.mission-list { margin-top: 18px; }
.mission-list li {
  position: relative;
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: baseline;
  padding: 26px 0;
}
.mission-list li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong);
  transform-origin: left; transition: transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + .1s);
}
.js .mission-list li[data-reveal]::before { transform: scaleX(0); }
.js .mission-list li.is-in::before { transform: scaleX(1); }
.mission-list span {
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--rojo);
  font-variant-numeric: lining-nums tabular-nums;
}
.mission-list p {
  font-family: var(--serif); font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.3; color: var(--petroleo);
}

.about-side { display: grid; gap: 56px; align-content: start; }
.statement {
  position: relative; color: var(--on-dark);
  padding: clamp(36px, 5vw, 56px);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(52, 120, 124, .45), transparent 60%),
    var(--petroleo);
  box-shadow: var(--shadow);
}
.statement::before { content: ""; position: absolute; left: 0; top: clamp(36px, 5vw, 56px); width: 3px; height: 56px; background: var(--rojo-2); }
.statement h3 {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.5rem; color: #e3b3ae;
}
.statement p {
  margin-top: 18px;
  font-family: var(--serif); font-size: clamp(1.4rem, 2.3vw, 1.75rem); line-height: 1.38; color: #fff;
}
.about-team { padding-left: 2px; }
.about-team p { margin-top: 14px; color: var(--muted); max-width: 52ch; }

@media (min-width: 960px) {
  .about-grid { grid-template-columns: 1.15fr 1fr; gap: 104px; }
  .about-side { margin-top: 52px; }
}

/* ---------- Áreas (índice editorial a dos columnas) ---------- */
.areas-section { background: var(--bg-2); }
.areas { display: grid; grid-template-columns: 1fr; column-gap: 72px; counter-reset: area; }
.area {
  position: relative; counter-increment: area;
  display: grid; grid-template-columns: 56px 1fr; column-gap: 12px;
  padding: 32px 0 36px;
}
.area::before {
  content: counter(area, decimal-leading-zero);
  grid-row: 1 / span 2;
  padding-top: .55em;
  font-size: .78rem; font-weight: 500; letter-spacing: .1em; color: var(--rojo);
  font-variant-numeric: tabular-nums;
}
/* Línea superior + línea roja que se dibuja en hover */
.area::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(var(--rojo), var(--rojo)) left / 0 100% no-repeat, var(--line-strong);
  transition: background-size .8s var(--ease);
}
.area:hover::after { background-size: 100% 100%, auto; }
.area h3 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.2vw, 1.8rem); line-height: 1.15; color: var(--petroleo);
  transition: transform .6s var(--ease);
}
.area p { margin-top: 10px; color: var(--muted); max-width: 46ch; transition: color .5s var(--ease), transform .6s var(--ease); }
.area:hover h3, .area:hover p { transform: translateX(8px); }
.area:hover p { color: var(--ink); }

@media (min-width: 760px) { .areas { grid-template-columns: 1fr 1fr; } }

/* ---------- Servicios (cabecera fija + acordeón) ---------- */
.services-layout { display: grid; gap: 8px; }
.services { border-bottom: 1px solid var(--line-strong); }
.service { position: relative; }
.service summary {
  position: relative;
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px;
  padding: 30px 0; cursor: pointer; list-style: none;
  border-top: 1px solid var(--line-strong);
}
.service summary::-webkit-details-marker { display: none; }
.service summary::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--rojo);
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease);
}
.service[open] summary::after, .service summary:hover::after { transform: scaleX(1); }
.service-num { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--rojo); font-variant-numeric: lining-nums tabular-nums; }
.service-title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.15; color: var(--petroleo);
  transition: transform .6s var(--ease);
}
.service summary:hover .service-title { transform: translateX(6px); }
.chev { position: relative; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; transition: transform .7s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease); }
.chev::before, .chev::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1px; background: var(--petroleo);
  transform: translate(-50%, -50%); transition: transform .55s var(--ease), background-color .4s var(--ease);
}
.chev::after { transform: translate(-50%, -50%) rotate(90deg); }
.service[open] .chev { transform: rotate(180deg); background: var(--petroleo); border-color: var(--petroleo); }
.service[open] .chev::before, .service[open] .chev::after { background: #fff; }
.service[open] .chev::after { transform: translate(-50%, -50%) rotate(0deg); }

.service-body { padding: 0 0 40px 68px; }
.service-body > p { color: var(--muted); max-width: 62ch; font-size: 1.06rem; }
.service-body h4 {
  margin: 28px 0 4px;
  font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--petroleo-3);
}
.service-cols { display: grid; gap: 8px; }
.ticks { margin-top: 18px; display: grid; gap: 12px; }
.service-cols .ticks { margin-top: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .78em; width: 16px; height: 1px; background: var(--rojo); }
.service.is-opening .ticks li { animation: rise .75s var(--ease) both; }
.service.is-opening .ticks li:nth-child(2) { animation-delay: .04s; }
.service.is-opening .ticks li:nth-child(3) { animation-delay: .08s; }
.service.is-opening .ticks li:nth-child(4) { animation-delay: .12s; }
.service.is-opening .ticks li:nth-child(5) { animation-delay: .16s; }
.service.is-opening .ticks li:nth-child(6) { animation-delay: .2s; }
.service.is-opening .ticks li:nth-child(n+7) { animation-delay: .24s; }

@media (max-width: 559px) {
  .service summary { grid-template-columns: 40px 1fr auto; }
  .service-body { padding-left: 0; }
}
@media (min-width: 760px) { .service-cols { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (min-width: 1024px) {
  .services-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 88px; align-items: start; }
  .services-head { position: sticky; top: calc(var(--header-h-sm) + 40px); margin-bottom: 0; }
  .services-head h2 { font-size: clamp(2.5rem, 4vw, 3.6rem); }
}

/* ---------- Equipo (retratos editoriales) ---------- */
.team-section { background: var(--bg); }
.team { display: grid; grid-template-columns: 1fr; gap: 28px; }
.member { display: flex; flex-direction: column; }
.member-link { display: block; text-decoration: none; }

/* Tratamiento uniforme de fotos: mismo recorte, monocromo que se colorea al pasar */
.member-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: #cfd9d8; isolation: isolate; }
.member-media .photo, .member-media .avatar { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.member-media .photo {
  filter: grayscale(1) contrast(1.06) brightness(1.03);
  transform: scale(1.001);
  transition: transform 1.4s var(--ease), filter 1s var(--ease);
}
.member-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--petroleo-3); mix-blend-mode: soft-light; opacity: .5;
  transition: opacity 1s var(--ease);
}
.member-media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 2;
  background: var(--rojo); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease);
}
.member:hover .member-media .photo { transform: scale(1.05); filter: grayscale(0) contrast(1.02) brightness(1); }
.member:hover .member-media::before { opacity: .15; }
.member:hover .member-media::after { transform: scaleX(1); }
.avatar {
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 4rem; color: var(--petroleo);
  background: linear-gradient(160deg, #e3ebea, #c9d8d7);
}

.member-body { padding-top: 22px; display: flex; flex-direction: column; flex: 1; }
.member h3 { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.12; color: var(--petroleo); }
.role { margin-top: 6px; font-size: .9rem; font-weight: 500; color: var(--rojo); }
/* Especialidades como texto corrido, separadas por comas */
.tags { display: block; margin: 12px 0 22px; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.tags li { display: inline; }
.tags li:not(:last-child)::after { content: ", "; }

.btn-profile {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 0;
  font: 500 .93rem var(--sans); letter-spacing: .02em; color: var(--petroleo); text-decoration: none;
  background: linear-gradient(var(--rojo), var(--rojo)) left bottom / 0 1px no-repeat,
              linear-gradient(var(--line-strong), var(--line-strong)) left bottom / 100% 1px no-repeat;
  transition: background-size .55s var(--ease), color .4s var(--ease);
}
.btn-profile:hover, .member:hover .btn-profile { background-size: 100% 1px, 100% 1px; color: var(--rojo); }

@media (max-width: 559px) {
  .member { flex-direction: row; gap: 18px; align-items: stretch; }
  .member-link { width: 118px; flex: none; }
  .member-body { padding-top: 2px; }
  .member h3 { font-size: 1.35rem; }
  .tags { margin: 8px 0 12px; font-size: .86rem; }
}
@media (min-width: 560px) { .team { grid-template-columns: repeat(2, 1fr); gap: 48px 28px; } }
@media (min-width: 860px) { .team { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1120px) {
  .team { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  /* Ritmo escalonado sutil */
  .member:nth-child(even) { margin-top: 56px; }
  .member h3 { font-size: 1.4rem; }
}

/* ---------- Contacto ---------- */
.contact-section { background: var(--bg-2); }
.contact-grid { display: grid; gap: 56px; }
.contact-info .section-head { margin-bottom: 44px; }
.contact-list { display: grid; gap: 0; margin-bottom: 36px; }
.contact-list > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line-strong); }
.contact-list dt {
  font-size: .72rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--muted);
}
.contact-list dd { font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.3; color: var(--petroleo); }
.contact-list a {
  color: inherit; text-decoration: none; font-variant-numeric: lining-nums tabular-nums;
  background: linear-gradient(var(--rojo), var(--rojo)) left bottom / 0 1px no-repeat;
  transition: background-size .5s var(--ease), color .35s var(--ease);
}
.contact-list a:hover { background-size: 100% 1px; color: var(--rojo); }
@media (min-width: 560px) {
  .contact-list > div { grid-template-columns: 160px 1fr; align-items: baseline; gap: 20px; }
}

.form {
  position: relative; align-self: start;
  background: var(--surface); padding: clamp(28px, 4vw, 52px);
  box-shadow: var(--shadow);
}
.form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--petroleo); }
.form h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.4rem); color: var(--petroleo); margin-bottom: 18px; }
.field { position: relative; display: flex; flex-direction: column; margin-bottom: 10px; }
.field-row { display: grid; gap: 0 28px; }

/* Campos de línea inferior */
.field input, .field select, .field textarea {
  width: 100%; font: 400 1.05rem var(--sans); color: var(--ink);
  padding: 28px 0 10px; min-height: 64px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  transition: border-color .4s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230e3a3f' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center;
}
.field select:invalid { color: var(--muted); }
/* Línea de foco que se dibuja desde la izquierda */
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--petroleo);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); pointer-events: none;
}
.field:focus-within::after { transform: scaleX(1); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }

/* Etiquetas flotantes */
.field--float label {
  position: absolute; left: 0; top: 30px; z-index: 1;
  font-size: 1.02rem; color: var(--muted);
  transform-origin: left top; pointer-events: none;
  transition: transform .45s var(--ease), color .35s var(--ease);
}
.field--float input:focus + label,
.field--float input:not(:placeholder-shown) + label,
.field--float textarea:focus + label,
.field--float textarea:not(:placeholder-shown) + label,
.field--select label { transform: translateY(-22px) scale(.78); }
.field--float input:focus + label, .field--float textarea:focus + label, .field--select select:focus + label { color: var(--petroleo-3); }

.field .is-invalid { border-bottom-color: var(--rojo-2); }
.field .is-invalid + label { color: var(--rojo-2) !important; }
.field .is-invalid:not(:focus) { animation: nudge .4s var(--ease); }
@keyframes nudge { 30% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }

.form .btn-block { margin-top: 28px; }
.form-status { margin-top: 14px; font-size: .95rem; min-height: 1.4em; }
.form-status.is-error { color: var(--rojo-2); }
.form-status.is-ok { color: var(--petroleo-3); }

.map {
  margin-top: clamp(64px, 8vw, 104px); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--bg);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.85) contrast(1.05); transition: filter 1s var(--ease); }
.map:hover iframe { filter: grayscale(0); }

@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 760px) { .map { aspect-ratio: 21 / 8; } }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 96px; align-items: start; } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--petroleo-900); color: var(--on-dark-muted);
  padding-top: clamp(72px, 9vw, 120px); padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}
.footer-grid { display: grid; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer .brand-name {
  display: block; color: #fff; font-weight: 400;
  font-size: clamp(3.4rem, 9vw, 7rem); line-height: .95; letter-spacing: -.02em;
}
.site-footer .brand-sub { display: block; margin-top: 14px; }
.footer-list { display: grid; gap: 10px; font-size: .98rem; align-content: end; }
.footer-list a {
  color: #fff; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.footer-list a:hover { background-size: 100% 1px; }
.footer-legal { padding-top: 28px; display: grid; gap: 6px; font-size: .86rem; color: #86a3a3; }

@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr; align-items: end; }
  .footer-legal { grid-template-columns: 1fr auto; }
  .site-footer { padding-bottom: 56px; }
}

/* ---------- Página de perfil (equipo/*.html) ---------- */
.profile { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 40px); padding-bottom: clamp(96px, 12vw, 160px); }
.profile-back {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 500; color: var(--petroleo); text-decoration: none; margin-bottom: 36px;
}
.profile-back::before { content: "←"; transition: transform .4s var(--ease); }
.profile-back:hover::before { transform: translateX(-4px); }

.profile-grid { display: grid; gap: 40px; }
.profile-media .member-media { max-width: 360px; box-shadow: var(--shadow); }
.profile-media .member-media .photo { filter: grayscale(.15) contrast(1.03); }
.profile-media .member-media::before { opacity: .2; }

.profile-head h1 {
  margin-top: 18px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1; letter-spacing: -.015em; color: var(--petroleo);
}
.profile-head .role { font-size: 1rem; margin-top: 18px; }
.profile-areas { margin-top: 6px; color: var(--muted); font-size: 1.02rem; }
.profile-bio { position: relative; margin-top: 40px; padding-top: 40px; max-width: 64ch; }
.profile-bio::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong);
  transform-origin: left; animation: line-draw 1.3s var(--ease) .5s both;
}
@keyframes line-draw { from { transform: scaleX(0); } }
.profile-bio p { color: #2d4044; font-size: 1.1rem; line-height: 1.8; }
.profile-bio p:first-child {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.3vw, 1.7rem); line-height: 1.42; color: var(--petroleo);
}
.profile-bio p + p { margin-top: 22px; }
.profile-actions { margin-top: 48px; }

.page-in { animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--d, 0) * 110ms + 120ms); }
.profile-media .page-in { animation-name: media-in; animation-duration: 1.4s; }
@keyframes media-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }

@media (max-width: 859px) {
  .profile-media .member-media { max-width: 200px; }
}
@media (min-width: 860px) {
  .profile { padding-top: calc(var(--header-h) + 72px); }
  .profile-grid { grid-template-columns: 320px 1fr; gap: 88px; align-items: start; }
  .profile-media { position: sticky; top: calc(var(--header-h-sm) + 40px); }
}

/* ---------- Táctil: sin estados de hover persistentes ---------- */
@media (hover: none) {
  .member:hover .member-media .photo { transform: none; filter: grayscale(1) contrast(1.06) brightness(1.03); }
  .member:hover .member-media::after { transform: scaleX(0); }
  .area:hover h3, .area:hover p { transform: none; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
  .hero-bg, .hero-copy { animation: none !important; transform: none !important; opacity: 1 !important; }
  .progress span { animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .mission-list li[data-reveal]::before, .js .section-head[data-reveal] .label::before { transform: none; }
}
