/* =========================================================
   CASA SOÑADA — Real Estate Cozumel
   Estándar look & feel: "Caribbean Editorial"
   Paleta cálida crema + turquesa caribeño + coral
   CSS puro, sin dependencias.
   ========================================================= */

:root {
  --cream:      #FBF7F0;
  --cream-2:    #F3EBDD;
  --sand:       #E9DCC5;
  --ink:        #17282B;
  --ink-soft:   #3A4B4D;
  --teal:       #0E5C63;
  --turq:       #2CB1BC;
  --turq-light: #7FD8DE;
  --coral:      #FF6B5E;
  --gold:       #C9A24B;
  --white:      #ffffff;
  --shadow:     0 20px 50px -20px rgba(14, 92, 99, .35);
  --shadow-sm:  0 8px 24px -12px rgba(14, 92, 99, .30);
  --radius:     22px;
  --radius-sm:  14px;
  --maxw:       1240px;
  --ease:       cubic-bezier(.22,.61,.36,1);
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:  'Manrope', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 17px;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .serif { font-family: var(--font-serif); font-weight: 500; line-height: 1.05; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: .72rem; letter-spacing: .28em; text-transform: uppercase;
  font-weight: 700; color: var(--teal); display: inline-block;
}
.eyebrow.light { color: var(--turq-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-sans); font-weight: 700; font-size: .95rem;
  padding: .95em 1.6em; border-radius: 100px; border: none;
  cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn-wa { background: #25D366; color: #fff; box-shadow: 0 12px 30px -12px rgba(37,211,102,.7); }
.btn-wa:hover { box-shadow: 0 18px 40px -12px rgba(37,211,102,.85); }
.btn-primary { background: var(--teal); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #0a4a50; }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 12px 30px -12px rgba(255,107,94,.7); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid rgba(23,40,43,.22); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost.light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost.light:hover { background: rgba(255,255,255,.12); border-color:#fff; }
.btn.small { padding: .7em 1.15em; font-size: .84rem; }
.btn.full { width: 100%; justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s;
}
.nav.scrolled { background: rgba(251,247,240,.88); backdrop-filter: blur(14px); padding: 12px 32px; box-shadow: 0 6px 24px -18px rgba(0,0,0,.4); }
.nav__logo { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; color: var(--white); transition: color .4s; display:flex; align-items:center; gap:.5em; }
.nav.scrolled .nav__logo { color: var(--teal); }
.nav__logo .palm { font-size: 1.1em; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: .92rem; font-weight: 600; color: rgba(255,255,255,.92); transition: color .3s; }
.nav.scrolled .nav__links a { color: var(--ink-soft); }
.nav__links a:hover { color: var(--turq); }
.nav__cta { }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav__burger span { width: 26px; height: 2px; background: #fff; transition: .3s; }
.nav.scrolled .nav__burger span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: flex-end;
  overflow: hidden; color: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); animation: heroZoom 14s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,40,45,.55) 0%, rgba(10,40,45,.15) 35%, rgba(10,40,45,.85) 100%);
}
.hero__inner { padding-bottom: 8vh; padding-top: 14vh; width: 100%; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 6.4rem); font-weight: 400; max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--turq-light); }
.hero__sub { max-width: 46ch; margin-top: 22px; font-size: clamp(1rem,1.6vw,1.22rem); color: rgba(255,255,255,.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
/* Hero search card */
.hero-search {
  margin-top: 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr .9fr auto; gap: 10px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.28); border-radius: 20px; padding: 14px; align-items: end;
  max-width: 900px; box-shadow: 0 20px 50px -24px rgba(0,0,0,.5);
}
.hs-field { display: flex; flex-direction: column; gap: 5px; text-align: left; }
.hs-field label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: rgba(255,255,255,.92); padding-left: 4px; }
.hs-field input, .hs-field select {
  border: none; border-radius: 12px; padding: .78em .9em; font-family: var(--font-sans);
  font-size: .92rem; font-weight: 600; background: rgba(255,255,255,.95); color: var(--ink); width: 100%;
}
.hs-field input:focus, .hs-field select:focus { outline: 2px solid var(--turq); }
.hs-btn { height: 46px; align-self: end; }
@media (max-width: 760px){ .hero-search { grid-template-columns: 1fr 1fr; } .hs-btn { grid-column: 1 / -1; } }

/* Location filter (catalog) */
.loc-filter { border: 1.5px solid var(--sand); background: #fff; color: var(--ink); border-radius: 100px; padding: .7em 1.2em; font-family: var(--font-sans); font-weight: 700; font-size: .9rem; cursor: pointer; }
.loc-filter:focus { outline: none; border-color: var(--turq); }
.search-banner { background: var(--cream-2); border-radius: 14px; padding: 10px 16px; font-size: .9rem; color: var(--teal); font-weight: 700; margin-bottom: 20px; display: none; align-items: center; justify-content: space-between; gap: 12px; }
.search-banner.show { display: flex; }
.search-banner button { background: none; border: none; color: var(--coral); font-weight: 800; cursor: pointer; font-size: .85rem; }

.hero__scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; opacity: .8; display:flex; flex-direction:column; align-items:center; gap:8px; }
.hero__scroll .line { width: 1px; height: 42px; background: rgba(255,255,255,.6); animation: scrollLine 2s var(--ease) infinite; transform-origin: top; }
@keyframes scrollLine { 0%{transform:scaleY(0)} 40%{transform:scaleY(1)} 100%{transform:scaleY(0);transform-origin:bottom} }

/* ---------- Stats bar ---------- */
.stats { background: var(--teal); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; padding: 46px 0; }
.stat { text-align: center; }
.stat__num { font-family: var(--font-serif); font-size: clamp(2rem,4vw,3rem); color: var(--turq-light); }
.stat__label { font-size: .82rem; letter-spacing: .04em; color: rgba(255,255,255,.8); margin-top: 4px; }

/* ---------- Section header ---------- */
.section { padding: clamp(70px, 10vw, 130px) 0; }
.section__head { max-width: 720px; margin-bottom: 46px; }
.section__head h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-top: 14px; }
.section__head p { margin-top: 16px; color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Filter toggle ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 40px; }
.toggle { display: inline-flex; background: var(--cream-2); border-radius: 100px; padding: 5px; }
.toggle button {
  border: none; background: transparent; cursor: pointer; font-family: var(--font-sans);
  font-weight: 700; font-size: .92rem; padding: .7em 1.5em; border-radius: 100px;
  color: var(--ink-soft); transition: .3s var(--ease);
}
.toggle button.active { background: var(--white); color: var(--teal); box-shadow: var(--shadow-sm); }
.filter-note { font-size: .85rem; color: var(--ink-soft); }

/* ---------- Property grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.07); }
.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .45em 1em; border-radius: 100px; color: #fff;
}
.badge.venta { background: var(--coral); }
.badge.renta { background: var(--turq); }
.card__price {
  position: absolute; bottom: 14px; right: 14px; z-index: 2;
  background: rgba(23,40,43,.82); backdrop-filter: blur(6px); color: #fff;
  padding: .5em 1em; border-radius: 100px; font-weight: 800; font-size: .95rem;
}
.card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card__loc { font-size: .8rem; color: var(--turq); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.card__title { font-family: var(--font-serif); font-size: 1.4rem; margin: 6px 0 12px; }
.card__specs { display: flex; gap: 16px; font-size: .86rem; color: var(--ink-soft); margin-bottom: 18px; flex-wrap: wrap; }
.card__specs span { display: inline-flex; align-items: center; gap: .4em; }
.card__actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.card__actions .btn { flex: 1; }

/* ---------- Feature / experience split ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split ul { list-style: none; margin-top: 24px; display: grid; gap: 16px; }
.split li { display: flex; gap: 14px; align-items: flex-start; }
.split li .dot { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--cream-2); color: var(--teal); display: grid; place-items: center; font-weight: 800; }
.split li strong { display: block; }
.split li p { color: var(--ink-soft); font-size: .95rem; }

.bg-cream2 { background: var(--cream-2); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; background: var(--ink); color: var(--cream); }
.marquee__track { display: flex; gap: 40px; white-space: nowrap; width: max-content; animation: scrollX 26s linear infinite; }
.marquee span { font-family: var(--font-serif); font-size: clamp(1.4rem,3vw,2.4rem); font-style: italic; opacity: .85; }
.marquee span::after { content: '✦'; margin-left: 40px; color: var(--turq); font-style: normal; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- About / broker ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about__badge { display:inline-flex; align-items:center; gap:.5em; background: var(--cream); border-radius:100px; padding:.5em 1.1em; font-size:.82rem; font-weight:700; color: var(--teal); margin-bottom: 18px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--teal), var(--turq)); color: #fff; border-radius: var(--radius); padding: clamp(40px,6vw,72px); text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { font-size: clamp(1.8rem,4vw,3rem); }
.cta-band p { max-width: 52ch; margin: 16px auto 30px; color: rgba(255,255,255,.9); }
.cta-band .btns { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 70px 0 40px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer__logo { font-family: var(--font-serif); font-size: 1.6rem; color: #fff; }
footer h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
footer a { display: block; margin-bottom: 10px; font-size: .95rem; transition: color .3s; }
footer a:hover { color: var(--turq-light); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; background: #25D366;
  display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37,211,102,.7);
  transition: transform .3s var(--ease); animation: pulse 2.6s infinite;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(37,211,102,.5)} 70%{box-shadow:0 0 0 18px rgba(37,211,102,0)} 100%{box-shadow:0 0 0 0 rgba(37,211,102,0)} }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay:.08s } .reveal[data-d="2"]{ transition-delay:.16s } .reveal[data-d="3"]{ transition-delay:.24s }

/* ---------- Reservation Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(17,40,43,.55);
  backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--cream); border-radius: var(--radius); max-width: 520px; width: 100%;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow); animation: modalUp .4s var(--ease);
}
@keyframes modalUp { from { opacity:0; transform: translateY(30px) scale(.98);} to {opacity:1; transform:none;} }
.modal__head { position: relative; padding: 26px 28px 18px; border-bottom: 1px solid var(--sand); }
.modal__head h3 { font-size: 1.5rem; }
.modal__head .sub { font-size: .88rem; color: var(--ink-soft); margin-top: 4px; }
.modal__close { position: absolute; top: 20px; right: 22px; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.modal__body { padding: 24px 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field select {
  width: 100%; padding: .8em 1em; border-radius: var(--radius-sm); border: 1.5px solid var(--sand);
  font-family: var(--font-sans); font-size: .95rem; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--turq); }
.field.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.summary { background: #fff; border-radius: var(--radius-sm); padding: 18px; margin: 20px 0; font-size: .92rem; }
.summary .line { display: flex; justify-content: space-between; padding: 6px 0; }
.summary .total { border-top: 1px dashed var(--sand); margin-top: 8px; padding-top: 12px; font-weight: 800; font-size: 1.1rem; color: var(--teal); }
.step-tag { font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; font-weight:800; color: var(--turq); }
.pay-mp { background:#009EE3; color:#fff; box-shadow:0 12px 30px -12px rgba(0,158,227,.7); }
.demo-note { font-size:.78rem; color:var(--ink-soft); background:var(--cream-2); border-radius:10px; padding:10px 12px; margin-top:14px; display:flex; gap:8px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2,1fr); }
  .split, .about { grid-template-columns: 1fr; gap: 34px; }
  .split__media { aspect-ratio: 16/10; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: repeat(2,1fr); gap: 30px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .field.row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__media img { animation: none; transform: none; }
}

/* ============ CARD extras (tipo + link) ============ */
.card__type { position:absolute; top:14px; right:14px; z-index:2; background:rgba(255,255,255,.9); color:var(--teal); font-size:.68rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; padding:.4em .9em; border-radius:100px; }
.card__link { color: var(--teal); font-weight:700; font-size:.9rem; }

/* ============ DETAIL PAGE ============ */
.detail-wrap { padding-top: 90px; }
.breadcrumb { font-size:.85rem; color:var(--ink-soft); margin-bottom:18px; }
.breadcrumb a { color:var(--teal); font-weight:600; }
.detail-head { display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; align-items:flex-start; margin-bottom:24px; }
.detail-head h1 { font-size:clamp(1.8rem,4vw,2.9rem); max-width:20ch; }
.detail-head .loc { color:var(--turq); font-weight:700; text-transform:uppercase; letter-spacing:.05em; font-size:.85rem; margin-bottom:8px; display:block; }
.detail-price { text-align:right; }
.detail-price .num { font-family:var(--font-serif); font-size:clamp(1.6rem,3.4vw,2.6rem); color:var(--teal); white-space:nowrap; }
.detail-price .op { font-size:.8rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--coral); }
.detail-price .op.renta { color:var(--turq); }

/* Gallery */
.gallery { display:grid; grid-template-columns: 1fr; gap:12px; margin-bottom:34px; }
.gallery__main { position:relative; border-radius:var(--radius); overflow:hidden; aspect-ratio:16/10; background:var(--cream-2); box-shadow:var(--shadow-sm); }
.gallery__main img { width:100%; height:100%; object-fit:cover; cursor:zoom-in; transition:opacity .3s; }
.gallery__nav { position:absolute; top:50%; transform:translateY(-50%); width:44px; height:44px; border-radius:50%; border:none; background:rgba(255,255,255,.9); cursor:pointer; font-size:1.3rem; display:grid; place-items:center; box-shadow:var(--shadow-sm); transition:.25s; }
.gallery__nav:hover { background:#fff; transform:translateY(-50%) scale(1.08); }
.gallery__nav.prev { left:14px; } .gallery__nav.next { right:14px; }
.gallery__count { position:absolute; bottom:14px; right:14px; background:rgba(23,40,43,.8); color:#fff; padding:.4em .9em; border-radius:100px; font-size:.82rem; font-weight:700; }
.gallery__thumbs { display:flex; gap:10px; overflow-x:auto; padding-bottom:6px; scrollbar-width:thin; }
.gallery__thumbs img { width:96px; height:72px; object-fit:cover; border-radius:10px; cursor:pointer; flex:none; opacity:.6; transition:.25s; border:2px solid transparent; }
.gallery__thumbs img.active, .gallery__thumbs img:hover { opacity:1; border-color:var(--turq); }

.detail-grid { display:grid; grid-template-columns: 1.7fr 1fr; gap:40px; align-items:start; }
.specs-row { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:26px; }
.spec-pill { background:var(--cream-2); border-radius:12px; padding:12px 18px; text-align:center; min-width:92px; }
.spec-pill .v { font-family:var(--font-serif); font-size:1.35rem; color:var(--teal); }
.spec-pill .l { font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-soft); }
.detail-desc h3 { font-size:1.3rem; margin:6px 0 12px; }
.detail-desc p { color:var(--ink-soft); white-space:pre-line; }
.detail-side { position:sticky; top:100px; background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:26px; }
.detail-side h4 { font-size:1.15rem; margin-bottom:6px; }
.detail-side .muted { color:var(--ink-soft); font-size:.9rem; margin-bottom:18px; }
.detail-side .btn { margin-bottom:10px; }

.lightbox { position:fixed; inset:0; z-index:300; background:rgba(10,20,22,.94); display:none; align-items:center; justify-content:center; }
.lightbox.open { display:flex; }
.lightbox img { max-width:92vw; max-height:86vh; border-radius:10px; }
.lightbox__close { position:absolute; top:20px; right:26px; background:none; border:none; color:#fff; font-size:2.2rem; cursor:pointer; }
.lightbox__nav { position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.15); border:none; color:#fff; width:52px; height:52px; border-radius:50%; font-size:1.6rem; cursor:pointer; }
.lightbox__nav.prev{left:20px} .lightbox__nav.next{right:20px}

.related { margin-top:60px; }
@media (max-width: 900px){ .detail-grid { grid-template-columns:1fr; } .detail-side{ position:static; } }
