/* Hemvist - public site styles */
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-800-normal.woff2') format('woff2'); }

:root {
  --green-900: #123f36;
  --green-700: #1a5c4f;
  --green-600: #21715f;
  --green-100: #e3efeb;
  --coral: #e8674a;
  --coral-dark: #d5563a;
  --ink: #1d2521;
  --ink-soft: #55625d;
  --line: #e4e0d8;
  --bg: #faf8f4;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 37, 33, .05), 0 6px 20px -6px rgba(29, 37, 33, .12);
  --shadow-lg: 0 10px 38px -8px rgba(29, 37, 33, .22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.55; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none !important; transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--green-700); color: var(--green-700); }
.btn-primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--green-100); border-color: transparent; }
.btn-light { background: #fff; border-color: #fff; color: var(--green-900); }
.btn-light:hover { background: var(--green-100); border-color: var(--green-100); color: var(--green-900); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }
.inline-form { display: inline; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(250, 248, 244, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.22rem; color: var(--green-900); letter-spacing: -.02em; text-decoration: none !important; }
.brand-mark { color: var(--coral); }
.main-nav { display: flex; gap: 4px; margin-right: auto; }
.main-nav a { padding: 8px 13px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none !important; }
.main-nav a:hover, .main-nav a.active { background: var(--green-100); color: var(--green-900); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* flash */
.flash { padding: 12px 20px; text-align: center; font-weight: 600; font-size: .95rem; }
.flash-success { background: #e2f3e8; color: #14522c; }
.flash-error { background: #fbe4de; color: #8c2f18; }
.flash-info { background: #e7ecf6; color: #2c4370; }

/* hero */
.hero {
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 55%, var(--green-600) 100%);
  color: #fff; padding: 74px 0 60px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -140px; top: -140px; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(232, 103, 74, .35), transparent 65%); pointer-events: none;
}
.hero-title { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -.03em; max-width: 700px; }
.hero-sub { margin: 14px 0 30px; font-size: 1.13rem; color: #d7e5df; max-width: 560px; }
.search-panel {
  background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow-lg);
  max-width: 100%; position: relative; z-index: 2;
}
.mode-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.mode-tab input { display: none; }
.mode-tab span {
  display: inline-block; padding: 8px 22px; border-radius: 9px; font-weight: 700; font-size: .95rem;
  color: var(--ink-soft); cursor: pointer; border: 1px solid transparent;
}
.mode-tab input:checked + span { background: var(--green-100); color: var(--green-900); border-color: var(--green-700); }
.search-row { display: flex; gap: 10px; }
.search-city { flex: 2.4; }
.search-type { flex: 1.2; }
.hero-stats { display: flex; gap: 44px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.55rem; font-weight: 800; }
.hero-stats span { color: #c4d7d0; font-size: .9rem; }

/* inputs */
.input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .97rem; background: #fff; color: var(--ink);
}
.input:focus { outline: 2px solid var(--green-600); outline-offset: -1px; border-color: var(--green-600); }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2355625d' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 13px center; padding-right: 34px; }

/* sections */
.section { padding: 58px 0; }
.section-alt { background: #f3efe8; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.65rem; letter-spacing: -.02em; }
.link-arrow { font-weight: 700; }

/* grid + cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid rgba(228, 224, 216, .6);
  transition: transform .18s, box-shadow .18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--green-100); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.045); }
.card-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #b9cfc7; background: var(--green-100); }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 11px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--green-700);
}
.badge-rent { background: #38618f; }
.badge-featured { left: auto; right: 12px; background: var(--coral); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.card-price-row { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-size: 1.18rem; font-weight: 800; letter-spacing: -.01em; color: var(--green-900); }
.fav-btn {
  background: none; border: 0; cursor: pointer; color: #cfd8d4; padding: 6px; border-radius: 8px;
  display: inline-flex; transition: .15s;
}
.fav-btn:hover { color: var(--coral); background: #fdf0ec; }
.fav-btn.is-fav { color: var(--coral); }
.fav-lg { border: 1px solid var(--line); padding: 9px 16px; gap: 8px; font-weight: 700; font-size: .95rem; color: var(--ink); align-items: center; }
.fav-lg.is-fav { border-color: var(--coral); color: var(--coral); }
.card-title { font-size: 1.03rem; font-weight: 700; }
.card-title a { color: var(--ink); }
.card-loc { color: var(--ink-soft); font-size: .9rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-soft); font-size: .87rem; margin-top: 6px; }
.card-meta span { white-space: nowrap; }

/* city chips */
.city-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.city-chip {
  background: #fff; border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px;
  font-weight: 700; color: var(--ink); text-decoration: none !important; transition: .15s;
}
.city-chip small { color: var(--ink-soft); font-weight: 600; margin-left: 4px; }
.city-chip:hover { border-color: var(--green-700); color: var(--green-700); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.step-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--green-100); color: var(--green-900);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* cta band */
.cta-band { background: var(--green-900); color: #fff; padding: 52px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-inner h2 { font-size: 1.7rem; letter-spacing: -.02em; }

/* footer */
.site-footer { background: #14201c; color: #b8c6c0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 48px 20px 30px; }
.footer-grid h4 { color: #fff; margin-bottom: 12px; font-size: .95rem; }
.footer-grid a { display: block; color: #b8c6c0; padding: 3px 0; font-size: .93rem; }
.footer-grid a:hover { color: #fff; }
.brand-light { color: #fff; }
.footer-tag { font-size: .9rem; margin-top: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding: 18px 20px; font-size: .85rem; color: #8fa39b; }

/* pages */
.page { padding: 34px 0 64px; }
.page-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.9rem; letter-spacing: -.02em; }

/* filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 26px; box-shadow: var(--shadow);
}
.filter-bar .input { width: auto; flex: 1 1 130px; min-width: 110px; }
.input-num { max-width: 130px; }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-left: auto; }
.vt-btn { border: 0; background: #fff; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.vt-btn.active { background: var(--green-700); color: #fff; }

/* pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.page-link {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; text-decoration: none !important; color: var(--ink);
}
.page-link.active { background: var(--green-700); border-color: var(--green-700); color: #fff; }

/* empty state */
.empty-state { text-align: center; padding: 70px 20px; background: #fff; border-radius: var(--radius); border: 1px dashed var(--line); }
.empty-state h1, .empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--ink-soft); margin-bottom: 18px; }

/* maps */
.listings-map { height: 620px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.mini-map { height: 320px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.map-pop { width: 200px; }
.map-pop img { border-radius: 8px; margin-bottom: 6px; aspect-ratio: 3/2; object-fit: cover; }
.map-pop strong { display: block; font-size: .95rem; }
.map-pop span { color: var(--ink-soft); font-size: .82rem; }
.price-pin {
  background: var(--green-900); color: #fff; font-weight: 700; font-size: .78rem;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  border: 2px solid #fff;
}
.price-pin.rent { background: #38618f; }

/* breadcrumb */
.breadcrumb { font-size: .88rem; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb span { color: var(--ink); font-weight: 600; }

/* gallery */
.gallery { margin-bottom: 30px; }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 10; background: var(--green-100); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-noimg { aspect-ratio: 21 / 10; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92);
  font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; padding-bottom: 4px;
}
.gal-prev { left: 14px; } .gal-next { right: 14px; }
.gal-nav:hover { background: #fff; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs img {
  width: 108px; aspect-ratio: 3/2; object-fit: cover; border-radius: 9px; cursor: pointer;
  opacity: .65; border: 2px solid transparent; flex: 0 0 auto;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover { opacity: 1; border-color: var(--green-700); }

/* detail */
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 34px; align-items: start; }
.detail-header { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.detail-title { font-size: 1.75rem; letter-spacing: -.02em; }
.detail-loc { color: var(--ink-soft); margin-top: 4px; }
.price-line { display: flex; align-items: baseline; gap: 14px; margin: 16px 0 22px; }
.detail-price { font-size: 1.9rem; font-weight: 800; color: var(--green-900); letter-spacing: -.02em; }
.facts-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.fact {
  background: #fff; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 10px; flex: 1 1 150px; min-width: 130px;
}
.fact-label { color: var(--ink-soft); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.detail-section { margin-bottom: 34px; }
.detail-section h2 { font-size: 1.3rem; margin-bottom: 12px; }
.prose p { margin-bottom: 12px; color: #333d38; }
.feature-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; }
.feature-list li { color: #333d38; }

/* panels */
.card-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.agent-card h3 { margin-bottom: 14px; }
.agent-row { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.agent-photo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.agent-initial { background: var(--green-100); color: var(--green-900); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; }
.stack-form { display: flex; flex-direction: column; gap: 10px; }
.detail-side { position: sticky; top: 86px; }

/* calculator */
.calc-row { margin-bottom: 16px; }
.calc-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.calc-row input[type=range] { width: 100%; accent-color: var(--green-700); }
.calc-result { background: var(--green-100); border-radius: 10px; padding: 14px 16px; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.calc-result strong { font-size: 1.3rem; color: var(--green-900); }

/* auth */
.auth-page { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card .muted { margin-bottom: 18px; }
.auth-card .flash { border-radius: 10px; margin-bottom: 14px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(12, 18, 15, .94); z-index: 900;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }
.lb-close {
  position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff;
  font-size: 2.4rem; cursor: pointer; line-height: 1;
}

/* responsive */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .facts-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .grid-3 { grid-template-columns: 1fr; }
  .main-nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px; gap: 2px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .search-row { flex-direction: column; }
  .hero { padding: 48px 0 42px; }
  .hero-stats { gap: 24px; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: 1fr; }
  .filter-bar .input { flex-basis: 44%; }
  .view-toggle { margin-left: 0; width: 100%; }
  .vt-btn { flex: 1; }
  .header-actions .btn-ghost { display: none; }
}
