*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #b89a5a;
  --gold-light:  #d4b87a;
  --gold-pale:   #f5edd8;
  --dark:        #0e0c0a;
  --dark-soft:   #1a1714;
  --mid:         #2e2a25;
  --cream:       #faf8f4;
  --cream-dark:  #f0ebe1;
  --text-body:   #3d3830;
  --text-muted:  #8a7f72;
  --white:       #ffffff;
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Jost', sans-serif;
  --transition:  0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* Top Bar */
.topbar {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 48px;
  display: flex;
  justify-content: flex-end;
  gap: 32px;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color var(--transition); }
.topbar a:hover { color: var(--gold-light); }
.topbar-sep { color: rgba(255,255,255,0.2); }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,244,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,154,90,0.2);
  padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
  transition: box-shadow var(--transition);
  overflow: visible;
}
nav.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.08); }
.nav-logo img { height: 52px; width: auto; display: block; }
.nav-logo-fallback { display: none; font-family: var(--font-serif); font-size: 1.3rem; color: var(--dark); font-weight: 400; }
.nav-links { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-body);
  position: relative; padding-bottom: 4px;
  transition: color var(--transition);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--dark); transition: all var(--transition); }

/* Hero — cap width like typical theme sliders; anchor wide assets to the text side */
.hero {
  position: relative;
  width: 100%;
  max-width: min(100%, 1920px);
  margin-inline: auto;
  height: min(92vh, 900px);
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/Slider01-1.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right center;
  transform: scale(1.02);
  transform-origin: center center;
  animation: heroZoom 12s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.02); }
  to   { transform: scale(1); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(14,12,10,0.82) 0%, rgba(14,12,10,0.55) 55%, rgba(14,12,10,0.25) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 48px; max-width: 780px;
  width: 100%;
  animation: heroFadeUp 1.2s 0.3s both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 24px;
  display: flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before { content: ''; display: block; width: 40px; height: 1px; background: var(--gold); }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 300; color: var(--white);
  line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-desc {
  font-size: 1rem; font-weight: 300;
  color: rgba(255,255,255,0.72); max-width: 480px;
  letter-spacing: 0.02em; margin-bottom: 44px;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--gold); color: var(--dark);
  text-decoration: none; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 16px 36px;
  transition: background var(--transition), transform var(--transition);
}
.hero-cta:hover { background: var(--gold-light); transform: translateY(-2px); }
.hero-cta svg { width: 14px; height: 14px; }
.hero-scroll {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.4); font-size: 0.62rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.8; transform: translateX(-50%) translateY(5px); }
}
.hero-scroll-line { width: 1px; height: 48px; background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent); }

/* Sections */
section { padding: 100px 48px; }
.section-eyebrow {
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.section-eyebrow::before { content: ''; display: block; width: 32px; height: 1px; background: var(--gold); }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300; color: var(--dark); line-height: 1.2; margin-bottom: 16px;
}
.section-title em { font-style: italic; color: var(--gold); }
.section-sub { font-size: 0.9rem; font-weight: 300; color: var(--text-muted); max-width: 520px; letter-spacing: 0.02em; }

/* Areas */
#areaslegales { background: var(--cream); }
.areas-header { max-width: 1200px; margin: 0 auto 64px; }
.areas-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px;
}
.area-card {
  background: var(--white); padding: 44px 36px;
  position: relative; overflow: hidden; transition: background var(--transition);
}
.area-card::before {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--gold); transition: width 0.5s ease;
}
.area-card:hover { background: var(--cream-dark); }
.area-card:hover::before { width: 100%; }
.area-number {
  font-family: var(--font-serif); font-size: 3.5rem; font-weight: 300;
  color: rgba(184,154,90,0.15); line-height: 1; margin-bottom: 20px; transition: color var(--transition);
}
.area-card:hover .area-number { color: rgba(184,154,90,0.3); }
.area-card h4 { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; color: var(--dark); margin-bottom: 14px; line-height: 1.3; }
.area-card p { font-size: 0.83rem; font-weight: 300; color: var(--text-muted); line-height: 1.7; }

/* About */
#bettyperez { background: var(--dark); padding: 100px 48px; }
.about-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: center; }
.about-text .section-eyebrow { color: var(--gold-light); }
.about-text .section-eyebrow::before { background: var(--gold-light); }
.about-text .section-title { color: var(--white); }
.about-text p { font-size: 0.92rem; font-weight: 300; color: rgba(255,255,255,0.6); line-height: 1.85; margin-top: 24px; }
.about-text p + p { margin-top: 16px; }
.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.highlight-item { border-left: 2px solid rgba(184,154,90,0.3); padding-left: 20px; }
.highlight-item strong { display: block; font-family: var(--font-serif); font-size: 1.8rem; font-weight: 300; color: var(--gold-light); line-height: 1; margin-bottom: 6px; }
.highlight-item span { font-size: 0.72rem; font-weight: 300; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); text-transform: uppercase; }
.about-visual { position: relative; }
.about-img-frame { position: relative; }
.about-img-frame::before {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 100%; height: 100%;
  border: 1px solid rgba(184,154,90,0.25); pointer-events: none; z-index: 0;
}
.about-img-frame img { width: 100%; height: 520px; object-fit: cover; display: block; position: relative; z-index: 1; filter: grayscale(20%); }
.about-badge {
  position: absolute; bottom: -28px; left: -28px; z-index: 2;
  background: var(--gold); color: var(--dark); padding: 28px 32px;
  font-family: var(--font-serif); text-align: center;
}
.about-badge strong { display: block; font-size: 2.4rem; font-weight: 400; line-height: 1; }
.about-badge span { font-size: 0.75rem; font-weight: 400; letter-spacing: 0.06em; font-family: var(--font-sans); }

/* Team */
#asociados { background: var(--cream-dark); }
.team-header { max-width: 1200px; margin: 0 auto 64px; }
.team-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px; }
.team-card { background: var(--white); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.team-card:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,0,0,0.1); }
.team-photo { width: 100%; height: 300px; object-fit: cover; display: block; filter: grayscale(15%); transition: filter var(--transition); }
.team-card:hover .team-photo { filter: grayscale(0%); }
.team-info { padding: 28px 28px 32px; border-top: 2px solid var(--gold); }
.team-info h3 { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 500; color: var(--dark); margin-bottom: 4px; }
.team-role { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.team-contact { display: flex; flex-direction: column; gap: 6px; }
.team-contact a { font-size: 0.8rem; font-weight: 300; color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color var(--transition); }
.team-contact a:hover { color: var(--gold); }
.team-contact svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.6; }

/* Contact */
#contacto { background: var(--dark-soft); padding: 80px 48px; }
.contact-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px; align-items: start; }
.contact-brand .section-eyebrow { color: var(--gold); }
.contact-brand .section-eyebrow::before { background: var(--gold); }
.contact-brand h2 { font-family: var(--font-serif); font-size: 2rem; font-weight: 300; color: var(--white); line-height: 1.25; margin-bottom: 20px; }
.contact-brand p { font-size: 0.83rem; font-weight: 300; color: rgba(255,255,255,0.45); line-height: 1.8; }
.contact-block h5 { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid rgba(184,154,90,0.2); }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; align-items: flex-start; gap: 12px; }
.contact-list svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; color: var(--gold); opacity: 0.7; }
.contact-list span, .contact-list a { font-size: 0.85rem; font-weight: 300; color: rgba(255,255,255,0.55); text-decoration: none; line-height: 1.5; transition: color var(--transition); }
.contact-list a:hover { color: var(--gold-light); }
.social-row { display: flex; gap: 16px; margin-top: 28px; }
.social-link { width: 36px; height: 36px; border: 1px solid rgba(184,154,90,0.25); display: flex; align-items: center; justify-content: center; text-decoration: none; color: rgba(255,255,255,0.4); transition: all var(--transition); }
.social-link:hover { border-color: var(--gold); color: var(--gold); background: rgba(184,154,90,0.08); }
.social-link svg { width: 15px; height: 15px; }

/* Footer */
footer { background: var(--dark); padding: 28px 48px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(184,154,90,0.12); }
footer p { font-size: 0.72rem; font-weight: 300; color: rgba(255,255,255,0.25); letter-spacing: 0.06em; }
footer a { color: rgba(184,154,90,0.6); text-decoration: none; transition: color var(--transition); }
footer a:hover { color: var(--gold-light); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.contact-block-spaced { margin-top: 32px; }

/* Responsive */
@media (max-width: 900px) {
  /* backdrop-filter makes fixed descendants use nav as containing block — breaks full-screen menu */
  nav { backdrop-filter: none; background: rgba(250,248,244,0.98); }

  section { padding: 72px 28px; }
  nav { padding: 0 28px; }
  .topbar { padding: 10px 28px; gap: 16px; font-size: 0.65rem; }
  .nav-links {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 48px;
    gap: 32px;
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.9rem; }
  .nav-toggle { display: flex; z-index: 201; position: relative; }
  .hero-content { padding: 0 28px; }
  .hero h1 { font-size: 2.4rem; }
  .hero { height: min(75vh, 720px); min-height: 380px; }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { display: none; }
  .about-highlights { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  footer { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 600px) {
  .topbar .topbar-phone { display: none; }
  .areas-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .team-grid { grid-template-columns: 1fr; }
}
