/* ════════════════════════════════════════
   APARTAMENTO LA PAZ — ESTILOS PREMIUM
   Paleta: marfil, beige, piedra, grafito, oro
   ════════════════════════════════════════ */

:root {
  --ivory:      #f5f0e8;
  --cream:      #ede8dc;
  --sand:       #d4c9b0;
  --stone:      #b5a98e;
  --taupe:      #8c7d6b;
  --graphite:   #3d3530;
  --dark:       #1e1a16;
  --gold:       #b8975a;
  --gold-light: #d4b07a;
  --olive:      #6b7355;
  --petrol:     #3d5a5f;
  --white:      #ffffff;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;

  --max-w: 1280px;
  --section-py: clamp(5rem, 10vw, 9rem);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--graphite);
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

/* ── UTILITIES ── */
.section-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

/* ── REVEAL ANIMATIONS ── */
.reveal-up, .reveal-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
  will-change: opacity, transform;
}
.reveal-fade { transform: translateY(18px); }
.delay-1 { transition-delay: 0.15s !important; }
.delay-2 { transition-delay: 0.30s !important; }
.delay-3 { transition-delay: 0.45s !important; }
.in-view { opacity: 1 !important; transform: translateY(0) !important; }

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}
.site-header.scrolled {
  background: rgba(245,240,232,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo-link { display: flex; align-items: center; }
.logo-img { height: 44px; width: auto; object-fit: contain; transition: filter var(--transition); }
.site-header:not(.scrolled) .logo-img { filter: brightness(0) invert(1); }

.main-nav { display: flex; align-items: center; gap: 2.5rem; }
.main-nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  transition: color var(--transition);
}
.site-header.scrolled .main-nav a { color: var(--taupe); }
.main-nav a:hover { color: var(--gold) !important; }

.nav-cta {
  padding: 0.55rem 1.4rem;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em;
  transition: all var(--transition) !important;
}
.site-header.scrolled .nav-cta {
  border-color: var(--gold);
  color: var(--gold) !important;
}
.nav-cta:hover { background: var(--gold) !important; color: var(--white) !important; border-color: var(--gold) !important; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: var(--transition); }
.site-header.scrolled .menu-toggle span { background: var(--graphite); }

.mobile-nav {
  display: none; flex-direction: column;
  background: rgba(245,240,232,0.97);
  backdrop-filter: blur(16px);
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--cream);
}
.mobile-nav.open { display: flex; }
.mobile-link {
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--taupe); padding: 0.9rem 0; border-bottom: 1px solid var(--cream);
}
.mobile-link--cta { color: var(--gold); border-bottom: none; margin-top: 0.5rem; }

/* ════════════════════════════════════════
   HERO
   ════════════════════════════════════════ */
.hero {
  position: relative; height: 100svh; min-height: 600px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 12s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(20,16,12,0.55) 0%, rgba(20,16,12,0.3) 50%, rgba(20,16,12,0.65) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; color: var(--white);
  padding: 0 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  max-width: 780px;
}
.hero-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-light); font-family: var(--sans); font-weight: 300;
}
.hero-title {
  font-family: var(--serif); font-size: clamp(3.8rem, 9vw, 7.5rem);
  font-weight: 300; line-height: 1.02; color: var(--white);
}
.hero-title em { font-style: italic; color: var(--gold-light); }
.hero-subtitle {
  font-family: var(--sans); font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: 300; color: rgba(255,255,255,0.82); line-height: 1.75; max-width: 520px;
}
.btn-hero {
  display: inline-block; margin-top: 0.5rem;
  padding: 0.9rem 2.4rem;
  border: 1px solid rgba(255,255,255,0.55);
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--white); font-family: var(--sans);
  transition: all var(--transition);
}
.btn-hero:hover { background: var(--gold); border-color: var(--gold); }

.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; z-index: 2;
}
.scroll-line {
  display: block; width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.7));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:0.3;transform:scaleY(0.8)} 50%{opacity:1;transform:scaleY(1)} }

/* ════════════════════════════════════════
   EDITORIAL
   ════════════════════════════════════════ */
.editorial { padding: var(--section-py) clamp(1.5rem, 6vw, 4rem); background: var(--ivory); }
.editorial-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: center;
}
.editorial-title {
  font-family: var(--serif); font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 300; line-height: 1.12; color: var(--dark); margin-bottom: 1.8rem;
}
.editorial-body { font-size: 0.95rem; color: var(--taupe); margin-bottom: 1.2rem; font-weight: 300; max-width: 46ch; }
.editorial-image { position: relative; aspect-ratio: 4/5; overflow: hidden; }
.editorial-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--transition); }
.editorial-image:hover img { transform: scale(1.03); }
.editorial-image-caption {
  position: absolute; bottom: 1.2rem; left: 1.2rem;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.75); background: rgba(0,0,0,0.25);
  padding: 0.3rem 0.7rem; backdrop-filter: blur(4px);
}

/* ════════════════════════════════════════
   SPECS
   ════════════════════════════════════════ */
.specs { padding: var(--section-py) clamp(1.5rem, 6vw, 4rem); background: var(--dark); color: var(--cream); }
.specs-inner { max-width: var(--max-w); margin: 0 auto; }
.specs-header { margin-bottom: 4rem; }
.specs-header .section-label { color: var(--gold); }
.specs-title {
  font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 300; color: var(--ivory); line-height: 1.12;
}
.specs-grid {
  display: flex; gap: clamp(3rem, 6vw, 6rem);
  padding-bottom: 4rem; border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 3.5rem;
}
.spec-item { display: flex; flex-direction: column; }
.spec-number { font-family: var(--serif); font-size: clamp(5rem, 10vw, 8rem); font-weight: 300; color: var(--ivory); line-height: 1; }
.spec-unit { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-top: 0.2rem; }
.spec-label { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-top: 0.5rem; letter-spacing: 0.06em; }

.amenity-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.amenity { display: flex; gap: 1rem; align-items: flex-start; }
.amenity-icon { color: var(--gold); font-size: 0.6rem; margin-top: 0.35rem; flex-shrink: 0; }
.amenity-text strong { display: block; font-size: 0.88rem; font-weight: 500; color: var(--ivory); margin-bottom: 0.2rem; }
.amenity-text span { font-size: 0.78rem; color: rgba(255,255,255,0.4); font-weight: 300; }

/* ════════════════════════════════════════
   GALERÍA
   ════════════════════════════════════════ */
.gallery-section { padding: var(--section-py) clamp(1.5rem, 4vw, 3rem); background: var(--cream); }
.gallery-header { max-width: var(--max-w); margin: 0 auto 3.5rem; }
.gallery-title {
  font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 300; color: var(--dark); line-height: 1.12;
}
.gallery-masonry {
  max-width: var(--max-w); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 12px;
}
.gallery-item {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--sand);
}
.gallery-item--large { grid-row: span 2; }
.gallery-item img { transition: transform 0.7s var(--transition); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2rem 1.2rem 1rem;
  background: linear-gradient(to top, rgba(20,16,12,0.65), transparent);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transform: translateY(4px); opacity: 0;
  transition: all 0.35s var(--transition);
}
.gallery-item:hover .gallery-item-label { opacity: 1; transform: translateY(0); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(20,16,12,0.96); backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-content { max-width: 90vw; max-height: 90vh; position: relative; }
.lightbox-content img { max-width: 90vw; max-height: 80vh; object-fit: contain; }
.lightbox-caption { text-align: center; color: rgba(255,255,255,0.5); font-size: 0.75rem; letter-spacing: 0.1em; margin-top: 1rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed; background: none; border: none;
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 2rem;
  transition: color var(--transition); line-height: 1;
}
.lightbox-close { top: 1.5rem; right: 2rem; font-size: 2.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: var(--gold); }

/* ════════════════════════════════════════
   UBICACIÓN
   ════════════════════════════════════════ */
.location-section { padding: var(--section-py) clamp(1.5rem, 6vw, 4rem); background: var(--ivory); }
.location-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 5rem); align-items: start;
}
.location-title {
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300; color: var(--dark); line-height: 1.15; margin-bottom: 1.8rem;
}
.location-title em { font-style: italic; color: var(--gold); }
.location-body { font-size: 0.93rem; color: var(--taupe); margin-bottom: 1.1rem; font-weight: 300; }
.location-distances { margin: 2.2rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.distance-item { display: flex; flex-direction: column; border-left: 2px solid var(--gold); padding-left: 0.9rem; }
.distance-val { font-family: var(--serif); font-size: 1.5rem; font-weight: 300; color: var(--dark); line-height: 1.2; }
.distance-name { font-size: 0.72rem; color: var(--stone); letter-spacing: 0.06em; margin-top: 0.2rem; }
.location-address { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-top: 0.5rem; }
.location-map-wrap { position: sticky; top: 96px; }
.location-map-frame { aspect-ratio: 4/5; overflow: hidden; background: var(--cream); }
.location-map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(20%) contrast(1.05); }

/* ════════════════════════════════════════
   TRAYECTORIA
   ════════════════════════════════════════ */
.reputation-section { padding: var(--section-py) clamp(1.5rem, 6vw, 4rem); background: var(--cream); }
.reputation-inner { max-width: var(--max-w); margin: 0 auto; }
.reputation-header { margin-bottom: 4rem; }
.reputation-title {
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300; color: var(--dark); line-height: 1.12;
}
.reputation-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-bottom: 4rem; }
.rep-quote {
  border-left: 1px solid var(--gold); padding: 0 0 0 1.5rem;
  list-style: none;
}
.rep-quote p { font-family: var(--serif); font-size: 1.05rem; font-weight: 300; color: var(--taupe); line-height: 1.7; font-style: italic; }
.reputation-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-top: 3rem; border-top: 1px solid var(--sand); }
.rep-stat { display: flex; flex-direction: column; gap: 0.4rem; }
.rep-stat-val { font-family: var(--serif); font-size: 1.6rem; font-weight: 300; color: var(--dark); }
.rep-stat-desc { font-size: 0.78rem; color: var(--stone); }

/* ════════════════════════════════════════
   OPORTUNIDAD
   ════════════════════════════════════════ */
.opportunity-section { padding: var(--section-py) clamp(1.5rem, 6vw, 4rem); background: var(--ivory); }
.opportunity-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: center;
}
.opportunity-image { aspect-ratio: 3/4; overflow: hidden; }
.opportunity-image img { transition: transform 0.8s var(--transition); }
.opportunity-image:hover img { transform: scale(1.04); }
.opportunity-title {
  font-family: var(--serif); font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 300; color: var(--dark); line-height: 1.1; margin-bottom: 1.8rem;
}
.opportunity-body { font-size: 0.93rem; color: var(--taupe); margin-bottom: 1.1rem; font-weight: 300; }

/* ════════════════════════════════════════
   CIERRE
   ════════════════════════════════════════ */
.closing-section {
  position: relative; min-height: 85vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.closing-bg { position: absolute; inset: 0; }
.closing-bg-img { width: 100%; height: 100%; object-fit: cover; }
.closing-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(20,16,12,0.72) 0%, rgba(20,16,12,0.55) 100%);
}
.closing-content {
  position: relative; z-index: 2;
  text-align: center; color: var(--white);
  padding: 0 1.5rem; max-width: 680px;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
}
.closing-eyebrow { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-light); }
.closing-title {
  font-family: var(--serif); font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300; line-height: 1.1; color: var(--white);
}
.closing-subtitle { font-size: 0.92rem; color: rgba(255,255,255,0.72); font-weight: 300; line-height: 1.8; }
.closing-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; align-items: center; }

.btn-primary {
  padding: 0.95rem 2.2rem;
  background: var(--gold); color: var(--white);
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-whatsapp svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-secondary {
  padding: 0.95rem 2rem;
  border: 1px solid rgba(255,255,255,0.45); color: var(--white);
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: all var(--transition);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); transform: translateY(-2px); }

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
.site-footer { padding: 2.5rem clamp(1.5rem, 6vw, 4rem); background: var(--dark); }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.footer-logo-img { height: 36px; width: auto; object-fit: contain; filter: brightness(0) invert(0.6); }
.footer-info p { font-size: 0.78rem; color: rgba(255,255,255,0.3); }
.footer-copy { margin-top: 0.3rem; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .editorial-inner, .location-inner, .opportunity-inner { grid-template-columns: 1fr; }
  .editorial-image { aspect-ratio: 16/9; order: -1; }
  .opportunity-image { aspect-ratio: 16/9; }
  .location-map-wrap { position: static; }
  .location-map-frame { aspect-ratio: 16/9; }
  .reputation-quotes { grid-template-columns: 1fr; }
  .reputation-stats { grid-template-columns: 1fr 1fr; }
  .gallery-masonry { grid-template-columns: repeat(2, 1fr); }
  .gallery-masonry .gallery-item--large { grid-row: span 1; }
  .specs-grid { gap: 2.5rem; }
}

@media (max-width: 560px) {
  .hero-title { font-size: clamp(3rem, 13vw, 4rem); }
  .gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .specs-grid { flex-wrap: wrap; gap: 2rem; }
  .location-distances { grid-template-columns: 1fr; }
  .reputation-stats { grid-template-columns: 1fr; }
  .closing-actions { flex-direction: column; width: 100%; }
  .btn-primary, .btn-secondary { text-align: center; justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
