/* =====================================================================
   Biemann Properties — design system
   Palette: deep pine green + brass on warm ivory. Display face Fraunces,
   body Archivo, mono Spline Sans Mono for prices & references.
   Signature motif: arched image masks (doorways) + the Discover deck.
   ===================================================================== */

:root {
  --pine:      #0e2e25;
  --pine-2:    #16443a;
  --pine-soft: #e6ece7;
  --ivory:     #f6f3ec;
  --paper:     #ffffff;
  --brass:     #a8823e;
  --brass-2:   #c9a45c;
  --ink:       #1c201e;
  --stone:     #7c8279;
  --line:      #e3ded2;
  --danger:    #a63d2f;
  --ok:        #2e6b4f;

  --ff-display: "Fraunces", Georgia, serif;
  --ff-body:    "Archivo", system-ui, -apple-system, sans-serif;
  --ff-mono:    "Spline Sans Mono", ui-monospace, monospace;

  --radius: 14px;
  --arch:   240px 240px 14px 14px;  /* signature doorway mask */
  --shadow: 0 10px 30px rgba(14,46,37,.10);
  --shadow-lg: 0 24px 60px rgba(14,46,37,.18);
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--ff-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pine-2); text-decoration: none; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-tight { padding: 44px 0; }

/* ---- Type ------------------------------------------------------------ */
h1, h2, h3, .display { font-family: var(--ff-display); font-weight: 500; line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
.eyebrow {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brass); display: block; margin-bottom: 14px;
}
.lede { color: var(--stone); font-size: 1.06rem; max-width: 56ch; }
.price { font-family: var(--ff-mono); font-weight: 600; }
.muted { color: var(--stone); }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--ff-body); font-weight: 600; font-size: .95rem;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pine); color: var(--ivory); }
.btn-primary:hover { background: var(--pine-2); color: var(--ivory); box-shadow: var(--shadow); }
.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-2); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246,243,236,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.brand-word { font-family: var(--ff-display); font-size: 1.2rem; letter-spacing: .06em; color: var(--pine); }
.brand-word b { color: var(--brass); font-weight: 600; }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { font-size: .93rem; font-weight: 500; color: var(--ink); padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--pine); border-bottom-color: var(--brass); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.currency-toggle select {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 7px 12px; font-family: var(--ff-mono); font-size: .8rem; cursor: pointer;
}

.bell { position: relative; background: none; border: 1px solid var(--line); border-radius: 999px;
        width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.bell svg { width: 18px; height: 18px; stroke: var(--pine); }
.bell .dot { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px;
             background: var(--danger); color: #fff; border-radius: 999px;
             font-size: .62rem; line-height: 16px; font-family: var(--ff-mono); }
.notif-panel {
  position: absolute; right: 0; top: 50px; width: 340px; max-height: 420px; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: none;
}
.notif-panel.open { display: block; }
.notif-item { padding: 10px 12px; border-radius: 10px; }
.notif-item + .notif-item { border-top: 1px solid var(--ivory); }
.notif-item.unread { background: var(--pine-soft); }
.notif-item .t { font-weight: 600; font-size: .9rem; }
.notif-item .b { font-size: .82rem; color: var(--stone); }

.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--pine); margin: 5px 0; }

@media (max-width: 920px) {
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 16px 20px; gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; }
  .hamburger { display: block; }
  .nav-cta .btn-ghost { display: none; }
}

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--pine); color: #cfd8d1; margin-top: 72px; }
.site-footer a { color: #e8eee9; }
.site-footer a:hover { color: var(--brass-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding: 64px 0 40px; }
.footer-grid h4 { color: var(--brass-2); font-family: var(--ff-mono); font-size: .72rem;
                  letter-spacing: .2em; text-transform: uppercase; margin: 0 0 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0;
                 font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.newsletter-inline { display: flex; gap: 8px; margin-top: 10px; }
.newsletter-inline input { flex: 1; border: 0; border-radius: 999px; padding: 12px 18px; font-family: var(--ff-body); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Forms ------------------------------------------------------------ */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); font-family: var(--ff-body); font-size: .95rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass); outline: none; }
.field .hint { font-size: .78rem; color: var(--stone); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px;
  background: var(--paper); font-size: .84rem; cursor: pointer; user-select: none;
}
.chip.on { background: var(--pine); color: var(--ivory); border-color: var(--pine); }

/* ---- Cards ------------------------------------------------------------ */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.prop-card .ph { position: relative; aspect-ratio: 4/3; background: var(--pine-soft); overflow: hidden; }
.prop-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.prop-card:hover .ph img { transform: scale(1.05); }
.prop-card .tag {
  position: absolute; top: 12px; left: 12px; background: rgba(14,46,37,.88); color: var(--ivory);
  font-family: var(--ff-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
.prop-card .save {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 999px;
  border: 0; background: rgba(246,243,236,.92); cursor: pointer; display: grid; place-items: center;
}
.prop-card .save svg { width: 17px; height: 17px; fill: none; stroke: var(--pine); stroke-width: 2; }
.prop-card .save.on svg { fill: var(--danger); stroke: var(--danger); }
.prop-card .body { padding: 18px; }
.prop-card .price { color: var(--pine); font-size: 1.12rem; }
.prop-card h3 { font-size: 1.02rem; margin: 4px 0 2px; font-family: var(--ff-body); font-weight: 600; }
.prop-card .loc { color: var(--stone); font-size: .85rem; }
.prop-card .meta { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px;
                   border-top: 1px solid var(--ivory); font-size: .8rem; color: var(--stone); }
.prop-card .meta b { color: var(--ink); font-weight: 600; }

/* ---- Hero -------------------------------------------------------------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero .arch {
  border-radius: var(--arch); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4; max-height: 560px;
}
.hero .arch img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero .arch { max-height: 420px; } }

.search-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 18px; margin-top: 28px;
}
.search-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.search-tabs button {
  border: 0; background: transparent; padding: 8px 18px; border-radius: 999px;
  font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--stone);
}
.search-tabs button.on { background: var(--pine); color: var(--ivory); }
.search-row { display: grid; grid-template-columns: 2fr 1.2fr 1.2fr auto; gap: 10px; }
.search-row input, .search-row select {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: .93rem;
}
@media (max-width: 760px) { .search-row { grid-template-columns: 1fr; } }

/* ---- Discover deck (swipe) --------------------------------------------- */
.deck-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: center; }
@media (max-width: 900px) { .deck-wrap { grid-template-columns: 1fr; } }
.deck { position: relative; height: 520px; max-width: 380px; margin-inline: auto; width: 100%; }
.deck-card {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: var(--paper);
  box-shadow: var(--shadow-lg); cursor: grab; touch-action: pan-y; user-select: none;
  transition: transform .3s ease, opacity .3s ease; will-change: transform;
}
.deck-card.dragging { transition: none; cursor: grabbing; }
.deck-card img { width: 100%; height: 68%; object-fit: cover; pointer-events: none; }
.deck-card .info { padding: 16px 20px; }
.deck-card .info .price { font-size: 1.15rem; color: var(--pine); }
.deck-card .stamp {
  position: absolute; top: 26px; font-family: var(--ff-mono); font-size: 1rem; letter-spacing: .2em;
  padding: 8px 16px; border: 3px solid; border-radius: 8px; transform: rotate(-14deg); opacity: 0;
}
.deck-card .stamp.like { left: 22px; color: var(--ok); border-color: var(--ok); }
.deck-card .stamp.pass { right: 22px; color: var(--danger); border-color: var(--danger); transform: rotate(14deg); }
.deck-actions { display: flex; justify-content: center; gap: 18px; margin-top: 22px; }
.deck-actions button {
  width: 58px; height: 58px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; font-size: 1.35rem; box-shadow: var(--shadow);
}
.deck-actions .like-btn { color: var(--ok); }
.deck-actions .pass-btn { color: var(--danger); }
.deck-actions .view-btn { color: var(--brass); }
.deck-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
              color: var(--stone); border: 2px dashed var(--line); border-radius: 22px; padding: 30px; }

/* ---- Collections ------------------------------------------------------- */
.collection-tile { position: relative; border-radius: var(--arch); overflow: hidden; aspect-ratio: 3/4; }
.collection-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.collection-tile:hover img { transform: scale(1.06); }
.collection-tile .label {
  position: absolute; inset: auto 0 0; padding: 40px 20px 20px; color: var(--ivory);
  background: linear-gradient(transparent, rgba(14,46,37,.85));
  font-family: var(--ff-display); font-size: 1.2rem;
}

/* ---- Calculators -------------------------------------------------------- */
.calc-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.calc-result { background: var(--pine); color: var(--ivory); border-radius: var(--radius); padding: 24px; }
.calc-result .big { font-family: var(--ff-mono); font-size: 1.9rem; color: var(--brass-2); }
.calc-result table { width: 100%; font-size: .9rem; border-collapse: collapse; margin-top: 12px; }
.calc-result td { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.calc-result td:last-child { text-align: right; font-family: var(--ff-mono); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brass); }

/* ---- Steps (multi-step form) -------------------------------------------- */
.steps { display: flex; gap: 0; margin-bottom: 32px; counter-reset: step; }
.steps .s { flex: 1; text-align: center; position: relative; color: var(--stone); font-size: .82rem; padding-top: 34px; }
.steps .s::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 999px; line-height: 28px;
  background: var(--paper); border: 1px solid var(--line); font-family: var(--ff-mono);
}
.steps .s::after { content: ""; position: absolute; top: 14px; left: calc(50% + 16px); right: calc(-50% + 16px);
                   height: 1px; background: var(--line); }
.steps .s:last-child::after { display: none; }
.steps .s.on { color: var(--pine); font-weight: 600; }
.steps .s.on::before { background: var(--pine); color: var(--ivory); border-color: var(--pine); }
.steps .s.done::before { background: var(--brass); color: #fff; border-color: var(--brass); content: "✓"; }
.step-pane { display: none; }
.step-pane.on { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Modal / popup ------------------------------------------------------ */
.modal-back { position: fixed; inset: 0; background: rgba(14,46,37,.55); z-index: 80;
              display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-back.open { display: flex; }
.modal { background: var(--paper); border-radius: 18px; max-width: 480px; width: 100%;
         padding: 32px; position: relative; box-shadow: var(--shadow-lg); }
.modal .x { position: absolute; top: 14px; right: 16px; border: 0; background: none;
            font-size: 1.3rem; cursor: pointer; color: var(--stone); }

/* ---- Toast --------------------------------------------------------------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--pine); color: var(--ivory); padding: 13px 22px; border-radius: 999px;
  font-size: .9rem; opacity: 0; pointer-events: none; transition: .3s; z-index: 100;
  box-shadow: var(--shadow-lg); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

/* ---- Tables (dashboards) -------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; background: var(--paper);
         border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .9rem; }
.table th { text-align: left; font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .14em;
            text-transform: uppercase; color: var(--stone); padding: 12px 14px; background: var(--ivory); }
.table td { padding: 12px 14px; border-top: 1px solid var(--ivory); vertical-align: middle; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .72rem;
         font-family: var(--ff-mono); letter-spacing: .06em; }
.badge.live { background: #e2efe7; color: var(--ok); }
.badge.under_review { background: #f7efdd; color: var(--brass); }
.badge.rejected, .badge.archived { background: #f6e3e0; color: var(--danger); }
.badge.draft { background: var(--pine-soft); color: var(--stone); }

/* ---- Misc ------------------------------------------------------------------ */
.divider-brass { width: 56px; height: 3px; background: var(--brass); border: 0; margin: 18px 0; }
.skeleton { background: linear-gradient(90deg, var(--pine-soft) 25%, #f0ece1 50%, var(--pine-soft) 75%);
            background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }
.testimonial { background: var(--paper); border-left: 3px solid var(--brass); padding: 24px;
               border-radius: 0 var(--radius) var(--radius) 0; }
.testimonial .who { font-family: var(--ff-mono); font-size: .75rem; color: var(--stone); margin-top: 12px; }
#map { height: 480px; border-radius: var(--radius); border: 1px solid var(--line); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination button { border: 1px solid var(--line); background: var(--paper); border-radius: 10px;
                     padding: 8px 14px; cursor: pointer; font-family: var(--ff-mono); }
.pagination button.on { background: var(--pine); color: var(--ivory); border-color: var(--pine); }
