/* =========================================================
   Despacho jurídico — Sitio estático para Cloudflare Pages
   ========================================================= */

:root {
  --navy-950: #07111f;
  --navy-900: #0b1728;
  --navy-800: #11243b;
  --navy-700: #17324f;
  --gold: #c6a15b;
  --gold-soft: #e2c78f;
  --cream: #f5f2eb;
  --paper: #fbfaf7;
  --white: #ffffff;
  --ink: #152233;
  --muted: #667386;
  --line: rgba(21, 34, 51, .12);
  --line-light: rgba(255, 255, 255, .16);
  --shadow: 0 24px 70px rgba(5, 17, 31, .12);
  --radius-lg: 30px;
  --radius-md: 20px;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 110px 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy-950);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.site-header.scrolled {
  background: rgba(7, 17, 31, .93);
  border-color: var(--line-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(198, 161, 91, .65);
  border-radius: 50%;
  color: var(--gold-soft);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: rgba(255, 255, 255, .86);
  font-size: .93rem;
}

.main-nav > a {
  position: relative;
  transition: color .2s ease;
}

.main-nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--gold);
  transition: right .2s ease;
}

.main-nav > a:hover,
.main-nav > a:focus-visible {
  color: var(--white);
}

.main-nav > a:not(.nav-cta):hover::after,
.main-nav > a:not(.nav-cta):focus-visible::after {
  right: 0;
}

.nav-cta {
  padding: 11px 18px;
  border: 1px solid rgba(226, 199, 143, .58);
  border-radius: 999px;
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--white);
  transition: transform .25s ease, opacity .25s ease;
}

/* Hero */

.hero {
  position: relative;
  min-height: 820px;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(7, 17, 31, .98) 0%, rgba(11, 23, 40, .96) 52%, rgba(17, 36, 59, .95) 100%);
  color: var(--white);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -18vw;
  top: 100px;
  width: 72vw;
  height: 72vw;
  z-index: -2;
  border: 1px solid rgba(198, 161, 91, .12);
  border-radius: 50%;
  box-shadow:
    0 0 0 85px rgba(198, 161, 91, .025),
    0 0 0 170px rgba(198, 161, 91, .018);
}

.hero-glow {
  position: absolute;
  z-index: -4;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .46;
}

.hero-glow-one {
  width: 380px;
  height: 380px;
  right: 8%;
  top: 26%;
  background: rgba(198, 161, 91, .22);
}

.hero-glow-two {
  width: 420px;
  height: 420px;
  left: -180px;
  bottom: -160px;
  background: rgba(41, 91, 133, .24);
}

.hero-grid {
  min-height: 820px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: center;
  gap: 80px;
  padding-top: 95px;
  padding-bottom: 90px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold-soft);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: #967235;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.1rem, 7.6vw, 7.2rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .9;
}

.hero h1 span {
  display: block;
  margin-left: .58em;
  color: var(--gold-soft);
  font-style: italic;
  font-weight: 400;
}

.hero-lead {
  max-width: 630px;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, .75);
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 750;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-950);
  box-shadow: 0 16px 35px rgba(198, 161, 91, .18);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #d4b572;
  box-shadow: 0 20px 40px rgba(198, 161, 91, .24);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, .18);
  color: var(--white);
  background: rgba(255, 255, 255, .045);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .08);
}

.hero-meta {
  display: flex;
  gap: 50px;
  margin-top: 55px;
  padding-top: 25px;
  border-top: 1px solid var(--line-light);
}

.hero-meta > div {
  display: grid;
  gap: 4px;
}

.meta-label {
  color: rgba(255, 255, 255, .43);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.hero-meta a,
.hero-meta div > span:last-child {
  color: rgba(255,255,255,.92);
  font-size: .95rem;
}

.hero-panel {
  position: relative;
  padding: 34px 34px 18px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 28px 70px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
}

.panel-line {
  width: 48px;
  height: 2px;
  margin-bottom: 28px;
  background: var(--gold);
}

.panel-kicker {
  margin: 0 0 7px;
  color: rgba(255, 255, 255, .5);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-panel h2 {
  max-width: 360px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 500;
  line-height: 1.08;
}

.service-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 2px;
  border-top: 1px solid rgba(255, 255, 255, .11);
  color: rgba(255, 255, 255, .85);
}

.service-list span {
  color: var(--gold-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(calc(100% - 40px), var(--container));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, .38);
}

.hero-bottom span {
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.hero-bottom small {
  font-size: .69rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Intro */

.intro {
  background: var(--cream);
}

.split {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 90px;
  align-items: start;
}

.section-heading h2,
.services-head h2,
.contact-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.035em;
}

.section-heading h2 {
  max-width: 620px;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.intro-copy {
  padding-top: 42px;
}

.intro-copy p {
  margin: 0;
  color: #435165;
  font-size: clamp(1.18rem, 2vw, 1.52rem);
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(21, 34, 51, .24);
  font-weight: 750;
}

.text-link span {
  color: #967235;
}

/* Services */

.services {
  background: var(--paper);
}

.services-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 45px;
}

.services-head h2 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 1;
}

.services-head > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  grid-column: span 4;
  min-height: 235px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 30px rgba(10, 25, 42, .045);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.service-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(198, 161, 91, .18);
  border-radius: 50%;
  transition: transform .3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(198, 161, 91, .5);
  box-shadow: 0 18px 48px rgba(10, 25, 42, .08);
}

.service-card:hover::after {
  transform: scale(1.15);
}

.service-card.featured {
  grid-column: span 6;
  min-height: 285px;
  background: var(--navy-900);
  color: var(--white);
  border-color: transparent;
}

.card-number {
  position: absolute;
  top: 22px;
  right: 22px;
  color: #9aa4b1;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .09em;
}

.featured .card-number {
  color: rgba(255, 255, 255, .38);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border: 1px solid rgba(198, 161, 91, .4);
  border-radius: 50%;
  color: #9a7538;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.featured .card-icon {
  color: var(--gold-soft);
  border-color: rgba(226, 199, 143, .35);
}

.service-card h3 {
  margin: 22px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.2vw, 2.1rem);
  font-weight: 500;
  line-height: 1.05;
}

/* Contact */

.contact-section {
  background: var(--paper);
  padding-top: 30px;
}

.contact-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  padding: 28px;
  border-radius: 38px;
  background: var(--navy-950);
  color: var(--white);
  box-shadow: var(--shadow);
}

.contact-copy {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 20%, rgba(198, 161, 91, .13), transparent 36%),
    rgba(255, 255, 255, .025);
}

.contact-copy h2 {
  max-width: 510px;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: .98;
}

.contact-copy > p:not(.eyebrow) {
  margin: 22px 0 34px;
  color: rgba(255, 255, 255, .6);
  font-size: 1.08rem;
}

.light-btn {
  align-self: flex-start;
}

.contact-cards {
  display: grid;
  gap: 14px;
}

.contact-card {
  position: relative;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 68px 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px;
  background: rgba(255, 255, 255, .055);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

a.contact-card:hover,
a.contact-card:focus-visible {
  transform: translateX(-4px);
  border-color: rgba(226, 199, 143, .42);
  background: rgba(255, 255, 255, .085);
}

.contact-label {
  margin-bottom: 9px;
  color: rgba(255, 255, 255, .42);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.contact-card strong {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  font-weight: 650;
}

.contact-arrow {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-soft);
  font-size: 1.25rem;
}

.contact-dot {
  position: absolute;
  right: 30px;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(198, 161, 91, .1);
}

/* Footer */

.site-footer {
  padding: 58px 0 70px;
  background: var(--navy-950);
  color: rgba(255, 255, 255, .62);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .55fr 1fr;
  gap: 50px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-brand {
  margin-bottom: 12px;
}

.footer-grid p {
  margin: 0;
  font-size: .9rem;
}

.footer-links,
.footer-contact {
  display: grid;
  align-content: start;
  gap: 12px;
  font-size: .88rem;
}

.footer-links a,
.footer-contact a {
  transition: color .2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--white);
}

.footer-contact {
  justify-items: start;
}

.floating-whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .2);
  transition: transform .2s ease, box-shadow .2s ease;
}

.floating-whatsapp:hover,
.floating-whatsapp:focus-visible {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
}

.floating-whatsapp svg {
  width: 31px;
  height: 31px;
  fill: #fff;
}

/* Animaciones seguras: el contenido nunca queda oculto si JavaScript falla */

.reveal {
  opacity: 1;
  transform: none;
  animation: fadeUp .62s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus */

:focus-visible {
  outline: 3px solid rgba(226, 199, 143, .85);
  outline-offset: 4px;
}

/* Responsive */

@media (max-width: 980px) {
  .section {
    padding: 88px 0;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1002;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    padding: 100px 40px 50px;
    background: rgba(7, 17, 31, .985);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s ease, visibility .3s ease;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
  }

  .main-nav.open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-cta {
    margin-top: 10px;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 1rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 150px;
    padding-bottom: 105px;
  }

  .hero h1 {
    max-width: 720px;
  }

  .hero-panel {
    width: min(100%, 620px);
  }

  .hero-bottom {
    bottom: 22px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .intro-copy {
    padding-top: 0;
  }

  .services-head {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }

  .service-card,
  .service-card.featured {
    grid-column: span 6;
  }

  .contact-shell {
    grid-template-columns: 1fr;
  }

  .contact-copy {
    min-height: 380px;
  }

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

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .section {
    padding: 72px 0;
  }

  .header-inner {
    min-height: 74px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero-grid {
    padding-top: 125px;
    padding-bottom: 105px;
  }

  .hero h1 {
    font-size: clamp(3.45rem, 17vw, 5.2rem);
  }

  .hero h1 span {
    margin-left: .22em;
  }

  .hero-lead {
    margin-top: 27px;
  }

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .hero-meta {
    display: grid;
    gap: 18px;
    margin-top: 40px;
  }

  .hero-panel {
    padding: 26px 22px 12px;
    border-radius: 24px;
  }

  .hero-bottom small {
    font-size: .58rem;
  }

  .section-heading h2,
  .services-head h2 {
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }

  .intro-copy p {
    font-size: 1.08rem;
  }

  .services-grid {
    gap: 12px;
  }

  .service-card,
  .service-card.featured {
    grid-column: 1 / -1;
    min-height: 210px;
  }

  .contact-section {
    padding-top: 16px;
  }

  .contact-shell {
    width: min(calc(100% - 16px), var(--container));
    padding: 10px;
    border-radius: 28px;
  }

  .contact-copy {
    min-height: 390px;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .contact-copy h2 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .contact-card {
    min-height: 132px;
    padding: 22px 52px 22px 20px;
    border-radius: 20px;
  }

  .contact-arrow {
    right: 20px;
  }

  .contact-dot {
    right: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-contact {
    grid-column: auto;
  }

  .floating-whatsapp {
    right: 14px;
    bottom: 14px;
    width: 54px;
    height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
