/* =============================================
   ESTUDIO JURÍDICO PÉREZ — Shared Styles v3
   Palette: black · white · gray · beige
   ============================================= */

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Blacks */
  --black:      #090909;
  --dark:       #111111;
  --dark-2:     #1a1a1a;

  /* Grays */
  --gray-1:     #3a3a3a;
  --gray-2:     #6a6a6a;
  --gray-3:     #a8a8a8;
  --gray-4:     #d4d4d4;

  /* Beige / Warm whites */
  --beige:      #ede8e1;
  --beige-2:    #e2dbd2;
  --off-white:  #f6f4f1;
  --white:      #ffffff;

  /* Green WhatsApp */
  --green: #25D366;

  /* Type */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Misc */
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius: 4px;
  --radius-lg: 12px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* =============================================
   REVEAL ANIMATION
   ============================================= */

/* .reveal / .reveal--left — initial invisible state for GSAP.
   GSAP (animations.js) takes full ownership of opacity, visibility
   and transform on these elements. The CSS rules below are a
   no-JS safety net only; transitions are intentionally removed
   so they don't fight gsap.fromTo() / autoAlpha. */
.reveal,
.reveal--left {
  opacity: 0;
  visibility: hidden;  /* matches GSAP autoAlpha:0 behaviour */
}
/* No-JS fallback: make everything visible */
.no-js .reveal,
.no-js .reveal--left {
  opacity: 1;
  visibility: visible;
}

/* =============================================
   NAVBAR
   ============================================= */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 18px 0;
  transition: background 0.3s var(--ease), padding 0.3s var(--ease);
}
.navbar.scrolled {
  background: rgba(9,9,9,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  transition: opacity 0.3s var(--ease);
}
.navbar__logo:hover { opacity: 0.65; }

.navbar__logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
}

/* thin vertical separator */
.navbar__logo::after {
  content: '';
  display: block;
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.navbar__logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}
.navbar__logo-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 300;
  font-style: italic;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1;
}
.navbar__logo-role {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--gray-2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Links */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.navbar__links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--gray-3);
  letter-spacing: 0.02em;
  transition: color 0.25s;
  position: relative;
  white-space: nowrap;
}
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.navbar__links a:hover,
.navbar__links a.active { color: var(--white); }
.navbar__links a:hover::after,
.navbar__links a.active::after { transform: scaleX(1); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: var(--green);
  border-radius: 50px;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  color: var(--white) !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap;
  transition: opacity 0.25s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { opacity: 0.85 !important; }

/* Burger */
.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  z-index: 201;
}
.navbar__burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.navbar__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.navbar__burger.open span:nth-child(2) { opacity: 0; }
.navbar__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =============================================
   BOTONES GLOBALES
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--wa {
  padding: 15px 32px;
  background: var(--green);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.88rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.25);
}
.btn--wa:hover { box-shadow: 0 8px 32px rgba(37,211,102,0.4); }

.btn--outline-w {
  padding: 14px 28px;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  font-size: 0.85rem;
}
.btn--outline-w:hover { border-color: var(--white); }

.btn--dark {
  padding: 15px 32px;
  background: var(--black);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.88rem;
}
.btn--dark:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.4); }

.btn--outline-d {
  padding: 14px 28px;
  background: transparent;
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 50px;
  font-size: 0.85rem;
}
.btn--outline-d:hover { border-color: var(--black); }

/* =============================================
   WHATSAPP FLOTANTE
   ============================================= */

.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 300;
  width: 56px; height: 56px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s;
  animation: waIn 0.6s 1.5s var(--ease-spring) both;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,0.6);
}
@keyframes waIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 52px 0 36px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.footer__logo-img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.footer__brand-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.footer__brand-role {
  font-size: 0.72rem;
  color: var(--gray-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__matricula {
  font-size: 0.68rem;
  color: var(--gray-2);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.footer__disclaimer {
  font-size: 0.72rem;
  color: var(--gray-2);
  line-height: 1.65;
  max-width: 420px;
  margin-bottom: 12px;
}
.footer__copy {
  font-size: 0.68rem;
  color: var(--gray-1);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.footer__links a {
  font-size: 0.8rem;
  color: var(--gray-3);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--white); }

.footer__instagram {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--gray-3);
  transition: color 0.2s;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 12px;
  margin-top: 4px;
}
.footer__instagram:hover { color: var(--white); }

/* =============================================
   SECTION SHARED
   ============================================= */

.section { padding: 100px 0; }
.section--dark   { background: var(--dark); }
.section--dark-2 { background: var(--dark-2); }
.section--beige  { background: var(--beige); color: var(--black); }
.section--off    { background: var(--off-white); color: var(--black); }
.section--black  { background: var(--black); }

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin-bottom: 20px;
}
.section__label--light { color: var(--gray-3); }
.section__label::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: currentColor;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  /* Sin menú lateral — nav y burger ocultos en mobile */
  .navbar__links { display: none !important; }
  .navbar__burger { display: none !important; }

  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { align-items: flex-start; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 24px; }
  .footer__instagram { border: none; padding: 0; margin: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
}

/* ACCESIBILIDAD */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  /* GSAP animations.js handles .reveal visibility for prefers-reduced-motion
     via gsap.matchMedia() — no CSS override needed here. */
}
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 2px; }
