/* ============================================================
   HARAS PROSPERIDADE — Sistema visual
   3 direções: Esmeralda (padrão), Areia, Noturno
   ============================================================ */

:root {
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;

  /* Esmeralda — padrão (DNA do logo) */
  --bg: #14201a;
  --bg-2: #1a2a22;
  --bg-3: #213429;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --ink: #f2ede1;
  --ink-soft: #b7c2b7;
  --ink-dim: #7e8d7f;
  --gold: #c8a44e;
  --gold-bright: #e7cd83;
  --line: rgba(200, 164, 90, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --hero-overlay: linear-gradient(180deg, rgba(15,24,18,.32) 0%, rgba(15,24,18,.48) 38%, rgba(15,24,18,.8) 70%, rgba(15,24,18,.97) 100%);
  color-scheme: dark;
}

[data-theme="areia"] {
  --bg: #f3eddf;
  --bg-2: #ece4d2;
  --bg-3: #e3d9c2;
  --surface: rgba(29, 42, 32, 0.035);
  --surface-2: rgba(29, 42, 32, 0.06);
  --ink: #1d2a20;
  --ink-soft: #55604f;
  --ink-dim: #8a9382;
  --gold: #a8812c;
  --gold-bright: #c39f48;
  --line: rgba(29, 42, 32, 0.16);
  --line-soft: rgba(29, 42, 32, 0.09);
  --shadow: 0 30px 70px -34px rgba(60, 50, 25, 0.4);
  --hero-overlay: linear-gradient(180deg, rgba(243,237,223,.1) 0%, rgba(243,237,223,.4) 55%, rgba(243,237,223,.97) 100%);
  color-scheme: light;
}

[data-theme="noturno"] {
  --bg: #0b110d;
  --bg-2: #111a14;
  --bg-3: #18241c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --ink: #f5f0e3;
  --ink-soft: #a3b0a3;
  --ink-dim: #6f7d70;
  --gold: #d8b86a;
  --gold-bright: #f2d88f;
  --line: rgba(216, 184, 106, 0.22);
  --line-soft: rgba(255, 255, 255, 0.07);
  --shadow: 0 36px 90px -28px rgba(0, 0, 0, 0.85);
  --hero-overlay: linear-gradient(180deg, rgba(11,17,13,.25) 0%, rgba(11,17,13,.6) 55%, rgba(11,17,13,.98) 100%);
  color-scheme: dark;
}

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

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 300;
  letter-spacing: 0.01em;
  transition: background .6s ease, color .6s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* ---------- Tipografia ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  opacity: .7;
}

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

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 13vw, 72px);
  line-height: 0.96;
}

.section-title {
  font-size: clamp(31px, 8.5vw, 46px);
  font-weight: 500;
  line-height: 1.02;
}
.section-title em { font-style: italic; color: var(--gold); }

.lead { font-size: clamp(16px, 4.4vw, 19px); color: var(--ink-soft); font-weight: 300; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 22px; }
section { position: relative; }
.pad { padding: 84px 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 400; font-size: 15px; letter-spacing: 0.04em;
  padding: 16px 26px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .25s ease, box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #20180a; font-weight: 500;
  box-shadow: 0 12px 30px -10px rgba(200,164,90,.5);
}
.btn-gold:active { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:active { background: var(--surface); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-soft);
}
.topbar .brand-mini { display: flex; align-items: center; gap: 9px; opacity: 0; transition: opacity .4s; pointer-events: none; }
.topbar.scrolled .brand-mini { opacity: 1; pointer-events: auto; }
.brand-mini .mk { width: 26px; height: 26px; }
.brand-mini .nm { font-family: var(--serif); font-size: 17px; letter-spacing: .12em; color: var(--ink); text-transform: uppercase; }
.topbar .wa-mini {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; white-space: nowrap;
  color: #20180a; background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 9px 15px; border-radius: 100px; text-decoration: none;
}

/* ---------- Hero ---------- */
.hero { min-height: 100svh; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; padding: 92px 0 108px;
  background:
    radial-gradient(120% 80% at 50% 6%, color-mix(in srgb, var(--gold) 13%, transparent), transparent 56%),
    linear-gradient(180deg, var(--bg-3), var(--bg) 62%, var(--bg)); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .ph { width: 100%; height: 100%; }
.hero-photo { width: 100%; height: 100%; background-size: cover; background-position: center 42%; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(80vw, 300px); height: auto; filter: drop-shadow(0 14px 44px rgba(0,0,0,.45)); }
.hero-emblem { width: 128px; height: 128px; margin-bottom: 20px; filter: drop-shadow(0 8px 24px rgba(0,0,0,.5)); }
.hero h1 { color: var(--ink); margin: 6px 0 4px; }
.hero .sub { display: block; font-family: var(--serif); font-style: italic; font-size: clamp(20px,6vw,28px); color: var(--gold); font-weight: 400; line-height: 1.18; margin-top: 18px; }
.hero .tagline { letter-spacing: .42em; text-transform: uppercase; font-size: 11px; color: var(--ink-soft); margin-top: 16px; }
.hero-cta { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; width: min(86vw, 360px); }
.scroll-cue { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3; color: var(--ink-soft); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: floaty 2.4s ease-in-out infinite; }
.scroll-chevron { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 8%, transparent); transition: background .25s, transform .25s; }
.scroll-cue:active .scroll-chevron { transform: scale(.92); background: color-mix(in srgb, var(--gold) 18%, transparent); }
@keyframes floaty { 0%,100%{ transform: translate(-50%,0); } 50%{ transform: translate(-50%,7px); } }

/* ---------- Placeholder de imagem ---------- */
.ph {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 20%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%),
    linear-gradient(135deg, var(--bg-3), var(--bg-2));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-dim);
}
.ph::after {
  content: attr(data-label);
  font-family: var(--sans); font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  border: 1px dashed var(--line); padding: 8px 14px; border-radius: 100px;
  color: var(--ink-soft); background: color-mix(in srgb, var(--bg) 40%, transparent);
}
.ph svg { position: absolute; opacity: .14; width: 46%; max-width: 180px; color: var(--gold); }

/* ---------- Stats / strip ---------- */
.factrip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 18px; overflow: hidden; }
.factrip .cell { background: var(--bg); padding: 22px 18px; text-align: center; }
.factrip .n { font-family: var(--serif); font-size: 34px; color: var(--gold); line-height: 1; }
.factrip .l { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-top: 8px; }

/* ---------- Mapa / voo ---------- */
.map-stage { position: relative; height: 78svh; min-height: 480px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #0a0f0c; }
#map { position: absolute; inset: 0; }
.map-stage .leaflet-control-attribution { font-size: 9px; background: rgba(0,0,0,.4); color: #cfd8cf; }
.map-stage .leaflet-control-attribution a { color: #e6cd83; }
.flight-hud {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 500;
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px;
}
.flight-hud .stepname { font-family: var(--serif); font-size: 19px; color: var(--ink); line-height: 1.1; }
.flight-hud .stepsub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.flight-btn {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #20180a;
  display: grid; place-items: center; cursor: pointer; transition: transform .2s;
}
.flight-btn:active { transform: scale(.92); }
.flight-progress { position: absolute; left: 0; top: 0; height: 3px; width: 0%; z-index: 600; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width .9s ease; }
.map-badge {
  position: absolute; top: 14px; left: 14px; z-index: 500;
  display: inline-flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--bg) 76%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 100px; padding: 9px 15px;
  font-size: 12px; letter-spacing: .04em; color: var(--ink);
}
.map-badge b { color: var(--gold); font-weight: 600; }

/* Leaflet marker labels */
.poi-label { background: none; border: none; }
.poi-pin {
  display: inline-flex; align-items: center; gap: 7px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border: 1px solid var(--gold); color: var(--ink);
  padding: 6px 12px 6px 8px; border-radius: 100px; font-family: var(--sans);
  font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.poi-pin .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 30%, transparent); }
.poi-pin.home .dot { background: #fff; }

/* ---------- Cards / lazer ---------- */
.amen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amen {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px;
  padding: 0; overflow: hidden; transition: transform .3s, border-color .3s, background .3s;
}
.amen:active { transform: translateY(-2px); }
.amen .amphoto { width: 100%; aspect-ratio: 4 / 3; background-size: cover; background-position: center; background-color: var(--bg-3); }
.amen .amtxt { padding: 15px 17px; }
.amen .ic { width: 34px; height: 34px; color: var(--gold); margin-bottom: 14px; }
.amen h3 { font-size: 20px; color: var(--ink); margin-bottom: 3px; }
.amen p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.amen.wide { grid-column: 1 / -1; }
.plan-render { width: 100%; border-radius: 14px; display: block; }
.cap { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); text-align: center; margin: 8px 0 16px; }

/* feature rows */
.feat { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.feat:last-child { border-bottom: none; }
.feat .ic { flex: none; width: 30px; height: 30px; color: var(--gold); margin-top: 2px; }
.feat h3 { font-size: 20px; margin-bottom: 2px; }
.feat p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Planta interativa ---------- */
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.plan-svg-wrap { position: relative; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #1a2a22, #111c16); border: 1px solid var(--line-soft); }
.plan-svg-wrap svg { width: 100%; height: auto; display: block; }
.lot { cursor: pointer; transition: fill .2s, opacity .2s; }
.lot:active { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 16px; }
.legend .it { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.legend .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); }
.lot-readout { margin-top: 14px; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-soft); }
.lot-readout b { color: var(--ink); font-weight: 500; }

/* ---------- Preços ---------- */
.price-grid { display: grid; gap: 16px; }
.price {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px;
  overflow: hidden;
}
.price.feature { border-color: var(--gold); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface)); }
.price .tag { position: absolute; top: 16px; right: 16px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #20180a; background: linear-gradient(135deg,var(--gold-bright),var(--gold)); padding: 5px 11px; border-radius: 100px; font-weight: 600; }
.price .ptype { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.price .pval { font-family: var(--serif); font-size: 46px; line-height: 1; margin: 12px 0 2px; color: var(--ink); }
.price .pval small { font-size: 19px; color: var(--ink-soft); }
.price .pwas { font-size: 13px; color: var(--ink-dim); text-decoration: line-through; }
.price .pdesc { font-size: 14px; color: var(--ink-soft); margin: 10px 0 18px; }
.price ul { list-style: none; display: grid; gap: 9px; margin-bottom: 20px; }
.price li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.price li svg { flex: none; width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }

.note { font-size: 12px; color: var(--ink-dim); text-align: center; margin-top: 16px; line-height: 1.5; }

/* ---------- Galeria ---------- */
.gallery { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.gallery .gph { aspect-ratio: 1; border-radius: 14px; cursor: pointer; background-size: cover; background-position: center; background-color: var(--bg-3); min-width: 0; transition: transform .35s ease, filter .35s; }
.gallery .gph:active { transform: scale(.985); filter: brightness(1.05); }
.gallery .gph.tall { aspect-ratio: 1 / 1.4; grid-row: span 2; }
.gallery .gph.wide { grid-column: 1 / -1; aspect-ratio: 16/9; }

/* ---------- Contato ---------- */
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px 24px; text-align: center; box-shadow: var(--shadow); }
.contact-card .ig { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); text-decoration: none; font-size: 14px; margin-top: 18px; }

/* ---------- Footer ---------- */
footer { padding: 40px 0 120px; text-align: center; border-top: 1px solid var(--line-soft); }
footer .fm { width: 56px; margin: 0 auto 16px; opacity: .8; }
footer p { font-size: 12px; color: var(--ink-dim); line-height: 1.7; }

/* ---------- Sticky WhatsApp ---------- */
.wa-float {
  position: fixed; left: 18px; right: 18px; bottom: 16px; z-index: 70;
  transform: translateY(140%); transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.wa-float.show { transform: translateY(0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* divider */
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 0 auto; max-width: 560px; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); margin: 4px 0 22px; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 44px; background: var(--line); }
.ornament svg { width: 22px; height: 22px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(6,10,8,.9); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 28px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox .frame { width: 92vw; max-width: 600px; height: 74vh; border-radius: 18px; border: 1px solid var(--line); background-size: contain; background-repeat: no-repeat; background-position: center; background-color: #0a0f0c; }
.lightbox .hint { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }

/* planta — lote selecionado */
.lot.sel { filter: drop-shadow(0 0 6px rgba(255,255,255,.5)); fill-opacity: 1 !important; }

@media (min-width: 620px) {
  .amen-grid { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: 1fr 1fr; }
  .factrip { grid-template-columns: repeat(4, 1fr); }
}
