/* =========================================================
   Martínez Abogados — Hoja de estilos
   Paleta sobria, tipografía editorial, diseño contemporáneo
   ========================================================= */

:root {
  /* Color — marca Martínez Abogados */
  --ink:        #0d1d3e;   /* azul marino del logo */
  --ink-2:      #16284c;
  --ink-3:      #1d3358;
  --bg:         #ffffff;
  --bg-soft:    #f5f3ef;   /* hueso */
  --gold:       #f96f17;   /* naranja del logo (acento: rellenos, iconos, texto sobre fondo oscuro) */
  --gold-soft:  #ff8a3d;   /* naranja claro para texto sobre fondo oscuro */
  --gold-strong:#b8540f;   /* naranja oscuro para texto pequeño sobre fondo claro (contraste AA) */
  --text:       #29333f;
  --muted:      #5e6a78;
  --muted-light:#9fb0c1;
  --line:       rgba(13, 29, 62, .12);
  --line-light: rgba(255, 255, 255, .14);

  /* Tipografía */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1200px;
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Foco visible para navegación por teclado (accesibilidad) */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.btn:focus-visible { outline-offset: 4px; }

/* ---------- Utilidades ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 28px; }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-strong);
  margin-bottom: 1.1rem;
  display: inline-block;
}
.eyebrow--light { color: var(--gold-soft); }

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section--soft { background: var(--bg-soft); }

.section__title {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--ink);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  text-wrap: balance;
}
.section__title em { font-style: italic; color: var(--gold-strong); }
.section__title--light { color: #fff; }
.section__title--light em { color: var(--gold-soft); }

.section__head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head--row {
  max-width: none; display: flex; justify-content: space-between;
  align-items: flex-end; gap: 2rem; flex-wrap: wrap;
}
.section__intro { color: var(--muted); font-size: 1.08rem; margin-top: 1.2rem; }

.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .95rem 1.9rem;
  font-size: .92rem; font-weight: 600; letter-spacing: .02em;
  border-radius: var(--radius); transition: all .35s var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.btn--accent { background: var(--gold); color: #fff; }
.btn--accent:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--block { width: 100%; }

.link-arrow {
  font-weight: 600; color: var(--ink); font-size: .95rem;
  border-bottom: 1px solid var(--gold); padding-bottom: 3px;
  transition: color .3s var(--ease);
}
.link-arrow::after { content: " →"; color: var(--gold); }
.link-arrow:hover { color: var(--gold-strong); }

/* ---------- Barra superior ---------- */
.topbar {
  background: var(--ink); color: var(--muted-light);
  font-size: .8rem; border-bottom: 1px solid var(--line-light);
}
.topbar__inner { display: flex; justify-content: flex-end; align-items: center; height: 42px; }
.topbar__contact { display: flex; align-items: center; gap: .8rem; }
.topbar a { transition: color .3s; }
.topbar a:hover { color: #fff; }
.topbar .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .4s var(--ease);
}
.site-header.scrolled { box-shadow: 0 10px 40px -20px rgba(14,26,40,.35); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }

/* Marca */
.brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand__logo { height: 46px; width: auto; flex-shrink: 0; }
.brand__text {
  display: flex; flex-direction: column; line-height: 1;
  padding-left: .85rem; border-left: 1px solid var(--line);
}
.brand__name { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); letter-spacing: .01em; }
.brand__sub {
  font-size: .68rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold-strong); margin-top: 3px; font-weight: 600;
}
.brand--light .brand__name { color: #fff; }
.brand--light .brand__sub { color: var(--gold-soft); }
.brand--light .brand__text { border-left-color: var(--line-light); }
.brand--light .brand__logo { height: 50px; }

/* Acciones del header (idioma + menú) */
.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .4rem .8rem;
  transition: border-color .3s var(--ease);
}
.lang-toggle:hover { border-color: var(--gold); }
.lang-toggle__opt { transition: color .25s; }
.lang-toggle__opt.is-active { color: var(--ink); }
.lang-toggle__opt:not(.is-active) { color: var(--muted-light); }
.lang-toggle__sep { color: var(--line); }

/* Navegación */
.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav a {
  font-size: .92rem; font-weight: 500; color: var(--text);
  position: relative; transition: color .3s;
}
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--gold); transition: width .35s var(--ease);
}
.nav a:not(.nav__cta):hover { color: var(--ink); }
.nav a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  background: var(--ink); color: #fff !important;
  padding: .7rem 1.4rem; border-radius: var(--radius); font-weight: 600;
  transition: background .3s var(--ease);
}
.nav__cta:hover { background: var(--gold); }

.nav-toggle { display: none; width: 30px; height: 22px; position: relative; }
.nav-toggle span {
  position: absolute; left: 0; height: 2px; width: 100%; background: var(--ink);
  transition: all .35s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }
.nav-toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(249,111,23,.20), transparent 55%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink-3) 100%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(80% 70% at 70% 20%, #000, transparent 80%);
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink), transparent 40%); }
.hero__content {
  position: relative; z-index: 2;
  padding-top: clamp(5rem, 12vw, 9rem); padding-bottom: clamp(4rem, 9vw, 7rem);
  max-width: 880px;
}
.hero__title {
  font-family: var(--serif); font-weight: 300; font-optical-sizing: auto;
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.04; letter-spacing: -.015em;
  margin-bottom: 1.6rem; text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--gold-soft); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,.78); max-width: 620px; margin-bottom: 2.4rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- La firma ---------- */
.firma__media { position: relative; }
.firma__img {
  aspect-ratio: 4 / 5; border-radius: var(--radius); background:
    linear-gradient(180deg, rgba(14,26,40,.15), rgba(14,26,40,.55)),
    url("assets/firma.jpg") center/cover no-repeat,
    var(--ink-2);
}
.firma__badge {
  position: absolute; bottom: -28px; left: -28px;
  background: var(--ink); color: #fff; padding: 1.4rem 1.8rem; border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(14,26,40,.6);
}
.firma__badge-num { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--gold); }
.firma__badge-label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); }

.firma__text p { color: var(--muted); margin-top: 1.3rem; }
.firma__text p:first-of-type { margin-top: 1.6rem; }
.checklist { margin-top: 2rem; display: grid; gap: .9rem; }
.checklist li { position: relative; padding-left: 2rem; color: var(--text); font-weight: 500; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 7px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

/* ---------- Áreas de práctica ---------- */
.areas-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.areas-grid--3 { grid-template-columns: repeat(3, 1fr); }
.areas-grid--4 { grid-template-columns: repeat(4, 1fr); }
.area-card {
  background: var(--bg); padding: 2.2rem 1.8rem 2.4rem;
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.section--soft .area-card { background: var(--bg-soft); }
.area-card:hover { background: var(--ink); transform: translateY(-2px); }
.area-card__icon { width: 44px; height: 44px; color: var(--gold); margin-bottom: 1.3rem; transition: color .4s; }
.area-card__icon svg { width: 100%; height: 100%; stroke-linecap: round; stroke-linejoin: round; }
.area-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; color: var(--ink); margin-bottom: .6rem; transition: color .4s; }
.area-card p { font-size: .92rem; color: var(--muted); transition: color .4s; }
.area-card:hover h3, .area-card:hover .area-card__icon { color: var(--gold-soft); }
.area-card:hover p { color: rgba(255,255,255,.7); }

/* ---------- Enfoque ---------- */
.enfoque { background: var(--ink); color: #fff; }
.grid-2--reverse .enfoque__media { order: 2; }
.enfoque__lead { color: rgba(255,255,255,.75); font-size: 1.1rem; margin-top: 1.4rem; margin-bottom: 2.6rem; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 2.4rem; }
.value__num { font-family: var(--serif); color: var(--gold); font-size: 1.1rem; letter-spacing: .1em; }
.value h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin: .5rem 0 .5rem; color: #fff; }
.value p { font-size: .92rem; color: rgba(255,255,255,.7); }
.enfoque__img {
  aspect-ratio: 3 / 4; border-radius: var(--radius); background:
    linear-gradient(180deg, rgba(14,26,40,.1), rgba(14,26,40,.5)),
    url("assets/enfoque.jpg") center/cover no-repeat,
    var(--ink-3);
}

/* ---------- Equipo ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; }
.member { text-align: left; }
.member__photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); margin-bottom: 1.1rem;
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  display: grid; place-items: center; position: relative; overflow: hidden;
  transition: transform .4s var(--ease);
}
.member__photo::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(249,111,23,.22), transparent 60%);
}
.member__photo span { font-family: var(--serif); font-size: 2.4rem; color: var(--gold-soft); }
.member:hover .member__photo { transform: translateY(-4px); }
.member h3 { font-family: var(--serif); font-weight: 500; font-size: 1.18rem; color: var(--ink); }
.member__role { color: var(--gold); font-weight: 600; font-size: .9rem; margin-top: .2rem; }
.member__area { color: var(--muted); font-size: .86rem; margin-top: .15rem; }

/* ---------- Perspectivas ---------- */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.post {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.8rem 2.2rem;
  transition: all .4s var(--ease); cursor: pointer; background: var(--bg);
}
.post:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(14,26,40,.4); }
.post__tag {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  color: var(--gold-strong);
}
.post h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; color: var(--ink); margin: 1rem 0 .8rem; line-height: 1.25; }
.post p { color: var(--muted); font-size: .94rem; }
.post__date { display: block; margin-top: 1.4rem; font-size: .82rem; color: var(--muted); }

/* ---------- Contacto ---------- */
.contacto { background: var(--ink); color: #fff; }
.contacto__lead { color: rgba(255,255,255,.75); margin-top: 1.4rem; font-size: 1.05rem; }
.contacto__list { margin-top: 2.4rem; display: grid; gap: 1.6rem; }
.contacto__list li { color: rgba(255,255,255,.85); font-size: .98rem; line-height: 1.55; }
.contacto__list a { transition: color .3s; }
.contacto__list a:hover { color: var(--gold-soft); }
.contacto__label {
  display: block; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-strong); font-weight: 600; margin-bottom: .35rem;
}

/* Formulario */
.form {
  background: #fff; color: var(--text); border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.6rem); box-shadow: 0 40px 80px -40px rgba(0,0,0,.5);
}
.form__row { margin-bottom: 1.1rem; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.1rem; }
.form label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.form input, .form select, .form textarea {
  width: 100%; margin-top: .5rem; padding: .85rem 1rem; font-family: inherit; font-size: .95rem;
  color: var(--text); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s, background .3s; font-weight: 400;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--gold); background: #fff;
}
.form textarea { resize: vertical; }
.form__check { display: flex; align-items: flex-start; gap: .6rem; margin: 1.2rem 0 1.5rem; font-weight: 400 !important; font-size: .85rem; color: var(--muted); }
.form__check input { width: auto; margin-top: 3px; accent-color: var(--gold); }
.form__check a { color: var(--gold-strong); border-bottom: 1px solid var(--gold-strong); }
.form__feedback { margin-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--gold-strong); min-height: 1.2em; text-align: center; }
.form__feedback--error { color: #c0392b; }

/* ---------- Footer ---------- */
.footer { background: #0a141f; color: var(--muted-light); padding-top: clamp(3.5rem, 6vw, 5rem); }
.footer__top {
  display: grid; grid-template-columns: 1.4fr 2fr; gap: 3rem;
  padding-bottom: 3rem; border-bottom: 1px solid var(--line-light);
}
.footer__brand p { margin-top: 1.4rem; font-size: .92rem; max-width: 320px; line-height: 1.7; }
.footer__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer__nav h4 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.1rem; font-weight: 600; }
.footer__nav a { display: block; font-size: .92rem; margin-bottom: .7rem; transition: color .3s; }
.footer__nav a:hover { color: var(--gold-soft); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding: 1.8rem 0; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }
.footer__legal { display: flex; gap: 1.6rem; }
.footer__legal a:hover { color: #fff; }

/* ---------- Animaciones reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(24px); filter: blur(5px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .areas-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2--reverse .enfoque__media { order: 0; }
  .values { grid-template-columns: 1fr; gap: 1.6rem; }
  .form__grid { grid-template-columns: 1fr; }
  .firma__badge { left: 0; bottom: -20px; }

  .nav {
    position: fixed; top: 80px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 1rem 28px 2rem;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -30px rgba(14,26,40,.4);
    transform: translateY(-130%); transition: transform .45s var(--ease); z-index: 90;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.nav__cta)::after { display: none; }
  .nav__cta { text-align: center; margin-top: 1rem; }
  .nav-toggle { display: block; }
}

@media (max-width: 460px) {
  .areas-grid, .team-grid { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Páginas interiores (multipágina)
   ========================================================= */

/* Enlace de navegación de la página actual */
.nav a.is-current:not(.nav__cta) { color: var(--ink); }
.nav a.is-current:not(.nav__cta)::after { width: 100%; }

/* Hero de página interior */
.page-hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.page-hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(249,111,23,.20), transparent 55%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 60%, var(--ink-3) 100%);
}
.page-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 80% at 75% 10%, #000, transparent 80%);
}
.page-hero .container { position: relative; z-index: 2; padding: clamp(4.5rem, 8vw, 6.5rem) 0 clamp(2.8rem, 5vw, 4rem); }
.page-hero__title {
  font-family: var(--serif); font-weight: 300; font-optical-sizing: auto;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.06; letter-spacing: -.01em;
  max-width: 20ch; text-wrap: balance;
}
.page-hero__title em { font-style: italic; color: var(--gold-soft); }
.page-hero__lead { color: rgba(255,255,255,.78); max-width: 640px; margin-top: 1.2rem; font-size: clamp(1rem, 1.5vw, 1.15rem); }

/* Migas de pan */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .55rem; font-size: .82rem; color: var(--muted-light); margin-bottom: 1.3rem; }
.breadcrumb a { transition: color .3s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { color: var(--gold); }
.breadcrumb .current { color: rgba(255,255,255,.72); }

/* Layout de página de área (contenido + barra lateral) */
.area-layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }

/* Texto largo */
.prose p { color: var(--muted); margin-bottom: 1.2rem; font-size: 1.04rem; }
.prose h2 { font-family: var(--serif); font-weight: 500; color: var(--ink); font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 2.4rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.service-list { display: grid; gap: .95rem; margin: 1.2rem 0 .5rem; }
.service-list li { position: relative; padding-left: 2rem; color: var(--text); }
.service-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 7px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg);
}

/* Barra lateral */
.sidebar { position: sticky; top: 100px; display: grid; gap: 1.4rem; }
.sidebar__box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; }
.sidebar__box h3 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--ink); margin-bottom: 1rem; }
.sidebar__box--accent { background: var(--ink); border-color: var(--ink); color: #fff; }
.sidebar__box--accent h3 { color: #fff; }
.sidebar__box--accent p { color: rgba(255,255,255,.78); font-size: .94rem; margin-bottom: 1.2rem; }
.side-links { display: grid; }
.side-links a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: .95rem; transition: color .3s, padding .3s; }
.side-links a:last-child { border-bottom: none; }
.side-links a::after { content: "→"; color: var(--gold); opacity: 0; transition: opacity .3s, transform .3s; }
.side-links a:hover { color: var(--gold-strong); padding-left: .3rem; }
.side-links a:hover::after { opacity: 1; }
.side-links a.is-current { color: var(--gold-strong); font-weight: 600; }
.side-links a.is-current::after { content: "•"; opacity: 1; }

/* Banda de llamado a la acción */
.cta-band { background: var(--ink); color: #fff; text-align: center; }
.cta-band .container { max-width: 760px; }
.cta-band h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.12; color: #fff; text-wrap: balance; }
.cta-band p { color: rgba(255,255,255,.78); margin: 1.1rem auto 2rem; font-size: 1.08rem; }

/* Tarjetas de área como enlace (índice de áreas) */
a.area-card { text-decoration: none; }
.area-card__more { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.2rem; font-size: .85rem; font-weight: 600; color: var(--gold-strong); letter-spacing: .02em; }
.area-card__more::after { content: "→"; transition: transform .3s var(--ease); }
.area-card:hover .area-card__more { color: var(--gold-soft); }
.area-card:hover .area-card__more::after { transform: translateX(4px); }

/* Lista de contacto sobre fondo claro (página de Contacto) */
.contacto__list--dark li { color: var(--text); }
.contacto__list--dark a { color: var(--ink); }
.contacto__list--dark a:hover { color: var(--gold-strong); }

@media (max-width: 860px) {
  .area-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* =========================================================
   Elementos visuales contemporáneos
   ========================================================= */

/* Selección de texto en color de marca */
::selection { background: var(--ink); color: #fff; }
.hero ::selection, .enfoque ::selection, .contacto ::selection,
.cta-band ::selection, .page-hero ::selection { background: var(--gold); color: #fff; }

/* Barra de progreso de lectura (inyectada por JS) */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  z-index: 300; pointer-events: none;
}

/* Botón volver arriba (inyectado por JS) */
.back-to-top {
  position: fixed; right: 26px; bottom: 26px; width: 46px; height: 46px;
  border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; z-index: 250;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 34px -12px rgba(13,29,62,.5);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .4s var(--ease), transform .4s var(--ease),
              visibility .4s, background .3s var(--ease);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--gold); }

/* Marca de agua del monograma en los heros */
.hero::after, .page-hero::after {
  content: ""; position: absolute; right: -4%; bottom: -10%;
  width: min(540px, 46vw); aspect-ratio: 934 / 760;
  background: url("assets/monogram-orange.png") center / contain no-repeat;
  opacity: .05; z-index: 1; pointer-events: none;
}
.page-hero::after { width: min(380px, 38vw); bottom: -16%; }

/* Marca de agua tipográfica en el footer */
.footer { position: relative; overflow: hidden; }
.footer::before {
  content: "Martínez"; position: absolute; right: -1rem; bottom: -4.5rem;
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(7rem, 18vw, 15rem); line-height: 1;
  color: rgba(255,255,255,.025); pointer-events: none; user-select: none;
}

/* Indicador de scroll del hero */
.hero__scroll {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  display: inline-flex; align-items: center; gap: 1rem;
  color: rgba(255,255,255,.55);
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 600;
}
.hero__scroll-line {
  width: 1px; height: 44px; background: rgba(255,255,255,.18);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; top: -14px; left: 0; width: 100%; height: 14px;
  background: var(--gold);
  animation: hero-scroll 2.4s var(--ease) infinite;
}
@keyframes hero-scroll {
  0%   { top: -14px; opacity: 1; }
  70%  { top: 44px;  opacity: 1; }
  100% { top: 44px;  opacity: 0; }
}

/* Acento superior que se expande en tarjetas de área */
.area-card { position: relative; overflow: hidden; }
.area-card::before {
  content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 0;
  background: var(--gold); transition: width .5s var(--ease); z-index: 1;
}
.area-card:hover::before { width: 100%; }

/* Proceso "Cómo trabajamos" (línea de tiempo horizontal) */
.process-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}
.process-step { position: relative; padding-top: 2.1rem; }
.process-step::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: var(--line);
}
.process-step::after {
  content: ""; position: absolute; top: -4px; left: 0; width: 9px; height: 9px;
  border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 5px rgba(249,111,23,.14);
}
.process-step__num {
  display: block; font-family: var(--serif); font-weight: 500; line-height: 1;
  font-size: clamp(2.8rem, 4.6vw, 4rem); color: rgba(13,29,62,.10);
  margin-bottom: .9rem; user-select: none;
}
.process-step h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.28rem;
  color: var(--ink); margin-bottom: .6rem;
}
.process-step p { color: var(--muted); font-size: .96rem; }

@media (max-width: 760px) {
  .process-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .process-step { padding-top: 0; padding-left: 1.9rem; }
  .process-step::before { width: 1px; height: 100%; }
  .process-step::after { top: 2px; left: -4px; }
  .hero::after { width: 70vw; right: -14%; bottom: -6%; }
  .back-to-top { right: 18px; bottom: 18px; width: 42px; height: 42px; }
}

/* ---------- Accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .hero__scroll-line::after { display: none; }
}
