/* ============================================================
   Casa Boerescu — demo Voost Vision
   Tokens: lumea cadastrului si a campului.
   ============================================================ */

:root {
  --ink: #14231a;          /* verde-negru: text, bara de sus */
  --paper: #fbfaf6;        /* hartie calda: fise, panouri */
  --pine: #1e5b3c;         /* verde-pin: brand, actiuni */
  --pine-deep: #123f28;
  --field: #2e8b57;        /* disponibil */
  --stake: #23241f;        /* rezervat (negru, ca in codul clientului) */
  --sold: #c03a2b;         /* vandut (rosu) */
  --line: #d9d6cb;
  --muted: #5c6660;
  --shadow: 0 10px 30px rgba(20, 35, 26, .22);

  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Public Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --topbar-h: 56px;
  --radius: 14px;
}

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

[hidden] { display: none !important; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--field);
  outline-offset: 2px;
}

/* ---------- Bara de sus ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(251, 250, 246, .12);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  min-width: 0;
}

.brand-flag {
  width: 15px;
  height: 20px;
  color: var(--field);
  align-self: center;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: .12em;
  font-size: 17px;
  white-space: nowrap;
}

.brand-tag {
  font-size: 12px;
  color: rgba(251, 250, 246, .65);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(251, 250, 246, .35);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 600;
}

.menu-btn:hover { background: rgba(251, 250, 246, .1); }

.menu-btn-lines { display: inline-flex; flex-direction: column; gap: 3px; }
.menu-btn-lines i { width: 16px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- Harta ---------- */

#map-wrap {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
}

#map { position: absolute; inset: 0; }

#map.is-ready { animation: map-in .8s ease both; }
@keyframes map-in { from { opacity: 0; } to { opacity: 1; } }

.maplibregl-ctrl-bottom-left { z-index: 20; }

/* hint */
.map-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: hint-in .5s .9s ease backwards;
  max-width: min(92vw, 420px);
}
.map-hint svg { width: 13px; height: 17px; color: var(--field); flex: none; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.map-hint.is-out { transition: opacity .4s, transform .4s; opacity: 0; transform: translate(-50%, -8px); pointer-events: none; }

/* comutator vedere */
.view-toggle {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 25;
  display: flex;
  background: var(--paper);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
}

.view-btn {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.view-btn.is-active {
  background: var(--ink);
  color: var(--paper);
}

/* legenda */
.legend {
  position: absolute;
  left: 12px;
  bottom: 42px;
  z-index: 25;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-available { background: var(--field); }
.dot-reserved { background: var(--stake); }
.dot-sold { background: var(--sold); }

/* buton import */
.import-btn {
  position: absolute;
  right: 12px;
  bottom: 42px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--pine);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.import-btn:hover { background: var(--pine-deep); }
.import-btn svg { width: 17px; height: 17px; }

/* dropzone */
.dropzone {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(20, 35, 26, .55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone-inner {
  border: 2px dashed var(--paper);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 28px 36px;
  font-size: 18px;
  font-weight: 600;
  background: rgba(20, 35, 26, .5);
}

/* toast */
.toast {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow);
  max-width: 92vw;
  text-align: center;
}

/* ---------- Fisa de teren ---------- */

.lot-card {
  position: absolute;
  z-index: 30;
  background: var(--paper);
  box-shadow: var(--shadow);
  /* mobil: bottom sheet */
  left: 0; right: 0; bottom: 0;
  border-radius: 18px 18px 0 0;
  max-height: 72%;
  overflow-y: auto;
  animation: sheet-up .35s cubic-bezier(.2, .9, .3, 1) both;
  padding-bottom: env(safe-area-inset-bottom);
}

@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }

.lot-card-handle {
  width: 42px; height: 4px;
  background: var(--line);
  border-radius: 4px;
  margin: 10px auto 2px;
}

.lot-card-close {
  position: absolute;
  top: 10px; right: 10px;
  border: 0;
  background: rgba(20, 35, 26, .07);
  color: var(--ink);
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 15px;
}

.lot-card-body { padding: 10px 18px 20px; }

.lot-status {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--paper);
  margin-bottom: 8px;
}
.lot-status.s-available { background: var(--field); }
.lot-status.s-reserved { background: var(--stake); }
.lot-status.s-sold { background: var(--sold); }

.lot-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 110%;
  font-size: 21px;
  line-height: 1.15;
  margin-bottom: 2px;
}

.lot-zone { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }

.lot-figures {
  display: flex;
  gap: 18px;
  align-items: baseline;
  font-family: var(--font-mono);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lot-price { font-size: 24px; font-weight: 600; color: var(--pine-deep); }
.lot-price.sold-strike { text-decoration: line-through; color: var(--muted); font-size: 18px; }
.lot-fig { font-size: 13.5px; color: var(--ink); }
.lot-fig b { font-weight: 600; }
.lot-fig span { color: var(--muted); }

.lot-desc { font-size: 15px; line-height: 1.5; margin-bottom: 14px; }

.lot-photos {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.lot-photos img {
  width: 33%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  flex: 1;
}

.lot-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--pine); color: var(--paper); }
.btn-primary:hover { background: var(--pine-deep); }
.btn-ghost { background: transparent; color: var(--pine-deep); border: 1.5px solid var(--pine); }
.btn-big { width: 100%; font-size: 17px; padding: 15px 20px; flex-direction: column; gap: 2px; }
.btn-sub { font-size: 11.5px; font-weight: 500; opacity: .75; }
.lot-cta .btn { flex: 1; }

/* ---------- Overlays (meniu + panouri) ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  animation: overlay-in .3s ease both;
}
@keyframes overlay-in { from { opacity: 0; } }

.menu-overlay { background: var(--ink); color: var(--paper); }
.panel-overlay { background: var(--paper); color: var(--ink); }

.overlay-top {
  height: var(--topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid rgba(127, 127, 127, .25);
}

.overlay-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: .12em;
  font-size: 15px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.overlay-close { flex: none; }

.overlay-close {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  opacity: .85;
}
.overlay-close:hover { opacity: 1; }

/* meniu */
.menu-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px clamp(16px, 6vw, 64px);
  gap: 4px;
  overflow-y: auto;
}

.menu-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--paper);
  text-decoration: none;
  padding: 14px 12px;
  border-radius: 10px;
}
.menu-link:hover { background: rgba(251, 250, 246, .07); }

.menu-link-no {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(24px, 5.4vw, 40px);
  line-height: 1.1;
}

.menu-link-hint { color: rgba(251, 250, 246, .55); font-size: 14px; }

.menu-link-secondary .menu-link-no { font-size: clamp(17px, 3.4vw, 22px); color: var(--field); }

.overlay-foot {
  flex: none;
  padding: 16px;
  text-align: center;
}

.voost-credit {
  color: rgba(251, 250, 246, .45);
  font-size: 12.5px;
  text-decoration: none;
}
.voost-credit:hover { color: rgba(251, 250, 246, .8); text-decoration: underline; }

/* panouri de continut */
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px clamp(16px, 6vw, 64px) 48px;
}

.panel-article, .panel-intro, #testimonials-list { max-width: 680px; margin-left: auto; margin-right: auto; }

.lede {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 105%;
  font-size: clamp(21px, 4vw, 30px);
  line-height: 1.25;
  margin-bottom: 24px;
}

.panel-article p { font-size: 16px; line-height: 1.65; margin-bottom: 16px; }

.stats-row {
  display: flex;
  gap: 12px;
  margin: 22px 0 26px;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 130px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 26px;
  color: var(--pine-deep);
}

.stat-label { font-size: 13px; color: var(--muted); }

.demo-note {
  font-size: 12.5px !important;
  color: var(--muted);
  border-left: 3px solid var(--line);
  padding-left: 10px;
  margin-top: 28px;
}

.panel-intro { font-size: 16px; line-height: 1.6; margin-bottom: 24px; color: var(--ink); }

/* testimoniale */
.tst-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tst-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}

.tst-name { font-weight: 700; font-size: 15.5px; }
.tst-where { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-family: var(--font-mono); }
.tst-text { font-size: 14.5px; line-height: 1.55; margin-bottom: 12px; }

.tst-maplink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--pine);
  color: var(--pine-deep);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.tst-maplink:hover { background: var(--pine); color: var(--paper); }

/* contact */
.contact-actions { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 26px; }

/* ---------- Modal demo (izolat, se sterge la handover) ---------- */

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 35, 26, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.demo-modal-card {
  background: var(--paper);
  border-radius: var(--radius);
  max-width: 430px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.demo-modal-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--sold);
  font-weight: 600;
}

.demo-modal-card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 108%;
  font-size: 22px;
  margin: 8px 0 12px;
}

.demo-modal-card p { font-size: 14.5px; line-height: 1.55; margin-bottom: 12px; }
.demo-modal-valid { font-family: var(--font-mono); font-size: 12.5px !important; color: var(--muted); }
.demo-modal-card .btn { width: 100%; margin-top: 6px; }

/* ---------- Desktop ---------- */

@media (min-width: 760px) {
  .lot-card {
    left: auto;
    right: 16px;
    bottom: 16px;
    top: auto;
    width: 390px;
    border-radius: var(--radius);
    max-height: calc(100% - 32px);
    animation: card-in .3s ease both;
  }
  @keyframes card-in { from { transform: translateY(12px); opacity: 0; } }
  .lot-card-handle { display: none; }
  .view-toggle { top: 16px; right: 16px; }
  .import-btn { right: 16px; bottom: 16px; }
  .legend { left: 16px; bottom: 16px; }
}

@media (max-width: 759px) {
  .brand-tag { display: none; }
  .map-hint { top: 70px; }
  .import-btn span { display: none; }
  .import-btn { padding: 12px; border-radius: 50%; }
  .legend { font-size: 11.5px; gap: 8px; padding: 7px 11px; bottom: 40px; left: 8px; }
  .import-btn { bottom: 40px; right: 8px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* marcaj varianta interna */
.variant-chip {
  position: absolute;
  top: 14px;
  left: 12px;
  z-index: 24;
  background: #c03a2b;
  color: #fbfaf6;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
@media (max-width: 759px) { .variant-chip { top: auto; bottom: 96px; } }

/* ---------- V3: contact in topbar ---------- */

.top-actions { display: flex; align-items: center; gap: 8px; }

.top-call, .top-wa {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(251, 250, 246, .35);
}
.top-call svg, .top-wa svg { width: 16px; height: 16px; }
.top-call:hover { background: rgba(251, 250, 246, .1); }
.top-call span { font-family: var(--font-mono); font-size: 13px; }
.top-wa { background: #1f7a4d; border-color: #1f7a4d; }
.top-wa:hover { background: #24905b; }

@media (max-width: 900px) {
  .top-call span, .top-wa span { display: none; }
  .top-call, .top-wa { padding: 9px; border-radius: 50%; }
}

/* ---------- V3: panoul Portofoliu ---------- */

.pf-btn {
  position: absolute;
  top: 52px;
  left: 12px;
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.pf-btn svg { width: 16px; height: 16px; }
.pf-btn:hover { background: #fff; }

.pf-panel {
  position: absolute;
  top: 96px;
  left: 12px;
  z-index: 27;
  width: 264px;
  max-height: calc(100% - 150px);
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px 12px;
}

.pf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pf-title { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; letter-spacing: .1em; font-size: 13px; }
.pf-close { border: 0; background: rgba(20,35,26,.07); width: 28px; height: 28px; border-radius: 50%; font-size: 13px; color: var(--ink); }

.pf-section { border-top: 1px solid var(--line); padding: 10px 0; }
.pf-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.pf-check { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; cursor: pointer; }
.pf-check input { width: 16px; height: 16px; accent-color: var(--pine); }

.pf-select {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 10px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.pf-count { font-family: var(--font-mono); font-size: 12px; color: var(--pine-deep); padding-top: 10px; border-top: 1px solid var(--line); }

@media (max-width: 759px) {
  .pf-btn { top: auto; bottom: 96px; left: 8px; padding: 11px 14px; }
  .pf-panel {
    top: auto;
    bottom: 148px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: 55%;
  }
  .variant-chip { bottom: 148px; }
}

/* ---------- V3: fisa extinsa ---------- */

.lot-cta-grid { flex-wrap: wrap; }
.lot-cta-grid .btn { flex: 1 1 45%; padding: 12px 10px; font-size: 14.5px; }

.utils-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-bottom: 14px;
}
.util-item { font-size: 13px; color: var(--pine-deep); font-weight: 600; }

.lot-extra { margin-bottom: 10px; }
.iso-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-family: var(--font-mono); color: var(--muted); }

/* mobil: doar WhatsApp + Meniu in bara (telefonul ramane in fise si Contact) */
@media (max-width: 759px) {
  .top-call { display: none; }
  .top-actions { gap: 6px; }
  .brand-name { font-size: 15px; letter-spacing: .09em; }
  .menu-btn { padding: 8px 12px; font-size: 14px; }
}
