/* ==========================================================================
   SUCEDALIA — Abogados de herencias y patrimonio familiar
   Hoja de estilos principal
   ========================================================================== */

:root {
  --ink: #0d1320;
  --ink-2: #141c2b;
  --ink-3: #1d2838;
  --ivory: #f5f1e8;
  --ivory-2: #ece6d8;
  --paper: #fbf9f4;
  --gold: #b8995a;
  --gold-2: #d4b97a;
  --gold-soft: rgba(184, 153, 90, 0.18);
  --text: #1a1f29;
  --muted: #5f6675;
  --muted-light: #a9b0bd;
  --line: rgba(13, 19, 32, 0.12);
  --line-light: rgba(245, 241, 232, 0.16);

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 92px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
p { margin: 0 0 1.2em; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Tipografía ---------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--gold); }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { content: ""; width: 36px; height: 1px; background: var(--gold); }

.h-display { font-size: clamp(44px, 7vw, 104px); line-height: 0.98; }
.h-xl { font-size: clamp(38px, 5vw, 68px); }
.h-lg { font-size: clamp(32px, 3.8vw, 52px); }
.h-md { font-size: clamp(24px, 2.4vw, 32px); }
.lead { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.65; color: var(--muted); }
.ital { font-style: italic; color: var(--gold); }
.text-center { text-align: center; }
.on-dark { color: var(--ivory); }
.on-dark .lead, .on-dark p { color: rgba(245, 241, 232, 0.72); }
.on-dark .eyebrow { color: var(--gold-2); }

/* Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 30px; border: 1px solid var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); background: transparent; border-radius: var(--radius);
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); transform: scaleX(0); transform-origin: right;
  transition: transform 0.55s var(--ease);
}
.btn:hover { color: var(--ivory); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn svg { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(5px); }

.btn--gold { border-color: var(--gold); color: var(--ivory); background: var(--gold); }
.btn--gold::before { background: var(--ivory); }
.btn--gold:hover { color: var(--ink); border-color: var(--ivory); }

.btn--light { border-color: rgba(245, 241, 232, 0.55); color: var(--ivory); }
.btn--light::before { background: var(--ivory); }
.btn--light:hover { color: var(--ink); border-color: var(--ivory); }

.btn--ghost { border: 0; padding: 0; letter-spacing: 0.22em; overflow: visible; }
.btn--ghost::before { display: none; }
.btn--ghost::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0.35); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.btn--ghost:hover { color: var(--gold); }
.btn--ghost:hover::after { transform: scaleX(1); }

/* Cabecera ------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  color: var(--ivory);
  transition: background 0.5s var(--ease), height 0.5s var(--ease), box-shadow 0.5s var(--ease), color 0.4s;
}
.header::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(13, 19, 32, 0.55), rgba(13, 19, 32, 0));
  opacity: 1; transition: opacity 0.5s;
}
.header.is-scrolled { height: 70px; background: rgba(251, 249, 244, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.header.is-scrolled::after { opacity: 0; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand__mark { width: 37px; height: 42px; flex: 0 0 auto; overflow: visible; }
.footer .brand__mark { width: 44px; height: 50px; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--font-display); font-size: 28px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; line-height: 1; }
.brand__sub { font-family: var(--font-body); font-size: 9px; letter-spacing: 0.34em; text-transform: uppercase; opacity: 0.7; margin-top: 5px; }

.nav { display: flex; align-items: center; gap: 40px; }
.nav__link { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; position: relative; padding: 6px 0; }
.nav__link::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav .btn { padding: 12px 22px; font-size: 11px; }
.header.is-scrolled .btn--light { border-color: var(--ink); color: var(--ink); }
.header.is-scrolled .btn--light::before { background: var(--ink); }
.header.is-scrolled .btn--light:hover { color: var(--ivory); }

.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; flex-direction: column; justify-content: center; gap: 6px; align-items: flex-end; position: relative; z-index: 101; }
.burger span { display: block; height: 1.5px; background: currentColor; width: 28px; transition: transform 0.4s var(--ease), width 0.4s var(--ease), opacity 0.3s; }
.burger span:nth-child(2) { width: 20px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.burger[aria-expanded="true"] { color: var(--ivory); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 90; background: var(--ink); color: var(--ivory);
  display: flex; flex-direction: column; justify-content: center; padding: 120px var(--gutter) 60px;
  clip-path: inset(0 0 100% 0); transition: clip-path 0.7s var(--ease);
}
.mobile-nav.is-open { clip-path: inset(0 0 0 0); }
.mobile-nav a { font-family: var(--font-display); font-size: clamp(34px, 8vw, 56px); padding: 10px 0; border-bottom: 1px solid var(--line-light); display: flex; justify-content: space-between; align-items: center; opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s var(--ease); }
.mobile-nav.is-open a { opacity: 1; transform: none; }
.mobile-nav a:nth-child(1) { transition-delay: 0.2s; } .mobile-nav a:nth-child(2) { transition-delay: 0.27s; }
.mobile-nav a:nth-child(3) { transition-delay: 0.34s; } .mobile-nav a:nth-child(4) { transition-delay: 0.41s; } .mobile-nav a:nth-child(5) { transition-delay: 0.48s; }
.mobile-nav a small { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.3em; color: var(--gold); }
.mobile-nav__foot { margin-top: 36px; font-size: 13px; color: var(--muted-light); }

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: var(--ivory); overflow: hidden; background: var(--ink);
}
.hero__media { position: absolute; inset: -12% 0; z-index: 0; will-change: transform; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(13, 19, 32, 0.92) 0%, rgba(13, 19, 32, 0.35) 45%, rgba(13, 19, 32, 0.25) 100%),
    linear-gradient(to right, rgba(13, 19, 32, 0.55), rgba(13, 19, 32, 0) 70%);
}
.hero__grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.8'/></svg>"); }
.hero__content { position: relative; z-index: 2; padding: 180px 0 clamp(60px, 9vh, 110px); }
.hero__title { max-width: 14ch; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); animation: rise 1.3s var(--ease) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: translateY(0); } }
.hero__row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; margin-top: 40px; }
.hero__lead { max-width: 52ch; color: rgba(245, 241, 232, 0.78); font-size: clamp(16px, 1.3vw, 19px); opacity: 0; animation: fade 1.2s 0.6s forwards; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 18px; opacity: 0; animation: fade 1.2s 0.8s forwards; }
.hero__meta { display: flex; gap: clamp(24px, 4vw, 56px); justify-content: flex-end; opacity: 0; animation: fade 1.2s 1s forwards; }
.hero__meta div { border-left: 1px solid rgba(245, 241, 232, 0.25); padding-left: 18px; }
.hero__meta strong { display: block; font-family: var(--font-display); font-size: clamp(34px, 3.4vw, 50px); font-weight: 500; line-height: 1; color: var(--gold-2); }
.hero__meta span { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(245, 241, 232, 0.65); }
@keyframes fade { to { opacity: 1; } }
.hero__scroll { position: absolute; right: var(--gutter); bottom: 40px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; color: rgba(245, 241, 232, 0.6); writing-mode: vertical-rl; }
.hero__scroll i { display: block; width: 1px; height: 64px; background: rgba(245, 241, 232, 0.35); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--gold-2); transform: translateY(-100%); animation: drop 2.2s ease-in-out infinite; }
@keyframes drop { 0% { transform: translateY(-100%); } 60% { transform: translateY(100%); } 100% { transform: translateY(100%); } }

/* Hero interior (páginas) ---------------------------------------------- */
.page-hero { position: relative; min-height: 72vh; display: flex; align-items: flex-end; color: var(--ivory); overflow: hidden; background: var(--ink); }
.page-hero .hero__content { padding: 180px 0 80px; }
.page-hero .hero__title { max-width: 18ch; }
.page-hero .hero__lead { margin-top: 28px; }
.breadcrumb { display: flex; gap: 12px; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(245, 241, 232, 0.6); margin-bottom: 26px; }
.breadcrumb a:hover { color: var(--gold-2); }

/* Secciones ------------------------------------------------------------ */
.section { padding: clamp(80px, 10vw, 150px) 0; position: relative; }
.section--tight { padding: clamp(60px, 7vw, 100px) 0; }
.section--dark { background: var(--ink); color: var(--ivory); }
.section--ivory { background: var(--ivory); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .lead { margin: 0; }
.section-head--center { display: block; text-align: center; max-width: 760px; margin-inline: auto; }
.section-head--center .lead { margin-top: 20px; }

/* Marquee de confianza -------------------------------------------------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; overflow: hidden; background: var(--paper); }
.ticker__track { display: flex; gap: 0; width: max-content; animation: marquee 45s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 26px; padding: 0 30px; font-family: var(--font-display); font-size: 20px; font-style: italic; color: var(--muted); white-space: nowrap; }
.ticker__item::after { content: "◆"; font-size: 8px; color: var(--gold); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Intro / Quiénes somos --------------------------------------------------- */
.intro { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.intro__media { position: relative; }
.intro__media .frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.intro__media .frame img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.intro__media .frame--second { position: absolute; right: -14%; bottom: -12%; width: 52%; aspect-ratio: 1; border: 12px solid var(--paper); box-shadow: 0 40px 80px -30px rgba(13, 19, 32, 0.45); }
.intro__badge { position: absolute; left: -24px; top: 40px; z-index: 2; background: var(--ink); color: var(--ivory); padding: 22px 26px; font-family: var(--font-display); font-size: 15px; line-height: 1.4; max-width: 190px; box-shadow: 0 30px 60px -20px rgba(13, 19, 32, 0.5); }
.intro__badge strong { display: block; font-size: 40px; color: var(--gold-2); font-weight: 500; line-height: 1; margin-bottom: 6px; }
.intro__text .h-lg { margin-bottom: 26px; }
.intro__text .lead { margin-bottom: 30px; }
.intro__list { display: grid; gap: 14px; margin: 34px 0 40px; }
.intro__list li { display: flex; gap: 16px; align-items: flex-start; font-size: 15.5px; color: var(--text); }
.intro__list li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 9px; background: var(--gold); transform: rotate(45deg); }

/* Parallax banner --------------------------------------------------------- */
.parallax {
  position: relative; min-height: 78vh; display: grid; place-items: center; overflow: hidden;
  color: var(--ivory); text-align: center; isolation: isolate;
}
.parallax__bg { position: absolute; inset: -20% 0; z-index: -2; background-size: cover; background-position: center; will-change: transform; }
.parallax__bg video, .parallax__bg img { width: 100%; height: 100%; object-fit: cover; }
.parallax::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(13, 19, 32, 0.58); }
.parallax__inner { padding: 120px var(--gutter); max-width: 900px; }
.parallax__quote { font-family: var(--font-display); font-size: clamp(30px, 4.2vw, 58px); line-height: 1.15; font-weight: 400; font-style: italic; }
.parallax__quote::before { content: "“"; color: var(--gold-2); }
.parallax__quote::after { content: "”"; color: var(--gold-2); }
.parallax__cite { margin-top: 30px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-2); }

/* Servicios -------------------------------------------------------------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--paper); padding: clamp(32px, 3.4vw, 48px); position: relative; overflow: hidden; min-height: 380px; display: flex; flex-direction: column; transition: background 0.6s var(--ease); }
.service__num { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 44px; }
.service__icon { width: 48px; height: 48px; margin-bottom: 26px; color: var(--ink); transition: color 0.5s; }
.service__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 27px; margin-bottom: 14px; }
.service p { color: var(--muted); font-size: 15px; margin: 0 0 24px; flex: 1; }
.service__link { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 700; display: inline-flex; align-items: center; gap: 12px; }
.service__link svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease); }
.service__bg { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s var(--ease), transform 1.4s var(--ease); transform: scale(1.08); z-index: 0; }
.service__bg img { width: 100%; height: 100%; object-fit: cover; }
.service__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 19, 32, 0.95), rgba(13, 19, 32, 0.55)); }
.service > *:not(.service__bg) { position: relative; z-index: 1; transition: color 0.5s; }
.service:hover .service__bg { opacity: 1; transform: scale(1); }
.service:hover, .service:hover h3, .service:hover .service__link { color: var(--ivory); }
.service:hover p { color: rgba(245, 241, 232, 0.75); }
.service:hover .service__icon { color: var(--gold-2); }
.service:hover .service__link svg { transform: translateX(6px); }
.service--featured { grid-column: span 2; background: var(--ink); color: var(--ivory); justify-content: flex-end; min-height: 440px; }
.service--featured .service__bg { opacity: 1; transform: scale(1); }
.service--featured h3 { font-size: 40px; max-width: 14ch; color: var(--ivory); }
.service--featured p { color: rgba(245, 241, 232, 0.75); max-width: 52ch; flex: 0; }
.service--featured .service__icon { color: var(--gold-2); }
.service--featured .service__link { color: var(--ivory); }

/* Método ----------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; counter-reset: step; }
.step { position: relative; padding-top: 34px; border-top: 1px solid var(--line-light); }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: -14px; left: 0; background: var(--ink); padding-right: 14px; font-family: var(--font-display); font-size: 22px; color: var(--gold-2); font-style: italic; }
.step h3 { font-size: 26px; margin-bottom: 12px; }
.step p { font-size: 15px; margin: 0; }
.steps-visual { margin: clamp(56px, 7vw, 96px) 0 0; position: relative; aspect-ratio: 21 / 9; overflow: hidden; }
.steps-visual img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.steps-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 19, 32, 0.8), transparent 55%); }
.steps-visual figcaption { position: absolute; z-index: 1; left: clamp(24px, 4vw, 56px); bottom: clamp(24px, 4vw, 56px); right: clamp(24px, 4vw, 56px); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.steps-visual figcaption p { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 34px); max-width: 24ch; color: var(--ivory); }

/* Cifras ----------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat { padding: 28px 0 0; border-top: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(48px, 5.6vw, 84px); font-weight: 400; line-height: 1; color: var(--ink); }
.stat strong sup { font-size: 0.45em; color: var(--gold); vertical-align: top; top: 0.3em; position: relative; }
.stat span { display: block; margin-top: 10px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

/* Equipo ----------------------------------------------------------------- */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
.member { position: relative; }
.member__photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ivory-2); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.05); transition: filter 0.8s var(--ease), transform 1.4s var(--ease); }
.member:hover .member__photo img { filter: grayscale(0%); transform: scale(1.04); }
.member__photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -120px 120px -60px rgba(13, 19, 32, 0.6); opacity: 0; transition: opacity 0.6s; }
.member:hover .member__photo::after { opacity: 1; }
.member__body { padding-top: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-top: 1px solid var(--line); margin-top: 0; }
.member h3 { font-size: 25px; }
.member__role { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-top: 6px; display: block; }
.member__city { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; white-space: nowrap; padding-top: 6px; }
.member__bio { font-size: 14.5px; color: var(--muted); margin: 14px 0 0; }

/* Casos prácticos --------------------------------------------------------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px; }
.case { display: block; }
.case__img { aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 20px; position: relative; }
.case__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.case:hover .case__img img { transform: scale(1.06); }
.case__tag { font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.case h3 { font-size: 24px; margin: 10px 0 10px; transition: color 0.4s; }
.case:hover h3 { color: var(--gold); }
.case p { font-size: 14.5px; color: var(--muted); margin: 0; }
.case--wide { grid-column: span 2; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.case--wide .case__img { aspect-ratio: 4 / 3; margin: 0; }
.case--wide h3 { font-size: 34px; }

/* Testimonios -------------------------------------------------------------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.testimonial { padding: clamp(32px, 3.5vw, 52px); background: var(--ink); position: relative; margin: 0; }
.testimonial::before { content: "“"; font-family: var(--font-display); font-size: 110px; line-height: 0.6; color: var(--gold); display: block; margin-bottom: 26px; }
.testimonial p { font-family: var(--font-display); font-size: 22px; line-height: 1.4; color: var(--ivory); margin-bottom: 30px; }
.testimonial footer { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(245, 241, 232, 0.55); }
.testimonial footer strong { display: block; color: var(--gold-2); font-weight: 600; margin-bottom: 4px; }

/* Oficinas ------------------------------------------------------------------ */
.offices-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.offices-visual { position: sticky; top: 110px; aspect-ratio: 4 / 5; overflow: hidden; margin: 0; background: var(--ink); }
.offices-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s var(--ease), transform 1.6s var(--ease); transform: scale(1.06); }
.offices-visual img.is-active { opacity: 1; transform: scale(1); }
.offices-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 19, 32, 0.7), transparent 50%); }
.offices-visual figcaption { position: absolute; left: 32px; bottom: 32px; color: var(--ivory); font-family: var(--font-display); font-size: 34px; z-index: 1; }
.offices { border-top: 1px solid var(--line); }
.office { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding 0.4s var(--ease); }
.office:hover, .office.is-active { padding-left: 14px; }
.office h3 { font-size: 30px; transition: color 0.4s; }
.office.is-active h3 { color: var(--gold); }
.office address { font-style: normal; font-size: 14px; color: var(--muted); line-height: 1.6; }
.office a.tel { font-size: 12px; letter-spacing: 0.16em; color: var(--ink); font-weight: 700; white-space: nowrap; }
.office a.tel:hover { color: var(--gold); }

/* CTA final ------------------------------------------------------------------ */
.cta { position: relative; overflow: hidden; color: var(--ivory); text-align: center; padding: clamp(120px, 16vw, 220px) 0; isolation: isolate; }
.cta .parallax__bg::after { content: ""; position: absolute; inset: 0; background: rgba(13, 19, 32, 0.72); }
.cta .h-xl { max-width: 20ch; margin: 0 auto 28px; }
.cta .lead { max-width: 56ch; margin: 0 auto 44px; color: rgba(245, 241, 232, 0.75); }
.cta__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* Formulario contacto -------------------------------------------------------- */
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 110px); }
.contact-aside .h-lg { margin-bottom: 24px; }
.contact-aside dl { margin: 40px 0 0; display: grid; gap: 22px; }
.contact-aside dt { font-size: 10.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.contact-aside dd { margin: 0; font-family: var(--font-display); font-size: 24px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 12px 0;
  font: inherit; font-size: 17px; color: var(--ink); outline: none; border-radius: 0;
  transition: border-color 0.4s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b8995a' stroke-width='1.5'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right center; padding-right: 24px; }
.check { grid-column: 1 / -1; display: flex; gap: 14px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 5px; accent-color: var(--gold); }
.form__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.form__note { font-size: 12.5px; color: var(--muted); }
.form-success { display: none; padding: 40px; border: 1px solid var(--gold); text-align: center; }
.form-success.is-visible { display: block; }
.form-success h3 { font-size: 32px; margin-bottom: 10px; }

/* Páginas de contenido -------------------------------------------------------- */
.prose h2 { font-size: clamp(28px, 3vw, 40px); margin: 1.6em 0 0.6em; }
.prose h3 { font-size: 24px; margin: 1.4em 0 0.5em; }
.prose p, .prose li { color: var(--text); font-size: 16.5px; }
.prose ul { list-style: none; display: grid; gap: 10px; margin: 0 0 1.4em; }
.prose ul li { padding-left: 24px; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.prose blockquote { margin: 2em 0; padding-left: 28px; border-left: 2px solid var(--gold); font-family: var(--font-display); font-size: 26px; font-style: italic; line-height: 1.35; }
.prose .meta { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.article { padding: clamp(60px, 8vw, 110px) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.article__media { aspect-ratio: 4 / 3; overflow: hidden; position: sticky; top: 100px; }
.article__media img { width: 100%; height: 100%; object-fit: cover; }
.article h2 { font-size: clamp(28px, 3vw, 42px); margin: 10px 0 20px; }

/* Servicio detallado (servicios.html) ----------------------------------------- */
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; padding: clamp(60px, 8vw, 120px) 0; border-top: 1px solid var(--line); }
.service-detail:nth-of-type(even) .service-detail__media { order: 2; }
.service-detail__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.service-detail__media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.service-detail__media .num { position: absolute; left: 0; bottom: 0; background: var(--paper); padding: 18px 28px 0 0; font-family: var(--font-display); font-size: 72px; line-height: 0.8; color: var(--gold); }
.service-detail .h-lg { margin: 14px 0 22px; }
.service-detail ul { display: grid; gap: 12px; margin: 28px 0 36px; }
.service-detail ul li { padding-left: 26px; position: relative; font-size: 15.5px; }
.service-detail ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.service-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); position: sticky; top: 70px; background: rgba(251, 249, 244, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 20; }
.service-nav a { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.service-nav a:hover { color: var(--ink); }

/* Valores (despacho.html) ------------------------------------------------------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; }
.value { border-top: 1px solid var(--line); padding-top: 26px; }
.value span { font-family: var(--font-display); font-style: italic; color: var(--gold); font-size: 20px; display: block; margin-bottom: 12px; }
.value h3 { font-size: 26px; margin-bottom: 12px; }
.value p { font-size: 15px; color: var(--muted); margin: 0; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.timeline div { border-top: 1px solid var(--line-light); padding-top: 22px; }
.timeline strong { font-family: var(--font-display); font-size: 44px; font-weight: 400; color: var(--gold-2); display: block; line-height: 1; margin-bottom: 12px; }
.timeline p { font-size: 14.5px; margin: 0; }
.awards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.award { background: var(--paper); padding: 36px 28px; text-align: center; }
.award strong { display: block; font-family: var(--font-display); font-size: 24px; margin-bottom: 8px; }
.award span { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

/* Pie ------------------------------------------------------------------------------ */
.footer { background: var(--ink); color: var(--ivory); padding: clamp(70px, 8vw, 110px) 0 36px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 60px; border-bottom: 1px solid var(--line-light); }
.footer .brand__name { font-size: 32px; }
.footer__about { margin-top: 22px; font-size: 14px; color: rgba(245, 241, 232, 0.65); max-width: 36ch; }
.footer h4 { font-family: var(--font-body); font-size: 10.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 22px; }
.footer li { margin-bottom: 10px; font-size: 14.5px; color: rgba(245, 241, 232, 0.75); }
.footer li a:hover { color: var(--gold-2); }
.footer__contact p { font-size: 14.5px; color: rgba(245, 241, 232, 0.75); margin: 0 0 8px; }
.footer__contact strong { font-family: var(--font-display); font-size: 26px; font-weight: 400; color: var(--ivory); display: block; margin: 6px 0 16px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 28px; font-size: 12px; color: rgba(245, 241, 232, 0.5); }
.footer__legal { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__legal a:hover { color: var(--gold-2); }
.certs { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.cert { border: 1px solid var(--line-light); padding: 10px 14px; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(245, 241, 232, 0.6); }

/* Reveal ------------------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal--left { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px); }
.reveal--scale { transform: scale(0.94); }
[data-stagger] > * { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); }
[data-stagger].is-in > * { opacity: 1; transform: none; }
[data-stagger].is-in > *:nth-child(1) { transition-delay: 0.05s; } [data-stagger].is-in > *:nth-child(2) { transition-delay: 0.15s; }
[data-stagger].is-in > *:nth-child(3) { transition-delay: 0.25s; } [data-stagger].is-in > *:nth-child(4) { transition-delay: 0.35s; }
[data-stagger].is-in > *:nth-child(5) { transition-delay: 0.45s; } [data-stagger].is-in > *:nth-child(6) { transition-delay: 0.55s; }
[data-stagger].is-in > *:nth-child(7) { transition-delay: 0.65s; } [data-stagger].is-in > *:nth-child(8) { transition-delay: 0.75s; }
.mask-img { overflow: hidden; }
.mask-img img { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease); }
.mask-img.is-in img { clip-path: inset(0 0 0 0); }

/* Cookie bar ---------------------------------------------------------------------------- */
.cookies { position: fixed; left: 24px; right: 24px; bottom: 24px; z-index: 120; margin: 0 auto; max-width: 720px; background: var(--ink); color: var(--ivory); padding: 22px 26px; display: flex; gap: 24px; align-items: center; justify-content: space-between; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); transform: translateY(140%); transition: transform 0.8s var(--ease); }
.cookies.is-visible { transform: none; }
.cookies p { margin: 0; font-size: 13px; color: rgba(245, 241, 232, 0.75); }
.cookies p a { color: var(--gold-2); text-decoration: underline; }
.cookies__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookies .btn { padding: 11px 18px; font-size: 10.5px; }

/* Preloader ------------------------------------------------------------------------------- */
.preloader { position: fixed; inset: 0; z-index: 200; background: var(--ink); display: grid; place-items: center; color: var(--ivory); transition: clip-path 1s var(--ease) 0.2s; clip-path: inset(0 0 0 0); text-align: center; }
.preloader.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.preloader__mark { display: block; width: 64px; height: 74px; margin: 0 auto 22px; color: var(--ivory); opacity: 0; animation: fade 1s forwards; }
.preloader .brand__name { font-size: clamp(32px, 5vw, 56px); opacity: 0; animation: fade 1s 0.1s forwards; }
.preloader__bar { width: 160px; height: 1px; background: var(--line-light); margin: 22px auto 0; overflow: hidden; }
.preloader__bar::after { content: ""; display: block; width: 100%; height: 100%; background: var(--gold); transform: translateX(-100%); animation: load 1.3s var(--ease) 0.2s forwards; }
@keyframes load { to { transform: none; } }

/* Scroll progress ------------------------------------------------------------------------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 110; transform-origin: left; transform: scaleX(0); background: var(--gold); pointer-events: none; }

/* Responsive ------------------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .service--featured { grid-column: span 2; }
  .steps, .stats, .timeline, .awards { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .case--wide { grid-column: span 2; }
}
@media (max-width: 900px) {
  :root { --header-h: 76px; }
  .nav { display: none; }
  .burger { display: flex; }
  .hero__row, .intro, .offices-layout, .contact-layout, .section-head, .service-detail, .article { grid-template-columns: 1fr; }
  .hero__meta { justify-content: flex-start; }
  .intro__media { margin-bottom: 70px; }
  .intro__media .frame--second { right: 0; }
  .intro__badge { left: 0; }
  .offices-visual { position: relative; top: 0; aspect-ratio: 16 / 10; }
  .article__media { position: relative; top: 0; }
  .team, .testimonials, .values { grid-template-columns: 1fr 1fr; }
  .service-detail:nth-of-type(even) .service-detail__media { order: 0; }
  .service-nav { display: none; }
  .hero__scroll { display: none; }
}
@media (max-width: 640px) {
  .services, .team, .testimonials, .cases, .steps, .stats, .values, .timeline, .awards, .footer__grid { grid-template-columns: 1fr; }
  .service--featured, .case--wide { grid-column: span 1; }
  .case--wide { grid-template-columns: 1fr; }
  .office { grid-template-columns: 1fr; gap: 8px; }
  .form { grid-template-columns: 1fr; }
  .cookies { flex-direction: column; align-items: flex-start; left: 12px; right: 12px; bottom: 12px; }
  .brand__name { font-size: 22px; }
  .hero__content { padding-top: 140px; }
  .page-hero { min-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal, [data-stagger] > * { opacity: 1; transform: none; }
  .mask-img img { clip-path: none; }
}

/* Modo estático (pruebas) --------------------------------------------------------------------- */
.is-static .preloader { display: none; }
.is-static .reveal, .is-static [data-stagger] > * { opacity: 1; transform: none; transition: none; }
.is-static .mask-img img { clip-path: none; }
.is-static .hero__title .line > span, .is-static .hero__lead, .is-static .hero__actions, .is-static .hero__meta { animation: none; transform: none; opacity: 1; }
.is-static .cookies { display: none; }
