/* Abal & Ferrer Abogados · proyecto conceptual de NORTH Studio Latam
   Claro y sobrio, como un diario bien compuesto: papel, tinta azul marino y un bronce.
   Newsreader (serif con cuerpo óptico) para títulos, Hanken Grotesk para leer. */

@font-face { font-family: Newsreader; src: url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(fonts/hanken-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #f6f4ef;
  --paper-2: #ece8df;
  --card: #fbfaf7;
  --ink: #0f1c2e;
  --ink-2: #3d4757;
  --muted: #5f6672;
  --rule: rgba(15, 28, 46, .14);
  --brass: #9a7440;
  --brass-2: #b88d52;
  --navy: #0f1c2e;
  --navy-2: #172840;

  --pad: clamp(18px, 4vw, 64px);
  --sec: clamp(96px, 12vw, 176px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.32, .72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* Lo que lleva el atributo hidden no se muestra ni recibe clics (los menús lo usan al cerrarse) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.62 "Hanken Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.h2 {
  margin: 0; font-family: Newsreader, Georgia, serif; font-weight: 400;
  font-variation-settings: "opsz" 72;
  font-size: clamp(2.375rem, 1.3rem + 3.6vw, 4.75rem); line-height: 1.02; letter-spacing: -0.022em;
  text-wrap: balance;
}
.sec-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head p { margin: 0; color: var(--ink-2); max-width: 44ch; font-size: 1.125rem; }

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 4px; cursor: pointer;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .4s var(--spring), background-color .3s, box-shadow .3s, color .3s;
}
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--navy-2); }
.btn--line { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--block { width: 100%; }

/* ── Cabecera ── */
.mast {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--pad);
  background: rgba(246, 244, 239, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--rule);
  transition: transform .5s var(--spring);
}
.mast.is-hidden { transform: translateY(-100%); }
.mast__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: Newsreader, serif; font-size: 1.25rem; line-height: 1.1; font-variation-settings: "opsz" 36; }
.mast__brand small { display: block; font-family: "Hanken Grotesk", sans-serif; font-size: .75rem; letter-spacing: .02em; color: var(--muted); }
.mast__mono { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: .9375rem; font-style: italic; }
.mast__nav { display: flex; gap: 4px; margin-left: auto; }
.mast__nav a { padding: 8px 14px; border-radius: 4px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .9375rem; transition: background-color .3s, color .3s; }
.mast__nav a:hover { background: var(--paper-2); color: var(--ink); }
.mast__nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.mast__cta { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.mast__menu { display: none; margin-left: auto; min-height: 44px; padding: 0 18px; border: 0; border-radius: 4px; background: var(--ink); color: var(--paper); font-weight: 600; cursor: pointer; }

.drawer { position: fixed; inset: 0; z-index: 15; padding: 96px 24px 32px; background: var(--paper); opacity: 0; transition: opacity .4s var(--ease); }
.drawer.is-open { opacity: 1; }
.drawer nav { display: grid; }
.drawer a { padding: 16px 0; font-family: Newsreader, serif; font-size: 2rem; text-decoration: none; box-shadow: inset 0 -1px 0 var(--rule); transform: translateY(16px); opacity: 0; transition: transform .6s var(--ease), opacity .6s var(--ease); }
.drawer.is-open a { transform: none; opacity: 1; }
.drawer.is-open a:nth-child(2) { transition-delay: .04s; }
.drawer.is-open a:nth-child(3) { transition-delay: .08s; }
.drawer.is-open a:nth-child(4) { transition-delay: .12s; }
.drawer.is-open a:nth-child(5) { transition-delay: .16s; color: var(--brass); }

/* ── Portada ── */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 80px); align-items: end; padding: clamp(40px, 6vw, 88px) var(--pad) 0; max-width: 1560px; margin: 0 auto; }
.hero__meta { display: flex; gap: 20px; flex-wrap: wrap; margin: 0 0 clamp(28px, 4vw, 48px); padding-bottom: 14px; box-shadow: inset 0 -1px 0 var(--rule); color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.hero__meta span + span::before { content: "·"; margin-right: 20px; }
.hero__title {
  margin: 0; font-family: Newsreader, Georgia, serif; font-weight: 350;
  font-variation-settings: "opsz" 72;
  font-size: clamp(3.25rem, 1.4rem + 6.4vw, 8.25rem); line-height: .94; letter-spacing: -0.035em;
}
.ln { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.ln > span { display: block; }
.hero__title .ln:last-child span { font-style: italic; color: var(--brass); }
.hero__lead { margin: clamp(24px, 3vw, 36px) 0 32px; max-width: 42ch; font-size: 1.1875rem; color: var(--ink-2); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__img { margin: 0; position: relative; height: min(76svh, 760px); overflow: hidden; border-radius: 4px; }
.hero__img img { width: 100%; height: 116%; margin-top: -8%; object-fit: cover; }
.hero__img figcaption { position: absolute; left: 0; bottom: 0; padding: 12px 16px; background: var(--paper); color: var(--muted); font-size: .8125rem; border-top-right-radius: 4px; }

/* ── Cifras ── */
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1560px; margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 var(--pad); }
.ledger > div { padding: 24px 24px 24px 0; box-shadow: inset 0 1px 0 var(--ink); }
.ledger > div + div { padding-left: 24px; box-shadow: inset 0 1px 0 var(--ink), inset 1px 0 0 var(--rule); }
.ledger__n { margin: 0 0 6px; font-family: Newsreader, serif; font-size: clamp(2.25rem, 1.6rem + 2vw, 3.5rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.ledger p:last-child { margin: 0; color: var(--ink-2); font-size: .9375rem; }

/* ── Orientación guiada ── */
.resolver, .areas, .studio, .consult { max-width: 1560px; margin: 0 auto; padding: var(--sec) var(--pad) 0; }
.wizard { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 4vw, 64px); padding: clamp(24px, 4vw, 56px); border-radius: 6px; background: var(--card); box-shadow: 0 0 0 1px var(--rule), 0 30px 60px -40px rgba(15, 28, 46, .35); }
.wizard__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; counter-reset: s; }
.wizard__steps li { position: relative; padding: 12px 0 12px 40px; color: var(--muted); counter-increment: s; transition: color .4s; }
.wizard__steps li::before { content: counter(s); position: absolute; left: 0; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--rule); font-size: .8125rem; font-variant-numeric: tabular-nums; transition: background-color .4s, color .4s, box-shadow .4s; }
.wizard__steps li.is-on { color: var(--ink); font-weight: 600; }
.wizard__steps li.is-on::before { background: var(--ink); color: var(--paper); box-shadow: none; }
.wizard__steps li.is-done::before { content: "✓"; background: var(--brass); color: #fff; box-shadow: none; }
.wizard__body { min-height: 360px; }
.wq { margin: 0 0 22px; font-family: Newsreader, serif; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem); line-height: 1.15; font-variation-settings: "opsz" 36; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.choice {
  display: grid; gap: 4px; padding: 18px 20px; text-align: left; cursor: pointer;
  border: 0; border-radius: 6px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: box-shadow .3s var(--ease), background-color .3s, transform .4s var(--spring);
}
.choice b { font-weight: 600; }
.choice span { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.choice:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: #fff; }
.choice:active { transform: scale(.98); }
.wiz-anim > * { animation: wz .6s var(--ease) both; }
.wiz-anim > *:nth-child(2) { animation-delay: .05s; }
.wiz-anim > *:nth-child(3) { animation-delay: .1s; }
@keyframes wz { from { opacity: 0; transform: translateY(14px); } }
.wiz-back { margin-top: 22px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.plan { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px 48px; }
.plan__head { grid-column: 1 / -1; }
.plan__area { margin: 0 0 6px; color: var(--brass); font-weight: 600; }
.plan__who { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.plan__mono { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--paper-2); font-family: Newsreader, serif; font-size: 1.125rem; }
.plan__who p { margin: 0; line-height: 1.35; }
.plan__who small { color: var(--muted); }
.plan h4 { margin: 0 0 12px; font-size: .875rem; color: var(--muted); font-weight: 600; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.docs li { display: flex; gap: 10px; align-items: flex-start; }
.docs li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--brass); }
.cost { margin: 0; padding: 18px 20px; border-radius: 6px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.cost p { margin: 0; display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.cost p span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.cost small { display: block; margin-top: 8px; color: var(--muted); }
.plan__go { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── Áreas ── */
.area-list { list-style: none; margin: 0; padding: 0; box-shadow: 0 -1px 0 var(--ink); }
.area { display: grid; grid-template-columns: 70px 1.1fr 1.4fr 220px; gap: 24px; align-items: baseline; padding: 26px 0; box-shadow: inset 0 -1px 0 var(--rule); transition: background-color .4s var(--ease); }
.area:hover { background: var(--paper-2); }
.area__n { color: var(--brass); font-family: Newsreader, serif; font-size: 1.125rem; font-variant-numeric: lining-nums tabular-nums; padding-left: 4px; }
.area h3 { margin: 0; font-family: Newsreader, serif; font-weight: 400; font-size: clamp(1.5rem, 1.2rem + .9vw, 2rem); line-height: 1.1; }
.area p { margin: 0; color: var(--ink-2); }
.area__who { color: var(--muted); font-size: .9375rem; text-align: right; padding-right: 4px; }

/* ── Residencia ── */
.res { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); max-width: 1560px; margin: var(--sec) auto 0; padding: clamp(56px, 7vw, 104px) var(--pad); background: var(--navy); color: var(--paper); }
.res__media { position: sticky; top: 96px; align-self: start; height: min(78svh, 760px); overflow: hidden; border-radius: 4px; }
.res__media img { width: 100%; height: 116%; margin-top: -8%; object-fit: cover; }
.res__body header p { margin: 18px 0 0; color: rgba(246, 244, 239, .72); max-width: 46ch; font-size: 1.125rem; }
.steps { list-style: none; margin: 48px 0 0; padding: 0; counter-reset: st; }
.steps li { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 18px; padding: 24px 0; box-shadow: inset 0 1px 0 rgba(246, 244, 239, .14); counter-increment: st; }
.steps li::before { content: counter(st, decimal-leading-zero); font-family: Newsreader, serif; font-size: 1.25rem; color: var(--brass-2); font-variant-numeric: lining-nums; }
.steps h3 { margin: 0; font-family: Newsreader, serif; font-weight: 400; font-size: 1.5rem; }
.steps p { grid-column: 2 / -1; margin: 0; color: rgba(246, 244, 239, .72); max-width: 52ch; }
.steps .when { color: var(--brass-2); font-size: .9375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── El estudio ── */
.studio__img { margin: 0; height: clamp(300px, 56vh, 640px); overflow: hidden; border-radius: 4px; }
.studio__img img { width: 100%; height: 118%; margin-top: -9%; object-fit: cover; }
.studio__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); margin-top: clamp(48px, 6vw, 80px); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.rules li { padding-top: 18px; box-shadow: inset 0 2px 0 var(--ink); }
.rules h3 { margin: 0 0 10px; font-family: Newsreader, serif; font-weight: 500; font-size: 1.3125rem; line-height: 1.2; }
.rules p { margin: 0; color: var(--ink-2); font-size: 1rem; }

/* ── Consulta ── */
.consult { padding-bottom: var(--sec); }
.consult__card { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 96px); padding: clamp(28px, 5vw, 72px); background: var(--card); border-radius: 6px; box-shadow: 0 0 0 1px var(--rule), 0 30px 60px -40px rgba(15, 28, 46, .35); }
.consult__intro p { margin: 18px 0 0; color: var(--ink-2); max-width: 38ch; font-size: 1.125rem; }
.consult__area { padding: 14px 16px; border-radius: 6px; background: var(--paper); color: var(--ink) !important; font-size: 1rem !important; box-shadow: inset 3px 0 0 var(--brass); }
.consult__form { display: grid; gap: 14px; }
.seg-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.seg-field legend { padding: 0; margin-bottom: 10px; font-size: .875rem; font-weight: 600; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 6px; background: var(--paper-2); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 12px; border-radius: 4px; text-align: center; font-weight: 500; color: var(--ink-2); transition: background-color .3s, color .3s, box-shadow .3s; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 28, 46, .14); }
.seg input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.slot { padding: 12px 10px; border: 0; border-radius: 4px; cursor: pointer; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); text-align: left; transition: box-shadow .3s, background-color .3s, color .3s, transform .3s var(--spring); }
.slot small { display: block; color: var(--muted); font-size: .8125rem; }
.slot:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.slot:active { transform: scale(.97); }
.slot[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.slot[aria-pressed="true"] small { color: rgba(246, 244, 239, .7); }
.field { display: grid; gap: 2px; padding: 10px 16px 8px; border-radius: 4px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .3s; }
.field:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); background: #fff; }
.field span { font-size: .8125rem; color: var(--muted); }
.field input, .field textarea { border: 0; background: transparent; outline: none; padding: 0; font-size: 1.0625rem; resize: vertical; }
.field input { height: 30px; }
.field.is-invalid { box-shadow: inset 0 0 0 1.5px #b3261e; }
.consult__done { margin: 0; padding: 14px 16px; border-radius: 6px; background: var(--paper-2); font-weight: 600; }

/* ── Pie ── */
.foot { background: var(--navy); color: var(--paper); padding: clamp(56px, 7vw, 96px) var(--pad) 28px; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 32px; max-width: 1560px; margin: 0 auto; }
.foot__brand { margin: 0; font-family: Newsreader, serif; font-size: clamp(2.25rem, 1.6rem + 2vw, 3.5rem); line-height: 1; }
.foot h4 { margin: 0 0 10px; font-size: .8125rem; font-weight: 600; color: var(--brass-2); }
.foot__grid p { margin: 0; color: rgba(246, 244, 239, .8); }
.foot__legal { max-width: 1560px; margin: 56px auto 0; padding-top: 20px; box-shadow: inset 0 1px 0 rgba(246, 244, 239, .14); color: rgba(246, 244, 239, .6); font-size: .8125rem; }

.concept {
  position: fixed; left: 16px; bottom: 16px; z-index: 12;
  padding: 9px 15px; border-radius: 4px; background: var(--ink); color: var(--paper);
  font-size: .8125rem; font-weight: 600; text-decoration: none;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.concept span { color: rgba(246, 244, 239, .65); font-weight: 400; }
.concept.is-on { opacity: 1; transform: none; pointer-events: auto; }

.js .reveal { opacity: 0; transform: translateY(32px); }

@media (max-width: 1023px) {
  .mast__nav, .mast__cta { display: none; }
  .mast__menu { display: block; }
  .hero, .sec-head, .res, .studio__grid, .consult__card, .plan { grid-template-columns: 1fr; }
  .hero__img { height: 56svh; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger > div:nth-child(3) { padding-left: 0; box-shadow: inset 0 1px 0 var(--ink); }
  .wizard { grid-template-columns: 1fr; }
  .wizard__steps { grid-auto-flow: column; }
  .wizard__steps li { padding-left: 36px; font-size: .9375rem; }
  .area { grid-template-columns: 48px 1fr; }
  .area p, .area__who { grid-column: 2; text-align: left; }
  .res__media { position: static; height: 46svh; }
  .rules { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .mast__brand small { display: none; }
  .wizard__steps li { font-size: 0; padding: 14px 0 14px 32px; }
  .wizard__steps li.is-on { font-size: .9375rem; }
  .concept span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
