/* =========================================================
   Torres Duran Abogados — estilos
   Estilo corporativo sobrio: blanco, grises, fotos en blanco
   y negro y acento bordó.
   ========================================================= */

:root {
  --white: #ffffff;
  --gray-50: #f3f3f3;
  --gray-200: #dcdcdc;
  --gray-500: #7c6f73;
  --gray-700: #4a4a4a;
  --ink: #1d1d1f;
  --dark: #333333;
  --brand: #8f1117;
  --brand-dark: #6e0c11;

  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;

  --header-h: 78px;
  --container: 1180px;
  --shadow: 0 6px 24px -10px rgba(0, 0, 0, .25);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .6em;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--narrow { max-width: 860px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.6rem;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: transparent;
  color: var(--brand);
  font: 500 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--brand); color: #fff; }

.btn--light { border-color: rgba(255,255,255,.85); color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); }

.btn--solid { background: var(--brand); color: #fff; }
.btn--solid:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--white);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
}
.header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__text {
  display: flex; flex-direction: column;
  font: 700 1.2rem/1.05 var(--font-head);
  color: var(--ink);
  letter-spacing: .01em;
}
.brand__text small {
  font: 500 .68rem/1.4 var(--font-head);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--brand);
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: .97rem;
  transition: color .2s;
}
.nav a:hover, .nav a.is-active { color: var(--brand); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .25s, opacity .25s; }
.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); }

/* ---------- Hero (foto panorámica con corte diagonal) ---------- */
.hero {
  position: relative;
  height: clamp(380px, 68vh, 640px);
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
  background: var(--dark);
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 26%;
  filter: grayscale(1) contrast(1.05);
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.32) 45%, rgba(0,0,0,0) 75%);
}
.hero__copy {
  position: relative;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding-bottom: 8%;
  color: #fff;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 600;
  letter-spacing: .01em;
  margin: 0;
}
.hero h1 span {
  display: block;
  margin-top: .5rem;
  font-size: .32em;
  font-weight: 500;
  letter-spacing: .5em;
  text-transform: uppercase;
}
.hero__places {
  display: flex; align-items: center; flex-wrap: wrap; gap: .8rem;
  margin: 1.6rem 0 0;
  font-size: clamp(.85rem, 1.6vw, 1rem);
  letter-spacing: .08em;
}
.hero__places i { width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .8; }

/* ---------- Presentación ---------- */
.intro { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 5.5rem); text-align: center; }
.intro__lead {
  margin: 0 0 1.4rem;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
}
.intro__lead strong { font-weight: 500; }
.intro .btn { margin-top: 1.2rem; }

/* ---------- Banda oscura con foto ---------- */
.band {
  position: relative;
  padding: clamp(4rem, 9vw, 6.5rem) 0;
  background: var(--dark);
  overflow: hidden;
  color: #eee;
}
.band__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  filter: grayscale(1);
  opacity: .38;
}
.band__inner { position: relative; }
.band__copy { max-width: 520px; }
.band h2 { color: #fff; }
.band p { margin: 0 0 1rem; text-align: justify; hyphens: auto; }
.band .btn { margin-top: 1rem; }

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section--gray { background: var(--gray-50); }

.section__head { text-align: center; max-width: 680px; margin: 0 auto clamp(2.2rem, 5vw, 3.2rem); }
.section__head h2::after {
  content: "";
  display: block;
  width: 36px; height: 2px;
  margin: .9rem auto 0;
  background: var(--brand);
}
.section__head p { margin: 0; color: var(--gray-700); font-size: 1.05rem; }

/* ---------- Áreas ---------- */
.areas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.area {
  padding: 2rem 1.6rem;
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--brand);
  background: var(--white);
  transition: box-shadow .25s, transform .25s;
}
.area:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.area__icon { width: 38px; height: 38px; color: var(--brand); margin-bottom: 1rem; }
.area ul { margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.area li { padding: .4rem 0; border-bottom: 1px solid var(--gray-50); }
.area li:last-child { border-bottom: 0; }

/* ---------- Sedes ---------- */
.offices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin-inline: auto;
}
.office {
  padding: 2rem 1.5rem;
  background: var(--white);
  text-align: center;
  box-shadow: 0 1px 0 var(--gray-200);
}
.office__tag {
  margin: 0 0 .5rem;
  font: 500 .72rem/1 var(--font-head);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--brand);
}
.office h3 { font-size: 1.45rem; margin: 0 0 .2rem; }
.office p:last-child { margin: 0; color: var(--gray-500); }

/* ---------- Contacto ---------- */
.contact .pin { width: 34px; height: 34px; color: var(--brand); margin: 0 auto .6rem; display: block; }
.contact .section__head h2::after { display: none; }
.contact__address { font-style: normal; font-size: 1.05rem; color: var(--ink); line-height: 1.9; }
.contact__hours { margin-top: .4rem !important; color: var(--gray-500) !important; }

.contact__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.map {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.85); }

.contact__list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .8rem; }
.contact__list li { display: flex; align-items: center; gap: .75rem; }
.contact__list li > a { min-width: 0; overflow-wrap: break-word; color: var(--ink); text-decoration: none; }
.contact__list li > a:hover { color: var(--brand); }
.contact__list .i { width: 20px; height: 20px; flex: none; color: var(--brand); }

.form {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--gray-50);
}
.form h3 { margin-bottom: 1.2rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 500; color: var(--ink); }
.optional { font-weight: 400; color: var(--gray-500); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--gray-200);
  border-radius: 3px;
  background: var(--white);
  font: inherit;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(143,17,23,.12); }
.field .is-invalid { border-color: var(--brand); }
.form__error { margin: 0 0 1rem; color: var(--brand); font-size: .9rem; }
.form__note { margin: .8rem 0 0; font-size: .82rem; color: var(--gray-500); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #e6e6e6; text-align: center; font-size: .9rem; }
.footer > .container { padding: 2.4rem 0 1.6rem; }
.footer a { color: #fff; }
.footer__line { margin: 0 0 1.4rem; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; font-size: 1rem; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { text-decoration: underline; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1rem 0; font-size: .78rem; color: #bdbdbd; }
.footer__bottom p { margin: .2rem 0; }
.footer__bottom a { color: #d6d6d6; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

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

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white);
    box-shadow: 0 12px 20px -12px rgba(0,0,0,.25);
    border-top: 1px solid var(--gray-200);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav.is-open { max-height: 400px; }
  .nav a { padding: .95rem 1.25rem; border-bottom: 1px solid var(--gray-50); }

  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .brand img { width: 36px; height: 36px; }
  .brand__text { font-size: 1.05rem; }
  .hero { height: 360px; clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
  .hero__overlay { background: rgba(0,0,0,.45); }
  .intro { text-align: left; }
  .intro .btn { width: 100%; }
  .band p { text-align: left; }
  .areas, .offices { grid-template-columns: 1fr; }
  .wa-float { right: 14px; bottom: 14px; }
  .footer__bottom { padding-bottom: 5rem; }
}
