/* Abogados Uruguay — derechopenal.uy */

:root {
  --ink: #0B1D33;
  --ink-2: #15345A;
  --paper: #FFFFFF;
  --paper-2: #F1F4F8;
  --white: #FFFFFF;
  --text: #1A2330;
  --muted: #515C6B;
  --line: #DCE2EA;
  --accent: #1B5FAA;
  --accent-light: #7FB8EA;
  --wa: #1A8F49;
  --wa-hover: #157A3E;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--white); color: var(--ink);
  padding: 10px 16px; border-radius: 4px;
  transition: top .15s var(--ease);
}
.skip:focus { top: 12px; }

.ico { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px;
  padding: .7em 1.35em;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 42px; padding: .5em 1.1em; font-size: .95rem; }
.btn--lg { min-height: 56px; padding: .8em 1.6em; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); }
.btn--ghost { color: var(--paper); border-color: rgba(255, 255, 255, .4); }
.btn--ghost:hover { border-color: var(--paper); background: rgba(255, 255, 255, .08); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(11, 29, 51, .5); }
.header__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__text { font: 600 1.12rem/1.1 var(--serif); letter-spacing: -0.01em; }
.brand__text span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); }
.nav a:not(.btn) {
  position: relative;
  padding: 8px 0;
  font-weight: 600; font-size: .98rem;
  color: var(--ink);
  text-decoration: none;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.burger {
  display: none;
  width: 48px; height: 48px; margin-right: -10px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.burger span { width: 24px; height: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--paper);
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(127, 184, 234, .20), transparent 60%),
    radial-gradient(700px 600px at -10% 110%, rgba(21, 52, 90, .9), transparent 65%),
    var(--ink);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 120px);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  pointer-events: none;
}
.hero__in { position: relative; padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__img { margin: 0; position: relative; }
.hero__img img { width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 4px; }
.hero__img::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid rgba(127, 184, 234, .45); border-radius: 4px; z-index: -1; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: .95rem; letter-spacing: .04em;
  color: var(--accent-light);
  margin-bottom: 22px;
}
.hero__kicker::before { content: ""; width: 36px; height: 1.5px; background: currentColor; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 15ch;
}
.hero__lead {
  margin-top: 26px;
  max-width: 58ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .86);
}
.hero__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__note { margin-top: 18px; font-size: .98rem; color: rgba(255, 255, 255, .7); }

.facts {
  margin: clamp(48px, 7vw, 88px) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.facts > div { padding: 24px 28px 0 0; display: flex; align-items: center; gap: 18px; }
.facts > div + div { padding-left: 28px; border-left: 1px solid rgba(255, 255, 255, .18); }
.facts dt { font: 400 clamp(2.4rem, 4vw, 3.25rem)/1 var(--serif); color: var(--accent-light); font-variant-numeric: lining-nums tabular-nums; flex: none; }
.facts dd { margin: 0; font-size: .98rem; line-height: 1.4; color: rgba(255, 255, 255, .8); max-width: 24ch; }

/* reveal on load (única animación orquestada) */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .7s var(--ease) forwards; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .24s; }
.reveal:nth-child(5) { animation-delay: .32s; }
.reveal:nth-child(6) { animation-delay: .44s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Urgencia ---------- */
.urgent { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.urgent__in {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(56px, 8vw, 96px);
}
.urgent__head h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
.urgent__head p { margin: 18px 0 28px; color: var(--muted); max-width: 44ch; }

.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 68px;
}
.steps li + li { padding-top: 28px; border-top: 1px solid var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  font: 400 2.75rem/1 var(--serif);
  color: var(--accent);
}
.steps li + li::before { top: 28px; }
.steps h3 { font-size: 1.3rem; margin-bottom: 8px; }
.steps p { color: var(--muted); max-width: 60ch; }

.urgent__img { margin-top: 40px; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.band-img { width: 100%; height: auto; aspect-ratio: 21 / 8; object-fit: cover; border-radius: 4px; margin-bottom: clamp(36px, 5vw, 64px); }
.contact__img { margin-top: 36px; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--paper2 { background: var(--paper-2); }
.section--ink { background: var(--ink); color: rgba(255, 255, 255, .84); }
.section--ink h2, .section--ink h3 { color: var(--white); }

.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section__head h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.section__head p { margin-top: 18px; font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.section--ink .section__head p { color: rgba(255, 255, 255, .78); }

/* ---------- Áreas ---------- */
.areas {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 88px);
  border-top: 1px solid var(--ink);
}
.area {
  display: flex; flex-direction: column; gap: 12px;
  padding-block: 32px;
  border-bottom: 1px solid var(--line);
}
.area h3 { font-size: 1.5rem; }
.area p { color: var(--muted); }
.area--lead {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(32px, 6vw, 88px); row-gap: 14px;
  padding-block: 40px;
  border-bottom-color: var(--ink);
}
.area--lead h3 { font-size: clamp(2rem, 3.6vw, 2.75rem); grid-row: 1 / 3; }
.area--lead p { font-size: 1.12rem; color: var(--text); }
.area--lead .area__link { grid-column: 2; }
.area--ask h3 { color: var(--accent); }
.area--ask p { max-width: 62ch; }

.area__link {
  align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center; gap: .45em;
  min-height: 44px;
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.area__link span { transition: transform .2s var(--ease); }
.area__link:hover span { transform: translateX(4px); }
.area__link:hover { color: var(--accent); }

/* ---------- Flujo ---------- */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.flow li { padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .22); }
.flow__n { display: block; font: 400 3.25rem/1 var(--serif); color: var(--accent-light); margin-bottom: 18px; }
.flow h3 { font-size: 1.4rem; margin-bottom: 10px; }

/* ---------- Equipo ---------- */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); border-top: 1px solid var(--ink); }
.member { display: flex; align-items: center; gap: 20px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.member__mono {
  flex: none;
  width: 68px; height: 68px;
  display: grid; place-items: center;
  font: 600 1.4rem/1 var(--serif); letter-spacing: .02em;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--accent-light);
}
.member h3 { font-size: 1.25rem; }
.member p { margin-top: 4px; color: var(--muted); font-size: 1rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq .section__head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.faq__list { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0;
  min-height: 44px;
  font: 600 1.2rem/1.3 var(--serif); color: var(--ink);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 40px 26px 0; color: var(--muted); max-width: 64ch; }

/* ---------- Contacto ---------- */
.contact {
  background:
    radial-gradient(800px 500px at 100% 0%, rgba(127, 184, 234, .14), transparent 60%),
    var(--ink);
}
.contact__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.contact h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.contact__lead { margin-top: 18px; font-size: 1.15rem; max-width: 46ch; }
.contact__data { margin-top: 36px; display: grid; gap: 4px; }
.contact__data li { display: flex; align-items: center; gap: 14px; min-height: 44px; color: var(--paper); }
.contact__data .ico { color: var(--accent-light); width: 22px; height: 22px; }
.contact__data a { font-weight: 600; font-size: 1.2rem; text-underline-offset: 4px; }

.form {
  background: var(--white); color: var(--text);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 8px;
  display: grid; gap: 8px;
}
.form label { font-weight: 600; font-size: .95rem; color: var(--ink); margin-top: 10px; }
.form label:first-child { margin-top: 0; }
.form input, .form select, .form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font: 400 1.0625rem/1.4 var(--sans); color: var(--text);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(28, 49, 80, .16);
}
.form input.is-invalid { border-color: #B3372C; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__row > div { display: grid; gap: 8px; }
.form .btn { margin-top: 18px; }
.form__note { margin-top: 8px; font-size: .9rem; color: var(--muted); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: #071426; color: rgba(255, 255, 255, .72); font-size: .98rem; padding-block: 56px 110px; }
.footer__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); gap: 40px clamp(32px, 6vw, 88px); }
.footer__brand { font: 600 1.35rem/1.2 var(--serif); color: var(--white); margin-bottom: 12px; }
.footer nav { display: grid; gap: 2px; align-content: start; }
.footer nav a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; color: rgba(255, 255, 255, .85); }
.footer nav a:hover { color: var(--accent-light); }
.footer__legal { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; line-height: 1.7; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center;
  height: 60px; min-width: 60px;
  padding: 0 16px;
  color: #fff; background: var(--wa);
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 10px 28px -8px rgba(10, 60, 30, .55), 0 2px 6px rgba(11, 29, 51, .25);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.wa-float svg { width: 28px; height: 28px; flex: none; }
.wa-float__label {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-weight: 600; font-size: 1rem;
  transition: max-width .35s var(--ease), margin .35s var(--ease);
}
.wa-float:hover { background: var(--wa-hover); transform: translateY(-2px); }
.wa-float:hover .wa-float__label, .wa-float:focus-visible .wa-float__label, .wa-float.is-open .wa-float__label { max-width: 220px; margin-left: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(11, 29, 51, .45);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a:not(.btn) { padding: 16px 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 20px; min-height: 52px; font-size: 1.05rem; }

  .urgent__in, .faq, .contact__in, .hero__grid { grid-template-columns: 1fr; }
  .hero__img img { aspect-ratio: 16 / 10; }
  .hero__img::after { display: none; }
  .urgent__img { display: none; }
  .band-img { aspect-ratio: 16 / 9; }
  .faq .section__head { position: static; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow li { padding-block: 26px; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; }
  .flow__n { grid-row: 1 / 3; font-size: 2.75rem; margin: 0; }
  .area--lead { grid-template-columns: 1fr; }
  .area--lead h3 { grid-row: auto; }
  .area--lead .area__link { grid-column: 1; }
}

@media (max-width: 680px) {
  :root { --header-h: 64px; }
  body { font-size: 1.0625rem; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__text { font-size: 1.02rem; }
  .hero__cta .btn { width: 100%; }
  .facts { grid-template-columns: 1fr; }
  .facts > div, .facts > div + div { padding: 18px 0; border-left: 0; }
  .facts > div + div { border-top: 1px solid rgba(255, 255, 255, .14); }
  .facts dt { min-width: 1.15em; }
  .facts dd { max-width: none; }
  .areas, .team { grid-template-columns: 1fr; }
  .area { padding-block: 28px; }
  .steps li { padding-left: 52px; }
  .steps li::before { font-size: 2.25rem; }
  .form__row { grid-template-columns: 1fr; gap: 8px; }
  .footer__in { grid-template-columns: 1fr; }
  .faq details p { padding-right: 0; }
  .wa-float { right: 16px; bottom: 16px; }
  .wa-float:hover .wa-float__label { max-width: 0; margin-left: 0; }
  .wa-float.is-open .wa-float__label { max-width: 220px; margin-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
