/* ============================================================
   BUFETE ALONSO GARCÍA LLC — Design System
   Paleta monocromática violeta derivada del logo AG
   Display: Cormorant Garamond · Cuerpo: Mulish
   ============================================================ */

:root {
  --c-tinta: #2b2135;          /* texto principal, ciruela casi negro */
  --c-purpura: #5c3a72;        /* primario de marca */
  --c-purpura-osc: #452a58;    /* hover / énfasis */
  --c-lavanda: #c9b5da;        /* acento suave del logo */
  --c-lavanda-palida: #f1ecf6; /* fondos alternos */
  --c-marfil: #faf9f7;         /* fondo de página */
  --c-blanco: #ffffff;
  --c-linea: #e3dcea;
  --c-gris-texto: #5d5468;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Mulish", "Segoe UI", sans-serif;

  --w-content: 1200px;
  --gutter: clamp(1.5rem, 4vw, 4rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-tinta);
  background: var(--c-marfil);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--c-purpura); }

/* ---------- Utilidades tipográficas ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-purpura);
  margin: 0 0 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
  letter-spacing: 0.01em;
}
.section-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--c-purpura);
}

/* ---------- Botones ---------- */

.btn {
  position: relative;
  display: inline-block;
  padding: 0.9rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--c-purpura);
  color: var(--c-blanco);
  box-shadow: 0 1px 2px rgba(43, 33, 53, 0.12), 0 6px 16px rgba(92, 58, 114, 0.22);
}
.btn-primary::after { box-shadow: 0 4px 10px rgba(43, 33, 53, 0.16), 0 16px 32px rgba(92, 58, 114, 0.34); }
.btn-primary:hover { background: var(--c-purpura-osc); transform: translateY(-2px); }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { background: var(--c-purpura-osc); box-shadow: 0 1px 2px rgba(43, 33, 53, 0.14); }

.btn-ghost {
  background: transparent;
  color: var(--c-purpura);
  border-color: var(--c-lavanda);
}
.btn-ghost::after { box-shadow: 0 8px 20px rgba(92, 58, 114, 0.14); }
.btn-ghost:hover { border-color: var(--c-purpura); transform: translateY(-2px); }
.btn-ghost:hover::after { opacity: 1; }

.btn-block { width: 100%; }

:focus-visible {
  outline: 2px solid var(--c-purpura);
  outline-offset: 3px;
}

/* ---------- Marcos de imagen ---------- */

.ph {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e9dff2 0%, var(--c-lavanda) 55%, #a98cc4 100%);
  box-shadow: 0 1px 2px rgba(43, 33, 53, 0.05), 0 20px 40px -16px rgba(92, 58, 114, 0.28);
}
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(165deg, rgba(92, 58, 114, 0.16) 0%, rgba(43, 33, 53, 0.05) 55%, rgba(92, 58, 114, 0.1) 100%);
  mix-blend-mode: multiply;
}
.ph picture { display: block; width: 100%; height: 100%; }
.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-hero {
  height: min(600px, 68vh);
  border-radius: 18px;
}
.ph-hero img { object-position: 18% 54%; transform: scale(1.2); transform-origin: 18% 54%; }

.ph-tall { height: 100%; min-height: 420px; border-radius: 18px; }
.ph-tall img { object-position: center 35%; }

.ph-team {
  height: 420px;
  border-radius: 18px;
}
.team-photo { position: relative; }
.ph-team img { object-position: center top; }

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.header.scrolled {
  border-bottom-color: var(--c-linea);
  box-shadow: 0 2px 20px rgba(43, 33, 53, 0.06);
}
.header.menu-open { background: var(--c-marfil); }

.header-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--c-purpura);
}

.brand-mark { width: 57px; height: 34px; flex-shrink: 0; object-fit: contain; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-bufete {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--c-gris-texto);
}

.brand-nombre {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-tinta);
}

.nav { display: flex; align-items: center; gap: 1.8rem; }

.nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--c-tinta);
  transition: color 0.2s var(--ease);
}
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: var(--c-purpura);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav a:not(.nav-cta):hover { color: var(--c-purpura); }
.nav a:not(.nav-cta):hover::after,
.nav a:not(.nav-cta)[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav a.nav-cta {
  position: relative;
  padding: 0.6rem 1.4rem;
  background: var(--c-purpura);
  color: var(--c-blanco);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(43, 33, 53, 0.12), 0 6px 14px rgba(92, 58, 114, 0.22);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nav a.nav-cta:hover {
  background: var(--c-purpura-osc);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(43, 33, 53, 0.16), 0 14px 26px rgba(92, 58, 114, 0.3);
}

/* ---------- Nav: dropdown de servicios ---------- */

.nav-dropdown { position: relative; }

.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 0.4rem; }
.nav-dropdown-trigger svg { transition: transform 0.25s var(--ease); flex-shrink: 0; }
.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown:focus-within .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 240px;
  margin-top: 0.8rem;
  padding: 0.6rem;
  background: var(--c-blanco);
  border: 1px solid var(--c-linea);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(43, 33, 53, 0.06), 0 24px 48px -12px rgba(92, 58, 114, 0.22);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 200;
}
/* Puente invisible para que el mouse pueda cruzar del enlace al panel sin perder el hover. */
.nav-dropdown-panel::before {
  content: "";
  position: absolute;
  top: -0.8rem;
  left: 0;
  right: 0;
  height: 0.8rem;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dropdown-panel a {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-tinta);
}
.nav-dropdown-panel a::after { display: none; }
.nav-dropdown-panel a:hover,
.nav-dropdown-panel a:focus-visible {
  background: var(--c-lavanda-palida);
  color: var(--c-purpura);
}

@media (max-width: 767px) {
  /* En touch no hay hover, así que el dropdown se vuelve un acordeón:
     tocar "Servicios" despliega la lista en vez de navegar (ver script.js). */
  .nav-dropdown-panel {
    position: static;
    min-width: 0;
    margin-top: 0.2rem;
    padding: 0.2rem 0 0.2rem 0.8rem;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: none;
  }
  .nav-dropdown-panel::before { display: none; }
  .nav-dropdown.open .nav-dropdown-panel { display: flex; }
  .nav-dropdown-panel a { padding: 0.55rem 0.7rem; font-size: 0.86rem; }
  .nav-dropdown.open .nav-dropdown-trigger svg { transform: rotate(180deg); }
  /* Misma especificidad que .nav-dropdown:hover/:focus-within .nav-dropdown-panel
     (que sigue activa en touch vía :focus-within) — al ir después en la cascada,
     esto gana y evita que el panel se desplace fuera de pantalla en mobile. */
  .nav-dropdown:hover .nav-dropdown-panel,
  .nav-dropdown:focus-within .nav-dropdown-panel {
    transform: none;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: -8px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--c-tinta);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) clamp(3.5rem, 7vw, 6rem);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.hero::before {
  width: 420px;
  height: 420px;
  left: -140px;
  top: -80px;
  background: radial-gradient(circle, rgba(201, 181, 218, 0.4), transparent 70%);
  animation: float-soft 14s ease-in-out infinite alternate;
}
.hero::after {
  width: 360px;
  height: 360px;
  right: 8%;
  top: 30%;
  background: radial-gradient(circle, rgba(92, 58, 114, 0.14), transparent 70%);
  animation: float-soft 18s ease-in-out infinite alternate-reverse;
}

@keyframes float-soft {
  from { transform: translate(0, 0); }
  to { transform: translate(30px, 24px); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--w-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 1.1rem;
}
.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--c-purpura);
}

.hero-sub {
  max-width: 480px;
  margin: 0 0 2rem;
  color: var(--c-gris-texto);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}

.hero-stats {
  position: relative;
  z-index: 1;
  max-width: var(--w-content);
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  display: flex;
  gap: clamp(2rem, 6vw, 4rem);
  border-top: 1px solid var(--c-linea);
  padding-top: 1.8rem;
}

.hero-stat { display: flex; flex-direction: column; gap: 0.25rem; }

.hero-stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--c-purpura);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-gris-texto);
  max-width: 120px;
}

.hero-media { position: relative; min-width: 0; }

.hero-caption {
  position: absolute;
  left: -1.5rem;
  bottom: -1.5rem;
  max-width: 240px;
  background: var(--c-blanco);
  border-radius: 4px 18px 18px 18px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 2px 6px rgba(43, 33, 53, 0.12), 0 24px 48px rgba(43, 33, 53, 0.24);
}
.hero-caption p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--c-tinta);
}
.hero-caption em { color: var(--c-purpura); font-weight: 500; }

/* ---------- Hero Sobre Nosotros ---------- */

.about-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) clamp(3.5rem, 7vw, 5.5rem);
  background: linear-gradient(160deg, var(--c-lavanda-palida) 0%, var(--c-marfil) 65%);
}
.about-hero::before,
.about-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.about-hero::before {
  width: 460px;
  height: 460px;
  right: -160px;
  top: -120px;
  background: radial-gradient(circle, rgba(201, 181, 218, 0.45), transparent 70%);
  animation: float-soft 16s ease-in-out infinite alternate;
}
.about-hero::after {
  width: 320px;
  height: 320px;
  left: 6%;
  bottom: -140px;
  background: radial-gradient(circle, rgba(92, 58, 114, 0.12), transparent 70%);
  animation: float-soft 20s ease-in-out infinite alternate-reverse;
}
.about-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.about-hero-inner .eyebrow { display: block; }
.about-hero-inner .hero-sub { margin: 0 auto; text-align: center; }

/* ---------- Secciones ---------- */

.section { padding: clamp(4rem, 8vw, 6.5rem) var(--gutter); }
.section-inner { max-width: var(--w-content); margin: 0 auto; }
.section-alt { background: var(--c-lavanda-palida); }

/* ---------- ¿Le suena familiar? ---------- */

.familiar-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.familiar-copy p { color: var(--c-gris-texto); }

.familiar-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}
.familiar-list li {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  padding: 1.3rem 0 1.3rem 2rem;
  border-top: 1px solid var(--c-linea);
  position: relative;
}
.familiar-list li::before {
  content: "«";
  position: absolute;
  left: 0;
  top: 1.2rem;
  font-size: 1rem;
  color: var(--c-lavanda);
}
.familiar-list li:last-child { border-bottom: 1px solid var(--c-linea); }
.familiar-list em {
  font-style: italic;
  font-weight: 600;
  color: var(--c-purpura);
}

/* ---------- Nuestro enfoque ---------- */

.enfoque-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: stretch;
}

.enfoque-copy > p { color: var(--c-gris-texto); }

/* ---------- Cómo trabajamos (pasos) ---------- */

.proceso-head { text-align: center; max-width: 700px; margin: 0 auto 3.5rem; }
.proceso-head .section-title { margin-left: auto; margin-right: auto; }

.proceso-track {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.proceso-track::before {
  content: "";
  position: absolute;
  top: 32px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 1px;
  background: var(--c-linea);
  z-index: 0;
}

.proceso-step { position: relative; z-index: 1; text-align: center; }

.proceso-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.3rem;
  border-radius: 50%;
  background: var(--c-marfil);
  border: 2px solid var(--c-purpura);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--c-purpura);
}

.proceso-step svg {
  width: 30px;
  height: 30px;
  color: var(--c-purpura);
  margin: 0 auto 1rem;
  display: block;
}

.proceso-step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.proceso-step p {
  font-size: 0.92rem;
  color: var(--c-gris-texto);
  margin: 0 auto;
  max-width: 260px;
}

.proceso-track.reveal.visible .proceso-step:nth-child(2) { transition-delay: 0.1s; }
.proceso-track.reveal.visible .proceso-step:nth-child(3) { transition-delay: 0.2s; }

/* ---------- Servicios (cuadrícula con íconos) ---------- */

.services-head { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.services-head .section-title { margin-left: auto; margin-right: auto; }
.services-sub { color: var(--c-gris-texto); margin: 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--c-linea);
  border-radius: 14px;
  overflow: hidden;
}

.service-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--c-tinta);
  background: var(--c-blanco);
  padding: 2.4rem 2rem;
  border-right: 1px solid var(--c-linea);
  border-bottom: 1px solid var(--c-linea);
  overflow: hidden;
  transition: background-color 0.3s var(--ease);
}
.service-card:nth-child(3n) { border-right: none; }
.service-card:nth-last-child(-n+3) { border-bottom: none; }
.service-card:hover { background: var(--c-lavanda-palida); }
.service-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--c-purpura);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--ease);
}
.service-card:hover::before { transform: scaleY(1); transform-origin: top; }

.service-card svg {
  width: 34px;
  height: 34px;
  color: var(--c-purpura);
  margin-bottom: 1.2rem;
  transition: transform 0.3s var(--ease);
}
.service-card:hover svg { transform: translateY(-3px); }

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6rem;
  transition: color 0.2s var(--ease);
}
.service-card:hover h3 { color: var(--c-purpura); }

.service-card p {
  font-size: 0.9rem;
  color: var(--c-gris-texto);
  margin: 0;
}

.service-card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-purpura);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.service-card:hover .service-card-link { color: var(--c-purpura-osc); }

/* ---------- Cita (banda oscura) ---------- */

.quote-band {
  background: var(--c-tinta);
  color: var(--c-marfil);
  padding: clamp(4.5rem, 9vw, 7rem) var(--gutter);
  text-align: center;
}
.quote-band-inner { max-width: 820px; margin: 0 auto; }
.quote-band-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 1.4rem;
}
.quote-band-text em { color: var(--c-lavanda); }
.quote-band-attr {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-lavanda);
  margin: 0;
}

/* ---------- Nuestro equipo ---------- */

.team-head { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.team-head .section-title { margin-left: auto; margin-right: auto; }
.team-sub { color: var(--c-gris-texto); margin: 0; }

.team-feature {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.team-info h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
}
.team-role {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-purpura);
  margin: 0 0 1rem;
}
.team-bio {
  color: var(--c-gris-texto);
  margin: 0 0 1.4rem;
}

.team-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.team-badges span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-purpura-osc);
  background: var(--c-lavanda-palida);
  border-radius: 999px;
  padding: 0.45rem 1rem;
}

.team-note {
  margin: 1.4rem 0 0;
  font-size: 0.92rem;
  color: var(--c-gris-texto);
}
.team-note a { font-weight: 600; white-space: nowrap; }

/* ---------- Página de servicio individual ---------- */

/* El hero de servicio no lleva .section, así que necesita su propio gutter
   lateral; sin esto el texto y la foto tocan el borde por debajo de ~1240px. */
.service-hero { padding: clamp(2rem, 5vw, 4rem) var(--gutter); }

.service-hero-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.ph-service { height: min(420px, 46vw); border-radius: 18px; box-shadow: none; }
.ph-service img { object-position: center 30%; }

.service-hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gris-texto);
  margin: 0 0 1.1rem;
}

.service-hero-tagline {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--c-gris-texto);
  margin: 0;
  max-width: 480px;
}
.service-hero-tagline em { font-style: italic; }

.service-body {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.service-sidebar {
  position: sticky;
  top: 6.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-sidebar-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-purpura);
  margin: 0 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--c-linea);
}

.service-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.service-checklist li {
  position: relative;
  padding: 0 0 0.9rem 1.4rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--c-linea);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--c-gris-texto);
}
.service-checklist li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-purpura);
  font-weight: 700;
}
.service-checklist li:last-child { border-bottom: none; margin-bottom: 0; }

.service-main > p { color: var(--c-tinta); margin: 0 0 1.4rem; }

.pull-quote {
  margin: 1.8rem 0;
  padding: 0 0 0 1.2rem;
  border-left: 2px solid var(--c-lavanda);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--c-tinta);
}
.pull-quote em { color: var(--c-purpura); font-weight: 500; }

/* Contenido SEO del servicio: situaciones + preguntas frecuentes */
.service-main a { color: var(--c-purpura); text-underline-offset: 3px; }
.service-main a:hover { color: var(--c-purpura-osc); }
.service-main a:focus-visible { outline: 2px solid var(--c-purpura); outline-offset: 2px; border-radius: 2px; }

.service-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--c-tinta);
  margin: 3rem 0 1.1rem;
}
.service-h2 em { font-style: italic; color: var(--c-purpura); }

.service-cases {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
}
.service-cases li {
  position: relative;
  padding: 0.95rem 0 0.95rem 1.6rem;
  border-top: 1px solid var(--c-linea);
  color: var(--c-tinta);
  line-height: 1.55;
}
.service-cases li:last-child { border-bottom: 1px solid var(--c-linea); }
.service-cases li::before {
  content: "«";
  position: absolute;
  left: 0;
  top: 0.95rem;
  font-family: var(--font-display);
  color: var(--c-lavanda);
}

.faq { border-top: 1px solid var(--c-linea); }
.faq details { border-bottom: 1px solid var(--c-linea); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.2rem;
  padding: 1.1rem 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-tinta);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--c-purpura);
  transition: transform 0.35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--c-purpura); }
.faq summary:focus-visible { outline: 2px solid var(--c-purpura); outline-offset: 4px; border-radius: 4px; }
.faq summary:active { color: var(--c-purpura-osc); }
.faq details p { margin: 0 0 1.2rem; color: var(--c-gris-texto); }
@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ---------- Página Legal ---------- */

.legal-toc { display: flex; flex-direction: column; gap: 0; }
.legal-toc a {
  padding: 0.55rem 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--c-tinta);
  text-decoration: none;
  border-bottom: 1px solid var(--c-linea);
}
.legal-toc a:last-child { border-bottom: none; }
.legal-toc a:hover, .legal-toc a:focus-visible { color: var(--c-purpura); }

.legal-updated { font-size: 0.85rem; color: var(--c-gris-texto); margin: 0 0 2.5rem; }

.legal-section { margin-bottom: 3rem; }
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 1.2rem;
}
.legal-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.6rem 0 0.6rem;
}
.legal-section p { color: var(--c-tinta); margin: 0 0 1.1rem; }

/* ---------- Sobre Nosotros: perfil de fundadora ---------- */

.founder-grid { max-width: 900px; margin: 0 auto; }
.founder-card { align-items: start; }
.founder-card .team-photo { position: sticky; top: 6.5rem; }
.founder-card .team-bio + .team-bio { margin-top: -0.8rem; }
.founder-card-alt { margin-top: 4.5rem; padding-top: 4.5rem; border-top: 1px solid var(--c-linea); }

.founder-note {
  max-width: 640px;
  margin: 2.5rem auto 0;
  text-align: center;
  color: var(--c-gris-texto);
  font-size: 0.92rem;
}

/* ---------- CTA pre-contacto ---------- */

.cta-band-inner { text-align: center; max-width: 620px; margin: 0 auto; }
.cta-band-inner .section-title { margin-left: auto; margin-right: auto; }
.cta-band-inner > p { color: var(--c-gris-texto); margin: 0 0 2rem; }
.cta-band-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Contacto ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: start;
}

.contact-info > p { color: var(--c-gris-texto); }

.contact-details {
  margin: 2rem 0 0;
  display: grid;
  gap: 1.4rem;
}

.contact-details dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-purpura);
  margin-bottom: 0.2rem;
}

.contact-details dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}
.contact-details dd a { text-decoration: none; color: var(--c-tinta); }
.contact-details dd a:hover { color: var(--c-purpura); }

.contact-cta { margin: 0.4rem 0 2.2rem; }

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}
.contact-list-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--c-linea);
}
.contact-list-item:last-child { border-bottom: 1px solid var(--c-linea); }

.contact-list-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-lavanda-palida);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-list-icon svg { width: 19px; height: 19px; color: var(--c-purpura); }

/* min-width + overflow-wrap: el correo es una sola "palabra" larga y a 320px
   empujaba la columna hasta el borde de la pantalla. */
.contact > * { min-width: 0; }
.contact-list-text { display: flex; flex-direction: column; gap: 0.15rem; padding-top: 0.3rem; min-width: 0; }
a[href^="mailto:"] { overflow-wrap: break-word; }

.contact-list-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-purpura);
}
.contact-list-text a,
.contact-list-text > span:not(.contact-list-label) {
  font-size: 0.98rem;
  color: var(--c-tinta);
  text-decoration: none;
  line-height: 1.55;
}
.contact-list-text a:hover { color: var(--c-purpura); }

.contact-form-card {
  background: var(--c-blanco);
  border: 1px solid var(--c-linea);
  border-radius: 18px;
  padding: 2.6rem 2.4rem;
  box-shadow: 0 1px 3px rgba(43, 33, 53, 0.06), 0 24px 48px -12px rgba(92, 58, 114, 0.22);
}
.contact-form-eyebrow {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.contact-form-eyebrow em { font-style: italic; font-weight: 500; color: var(--c-purpura); }
.contact-form-sub { color: var(--c-gris-texto); font-size: 0.9rem; margin: 0 0 1.8rem; }
.contact-form-card .contact-form { border: none; border-top: none; padding: 0; border-radius: 0; box-shadow: none; }

.contact-form {
  background: var(--c-blanco);
  border: 1px solid var(--c-linea);
  border-top: 3px solid var(--c-purpura);
  border-radius: 14px;
  padding: 2.4rem 2.2rem;
  box-shadow: 0 1px 3px rgba(43, 33, 53, 0.06), 0 24px 48px -12px rgba(92, 58, 114, 0.22);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-field { margin-bottom: 1.2rem; }

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.form-field label span { color: var(--c-purpura); }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--c-tinta);
  background: var(--c-marfil);
  border: 1px solid var(--c-linea);
  border-radius: 2px;
  box-shadow: 0 0 0 0 rgba(92, 58, 114, 0);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--c-purpura);
  box-shadow: 0 0 0 3px rgba(92, 58, 114, 0.14);
}

.form-field textarea { resize: vertical; }
.form-field label .form-optional { color: var(--c-gris-texto); font-weight: 400; letter-spacing: 0; }
.form-hint { font-size: 0.8rem; color: var(--c-gris-texto); margin: 0.4rem 0 0; line-height: 1.5; }

.form-note {
  font-size: 0.8rem;
  color: var(--c-gris-texto);
  margin: 1rem 0 0;
  text-align: center;
}

.form-success {
  margin: 1.2rem 0 0;
  padding: 1rem 1.2rem;
  background: var(--c-lavanda-palida);
  border-left: 3px solid var(--c-purpura);
  font-size: 0.92rem;
}

.form-error {
  margin: 1.2rem 0 0;
  padding: 1rem 1.2rem;
  background: #fbeceb;
  border-left: 3px solid #b3453b;
  color: #7a2e27;
  font-size: 0.92rem;
}

/* ---------- Textura mármol (boceto, CSS puro) ---------- */

.marble { position: relative; isolation: isolate; }
.marble::before,
.marble::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.marble::before {
  background-image:
    radial-gradient(ellipse 55% 35% at 12% 18%, rgba(255, 255, 255, 0.09), transparent 60%),
    radial-gradient(ellipse 45% 60% at 88% 12%, rgba(255, 255, 255, 0.06), transparent 65%),
    radial-gradient(ellipse 60% 45% at 72% 88%, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(128deg, transparent 25%, rgba(255, 255, 255, 0.045) 40%, transparent 55%),
    linear-gradient(205deg, transparent 35%, rgba(255, 255, 255, 0.035) 52%, transparent 68%);
}
.marble::after {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.marble-light::before {
  background-image:
    radial-gradient(ellipse 55% 35% at 12% 18%, rgba(92, 58, 114, 0.06), transparent 60%),
    radial-gradient(ellipse 45% 60% at 88% 12%, rgba(92, 58, 114, 0.045), transparent 65%),
    radial-gradient(ellipse 60% 45% at 72% 88%, rgba(43, 33, 53, 0.045), transparent 60%),
    linear-gradient(128deg, transparent 25%, rgba(43, 33, 53, 0.035) 40%, transparent 55%),
    linear-gradient(205deg, transparent 35%, rgba(43, 33, 53, 0.03) 52%, transparent 68%);
}
.marble > * { position: relative; z-index: 1; }

/* ---------- Footer ---------- */

.footer {
  background: var(--c-tinta);
  color: rgba(250, 249, 247, 0.75);
  padding: 4rem var(--gutter) 2rem;
}

.footer-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand > a { display: inline-block; transition: opacity 0.2s var(--ease); }
.footer-brand > a:hover, .footer-brand > a:focus-visible { opacity: 0.75; }
.footer .brand-mark { width: 67px; height: 40px; }

.footer-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-marfil);
  margin: 0.8rem 0 0.6rem;
}

.footer-tag {
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0;
  max-width: 300px;
}

.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-lavanda);
  margin: 0.4rem 0 1.1rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-links a {
  color: rgba(250, 249, 247, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--c-lavanda); }

.footer-contact p { margin: 0 0 0.7rem; font-size: 0.9rem; line-height: 1.6; }
.footer-contact a {
  color: rgba(250, 249, 247, 0.75);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-contact a:hover { color: var(--c-lavanda); }

.footer-bottom {
  max-width: var(--w-content);
  margin: 3rem auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.6rem;
}
.footer-bottom p {
  font-size: 0.78rem;
  line-height: 1.6;
  margin: 0 0 0.8rem;
  color: rgba(250, 249, 247, 0.55);
}
.footer-bottom a {
  color: rgba(250, 249, 247, 0.75);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease);
}
.footer-bottom a:hover { color: var(--c-lavanda); }
.footer-bottom a:focus-visible { outline: 2px solid var(--c-lavanda); outline-offset: 2px; border-radius: 2px; }
.footer-bottom a:active { opacity: 0.8; }

/* ---------- Animaciones de entrada (sistema existente, se mantiene) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Entrada escalonada en cuadrículas */
.services-grid.reveal.visible .service-card:nth-child(2) { transition-delay: 0.08s; }
.services-grid.reveal.visible .service-card:nth-child(3) { transition-delay: 0.16s; }
.services-grid.reveal.visible .service-card:nth-child(4) { transition-delay: 0.24s; }
.services-grid.reveal.visible .service-card:nth-child(5) { transition-delay: 0.32s; }
.services-grid.reveal.visible .service-card:nth-child(6) { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .service-card, .btn { transition: none; }
  .hero::before, .hero::after { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .ph-hero { height: 380px; max-width: 520px; margin: 0 auto; }
  .hero-caption { position: static; max-width: none; margin-top: 1.2rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.4rem 2rem; }
  .familiar-inner, .enfoque-inner { grid-template-columns: 1fr; }
  .enfoque-media { order: -1; }
  .ph-tall { height: 320px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .proceso-track { grid-template-columns: 1fr; gap: 2.4rem; }
  .proceso-track::before { display: none; }
  .team-feature { grid-template-columns: 1fr; text-align: center; }
  .team-badges { justify-content: center; }
  .founder-card .team-photo { position: relative; top: auto; }
  .service-hero-inner { grid-template-columns: 1fr; }
  .ph-service { height: 320px; }
  .service-body { grid-template-columns: 1fr; }
  .service-sidebar { position: static; top: auto; }
  .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  /* La fuente móvil (Bufete_Alonso_Hero_Mobile.jpeg) ya está recortada en vertical
     con la familia centrada — el zoom/reposición de escritorio no le hace falta. */
  .ph-hero img { object-position: center 42%; transform: none; }

  /* Hero mobile: el título y el CTA se superponen a la foto (en vez de
     apilarse debajo), con un scrim oscuro detrás para que el texto se
     lea bien sobre cualquier zona de la imagen. */
  .hero-inner {
    display: grid;
    grid-template-areas: "stack";
    align-items: stretch;
  }
  .hero-media, .hero-copy { grid-area: stack; min-height: 480px; }
  .hero-media { position: relative; z-index: 1; }
  .ph-hero { height: 100%; max-width: none; margin: 0; }
  .hero-media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 18px;
    background: linear-gradient(to top, rgba(43, 33, 53, 0.85) 0%, rgba(43, 33, 53, 0.5) 42%, rgba(43, 33, 53, 0) 70%);
    pointer-events: none;
  }
  /* La cita se retira en este modo: el título+CTA ya ocupan la foto completa
     y el mismo mensaje se repite en la banda de cita más abajo en la página. */
  .hero-caption { display: none; }
  .hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.6rem 1.4rem 2rem;
  }
  .hero-copy .eyebrow { color: rgba(255, 255, 255, 0.92); }
  .hero-copy .hero-title { color: var(--c-blanco); }
  .hero-copy .hero-title em { color: var(--c-lavanda); }
  .hero-copy .hero-sub { color: rgba(255, 255, 255, 0.9); }
  .hero-copy .hero-actions { margin-bottom: 0; }
  .hero-copy .btn-ghost { color: var(--c-blanco); border-color: rgba(255, 255, 255, 0.6); }
  .hero-copy .btn-ghost:hover { border-color: var(--c-blanco); }

  .nav {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--c-marfil);
    border-bottom: 1px solid var(--c-linea);
    flex-direction: column;
    align-items: stretch;
    padding: 1.2rem 1.5rem 1.6rem;
    gap: 1.1rem;
    transform: translateY(-130%);
    transition: transform 0.35s var(--ease);
    box-shadow: 0 20px 40px rgba(43, 33, 53, 0.08);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 0.5rem 0; }
  .nav a.nav-cta { text-align: center; padding: 0.75rem 1.4rem; }

  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .services-grid, .form-row { grid-template-columns: 1fr; }
  .familiar-list li { font-size: 1.1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-title br, .section-title br { display: none; }
  .brand-nombre { font-size: 1rem; }
  .footer-links a { padding: 0.55rem 0; }
}
