/* ============================================================
   DAVAST ABOGADOS — styles.css
   Archetype: Dark Professional (Navy)
   ============================================================ */

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

:root {
  --navy:       #1A2E5A;
  --navy-2:     #142348;
  --navy-3:     #213870;
  --red:        #C0392B;
  --red-2:      #a5301f;
  --cream:      #ffffff;
  --cream-2:    #f5f5f5;
  --white:      #ffffff;
  --ink:        #0d1f3c;
  --ink-soft:   #2a3f62;
  --ink-mute:   #6b7a94;
  --line:       rgba(13,31,60,0.12);
  --line-light: rgba(250,248,243,0.12);

  --font-display:   'Montserrat', system-ui, sans-serif;
  --font-body:      'Montserrat', system-ui, sans-serif;
  --font-editorial: 'Montserrat', system-ui, sans-serif;

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  --nav-h: 120px;
  --section-pad: clamp(5rem, 10vw, 9rem);
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

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

/* ---- SECTION SHARED ---- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--section-pad) clamp(1.25rem, 5vw, 3rem);
}

.section-kicker {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.section-kicker--light { color: rgba(250,248,243,0.5); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--navy);
  text-wrap: balance;
  max-width: 22ch;
}
.section-title::after {
  content: '';
  display: block;
  width: 42px;
  height: 3px;
  background: var(--red);
  margin-top: 1rem;
  border-radius: 2px;
}
.section-title em { font-style: normal; color: inherit; font-weight: inherit; }
.section-title--light { color: var(--cream); }
.section-title--light em { color: inherit; }

.section-sub {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 56ch;
  line-height: 1.75;
  margin-top: 1.25rem;
  letter-spacing: 0.01em;
}

.section-header { margin-bottom: clamp(3rem, 6vw, 5rem); }

/* ---- REVEAL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Safety: split+reveal never invisible */
.reveal[data-split] { opacity: 1; transform: none; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out),
              transform 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(13,31,60,0.3);
}
.btn-primary--light {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.btn-primary--light:hover {
  background: var(--cream-2);
}

.btn-primary:hover {
  background: var(--navy-3);
  box-shadow: 0 8px 28px rgba(13,31,60,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(13,31,60,0.25);
}
.btn-ghost:hover {
  background: rgba(13,31,60,0.04);
  border-color: rgba(13,31,60,0.5);
}

.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 1.1rem 2rem;
  background: var(--navy);
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(13,31,60,0.25);
  position: relative;
  overflow: hidden;
  transition: background 0.25s, transform 0.2s var(--ease-out), box-shadow 0.25s;
}
.btn-submit:hover:not(:disabled) {
  background: var(--navy-3);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13,31,60,0.35);
}
.btn-submit:disabled { opacity: 0.75; cursor: not-allowed; transform: none; }

.btn-text, .btn-loading, .btn-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
  position: absolute;
  inset: 0;
  justify-content: center;
}
.btn-loading, .btn-success { opacity: 0; pointer-events: none; }
.btn-text { position: static; }

.btn-submit.is-loading .btn-text { opacity: 0; }
.btn-submit.is-loading .btn-loading { opacity: 1; }

.btn-submit.is-success { background: #1a5c36; box-shadow: 0 4px 20px rgba(26,92,54,0.3); }
.btn-submit.is-success .btn-text { opacity: 0; }
.btn-submit.is-success .btn-success { opacity: 1; }

.spin { animation: spinAnim 0.8s linear infinite; }
@keyframes spinAnim { to { transform: rotate(360deg); } }

/* ---- SPLASH ---- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), clip-path 0.7s var(--ease-in-out);
  animation: splashSafety 0.01s 4.5s forwards;
}
@keyframes splashSafety {
  to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
}
.splash.is-out {
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
}
.splash-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: splashReveal 0.6s var(--ease-out) 0.15s both;
}
@keyframes splashReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
/* Logo image sizing */
.splash-logo    { width: 240px; height: auto; }
.nav-logo-img   { height: 130px; width: auto; display: block; }
.footer-logo-img { width: 260px; height: auto; display: block; opacity: 0.85; transition: opacity 0.2s; margin-left: -39px; }
.footer-logo:hover .footer-logo-img { opacity: 1; }
.footer-logo-svg { width: 180px; height: auto; display: block; opacity: 0.9; transition: opacity 0.2s; }
.footer-logo:hover .footer-logo-svg { opacity: 1; }

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(13,31,60,0.06);
  transition: box-shadow 0.35s var(--ease-out);
}
.nav.is-solid {
  box-shadow: 0 2px 20px rgba(13,31,60,0.12);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.25rem clamp(1.25rem, 5vw, 3rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: -12px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--red);
  transition: width 0.25s var(--ease-out);
}
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.25rem;
  border-radius: 3px;
  font-weight: 500 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--navy-3) !important; transform: translateY(-1px); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  width: 32px;
}
.nav-hamburger span {
  display: block;
  width: 100%; height: 1.5px;
  background: var(--navy);
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  padding: 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease-out), padding 0.3s;
}
.nav-mobile.is-open {
  max-height: 400px;
  padding: 0.5rem 0 1rem;
}
.nav-mobile a {
  padding: 0.9rem clamp(1.25rem, 5vw, 3rem);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s, color 0.2s;
}
.nav-mobile a:hover { background: var(--cream-2); color: var(--navy); }
.nav-mobile a:last-child { border-bottom: none; color: var(--red); font-weight: 600; }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--white);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero--compact {
  min-height: auto;
}
.hero--compact .hero-inner {
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 3rem;
}

.hero-bg-pattern { display: none; }

.hero-accent-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  top: auto;
  height: 1px;
  background: var(--line);
  opacity: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 5rem) clamp(1.25rem, 5vw, 3rem) 9rem;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: heroFadeUp 0.7s var(--ease-out) 0.5s both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--navy);
  max-width: 18ch;
  text-wrap: balance;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: heroFadeUp 0.8s var(--ease-out) 0.65s both;
}
.hero-title em {
  font-style: normal;
  color: inherit;
  font-weight: inherit;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: heroFadeUp 0.7s var(--ease-out) 0.8s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  opacity: 0;
  animation: heroFadeUp 0.7s var(--ease-out) 0.95s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  padding-top: 2.5rem;
  margin-top: auto;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: heroFadeUp 0.7s var(--ease-out) 1.1s both;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 2.5rem 0 0;
}
.stat:first-child { padding-left: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--line);
  margin: 0 2.5rem 0 0;
  flex-shrink: 0;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-mute);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  animation: heroFadeUp 0.7s var(--ease-out) 1.3s both;
}
.scroll-arrow {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(13,31,60,0.3), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: scaleY(1); transform-origin: top; }
  50%       { transform: scaleY(0.6); transform-origin: top; }
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ---- MARQUEE ---- */
.marquee-band {
  overflow: hidden;
  background: var(--navy-3);
  border-top: 1px solid rgba(250,248,243,0.06);
  border-bottom: 1px solid rgba(250,248,243,0.06);
  padding: 1rem 0;
}
.marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}
.marquee-track span {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(250,248,243,0.92);
  white-space: nowrap;
}
.marquee-track .sep {
  color: var(--red);
  opacity: 0.7;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- SERVICIOS ---- */
.servicios {
  background: var(--cream);
  padding: 0;
}

.flip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Flip cards */
.flip-card {
  height: 400px;
  perspective: 1200px;
  cursor: pointer;
  outline: none;
  position: relative;
}
/* Two-tone bottom bar — moved to front face so it flips with the card */
.flip-card::after {
  display: none;
}
.flip-card-front::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--navy) 78%, var(--red) 78%);
  z-index: 10;
  border-radius: 0 0 6px 6px;
  pointer-events: none;
}
.flip-card:focus-visible .flip-card-inner {
  box-shadow: 0 0 0 3px var(--red);
}
.flip-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out);
  border-radius: 6px;
}
.flip-card.is-flipped .flip-card-inner,
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.flip-card-front {
  background: var(--cream-2);
  border: 1px solid #e4e8ef;
  justify-content: flex-start;
  gap: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.flip-card:hover .flip-card-front,
.flip-card.is-flipped .flip-card-front {
  box-shadow: 0 8px 32px rgba(13,31,60,0.15);
}
.flip-card.is-flipped .flip-card-front::after {
  display: none;
}

.flip-card-back {
  background: var(--white);
  border: 1px solid var(--line);
  transform: rotateY(180deg);
  justify-content: space-between;
  overflow: hidden;
  z-index: 2;
}

.flip-card-icon {
  display: none;
}
.flip-card-icon svg {
  width: 180px; height: 180px;
  stroke-width: 1px;
}
.flip-card-icon-img {
  width: 180px; height: 180px;
  object-fit: contain;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 50%, transparent 100%);
}
.flip-card-illustration {
  display: none;
}
.flip-card-illus-img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flip-card-illus-img--left {
  object-position: 60% center;
}
.flip-card-illus-img--bottom {
  object-position: center 100%;
  transform: scale(1.45);
}
.flip-card-illus-img--bottom2 {
  object-position: center 100%;
  transform: scale(1.6);
}
.flip-card-illus-img--sm {
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center 30%;
  opacity: 0.9;
  mix-blend-mode: multiply;
  border-radius: 6px;
  z-index: 0;
}
.flip-card-title {
  position: relative;
  z-index: 1;
}
/* Desk illustration on the right — hidden (bar is now handled above) */

.flip-card-title {
  order: 1;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
}
/* Red divider bar below each card title */
.flip-card-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--red);
  margin-top: 0.55rem;
  border-radius: 2px;
}

.flip-card-wrap {
  display: flex;
  flex-direction: column;
}

.flip-card-wrap .flip-card {
  flex: none;
}

.flip-card-title--outside {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  text-align: left;
}

.flip-card-title--sm {
  font-size: clamp(1rem, 1.3vw, 1.25rem);
}

.flip-card-hint { display: none; }
.flip-back-tagline {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.flip-back-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.flip-back-title::after {
  content: '';
  display: block;
  width: 28px; height: 2.5px;
  background: var(--red);
  margin-top: 0.4rem;
  border-radius: 2px;
}

.flip-back-desc {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.6;
}

.flip-back-list {
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.flip-back-list li {
  font-size: 0.72rem;
  color: var(--ink-mute);
  padding-left: 1rem;
  position: relative;
  letter-spacing: 0.02em;
}
.flip-back-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 0.65rem;
}

.flip-back-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  transition: gap 0.2s;
  flex-shrink: 0;
}
.flip-back-cta:hover { gap: 0.7rem; }
.flip-back-cta::after { content: '→'; }

/* Featured card */
.flip-card--featured .flip-card-front {
  background: #f5f7fa;
  border-color: rgba(192,32,42,0.25);
}

.flip-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--red);
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
}

/* ---- ÁREAS ESPECIALIZADAS ---- */
.areas {
  background: var(--cream-2);
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
  margin-top: 4rem;
  justify-items: center;
}

.area-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  outline: none;
  width: 100%;
}

.area-circle {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  text-align: center;
  position: relative;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  background: var(--white);
}

.area-circle::after {
  content: '';
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--red);
  transition: width 0.3s var(--ease-out);
}

.area-card:hover .area-circle,
.area-card.is-open .area-circle {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(13,31,60,0.13);
}

.area-card:hover .area-circle::after,
.area-card.is-open .area-circle::after {
  width: 46px;
}

.area-card:focus-visible .area-circle {
  box-shadow: 0 0 0 3px rgba(192,24,24,0.4);
}

.area-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 0.55rem;
}

.area-brief {
  font-size: 0.7rem;
  color: var(--ink-mute);
  line-height: 1.55;
  font-style: italic;
}

.area-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s var(--ease-out), opacity 0.35s var(--ease-out);
  text-align: center;
  width: 100%;
  max-width: 240px;
}

.area-detail p {
  font-size: 0.78rem;
  color: var(--ink-mute);
  line-height: 1.75;
  padding-top: 1.25rem;
}

.area-card:hover .area-detail,
.area-card.is-open .area-detail {
  max-height: 320px;
  opacity: 1;
}

.areas-cta {
  margin-top: 5.5rem;
  text-align: center;
}

/* ---- HERO TITLE: 3-line bold/thin/bold (equipo) ---- */
.hero-title--team .thin {
  font-weight: 300;
}

/* ---- HISTORIA (equipo) ---- */
.historia {
  background: var(--cream);
}
.historia-layout {
  display: grid;
  grid-template-columns: 1fr;
}
.historia-text {
  max-width: 70ch;
}
.historia-text .firma-desc {
  color: var(--ink-mute);
  font-weight: 400;
}

/* ---- EQUIPO GRID ---- */
.equipo {
  background: var(--cream-2);
}
.equipo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem 2rem;
  margin-top: 4rem;
}
.equipo-grid .team-card {
  flex: 0 0 calc((100% - 2 * 2rem) / 3);
  max-width: calc((100% - 2 * 2rem) / 3);
}
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.team-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
}
.team-avatar::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  opacity: 0.4;
}
.team-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.team-role {
  font-size: 0.78rem;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.team-bio {
  font-size: 0.84rem;
  color: var(--ink-mute);
  line-height: 1.7;
}

/* ---- VALORES (equipo) ---- */
.valores {
  background: var(--cream);
}
.value-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 4rem;
}
.value-pillar {
  position: relative;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.value-pillar-line {
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 100%;
  background: var(--red);
  opacity: 0.4;
  transition: opacity 0.3s;
}
.value-pillar:hover .value-pillar-line { opacity: 1; }
.value-pillar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.value-pillar-text {
  font-size: 0.85rem;
  color: var(--ink-mute);
  line-height: 1.7;
}

/* ---- EQUIPO CTA ---- */
.equipo-cta {
  background: var(--navy);
  text-align: center;
}
.equipo-cta-inner {
  max-width: 700px;
  margin: 0 auto;
}
.equipo-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.equipo-cta-sub {
  color: rgba(250,248,243,0.65);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .equipo-grid .team-card { flex: 0 0 calc((100% - 2rem) / 2); max-width: calc((100% - 2rem) / 2); }
  .value-pillars { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 767px) {
  .equipo-grid { gap: 2.5rem; }
  .equipo-grid .team-card { flex: 0 0 100%; max-width: 100%; }
}

/* ---- PRÁCTICA GENERAL ---- */
.practica {
  background: var(--white);
}
.practica-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}
.practica-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.practica-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(13,31,60,0.1);
  border-color: var(--red);
}
.practica-bar {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
}
.practica-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.practica-text {
  font-size: 0.8rem;
  color: var(--ink-mute);
  line-height: 1.65;
}

@media (max-width: 1024px) {
  .practica-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .practica-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ---- LA FIRMA ---- */
.firma {
  position: relative;
  background: var(--navy);
  overflow: hidden;
}
.firma-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 90% 50%, rgba(192,32,42,0.06), transparent);
  pointer-events: none;
}

.firma-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.firma-desc {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  font-weight: 300;
  color: rgba(250,248,243,0.7);
  line-height: 1.85;
  margin-top: 1.5rem;
  max-width: 60ch;
  letter-spacing: 0.01em;
}

.firma-pillars {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line-light);
}
.pillar { display: flex; flex-direction: column; gap: 0.4rem; padding-left: 1.25rem; }
.pillar-line {
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 100%;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.3s;
}
.pillar { position: relative; }
.pillar:hover .pillar-line { opacity: 1; }
.pillar-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.06em;
}
.pillar-text {
  font-size: 0.85rem;
  color: rgba(250,248,243,0.5);
  line-height: 1.6;
}

.firma-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  overflow: hidden;
}
.firma-stat-card {
  background: rgba(17,36,73,0.8);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.25s;
}
.firma-stat-card:hover { background: rgba(26,50,96,0.9); }
.firma-stat-card--accent { background: rgba(17,36,73,0.8); }
.firma-stat-card--accent:hover { background: rgba(26,50,96,0.9); }

.firma-stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--cream);
  line-height: 1;
  letter-spacing: -0.02em;
}
.firma-stat-label {
  font-size: 0.75rem;
  color: rgba(250,248,243,0.45);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

/* ---- PROCESO ---- */
.proceso {
  background: var(--cream-2);
}
.section-header--proceso {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}
.proceso-header-text { flex: 1; }
.proceso-header-illus {
  flex: 0 0 auto;
  width: clamp(320px, 44vw, 620px);
  margin-right: -3rem;
}
.proceso-header-illus img {
  width: 100%; height: auto; display: block;
  mix-blend-mode: multiply;
  filter: contrast(1.3) brightness(1.02) saturate(0);
}
@media (max-width: 1024px) {
  .proceso-header-illus { display: none; }
}
@media (max-width: 768px) {
  .section-header--proceso { flex-direction: column; }
}
.proceso {
  background: var(--cream-2);
}
.proceso-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}
.proceso-steps::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--red) 0%, rgba(192,32,42,0.2) 100%);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  padding-top: 0;
}
.step-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
  background: var(--cream-2);
  width: 4rem; height: 4rem;
  border-radius: 50%;
  border: 1px solid rgba(192,32,42,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
  transition: background 0.25s, border-color 0.25s;
}
.step:hover .step-num {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.step-content { padding-top: 0.5rem; }
.step-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}
.step-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.step-arrow { display: none; }
.step-end-mark {
  position: absolute;
  top: 0.85rem;
  right: 0;
  width: 4rem; height: 4rem;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  display: none;
}

/* ---- CONTACTO ---- */
.contacto {
  position: relative;
  background: var(--navy);
  overflow: hidden;
}
.contacto-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(192,32,42,0.08), transparent),
    radial-gradient(ellipse 40% 40% at 100% 0%, rgba(26,50,96,0.5), transparent);
  pointer-events: none;
}
.contacto-inner { position: relative; }
.contacto-header { margin-bottom: clamp(3rem, 5vw, 4rem); }
.contacto-sub {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(250,248,243,0.6);
  max-width: 50ch;
  line-height: 1.8;
  margin-top: 1rem;
  letter-spacing: 0.01em;
}
.contacto-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(3rem, 5vw, 5rem);
  align-items: start;
}

/* Form */
.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}
.form-row { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row--2 { flex-direction: row; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.form-group label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form-group label span { color: var(--red); }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--navy);
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--ink-mute);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(192,32,42,0.5);
  background: var(--white);
}
.select-wrapper select option { background: var(--white); color: var(--navy); }
.form-group input.is-error,
.form-group select.is-error,
.form-group textarea.is-error {
  border-color: var(--red);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '↓';
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  color: rgba(250,248,243,0.35);
  font-size: 0.75rem;
  pointer-events: none;
}
.select-wrapper select { width: 100%; cursor: pointer; }
.select-wrapper select option { background: var(--navy-2); color: var(--cream); }

.form-group--checkbox { flex-direction: row; align-items: flex-start; gap: 0; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--ink-mute);
  line-height: 1.6;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
.checkbox-custom {
  width: 18px; height: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.checkbox-label input:checked ~ .checkbox-custom {
  background: var(--red);
  border-color: var(--red);
}
.checkbox-label input:checked ~ .checkbox-custom::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
  font-weight: 700;
}
.form-link { color: var(--ink-soft); text-decoration: underline; }
.form-link:hover { color: var(--navy); }

.form-error-msg {
  font-size: 0.8rem;
  color: #ff6b6b;
  min-height: 1.2em;
}

/* Contact info sidebar */
.contacto-info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding-top: 0.5rem;
}
.info-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.info-val {
  font-size: 0.9rem;
  color: rgba(250,248,243,0.7);
  line-height: 1.6;
}
.info-val a { transition: color 0.2s; }
.info-val a:hover { color: var(--cream); }

.info-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(250,248,243,0.04);
  border: 1px solid rgba(250,248,243,0.08);
  border-radius: 6px;
  margin-top: 0.5rem;
}
.guarantee-icon { color: rgba(250,248,243,0.3); flex-shrink: 0; margin-top: 2px; }
.info-guarantee p {
  font-size: 0.78rem;
  color: rgba(250,248,243,0.4);
  line-height: 1.6;
  font-style: italic;
  font-family: var(--font-editorial);
}

/* ---- FOOTER ---- */
.footer {
  background: var(--white);
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 5vw, 3rem) 2.5rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.footer-logo {
  display: block;
  margin-bottom: 1rem;
}
.footer-tagline {
  padding-left: 39px;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-mute);
  line-height: 1.6;
  font-family: var(--font-body);
  font-style: italic;
  letter-spacing: 0.02em;
}
.footer-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.footer-col a {
  font-size: 0.83rem;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--navy); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--ink-mute);
  line-height: 1.6;
}
.footer-bottom { text-align: center; }

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

/* Tablet */
@media (max-width: 1024px) {
  .flip-grid { grid-template-columns: repeat(2, 1fr); }
  .firma-layout { grid-template-columns: 1fr; }
  .firma-stats { grid-template-columns: repeat(4, 1fr); max-width: 600px; }
  .proceso-steps { grid-template-columns: repeat(2, 1fr); }
  .proceso-steps::before { display: none; }
  .step-arrow { display: none; }
  .contacto-layout { grid-template-columns: 1fr; }
  .contacto-info { flex-direction: row; flex-wrap: wrap; }
  .info-block { min-width: 200px; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: flex; }

  .hero-stats { gap: 1.5rem 0; }
  .stat-divider { display: none; }
  .stat { padding: 0 1.5rem 0 0; }
  .firma-stats { grid-template-columns: repeat(2, 1fr) !important; max-width: 100% !important; gap: 1rem; }
  .contacto-form { padding: 1.5rem; margin: 0; }

  .flip-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .flip-grid .flip-card:last-child { grid-column: span 1; }
  .flip-card { height: 420px; }
  .flip-card-back { overflow-y: auto; }
  .flip-card-front::after { display: none; }

  .proceso-steps { grid-template-columns: 1fr; }
  .step-arrow { display: none; }

  .form-row--2 { flex-direction: column; }

  .footer-nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* ===== SECTION BACKGROUND ILLUSTRATIONS ===== */
.section-illus {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.section-illus svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Hero — Scales of Justice, right side */
.hero-illus {
  right: 0;
  top: var(--nav-h);
  bottom: 0;
  width: clamp(480px, 58vw, 800px);
  opacity: 0.55;
  display: flex;
  align-items: stretch;
}
.hero-illus--shift-left {
  right: 10%;
  opacity: 0.85;
}
.hero-illus--shift-right {
  right: -1.5%;
}
.section-title .thin {
  font-weight: 300;
}

.legal {
  background: var(--white);
  padding-bottom: var(--section-pad);
}
.legal-content {
  max-width: 760px;
}
.legal-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.legal-content .firma-desc {
  color: var(--ink-mute);
  font-weight: 400;
}
.legal-content > .legal-heading:first-child {
  margin-top: 0;
}

.hero-illus-img--team {
  width: 100%;
  height: 100%;
  background-color: var(--navy);
  -webkit-mask-image: url("assets/img/abogados equipo portada.png");
  mask-image: url("assets/img/abogados equipo portada.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.hero-illus img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: right top;
  filter: contrast(1.4) brightness(1.02) saturate(0);
  mix-blend-mode: multiply;
}

/* Servicios — Desk scene, right side */
.servicios { position: relative; }
.servicios-illus {
  right: clamp(-1rem, 0vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 34vw, 460px);
  aspect-ratio: 420 / 340;
  color: var(--navy);
  opacity: 0.07;
}

/* Firma — Courthouse, left side */
.firma-illus {
  left: clamp(-4rem, -2vw, 0rem);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(320px, 40vw, 560px);
  aspect-ratio: 460 / 390;
  color: #ffffff;
  opacity: 0.07;
}

/* Proceso — Scroll, right side */
.proceso { position: relative; }
.proceso-illus {
  right: clamp(1rem, 4vw, 6rem);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(220px, 24vw, 340px);
  aspect-ratio: 320 / 420;
  color: var(--navy);
  opacity: 0.08;
}

/* Contacto — Shield, right side */
.contacto-illus {
  right: clamp(2rem, 5vw, 8rem);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(220px, 24vw, 340px);
  aspect-ratio: 300 / 400;
  color: #ffffff;
  opacity: 0.09;
}

/* Hide illustrations on small screens to avoid clutter */
@media (max-width: 768px) {
  .section-illus { display: none; }
  .hero-illus { display: none; }
}

@media (max-width: 1024px) {
  .hero-illus { display: none; }
}

/* ---- ÁREAS: tablet (2 cols) ---- */
@media (max-width: 1024px) {
  .areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2.5rem;
  }
  .area-circle { width: 200px; height: 200px; }
}

/* ---- ÁREAS: mobile (1 col) ---- */
@media (max-width: 767px) {
  .areas-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .area-circle { width: 170px; height: 170px; padding: 1.25rem; }
  .area-circle::after { bottom: 24px; }
  .area-name { font-size: 0.82rem; }
  .area-detail { max-width: 280px; }
}
