/* =========================================================
   Vergara & Partarrieu Abogados — Landing page
   Colores tomados del logo: naranjo #E5681E · gris #4E4E4E
   ========================================================= */

:root {
  --orange: #e5681e;
  --orange-hover: #cc5915;
  --gray: #4e4e4e;
  --ink: #2a2a2c;
  --ink-soft: #5c5c60;
  --charcoal: #2f2f31;
  --charcoal-2: #3a3a3d;
  --paper: #ffffff;
  --cream: #f7f5f2;
  --line: #e6e2dc;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 4px;
  --container: 1180px;
  --header-h: 84px;
  --shadow: 0 18px 40px -22px rgba(30, 30, 30, .28);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--charcoal); }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Tipografía base ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--orange);
}
.eyebrow.light { color: #f08a4b; }
.eyebrow.light::before { background: #f08a4b; }

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 5.4vw, 68px);
  letter-spacing: -.01em;
}
h1 em, h2 em { font-style: italic; color: var(--orange); }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 3.8vw, 48px);
}

.lead {
  font-size: 19px;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 34em;
  margin-top: 26px;
}

.section { padding: 112px 0; }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--orange);
}
.section-sub {
  margin: 18px auto 0;
  max-width: 36em;
  color: var(--ink-soft);
  font-weight: 300;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-1px); }
.btn-ghost { border-color: var(--charcoal); color: var(--charcoal); }
.btn-ghost:hover { background: var(--charcoal); color: #fff; }
.btn-sm { padding: 11px 20px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand img { height: 50px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a:not(.btn) {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color .2s;
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.main-nav a:not(.btn):hover { color: var(--charcoal); }
.main-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  margin: 6px auto;
  background: var(--charcoal);
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 112px;
  background:
    linear-gradient(90deg, var(--cream) 0 62%, var(--paper) 62% 100%);
  overflow: hidden;
}
.hero::before {
  /* línea diagonal sutil que evoca el trazo del monograma */
  content: "";
  position: absolute;
  top: -10%; left: 54%;
  width: 1px; height: 130%;
  background: linear-gradient(transparent, rgba(229, 104, 30, .35), transparent);
  transform: rotate(18deg);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 72px;
  align-items: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

.hero-card {
  background: var(--charcoal);
  color: #d9d7d3;
  padding: 48px 44px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--orange);
}
.hero-card-logo { width: 220px; margin-bottom: 36px; }
.principles { list-style: none; margin: 0; padding: 0; }
.principles li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.principle-num {
  font-family: var(--serif);
  font-size: 22px;
  font-variant-numeric: lining-nums;
  color: var(--orange);
  line-height: 1.2;
}
.principles h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  letter-spacing: .02em;
  margin-bottom: 4px;
}
.principles p { margin: 0; font-size: 15px; font-weight: 300; line-height: 1.55; color: #b9b6b1; }

/* ---------- Estudio ---------- */
.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 80px;
  align-items: start;
}
.about .section-head { margin-bottom: 0; }
.about-text { border-left: 1px solid var(--line); padding-left: 48px; }
.about-text p { color: var(--ink-soft); font-weight: 300; font-size: 18px; }
.about-text strong { color: var(--charcoal); font-weight: 500; }

/* ---------- Servicios ---------- */
.services { background: var(--cream); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service {
  position: relative;
  background: var(--paper);
  padding: 44px 38px 40px;
  transition: background-color .3s;
}
.service::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.service:hover::after { transform: scaleX(1); }
.service-icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color .3s, background-color .3s;
}
.service-icon svg, .contact-list svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service:hover .service-icon { border-color: var(--orange); background: #fdf3ec; }
.service h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 14px;
}
.service p { margin: 0; font-size: 16px; font-weight: 300; color: var(--ink-soft); }

/* ---------- Socios ---------- */
.partners-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  max-width: 1000px;
  margin: 0 auto;
}
.partner {
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .3s, transform .3s;
}
.partner:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.partner-photo {
  position: relative;
  min-height: 100%;
  background:
    linear-gradient(160deg, var(--charcoal-2), var(--charcoal));
}
.partner-photo::before {
  /* Monograma de iniciales mientras no haya fotografía */
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
}
.partner-photo::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 34%;
  width: 36px; height: 2px;
  background: var(--orange);
  transform: translate(-50%, 0);
}
.partner-photo:has(img)::before, .partner-photo:has(img)::after { display: none; }
.partner-photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transition: transform .6s ease;
}
.partner:hover .partner-photo img { transform: scale(1.03); }
.partner-photo:has(img) { overflow: hidden; }

.partner-body { padding: 44px 48px 40px; }
.partner:nth-child(even) { grid-template-columns: 1fr 320px; }
.partner:nth-child(even) .partner-photo { order: 2; }
.partner-role {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--orange);
}
.partner h3 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 16px;
}
.partner-body > p:not(.partner-role) { font-size: 15.5px; font-weight: 300; color: var(--ink-soft); line-height: 1.65; }
.partner-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0 0 20px; padding: 0;
}
.partner-tags li {
  padding: 4px 12px;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--gray);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.partner-mail {
  font-size: 14.5px;
  color: var(--charcoal);
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
  transition: color .2s;
}
.partner-mail:hover { color: var(--orange); }

/* ---------- Proceso ---------- */
.process { background: var(--cream); padding-top: 96px; padding-bottom: 104px; }
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 27px; left: 16%; right: 16%;
  height: 1px;
  background: var(--line);
}
.steps li { position: relative; text-align: center; padding: 0 12px; }
.step-num {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: 26px;
  font-variant-numeric: lining-nums;
  line-height: 1;
  color: var(--orange);
  background: var(--cream);
  border: 1px solid var(--orange);
  border-radius: 50%;
}
.steps h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin-bottom: 10px; }
.steps p { margin: 0 auto; max-width: 22em; font-size: 16px; font-weight: 300; color: var(--ink-soft); }

/* ---------- Contacto ---------- */
.contact {
  background: var(--charcoal);
  color: #d9d7d3;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  right: -120px; top: -80px;
  width: 420px; height: 420px;
  border: 1px solid rgba(229, 104, 30, .18);
  border-radius: 50%;
}
.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact h2 { color: #fff; }
.contact-lead { margin-top: 22px; font-weight: 300; color: #b9b6b1; max-width: 28em; }
.contact-list { list-style: none; margin: 36px 0 0; padding: 0; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 16px;
}
.contact-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.contact-list a:hover { color: var(--orange); }

.contact-form {
  background: var(--paper);
  color: var(--ink);
  padding: 44px 40px;
  border-radius: var(--radius);
  border-top: 3px solid var(--orange);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: #fff;
}
.field .invalid { border-color: #c0392b; }
.form-note { margin: 14px 0 0; font-size: 14.5px; min-height: 1.4em; color: var(--ink-soft); }
.form-note.error { color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer { background: #232325; color: #9e9b96; padding: 56px 0 28px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 36px;
}
.footer-logo { height: 46px; width: auto; }
.footer-nav { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-nav a {
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .2s;
}
.footer-nav a:hover { color: var(--orange); }
.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 24px;
  font-size: 13.5px;
}
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 1px;
  background: rgba(255, 255, 255, .08);
}
.footer-bottom p { margin: 0; }
.disclaimer { color: #7a7772; }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav { gap: 26px; }
  .partner, .partner:nth-child(even) { grid-template-columns: 260px 1fr; }
  .partner:nth-child(even) .partner-photo { order: 0; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .brand img { height: 42px; }

  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 28px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .25);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 20px; }

  .hero { padding: 64px 0 80px; background: var(--cream); }
  .hero::before { display: none; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-text { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }  .section { padding: 84px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .lead { font-size: 17.5px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-card { padding: 36px 26px 28px; }
  .hero-card-logo { width: 180px; }

  .services-grid { grid-template-columns: 1fr; }
  .service { padding: 36px 28px; }

  .partner, .partner:nth-child(even) { grid-template-columns: 1fr; }
  .partner-photo { min-height: 340px; }
  .partner-photo img { object-position: 50% 15%; }
  .partner-photo::after { bottom: 28%; }
  .partner-body { padding: 30px 26px 28px; }

  .steps { grid-template-columns: 1fr; gap: 40px; }
  .steps::before { display: none; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 32px 24px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; }
  .footer-bottom::before { left: 20px; right: 20px; }
}
