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

:root {
  --gold-light:  #d4a843;
  --gold-mid:    #b8892a;
  --gold-dark:   #8a6215;
  --black-deep:  #080808;
  --black-rich:  #0e0e0e;
  --black-card:  #141414;
  --black-hover: #1c1c1c;
  --text-light:  #f5f0e8;
  --text-muted:  #9a9182;
  --border-gold: rgba(212, 168, 67, 0.25);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black-deep);
  color: var(--text-light);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* ── CANVAS BACKGROUND ────────────────────────────────────── */
#hero-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(8,8,8,0.92) 0%, rgba(8,8,8,0) 100%);
  backdrop-filter: blur(4px);
  transition: background 0.4s;
}

.navbar.scrolled {
  background: rgba(8,8,8,0.96);
  border-bottom: 1px solid var(--border-gold);
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-logo {
  height: 48px;
  width: 48px;
  object-fit: contain;
  border-radius: 50%;
  filter: brightness(1.05);
  transition: transform 0.3s;
}

.navbar-logo:hover {
  transform: scale(1.06);
}

.navbar-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.navbar-links a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.navbar-links a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.navbar-toggle span {
  width: 24px; height: 1px;
  background: var(--gold-light);
  transition: all 0.3s;
}

/* ── HERO SECTION ─────────────────────────────────────────── */
#hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.hero-logo {
  width: clamp(180px, 22vw, 260px);
  height: clamp(180px, 22vw, 260px);
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 28px;
  animation: fadeIn 1.2s ease 0.1s forwards;
  opacity: 0;
  filter: opacity(0.82) sepia(0.18) brightness(0.92) drop-shadow(0 0 32px rgba(212,168,67,0.22));
}

.hero-ornament {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gold-light));
  margin: 0 auto 32px;
  animation: fadeInDown 1.2s ease forwards;
  opacity: 0;
}

.hero-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 20px;
  animation: fadeInUp 1s ease 0.3s forwards;
  opacity: 0;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--text-light);
  animation: fadeInUp 1s ease 0.5s forwards;
  opacity: 0;
}

.hero-title span {
  color: var(--gold-light);
}

.hero-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light), transparent);
  margin: 28px auto;
  animation: expandWidth 1s ease 0.9s forwards;
  transform: scaleX(0);
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 56px;
  animation: fadeInUp 1s ease 0.7s forwards;
  opacity: 0;
}

/* ── PRACTICE AREA TABS (hero) ────────────────────────────── */
.hero-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  animation: fadeInUp 1s ease 1.1s forwards;
  opacity: 0;
}

.hero-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--border-gold);
  background: rgba(212, 168, 67, 0.04);
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.hero-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,168,67,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
}

.hero-tab:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,168,67,0.12);
}

.hero-tab:hover::before { opacity: 1; }

.tab-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--gold-mid);
  line-height: 1;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeIn 1s ease 1.6s forwards;
  opacity: 0;
}

.hero-scroll span {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold-light), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* ── SECTION COMMON ───────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 120px 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-light);
  margin-bottom: 20px;
}

.section-title em {
  font-style: italic;
  color: var(--gold-light);
}

.section-divider {
  width: 48px;
  height: 1px;
  background: var(--gold-light);
  margin-bottom: 32px;
}

.section-text {
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--text-muted);
  max-width: 680px;
}

/* ── AREAS SECTION ────────────────────────────────────────── */
#areas {
  background: rgba(14,14,14,0.6);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}

.areas-header {
  text-align: center;
  margin-bottom: 72px;
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
}

.area-card {
  position: relative;
  background: var(--black-card);
  padding: 48px 40px 44px;
  border: 1px solid var(--border-gold);
  transition: all 0.4s;
  cursor: default;
  overflow: hidden;
}

.area-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.area-card:hover {
  background: var(--black-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,168,67,0.2);
}

.area-card:hover::after { transform: scaleX(1); }

.area-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(212,168,67,0.12);
  line-height: 1;
  margin-bottom: 24px;
  transition: color 0.4s;
}

.area-card:hover .area-number { color: rgba(212,168,67,0.25); }

.area-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 20px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.area-card:hover .area-icon { opacity: 1; }

.area-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-light);
  margin-bottom: 16px;
}

.area-desc {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.area-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-mid);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: gap 0.3s, color 0.3s;
  font-family: 'Montserrat', sans-serif;
  padding: 0;
}

.area-link:hover { gap: 14px; color: var(--gold-light); }

.area-link svg { flex-shrink: 0; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  backdrop-filter: blur(6px);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--black-card);
  border: 1px solid var(--border-gold);
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 56px 52px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.35s;
}

.modal-backdrop.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 36px; height: 36px;
  background: none;
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.modal-close:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.modal-label {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 12px;
}

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.2;
  margin-bottom: 24px;
}

.modal-divider {
  width: 40px;
  height: 1px;
  background: var(--gold-light);
  margin-bottom: 28px;
}

.modal-body {
  font-size: 0.84rem;
  line-height: 1.95;
  color: var(--text-muted);
}

.modal-body p { margin-bottom: 16px; }

.modal-body ul {
  padding-left: 0;
  list-style: none;
  margin-bottom: 16px;
}

.modal-body ul li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(212,168,67,0.08);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-body ul li::before {
  content: '—';
  color: var(--gold-mid);
  flex-shrink: 0;
}

/* ── ABOUT SECTION ────────────────────────────────────────── */
#nosotros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-visual {
  position: relative;
  height: 480px;
}

.about-frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-gold);
}

.about-frame-inner {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(212,168,67,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-logo {
  width: 72%;
  height: 72%;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 20px rgba(212,168,67,0.2));
}

.about-badge {
  position: absolute;
  bottom: -18px;
  right: -18px;
  width: 120px;
  height: 120px;
  border: 1px solid var(--border-gold);
  background: var(--black-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.badge-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
}

.badge-text {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ── CONTACT SECTION ──────────────────────────────────────── */
#contacto {
  background: rgba(14,14,14,0.6);
  border-top: 1px solid var(--border-gold);
  text-align: center;
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin-top: 52px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.contact-item-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.contact-item-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--text-light);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  padding: 16px 40px;
  background: transparent;
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s;
}

.cta-btn:hover {
  background: var(--gold-light);
  color: var(--black-deep);
}

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  padding: 36px 48px;
  border-top: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--gold-light);
}

.footer-copy {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes expandWidth {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .navbar { padding: 0 24px; }
  .navbar-links { display: none; }
  .navbar-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(8,8,8,0.98);
    padding: 32px 24px;
    border-bottom: 1px solid var(--border-gold);
    gap: 24px;
  }
  .navbar-toggle { display: flex; }
  .navbar-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .navbar-toggle.open span:nth-child(2) { opacity: 0; }
  .navbar-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .section { padding: 80px 24px; }

  #nosotros {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual { height: 320px; }

  .hero-tabs { flex-direction: column; align-items: stretch; width: 100%; max-width: 380px; }

  .modal { padding: 40px 28px; }

  footer { flex-direction: column; text-align: center; padding: 28px 24px; }
}

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

  .hero-title { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-tabs { max-width: 100%; }
  .hero-tab { padding: 12px 16px; font-size: 0.65rem; }

  .modal { padding: 28px 18px; }
  .modal-title { font-size: 1.55rem; }

  .area-card { padding: 36px 24px 32px; }

  .about-visual { height: 260px; }
  .about-badge { width: 96px; height: 96px; right: 0; bottom: -14px; }
  .badge-num { font-size: 2.2rem; }

  .contact-item-value { word-break: break-all; font-size: 0.92rem; }

  .cta-btn { padding: 14px 28px; width: 100%; justify-content: center; }
}
