/* Valdivia & Asociados — Opción B "Grises arquitectónicos" */

:root {
  --gold: #C6AE65;
  --black: #000000;
  --ink: #1A1A1A;
  --charcoal: #262626;
  --gray-70: #5C5C5C;
  --gray-50: #8C8C8C;
  --gray-30: #BFBFBF;
  --gray-15: #D9D9D9;
  --gray-05: #F2F2F2;
  --white: #FFFFFF;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Lato", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 5.5vw, 80px);
  --section-y: clamp(72px, 9vw, 120px);
  --max: 1440px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 3px; }
.footer :focus-visible, .quote :focus-visible, .topbar :focus-visible { outline-color: var(--gold); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--charcoal); color: var(--white);
  padding: 12px 20px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* Type */
.eyebrow {
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray-70);
}
.eyebrow--rule { display: flex; align-items: center; gap: 16px; }
.eyebrow--rule::before { content: ""; width: 40px; height: 1px; background: var(--gold); flex: none; }

.h2 {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(30px, 3.2vw, 46px); line-height: 1.15;
}
.body-muted { font-size: 17px; line-height: 1.75; color: var(--gray-70); }
.rule-gold { display: block; width: 56px; height: 1px; background: var(--gold); }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 16px 34px; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  transition: background-color .2s ease;
}
.btn--dark { background: var(--charcoal); color: var(--white); }
.btn--dark:hover { background: var(--black); }
.btn--outline { background: transparent; color: var(--charcoal); border: 1px solid var(--charcoal); align-self: flex-start; }
.btn--outline:hover { background: var(--charcoal); color: var(--white); }
.btn[disabled] { opacity: .6; cursor: wait; }

.link-underline {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid var(--charcoal); padding: 8px 0;
  transition: border-color .2s ease;
}
.link-underline:hover { border-color: var(--gold); }

/* Top bar */
.topbar { background: var(--charcoal); color: var(--gray-30); font-size: 13px; letter-spacing: 0.04em; }
.topbar__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-block: 10px; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--white); }
.topbar__contact { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* Header */
.header { background: var(--white); }
.header__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 40px; padding-bottom: 32px; }
.header__logo { display: block; line-height: 0; }
.header__logo img { width: 331px; height: auto; }

.nav { border-top: 1px solid var(--gray-15); border-bottom: 1px solid var(--gray-15); }
.nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 48px; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.nav__link {
  display: block; padding: 18px 0; margin-bottom: -1px;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .2s ease, color .2s ease;
}
.nav__link:hover { color: var(--gray-70); }
.nav__link.is-active { border-bottom-color: var(--gold); }

.nav-toggle {
  display: none; align-items: center; gap: 12px; min-height: 44px; padding: 10px 18px;
  background: transparent; border: 1px solid var(--gray-15); cursor: pointer;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--charcoal);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 1px; background: var(--charcoal); position: relative; transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Placeholders & photos */
.placeholder {
  background: var(--gray-15); color: #4D4D4D;
  display: flex; align-items: flex-end; padding: 28px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.photo { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }

/* Hero */
.hero__panel { background: var(--gray-05); display: flex; flex-wrap: wrap; min-height: 600px; }
.hero__text {
  flex: 1 1 520px; min-width: 0;
  padding: clamp(48px, 7vw, 104px) clamp(24px, 5vw, 80px);
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
}
.hero__title {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(36px, 4.6vw, 66px); line-height: 1.1;
}
.hero__lead { font-size: 18px; line-height: 1.7; color: var(--gray-70); max-width: 500px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 8px; }
.hero__media { flex: 1 1 440px; min-width: 0; min-height: 420px; position: relative; }
.hero__media .photo { position: absolute; inset: 0; }

/* Sections */
.section { padding-block: var(--section-y); }
.section--gray { background: var(--gray-05); }

.split-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-bottom: 64px; }
.split-head .h2 { max-width: 620px; }
.split-head .body-muted { max-width: 480px; }
.split-head__text { max-width: 560px; display: flex; flex-direction: column; gap: 16px; }
.split-head__text .body-muted { max-width: none; }
.split-head > div { display: flex; flex-direction: column; gap: 20px; }
.split-head--end { margin-bottom: 56px; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--charcoal); }
.pillar { padding: 40px 40px 8px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--gray-15); }
.pillar:first-child { padding-left: 0; }
.pillar:last-child { padding-right: 0; border-right: 0; }
.pillar__num { font-family: var(--serif); font-size: 15px; color: var(--gray-70); }
.pillar__title { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.25; color: var(--ink); }
.pillar .body-muted { font-size: 15px; line-height: 1.7; }

/* Areas */
.areas { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.areas__intro { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.areas__intro .body-muted { font-size: 16px; }
.areas__list { flex: 999 1 620px; min-width: 0; border-top: 1px solid var(--charcoal); }
.area {
  position: relative; z-index: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-30); text-decoration: none; color: var(--charcoal);
}
.area::before {
  content: ""; position: absolute; inset: 0 -24px; z-index: -1;
  background: var(--white); opacity: 0; transition: opacity .25s ease;
}
.area:hover::before, .area:focus-visible::before { opacity: 1; }
.area__num { font-family: var(--serif); font-size: 15px; color: var(--gray-70); width: 32px; flex: none; }
.area__title { font-family: var(--serif); font-size: 28px; line-height: 1.25; flex: 1 1 240px; }
.area__desc { font-size: 15px; line-height: 1.6; color: var(--gray-70); flex: 1 1 260px; }
.area__arrow { font-size: 20px; transition: color .25s ease, transform .25s ease; }
.area:hover .area__arrow, .area:focus-visible .area__arrow { color: var(--gold); transform: translateX(4px); }

/* Quote */
.quote { background: var(--charcoal); color: var(--white); }
.quote__inner {
  max-width: 1040px; padding-block: clamp(88px, 10vw, 128px);
  display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center;
}
.quote__rule { width: 1px; height: 56px; background: var(--gold); }
.quote__text { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.45; }
.quote__author { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray-30); }

/* Team */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1100px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .team { grid-template-columns: minmax(0, 1fr); } }
.member { background: var(--gray-05); display: flex; flex-direction: column; }
.member__photo { aspect-ratio: 4 / 5; position: relative; justify-content: center; align-items: center; }
.member__photo .photo { position: absolute; inset: 0; }
.member__info { padding: 28px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--gold); }
.member__name { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); }
.member__role { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-70); }
.member__creds { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--gray-15); display: flex; flex-direction: column; gap: 8px; }
.member__creds li { font-size: 14px; line-height: 1.5; color: var(--gray-70); padding-left: 16px; position: relative; }
.member__creds li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 1px; background: var(--gold); }

/* Contact */
.contact { display: flex; flex-wrap: wrap; gap: 64px; }
.contact__info { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.contact__list { border-top: 1px solid var(--gray-30); margin-top: 8px; }
.contact__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--gray-30); }
.contact__row dt { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-70); }
.contact__row dd { font-size: 16px; }
.contact__row a { text-decoration: none; }
.contact__row a:hover { text-decoration: underline; }

.form { flex: 1 1 480px; min-width: 0; background: var(--white); padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 24px; }
.form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-70); }
.field__opt { text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--charcoal);
  border: 0; border-bottom: 1px solid var(--gray-50); border-radius: 0;
  padding: 12px 0; background: transparent; outline: none;
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--charcoal); box-shadow: 0 1px 0 var(--charcoal); }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #9B1C1C; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field--check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field--check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--charcoal); flex: none; }
.field--check label { text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.5; }
.field--check.is-invalid label { color: #9B1C1C; }
.form .btn { align-self: flex-start; margin-top: 8px; }
.form__status { font-size: 15px; min-height: 1.5em; }
.form__status.is-ok { color: var(--charcoal); }
.form__status.is-error { color: #9B1C1C; }

/* Footer */
.footer { background: var(--ink); color: var(--white); }
.footer__inner { padding-top: 80px; padding-bottom: 36px; display: flex; flex-direction: column; align-items: center; gap: 48px; text-align: center; }
.footer__logo { width: 331px; height: auto; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 40px; }
.footer__nav a {
  display: block; padding: 12px 0;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray-30); text-decoration: none;
}
.footer__nav a:hover { color: var(--white); }
.footer__bottom {
  width: 100%; border-top: 1px solid #3A3A3A; padding-top: 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  font-size: 13px; color: var(--gray-50); text-align: left;
}
.footer__bottom a { color: var(--gray-30); text-decoration: none; }
.footer__bottom a:hover { color: var(--white); }

/* Booking page */
.booking { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; }
.booking__intro { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.booking__details { border-top: 1px solid var(--gray-30); margin-top: 8px; }
.booking__embed { flex: 999 1 620px; min-width: 0; background: var(--white); min-height: 640px; display: flex; }
.booking__embed iframe { width: 100%; min-height: 720px; border: 0; display: block; }
.booking__embed .placeholder { flex: 1; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; background: var(--white); border: 1px dashed var(--gray-50); }
.booking__fallback { font-size: 15px; color: var(--gray-70); }
.booking__fallback a { color: var(--charcoal); }

/* Legal page */
.legal { max-width: 760px; margin: 0 auto; padding: var(--section-y) var(--gutter); }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.15; color: var(--ink); margin-bottom: 32px; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ink); margin: 40px 0 12px; }
.legal p { color: var(--gray-70); line-height: 1.75; margin-bottom: 16px; }

/* Responsive */
@media (max-width: 900px) {
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillar, .pillar:first-child, .pillar:last-child { padding: 32px 0; border-right: 0; border-bottom: 1px solid var(--gray-15); }
  .pillar:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  .topbar__address { display: none; }
  .topbar__inner { justify-content: center; }
  .header__inner { padding-top: 28px; padding-bottom: 20px; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: center; gap: 0; padding-block: 8px; }
  .nav__link { padding: 14px 0; }
  .hero .container { padding-inline: 0; }
  .hero__panel { min-height: 0; }
  .hero__media { min-height: 300px; }
  .split-head { margin-bottom: 40px; }
  .area { padding: 24px 0; }
  .area::before { display: none; }
  .area__title { font-size: 24px; }
  .area__arrow { display: none; }
  .footer__bottom { justify-content: center; text-align: center; }
}

@media (max-width: 360px) {
  .header__logo img, .footer__logo { width: 100%; max-width: 331px; }
}
#estudio .split-head { align-items: flex-start; }

/* Hero: practice-area panel (replaces photo) */
.hero__aside { flex: 1 1 420px; min-width: 0; display: flex; align-items: center; padding: clamp(0px, 4vw, 64px) clamp(24px, 5vw, 80px) clamp(40px, 6vw, 80px) 0; }
.hero__areas { width: 100%; background: var(--white); padding: clamp(28px, 3.5vw, 48px); display: flex; flex-direction: column; gap: 20px; }
.hero__areas-list { border-top: 1px solid var(--charcoal); }
.hero__areas-list a {
  display: flex; align-items: baseline; gap: 20px; padding: 16px 0; min-height: 44px;
  border-bottom: 1px solid var(--gray-15); text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: 21px; line-height: 1.3;
  transition: color .2s ease;
}
.hero__areas-list a:hover { color: var(--gray-70); }
.hero__areas-num { font-size: 14px; color: var(--gray-70); width: 24px; flex: none; }
.hero__areas-list a > span:nth-child(2) { flex: 1; }
.hero__areas-arrow { font-family: var(--sans); font-size: 16px; color: var(--gray-50); transition: color .2s ease, transform .2s ease; }
.hero__areas-list a:hover .hero__areas-arrow { color: var(--gold); transform: translateX(4px); }
.areas__list li { scroll-margin-top: 24px; }
@media (max-width: 960px) {
  .hero__aside { padding: 0 clamp(24px, 5vw, 80px) clamp(40px, 6vw, 80px); }
}
@media (max-width: 760px) {
  .hero__aside { padding: 0 16px 32px; }
  .hero__areas-list a { font-size: 19px; padding: 14px 0; }
}

/* Hero: centered statement */
.hero__panel--center {
  min-height: 0; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(48px, 6vw, 96px) clamp(24px, 6vw, 96px);
  gap: 28px;
}
.hero__panel--center .hero__title { max-width: 980px; font-size: clamp(36px, 5vw, 72px); }
.hero__panel--center .hero__lead { max-width: 620px; }
.hero__panel--center .hero__actions { justify-content: center; }
.hero__eyebrow { display: flex; align-items: center; gap: 16px; }
.hero__eyebrow::before, .hero__eyebrow::after { content: ""; width: 40px; height: 1px; background: var(--gold); }

/* Gold accents (light doses) */
.hl-gold { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.txt-gold { color: var(--gold); }
.btn--dark:hover { background: var(--gold); color: var(--black); }
.pillar__num { display: flex; flex-direction: column; gap: 14px; }
.pillar__num::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.topbar a:hover, .footer__nav a:hover, .footer__bottom a:hover { color: var(--gold); }
.footer { border-top: 1px solid var(--gold); }

/* Team: one line per person + optional details */
.member__focus { margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--charcoal); }
.member__school { font-size: 13px; line-height: 1.5; color: var(--gray-70); }
.member__more { margin-top: 12px; border-top: 1px solid var(--gray-15); padding-top: 12px; }
.member__more summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 10px; min-height: 32px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-70);
}
.member__more summary::-webkit-details-marker { display: none; }
.member__more summary::after { content: "+"; font-size: 16px; font-weight: 400; color: var(--gold); line-height: 1; }
.member__more[open] summary::after { content: "−"; }
.member__more summary:hover { color: var(--charcoal); }
.member__more .member__creds { margin-top: 8px; padding-top: 0; border-top: 0; }

/* ===== Motion (first sections) ===== */
html.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0ms);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Lines that draw themselves */
html.js [data-reveal="line"] { opacity: 1; transform: none; }
.pillars, .areas__list { position: relative; }
html.js .pillars, html.js .areas__list { border-top-color: transparent; }
html.js .pillars::before, html.js .areas__list::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--charcoal);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
html.js .pillars.is-visible::before, html.js .areas__list.is-visible::before { transform: scaleX(1); }

/* Gold accents grow in */
html.js .hero__eyebrow::before, html.js .hero__eyebrow::after { width: 0; transition: width 1s cubic-bezier(.2, .7, .2, 1) .5s; }
html.js .hero__eyebrow.is-visible::before, html.js .hero__eyebrow.is-visible::after { width: 40px; }
html.js .pillar__num::before { width: 0; transition: width .9s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0ms) + 300ms); }
html.js .pillar.is-visible .pillar__num::before { width: 28px; }
html.js .rule-gold { width: 0; transition: width 1s cubic-bezier(.2, .7, .2, 1) .4s; }
html.js .areas__intro.is-visible .rule-gold { width: 56px; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html.js .pillars::before, html.js .areas__list::before { transform: none; transition: none; }
  html.js .hero__eyebrow::before, html.js .hero__eyebrow::after { width: 40px; transition: none; }
  html.js .pillar__num::before { width: 28px; transition: none; }
  html.js .rule-gold { width: 56px; transition: none; }
}
