/* ============================================================
   Magnificent Investments · Property page system  (/p)
   Layout base "Solamar" · identidad Magnificent
   TEMA CLARO / CREMA (híbrido) · Cinzel + Inter
   ============================================================ */

:root {
  --cream:   #f6f1ea;
  --cream-2: #ece3d5;
  --ink:     #221d17;
  --ink-soft:#4a4239;
  --muted:   #847a6e;
  --gold:    #9c7a3e;
  --gold-soft:#b89255;
  --terracotta:#9e7657;
  --olive:   #3a4526;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-display { font-family: 'Cinzel', serif; }
h1, h2, h3 { font-family: 'Cinzel', serif; letter-spacing: 0.01em; }

/* Smooth reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-slow { transition-duration: 1.6s; }

/* Ken Burns hero */
@keyframes kenBurns { 0% { transform: scale(1.0); } 100% { transform: scale(1.12); } }
.ken-burns { animation: kenBurns 22s ease-out infinite alternate; }

/* Scroll indicator */
@keyframes scrollHint {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50%      { transform: translateY(8px); opacity: 1; }
}
.scroll-hint { animation: scrollHint 2.4s ease-in-out infinite; }

/* Refined hairlines (gold on cream) */
.hairline { background: linear-gradient(to right, transparent, rgba(156,122,62,0.35), transparent); height: 1px; }

/* Image / video card hover */
.img-card { overflow: hidden; }
.img-card img, .img-card video { transition: transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1); }
.img-card:hover img, .img-card:hover video { transform: scale(1.05); }

/* Stat counter */
.stat-num { font-variant-numeric: tabular-nums; }

/* Underline link */
.ink-link { position: relative; display: inline-block; }
.ink-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform-origin: right; transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ink-link:hover::after { transform-origin: left; transform: scaleX(1); }

/* Hero overlay gradient — dark lightbox scrim for legible text (matches landings) */
.hero-grad {
  background:
    linear-gradient(to bottom, rgba(8,7,5,0.55) 0%, rgba(8,7,5,0.28) 32%, rgba(8,7,5,0.45) 62%, rgba(14,12,10,0.92) 100%),
    radial-gradient(120% 90% at 30% 55%, rgba(8,7,5,0.5), transparent 60%);
}

/* ---- NAV: light text over hero, ink text once scrolled over cream ---- */
nav .nav-text { color: var(--cream); transition: color 0.4s; }
nav.scrolled {
  background: rgba(246, 241, 234, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(156, 122, 62, 0.18);
}
nav.scrolled .nav-text { color: var(--ink); }
nav .nav-logo { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)); transition: filter 0.4s; }
nav.scrolled .nav-logo { filter: none; }

/* Active category in the universal nav */
.nav-cat.active { color: var(--gold-soft); }
nav.scrolled .nav-cat.active { color: var(--gold); }
.drawer a.active { color: var(--gold); }

/* Language toggle */
.lang-toggle { display: inline-flex; align-items: center; gap: 3px; }
.lang-toggle [data-lang] { opacity: 0.5; transition: opacity 0.3s; }
.lang-toggle [data-lang].active { opacity: 1; color: var(--gold); }
.lang-sep { opacity: 0.35; }
.drawer .drawer-lang { color: var(--ink); }

/* ---- Mobile hamburger (2 lines -> X) ---- */
.burger {
  display: flex; flex-direction: column; justify-content: space-between;
  width: 30px; height: 20px; padding: 0;
  background: none; border: 0; cursor: pointer; z-index: 110;
}
.burger span {
  display: block; width: 100%; height: 1.5px; border-radius: 2px;
  background: var(--cream);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.4s, opacity 0.3s;
}
nav.scrolled .burger span { background: var(--ink); }
.burger.open span { background: var(--ink); }
.burger.open span:first-child { transform: translateY(9.25px) rotate(45deg); }
.burger.open span:last-child  { transform: translateY(-9.25px) rotate(-45deg); }
@media (min-width: 768px) { .burger { display: none; } }

/* ---- Mobile fullscreen drawer (light) ---- */
.drawer {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(246, 241, 234, 0.98);
  backdrop-filter: blur(20px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
  display: flex; align-items: center; justify-content: center;
}
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer nav { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
.drawer a { font-family: 'Cinzel', serif; font-size: 1.7rem; line-height: 1.1; color: var(--ink); transition: color 0.3s; }
.drawer a:hover { color: var(--gold); }
.drawer .drawer-home { font-family: 'Inter', sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold); margin-top: 0.5rem; }
.drawer-close { position: absolute; top: 1.3rem; right: 1.3rem; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: var(--ink); z-index: 3; transition: color 0.3s; }
.drawer-close svg { width: 26px; height: 26px; fill: none; }
.drawer-close:hover { color: var(--gold); }
@media (min-width: 768px) { .drawer { display: none; } .drawer-close { display: none; } }

/* ---- Amenities ("detalles exclusivos") · brand PSD icons ---- */
.amenity { display: flex; align-items: flex-start; gap: 1rem; }
.amenity img { width: 44px; height: 44px; object-fit: contain; flex: none; }

/* ---- Amenities list: compact on mobile with "show more" ---- */
.amen-more { display: none; margin: 1.5rem auto 0; }
.amen-more .less-label { display: none; }
@media (max-width: 767px) {
  .amen-wrap:not(.is-expanded) .amen-grid .amen-extra { display: none; }
  .amen-more { display: inline-flex; }
  .amen-wrap.is-expanded .amen-more .more-label { display: none; }
  .amen-wrap.is-expanded .amen-more .less-label { display: inline; }
}

/* ---- Características (specs) · inline line icons ---- */
.spec { display: flex; align-items: flex-start; gap: 1rem; }
.spec-ico { width: 30px; height: 30px; flex: none; color: var(--gold); stroke: currentColor; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }

/* ============================================================
   Investment band (olive) + modern timeline + ROI
   ============================================================ */
.invest { background: var(--olive); color: var(--cream); }
.invest .text-muted-band { color: rgba(246, 241, 234, 0.6); }

/* ---- Timeline (bondroofing-style: alternating top/bottom, glowing dots) ---- */
.timeline-card { position: relative; background: rgba(246,241,234,0.04); border: 1px solid rgba(184,146,85,0.22); border-radius: 18px; padding: 36px 32px 44px; overflow: hidden; }
.timeline-card::before { content: ''; position: absolute; top: -120px; right: -120px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(184,146,85,0.16), transparent 70%); pointer-events: none; }

/* Horizontal (desktop) */
.timeline-h { position: relative; }
.th-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; min-height: 248px; }
.th-line { position: absolute; top: 50%; left: 12.5%; right: 12.5%; height: 2px; background: rgba(246,241,234,0.14); border-radius: 3px; overflow: hidden; transform: translateY(-50%); }
.th-line-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 3px; transition: width 2.2s cubic-bezier(0.22,0.61,0.36,1) 0.3s; }
.timeline.in .th-line-fill { width: 100%; }

.th-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; z-index: 2; opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.timeline.in .th-step { opacity: 1; transform: none; }
.timeline.in .th-step:nth-child(2) { transition-delay: 0.25s; }
.timeline.in .th-step:nth-child(3) { transition-delay: 0.5s; }
.timeline.in .th-step:nth-child(4) { transition-delay: 0.75s; }
.timeline.in .th-step:nth-child(5) { transition-delay: 1s; }
.th-step.th-top .th-label { position: absolute; bottom: calc(50% + 24px); left: 50%; transform: translateX(-50%); }
.th-step.th-bottom .th-label { position: absolute; top: calc(50% + 24px); left: 50%; transform: translateX(-50%); }
.th-step .th-dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.th-step:hover .th-dot { transform: translate(-50%, -50%) scale(1.3); }
.th-label { text-align: center; max-width: 200px; }
.th-label strong { display: block; font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 500; color: var(--cream); margin-bottom: 5px; }
.th-label span { display: block; font-size: 0.85rem; line-height: 1.55; font-weight: 300; color: rgba(246,241,234,0.72); }
.th-dot { width: 14px; height: 14px; background: var(--gold-soft); border-radius: 50%; box-shadow: 0 0 0 5px var(--olive), 0 0 18px rgba(184,146,85,0.55); transition: transform 0.3s cubic-bezier(0.22,0.61,0.36,1); }

/* Vertical (mobile) */
.timeline-v { display: none; position: relative; padding-left: 4px; }
.tv-line { position: absolute; top: 8px; bottom: 8px; left: 14px; width: 2px; background: rgba(246,241,234,0.14); overflow: hidden; }
.tv-line-fill { display: block; width: 100%; height: 100%; background: linear-gradient(180deg, var(--gold), var(--gold-soft)); transform: scaleY(0); transform-origin: top; transition: transform 1.8s cubic-bezier(0.22,0.61,0.36,1); }
.timeline.in .tv-line-fill { transform: scaleY(1); }
.tv-step { position: relative; display: flex; gap: 18px; padding: 14px 0; align-items: flex-start; }
.tv-dot { flex: none; width: 14px; height: 14px; margin-top: 6px; background: var(--gold-soft); border-radius: 50%; box-shadow: 0 0 0 4px var(--olive), 0 0 14px rgba(184,146,85,0.5); position: relative; z-index: 2; }
.tv-label strong { display: block; font-family: 'Cinzel', serif; font-size: 1.3rem; color: var(--cream); margin-bottom: 3px; }
.tv-label span { display: block; font-size: 0.92rem; line-height: 1.6; font-weight: 300; color: rgba(246,241,234,0.72); }

@media (max-width: 767px) {
  .timeline-h { display: none; }
  .timeline-v { display: block; }
  .timeline-card { padding: 26px 18px 30px; }
}

/* ---- ROI stat cards (on olive band) ---- */
.roi-card { border: 1px solid rgba(246, 241, 234, 0.18); border-radius: 0.5rem; padding: 1.25rem 1.5rem; }

/* ---- Facebook reel embed ---- */
.fb-embed { position: relative; width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 1rem; overflow: hidden; background: var(--cream-2); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.fb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Reel thumbnail (Facebook) ---- */
.reel-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(34,29,23,0.25); transition: background 0.4s;
}
.reel-card:hover .reel-play { background: rgba(34,29,23,0.1); }
.reel-play span {
  width: 78px; height: 78px; border-radius: 9999px;
  background: rgba(246,241,234,0.92); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25); transition: transform 0.4s;
}
.reel-card:hover .reel-play span { transform: scale(1.08); }

/* ---- Amenities modal · bottom sheet (mobile) / centered card (desktop) ---- */
.modal { position: fixed; inset: 0; z-index: 120; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(34,29,23,0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  max-height: 88vh; max-height: 88dvh;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 0 1.25rem 2rem;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.4);
}
.modal-head {
  position: sticky; top: 0; z-index: 2;
  background: var(--cream);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.75rem 0 1rem;
}
.modal-close { flex: none; width: 40px; height: 40px; border-radius: 9999px; border: 1px solid rgba(34,29,23,0.15); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); transition: background 0.3s; }
.modal-close:hover { background: rgba(34,29,23,0.06); }
@media (min-width: 640px) {
  .modal.open { display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
  .modal-panel { position: relative; left: auto; right: auto; bottom: auto; width: 100%; max-width: 840px; border-radius: 16px; max-height: 85vh; padding: 0 2rem 2.25rem; border: 1px solid rgba(156,122,62,0.25); box-shadow: 0 25px 60px rgba(0,0,0,0.35); }
  .modal-head { padding-top: 2rem; }
}
.amenities-full { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0 2.5rem; }
@media (min-width: 640px) { .amenities-full { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .amenities-full { grid-template-columns: repeat(3, 1fr); } }
.amenities-full li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.5rem 0; font-weight: 300; color: var(--ink-soft); border-bottom: 1px solid rgba(156,122,62,0.12); }
.amenities-full li::before { content: '·'; color: var(--gold); }
