/* =====================================================================
   Johannesdal Village – interactive Village Layout
   Scoped to .jv-layout (sits on <main class="jv-gallery jv-layout">).
   Builds on gallery.css (brand variables, .jv-btn, .jv-chip, .jv-wrap).
   ===================================================================== */
.jv-layout {
    --jv-av: #6d7a22;          /* available – olive (brand) */
    --jv-av-hi: #8a9a2b;
    --jv-res: #E18426;         /* reserved – fulvous (brand) */
    --jv-sold: #b8bcc1;        /* sold – grey, hatched on the map */
    --jv-cadet: #1B1F39;
    --jv-shadowblue: #778DA9;
    background: #fff;
}
.jv-layout *, .jv-layout *::before, .jv-layout *::after { box-sizing: border-box; }
.jv-layout [hidden] { display: none !important; }
.jv-layout h1, .jv-layout h2, .jv-layout h3 { font-family: 'Josefin Sans', sans-serif; }

/* ---------- intro ---------- */
.jv-lhead { background: var(--jv-sand); padding: 92px 0 40px; border-bottom: 1px solid var(--jv-line); }
.jv-lhead__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.jv-lhead .jv-eyebrow { color: var(--jv-fulvous); }
.jv-lhead h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 300; letter-spacing: .08em; text-transform: uppercase; color: var(--jv-gunmetal); margin: .25em 0 .15em; line-height: 1.05; }
.jv-lhead__sub { font-size: 1rem; letter-spacing: .2em; text-transform: uppercase; color: var(--jv-shadowblue); font-weight: 600; margin: 0 0 1.1em; }
.jv-lhead__lead { font-size: 1.1rem; font-weight: 300; line-height: 1.6; color: #3b4148; margin: 0 0 1.6em; max-width: 38em; }
.jv-lhead__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.jv-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.jv-kpi { background: #fff; border: 1px solid var(--jv-line); border-radius: var(--jv-radius); padding: 18px 16px 14px; }
.jv-kpi b { display: block; font-size: 2.1rem; font-weight: 300; line-height: 1; color: var(--jv-gunmetal); }
.jv-kpi span { display: flex; align-items: center; gap: .45em; margin-top: .55em; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #5a6068; }
.jv-kpi__note { grid-column: 1 / -1; font-size: .85rem; color: #6a7078; margin: 4px 2px 0; }

/* ---------- status dots / pills ---------- */
.jv-dot { width: .8em; height: .8em; border-radius: 3px; display: inline-block; flex: none; background: var(--jv-av); }
.jv-dot--reserved { background: var(--jv-res); }
.jv-dot--sold { background: repeating-linear-gradient(45deg, #9aa0a6 0 2px, #cfd2d6 2px 5px); }
.jv-status { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .45em .7em .3em; border-radius: 999px; line-height: 1; white-space: nowrap; }
.jv-status--available { background: #eef0dc; color: #4f5a14; }
.jv-status--reserved { background: #fbe9d6; color: #9a520f; }
.jv-status--sold { background: #eceef0; color: #6a7078; }

/* ---------- toolbar ---------- */
.jv-plan { padding: 34px 0 64px; }
.jv-plan > .jv-wrap { max-width: 1400px; }
.jv-plan__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.jv-plan__filters { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.jv-plan__filters .jv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.jv-plan__filters .jv-chip { display: inline-flex; align-items: center; gap: .5em; }
.jv-plan__filters .jv-chip[aria-pressed="true"] .jv-dot { box-shadow: 0 0 0 2px #fff; }
.jv-chip__count { opacity: .7; font-weight: 400; }
.jv-plan__hint { margin: 0; font-size: .9rem; color: #5a6068; }

/* ---------- map + list grid ---------- */
.jv-plan__grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: stretch; }
.jv-plan__stage { position: relative; border-radius: 14px; background: #f3f2ed; box-shadow: 0 10px 30px rgba(41,47,54,.12); }
.jv-plan__viewport { position: relative; overflow: hidden; border-radius: 14px; }
.jv-layout.is-zoomed .jv-plan__viewport { overflow: auto; cursor: grab; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.jv-plan__viewport.is-dragging { cursor: grabbing; }
.jv-plan__canvas { position: relative; width: 100%; aspect-ratio: 8200 / 4340; }
.jv-plan__canvas img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.jv-plan__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.jv-plan__tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.jv-plan__tools button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--jv-line); background: rgba(255,255,255,.95); color: var(--jv-gunmetal); font: 600 1.2rem/1 'Josefin Sans', sans-serif; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 0; }
.jv-plan__tools button:hover:not(:disabled) { background: var(--jv-gunmetal); color: #fff; }
.jv-plan__tools button:disabled { opacity: .4; cursor: default; }
.jv-plan__tools button:focus-visible { outline: 3px solid var(--jv-fulvous); outline-offset: 2px; }
.jv-plan__north { position: absolute; left: 12px; bottom: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.95); border: 1px solid var(--jv-line); display: grid; place-items: center; font: 700 .7rem/1 'Josefin Sans', sans-serif; color: var(--jv-gunmetal); pointer-events: none; }
.jv-plan__north::before { content: ""; width: 0; height: 0; border: 5px solid transparent; border-bottom: 9px solid var(--jv-gunmetal); border-top: 0; margin-bottom: -6px; }
.jv-plan__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 2px 0; font-size: .82rem; color: #5a6068; align-items: center; }
.jv-plan__legend span { display: inline-flex; align-items: center; gap: .45em; }
.jv-plan__legend .jv-dot--context { background: #c9d6cc; border: 1px solid #aebdb1; }

/* ---------- SVG shapes ---------- */
.jv-shape { cursor: pointer; outline: none; }
.jv-shape polygon { fill: var(--jv-av); fill-opacity: 1; stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .2s, fill-opacity .2s; }
.jv-shape text { fill: #fff; font: 600 150px 'Josefin Sans', sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.25); stroke-width: 10px; }
.jv-shape.is-reserved polygon { fill: var(--jv-res); }
.jv-shape.is-sold polygon { fill: url(#jvHatch); fill-opacity: 1; }
.jv-shape.is-sold text { fill: #5d636a; stroke: rgba(255,255,255,.7); }
.jv-shape.is-sold { cursor: help; }
.jv-shape.is-available:hover polygon, .jv-shape.is-available.is-hot polygon { fill: var(--jv-av-hi); fill-opacity: 1; }
.jv-shape.is-reserved:hover polygon, .jv-shape.is-reserved.is-hot polygon { fill: #f0974a; fill-opacity: 1; }
.jv-shape.is-dim polygon { fill-opacity: .18; }
.jv-shape.is-sold.is-dim polygon { fill-opacity: .3; }
.jv-shape.is-dim text { opacity: .35; }
.jv-plan__hl { fill: none; stroke: var(--jv-cadet); stroke-width: 3.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; filter: drop-shadow(0 0 3px rgba(255,255,255,.9)); }
.jv-shape:focus-visible polygon { stroke: var(--jv-fulvous); stroke-width: 4px; }

/* ---------- hover card ---------- */
.jv-pcard { position: absolute; left: 0; top: 0; z-index: 5; width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 18px 40px rgba(27,31,57,.25); overflow: hidden; opacity: 0; transition: opacity .15s; pointer-events: none; }
.jv-pcard.is-open { opacity: 1; pointer-events: auto; }
.jv-pcard__close { position: absolute; right: 8px; top: 8px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--jv-gunmetal); font-size: 1.3rem; line-height: 1; cursor: pointer; display: none; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.jv-pcard.is-pinned .jv-pcard__close { display: block; }
.jv-pcard__img { position: relative; aspect-ratio: 2 / 1; background: #e9e7e0; }
.jv-pcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jv-pcard__img span { position: absolute; left: 10px; bottom: 8px; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: rgba(27,31,57,.6); padding: .4em .6em .25em; border-radius: 4px; }
.jv-pcard__body { padding: 14px 16px 14px; }
.jv-pcard__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 26px; }
.jv-pcard.is-pinned .jv-pcard__img + .jv-pcard__body .jv-pcard__head { padding-right: 0; }
.jv-sheet .jv-pcard__head { padding-right: 46px; }
.jv-sheet .jv-pcard__img + .jv-pcard__body .jv-pcard__head { padding-right: 0; }
.jv-pcard__title { font-size: 1.45rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; margin: 0; color: var(--jv-gunmetal); padding: 0; line-height: 1.1; }
.jv-pcard__type { margin: .35em 0 .7em; font-size: .9rem; font-weight: 600; color: var(--jv-shadowblue); }
.jv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 4px 20px; margin: 0 0 .6em; }
.jv-facts div { min-width: 0; }
.jv-facts dt { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8a9097; margin: 0; }
.jv-facts dd { margin: .15em 0 0; font-size: 1rem; color: var(--jv-gunmetal); font-weight: 500; white-space: nowrap; }
.jv-pcard__line { margin: 0 0 .35em; font-size: .85rem; color: #4d535a; line-height: 1.4; }
.jv-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: .8em 0 .3em; }
.jv-prices div { background: var(--jv-sand); border-radius: 8px; padding: 8px 10px 6px; }
.jv-prices div:only-child { grid-column: 1 / -1; }
.jv-prices span { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8a9097; }
.jv-prices b { display: block; font-size: 1.02rem; font-weight: 600; color: var(--jv-gunmetal); margin-top: .15em; white-space: nowrap; }
.jv-pcard__note { margin: .3em 0 0; font-size: .75rem; color: #7a8087; }
.jv-pcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jv-pcard__actions .jv-btn { flex: 1 1 auto; justify-content: center; padding: .8em 1em .65em; font-size: .72rem; }
.jv-pcard__links { margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }
.jv-pcard__links a { font-size: .8rem; color: var(--jv-olive) !important; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- side list ---------- */
.jv-plist-wrap { position: relative; display: flex; flex-direction: column; border: 1px solid var(--jv-line); border-radius: 14px; background: #fff; min-height: 0; overflow: hidden; }
.jv-plist-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 10px; border-bottom: 1px solid var(--jv-line); }
.jv-plist-head h2 { margin: 0; padding: 0; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--jv-gunmetal); }
.jv-plist-head span { font-size: .8rem; color: #7a8087; }
.jv-plist-scroll { flex: 1 1 0; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.jv-plist { list-style: none; margin: 0; padding: 6px; }
.jv-pitem { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 8px; border: 0; background: transparent; border-radius: 9px; text-align: left; cursor: pointer; font-family: 'Josefin Sans', sans-serif; color: var(--jv-gunmetal); }
.jv-pitem:hover, .jv-pitem.is-hot { background: #f4f3ee; }
.jv-pitem:focus-visible { outline: 3px solid var(--jv-fulvous); outline-offset: -3px; }
.jv-pitem__no { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-size: 1.05rem; font-weight: 600; color: #fff; background: var(--jv-av); padding-top: 3px; }
.jv-pitem--reserved .jv-pitem__no { background: var(--jv-res); }
.jv-pitem--sold .jv-pitem__no { background: repeating-linear-gradient(45deg, #a9aeb4 0 3px, #cdd0d4 3px 7px); color: #4d535a; }
.jv-pitem__main b { display: block; font-size: .95rem; font-weight: 600; }
.jv-pitem__main small { display: block; font-size: .78rem; color: #6a7078; margin-top: 2px; line-height: 1.3; }
.jv-pitem__side { text-align: right; }
.jv-pitem__side small { display: block; font-size: .74rem; color: var(--jv-gunmetal); margin-top: 4px; font-weight: 600; white-space: nowrap; }
.jv-pitem--sold .jv-pitem__main { opacity: .7; }
.jv-plist-empty { padding: 20px 16px; color: #6a7078; font-size: .9rem; }

/* ---------- info cards ---------- */
.jv-linfo { background: var(--jv-sand); padding: 60px 0; }
.jv-linfo__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; }
.jv-linfo__card { background: #fff; border-radius: 14px; padding: 26px 26px 22px; border: 1px solid var(--jv-line); }
.jv-linfo__card h2 { font-size: .85rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--jv-shadowblue); margin: 0 0 .9em; padding: 0; }
.jv-linfo__card p, .jv-linfo__card li { font-size: .95rem; line-height: 1.6; color: #3b4148; }
.jv-linfo__card p { margin: 0 0 .8em; }
.jv-linfo__card ul { margin: 0; padding: 0; list-style: none; }
.jv-linfo__card li { padding: .45em 0; border-top: 1px solid var(--jv-line); }
.jv-linfo__card li:first-child { border-top: 0; }
.jv-dl { display: flex; align-items: center; gap: .6em; color: var(--jv-olive) !important; font-weight: 600; }
.jv-dl::before { content: "↓"; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #eef0dc; font-size: .8rem; flex: none; }
.jv-dl:hover { color: var(--jv-fulvous) !important; }

/* ---------- CTA band ---------- */
.jv-lcta { background: var(--jv-gunmetal); color: #fff; padding: 46px 0; }
.jv-lcta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; }
.jv-lcta h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 300; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .25em; padding: 0; }
.jv-lcta p { margin: 0; color: rgba(255,255,255,.8); font-size: 1rem; }
.jv-lcta .jv-btn--outline { border-color: rgba(255,255,255,.6); color: #fff !important; }
.jv-lcta .jv-btn--outline:hover { background: #fff; color: var(--jv-gunmetal) !important; }

/* ---------- mobile bottom sheet ---------- */
.jv-sheet__backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(27,31,57,.45); opacity: 0; transition: opacity .25s; }
.jv-sheet__backdrop.is-open { opacity: 1; }
.jv-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1041; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); transform: translateY(105%); transition: transform .26s ease; padding-bottom: env(safe-area-inset-bottom); }
.jv-sheet.is-open { transform: none; }
.jv-sheet__grab { width: 44px; height: 5px; border-radius: 3px; background: #d5d7da; margin: 10px auto 0; }
.jv-sheet__close { position: absolute; right: 12px; top: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); box-shadow: 0 1px 6px rgba(0,0,0,.18); font-size: 1.4rem; line-height: 1; color: var(--jv-gunmetal); cursor: pointer; padding: 0; }
.jv-sheet .jv-pcard__img { margin: 10px 14px 0; border-radius: 10px; overflow: hidden; }
.jv-sheet .jv-pcard__body { padding: 14px 18px 22px; }
.jv-sheet .jv-pcard__actions .jv-btn { padding: 1em 1em .85em; font-size: .78rem; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .jv-plan__grid { grid-template-columns: minmax(0, 1fr) 290px; }
    .jv-linfo__grid { grid-template-columns: 1fr 1fr; }
    .jv-linfo__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .jv-lhead { padding: 100px 0 34px; }
    .jv-lhead__grid { grid-template-columns: 1fr; gap: 26px; }
    .jv-plan__grid { grid-template-columns: 1fr; }
    .jv-plist-scroll { flex: none; max-height: 430px; }
    .jv-plan__viewport { max-height: 72vh; }
}
@media (max-width: 600px) {
    .jv-lhead h1 { font-size: 2.1rem; }
    .jv-lhead__lead { font-size: 1rem; }
    .jv-kpi { padding: 14px 12px 10px; }
    .jv-kpi b { font-size: 1.7rem; }
    .jv-kpi span { font-size: .66rem; letter-spacing: .08em; }
    .jv-plan { padding: 22px 0 44px; }
    .jv-plan__filters { gap: 8px; }
    .jv-plan__filters .jv-chip { padding: .65em .9em .5em; font-size: .78rem; }
    .jv-plan__viewport { max-height: 64vh; }
    .jv-plan__stage { border-radius: 12px; margin: 0 -6px; }
    .jv-linfo { padding: 40px 0; }
    .jv-linfo__grid { grid-template-columns: 1fr; }
    .jv-lcta__inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .jv-sheet, .jv-sheet__backdrop, .jv-pcard, .jv-shape polygon { transition: none; } }

/* ---------- header with aerial background (images set as CSS variables on the section) ---------- */
.jv-lhead--photo {
    --jv-lhead-shade: linear-gradient(90deg, rgba(27,31,36,.86) 0%, rgba(27,31,36,.66) 45%, rgba(27,31,36,.32) 100%), linear-gradient(180deg, rgba(27,31,36,.15) 0%, rgba(27,31,36,.55) 100%);
    position: relative; min-height: 400px; display: flex; align-items: flex-end; padding: 64px 0 44px; border-bottom: 0;
    background-color: var(--jv-gunmetal); background-repeat: no-repeat; background-size: cover; background-position: center, center, 62% 58%;
    background-image: var(--jv-lhead-shade), var(--jv-lhead-jpg-1280);
}
.jv-lhead--photo > .jv-wrap { width: 100%; }
.jv-lhead--photo .jv-eyebrow { color: #f2b97a; }
.jv-lhead--photo h1 { color: #fff; text-shadow: 0 1px 18px rgba(0,0,0,.25); }
.jv-lhead--photo .jv-lhead__sub { color: #d5dde8; }
.jv-lhead--photo .jv-lhead__lead { color: rgba(255,255,255,.92); }
.jv-lhead--photo .jv-btn--outline { border-color: rgba(255,255,255,.7); color: #fff !important; }
.jv-lhead--photo .jv-btn--outline:hover { background: #fff; color: var(--jv-gunmetal) !important; }
.jv-lhead--photo .jv-kpi { background: rgba(255,255,255,.94); border-color: transparent; }
.jv-lhead--photo .jv-kpi__note { color: rgba(255,255,255,.85); }
@media (min-width: 1500px), (min-width: 601px) and (min-resolution: 1.5dppx) {
    .jv-lhead--photo { background-image: var(--jv-lhead-shade), var(--jv-lhead-jpg-1728); }
}
@media (max-width: 900px) {
    .jv-lhead--photo { min-height: 0; padding: 56px 0 30px; background-position: center, 60% 55%;
        --jv-lhead-shade: linear-gradient(180deg, rgba(27,31,36,.55) 0%, rgba(27,31,36,.78) 55%, rgba(27,31,36,.9) 100%); }
}
@media (max-width: 600px) {
    .jv-lhead--photo { padding: 40px 0 26px; background-position: center, 58% 50%; background-image: var(--jv-lhead-shade), var(--jv-lhead-jpg-800); }
}
@media (max-width: 600px) and (min-resolution: 1.5dppx) {
    .jv-lhead--photo { background-image: var(--jv-lhead-shade), var(--jv-lhead-jpg-1280); }
}
