/* ARIACH: a Haifa floor of cement tiles. Phone first; the base CSS is the finished still. */

@font-face {
  font-family: 'Suez One';
  src: url('assets/suez-one.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Miriam Libre';
  src: url('assets/miriam-libre.woff') format('woff');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --cement: #d8dcd8;
  --cement-2: #c9cfca;
  --tile: #f0f0ea;
  --grout: #a9aca2;
  --ink: #1c1e1a;
  --ink-2: #474a43;
  --green: #1f4a3b;
  --green-deep: #15362b;
  --green-line: #2f5e4d;
  --on-green: #eef0e8;
  --on-green-2: #bccabe;
  --ochre: #d99a1e;
  --light: #f3d996;
  --oxblood: #8c3a28;
  --wa: #12833f;
  --wa-press: #0e6b33;
  --focus: #7a4f00;

  --tile-ground: var(--tile);
  --tile-a: var(--oxblood);
  --tile-b: var(--ochre);
  --tile-c: var(--green);

  --display: 'Suez One', 'Miriam Libre', Georgia, serif;
  --text: 'Miriam Libre', 'Segoe UI', system-ui, sans-serif;
  --gutter: 16px;
  --header-h: 60px;
  --grout-w: 3px;
  --measure: 34rem;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  background: var(--cement);
  color: var(--ink);
  font: 400 clamp(1.0625rem, 1rem + 0.25vw, 1.125rem)/1.6 var(--text);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
::selection { background: var(--light); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.num, bdi { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Hidden with a transform, never a large negative inset (that widens an RTL page). */
.skip {
  position: fixed; top: 8px; inset-inline-start: 8px; z-index: 50;
  padding: 10px 16px; background: var(--ink); color: var(--tile);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.icon { width: 22px; height: 22px; flex: none; }

/* ---------- buttons: square, like the tiles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border: 2px solid transparent; border-radius: 0;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.2; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-wa { background: var(--wa); color: #fff; }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-light { background: var(--tile); color: var(--ink); }
.btn-mark { background: var(--tile); border-color: var(--grout); color: var(--ink); min-height: 48px; padding: 0 16px; }
.btn-mark img { width: 22px; height: 22px; }
/* A control whose note is open wears the active colour as a ring. */
.btn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--cement), 0 0 0 6px var(--ochre); }
.sellers .btn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--green), 0 0 0 6px var(--ochre); }

/* The inline note that stands in for a contact fact the concept does not have. */
.kit-note {
  margin-top: 12px; padding: 12px 14px;
  background: var(--tile); border: 2px solid var(--ink);
  font-size: 1rem; line-height: 1.5; max-width: var(--measure);
  display: grid; gap: 8px;
}
.kit-note[hidden] { display: none; }
.kit-note q { display: block; font-weight: 600; quotes: none; }
.kit-note .note-close {
  justify-self: start; min-height: 44px; padding: 0 14px;
  background: none; border: 2px solid var(--ink); font-weight: 600;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: var(--cement);
  border-bottom: 1px solid var(--grout);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; min-height: 44px; }
.brand-tile { width: 30px; height: 30px; }
.brand-name { font-family: var(--display); font-size: 1.625rem; line-height: 1; }
.brand-agent { display: none; color: var(--ink-2); font-size: 0.9375rem; }
.lang-toggle, .menu-toggle {
  min-width: 44px; min-height: 44px; padding: 0 10px;
  background: none; border: 2px solid var(--ink); font-weight: 700; font-size: 0.9375rem;
}
.menu-toggle { display: grid; place-items: center; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav { order: 3; }
.nav-list {
  display: none; list-style: none; padding: 8px var(--gutter) 16px;
  position: absolute; inset-inline: 0; top: var(--header-h);
  background: var(--cement); border-bottom: 2px solid var(--ink);
}
.nav-list.open { display: grid; }
.nav-list a {
  display: flex; align-items: center; min-height: 52px;
  font-weight: 700; font-size: 1.25rem; text-decoration: none;
  border-bottom: 1px solid var(--grout);
}
.nav-list li:last-child a { border-bottom: 0; }

/* ---------- hero: the copy, then the floor of four neighbourhoods ---------- */
.hero { padding: 16px var(--gutter) 20px; display: grid; gap: 20px; }
.hero-title { font-size: clamp(2.55rem, 1.1rem + 6.6vw, 5.6rem); }
.hero-title span { display: block; }
.hero-lede { margin-top: 12px; max-width: var(--measure); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero .actions .btn-wa { flex: 1.5 1 auto; }
.hero .actions .btn-line { flex: 1 1 auto; }

.floor-title { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.floor-grid {
  list-style: none; padding: var(--grout-w);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--grout-w);
  background: var(--grout);
}
.floor-grid li { display: grid; }
/* The whole four-fold tile, then its plain border band with the name: the band never covers the motif. */
.floor-tile {
  position: relative; display: grid; grid-template-rows: auto auto; align-content: start; padding: 0;
  border: 0; background: var(--tile); text-align: start; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.floor-art { width: 100%; height: auto; aspect-ratio: 1; }
.floor-band {
  display: grid; gap: 0; padding: 6px 10px 8px;
  background: var(--tile); border-top: 2px solid var(--ink);
}
.floor-name { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.floor-count { font-size: 0.875rem; color: var(--ink-2); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Neighbourhood pigments: one palette per tile wherever the tile appears.
   Hadar uses the root palette (oxblood, ochre, green); the German Colony and Bat Galim share one. */
[data-hood="moshava"], [data-hood="batgalim"], #m-moshava, #m-batgalim, .swatch-moshava, .swatch-batgalim,
.chip:has(input[value="moshava"]), .chip:has(input[value="batgalim"]), .footer-tile { --tile-a: var(--green); --tile-b: var(--ochre); --tile-c: var(--ink); }
[data-hood="carmel"], #m-carmel, .swatch-carmel, .chip:has(input[value="carmel"]) { --tile-a: var(--ink); --tile-b: var(--green); --tile-c: var(--oxblood); }

/* ---------- the plan: a green field where rooms fill with light ---------- */
.plan-section { background: var(--green); color: var(--on-green); --focus: #e6a92a; }
.plan-section ::selection { background: var(--ochre); color: var(--ink); }
.plan-track { padding: 40px 0 48px; }
.plan-stage { display: grid; gap: 16px; }
.plan-head { padding: 0 var(--gutter); }
.section-title { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.6rem); }
.plan-lede { margin-top: 12px; max-width: var(--measure); color: var(--on-green); }
.plan-figure { display: grid; gap: 12px; }
.plan { position: relative; }
.plan-art { width: 100%; height: auto; overflow: visible; }
.plan-floor { fill: var(--green-deep); }
.plan-light { fill: var(--light); }
.plan-tiles { opacity: 0.55; }
#plan-tiles { --tile-ground: transparent; --tile-a: #c9862a; --tile-b: #e7b44c; --tile-c: #c9862a; }
.plan-grid { opacity: 0.8; }
.plan-gridline { fill: none; stroke: #d9b765; stroke-width: 0.25; }
.plan-wall { fill: var(--on-green); }
.plan-window { fill: var(--green); stroke: var(--on-green); stroke-width: 0.5; }
.plan-glass { stroke: var(--light); stroke-width: 0.7; }
.plan-rail { fill: none; stroke: var(--on-green); stroke-width: 1.1; }
.plan-leaf { stroke: var(--on-green); stroke-width: 1.2; stroke-linecap: square; }
.plan-swing { fill: none; stroke: var(--on-green); stroke-width: 0.5; stroke-dasharray: 1.4 1.1; }
.plan-pane { fill: var(--light); stroke: var(--on-green); stroke-width: 0.35; }
.plan-north path { fill: var(--light); }
.plan-labels { position: absolute; inset: 0; list-style: none; padding: 0; pointer-events: none; }
.plan-label {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 1px;
  padding: 3px 6px; background: var(--light); color: var(--ink);
  white-space: nowrap; text-align: center; line-height: 1.15;
}
.plan-label-name { font-weight: 700; font-size: clamp(0.8125rem, 0.62rem + 0.9vw, 1.0625rem); }
.plan-label-area { font-size: clamp(0.8125rem, 0.6rem + 0.8vw, 1rem); font-variant-numeric: tabular-nums; }
.plan-label-mark { background: none; color: var(--light); padding: 0; font-weight: 700; font-size: 0.875rem; }
.plan-runner { stroke: #b9822a; stroke-width: 0.3; }
.plan-caption { padding: 0 var(--gutter); display: grid; gap: 4px; font-size: 0.9375rem; color: var(--on-green-2); }
.plan-summary { font-family: var(--display); font-size: 1.3125rem; line-height: 1.25; color: var(--on-green); text-wrap: balance; }
.plan-beats { padding: 32px var(--gutter) 0; display: grid; gap: 20px; max-width: 40rem; }
.plan-note { color: var(--on-green-2); font-size: 0.9375rem; margin-bottom: 12px; }

/* ---------- listings: filters print their state, the map and the floor of cards agree ---------- */
.listings { padding: 48px var(--gutter) 56px; display: grid; gap: 20px; }
.notice { margin-top: 10px; color: var(--ink-2); font-size: 0.9375rem; max-width: var(--measure); }
.filters { display: grid; gap: 16px; }
.filters fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.filters legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 0.9375rem; }
.seg-row { display: flex; flex-wrap: wrap; gap: 0; border: 2px solid var(--ink); width: fit-content; max-width: 100%; }
.seg-row label { position: relative; display: flex; }
.seg-row label + label { border-inline-start: 2px solid var(--ink); }
.seg-row input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-row span {
  display: grid; place-items: center; min-width: 52px; min-height: 44px; padding: 0 14px;
  font-weight: 600; background: var(--tile); cursor: pointer;
}
.seg-row input:checked + span { background: var(--ochre); }
.seg-row input:focus-visible + span, .chip input:focus-visible + span, .select select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; position: relative; z-index: 1; }
.seg-rooms .seg-row { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; }
.seg-rooms .seg-row label { width: 100%; }
.seg-rooms .seg-row span { min-width: 0; width: 100%; padding: 0 6px; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.select { display: grid; gap: 4px; font-size: 0.875rem; color: var(--ink-2); }
.select select {
  min-height: 48px; width: 100%; padding: 0 12px; padding-inline-end: 34px;
  border: 2px solid var(--ink); border-radius: 0; background-color: var(--tile); color: var(--ink);
  font-size: 1rem; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231c1e1a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 12px 8px; background-position: left 12px center;
}
[dir="ltr"] .select select { background-position: right 12px center; }
.hood-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { position: relative; display: flex; }
.chip > span {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 6px 10px;
  border: 2px dashed var(--grout); background: transparent; color: var(--ink-2); cursor: pointer;
  font-weight: 600; font-size: 0.9375rem; line-height: 1.2;
}
.chip .swatch { width: 26px; height: 26px; flex: none; opacity: 0.45; }
.chip .tick { width: 18px; height: 18px; flex: none; margin-inline-start: auto; opacity: 0; }
.chip input:checked + span { border: 2px solid var(--ink); background: var(--tile); color: var(--ink); }
.chip input:checked + span .swatch { opacity: 1; }
.chip input:checked + span .tick { opacity: 1; }
.results { font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.3; text-wrap: balance; }

.listings-body { display: grid; gap: 20px; }
.map { display: grid; gap: 8px; }
.map-canvas { position: relative; aspect-ratio: 4 / 3; border: 2px solid var(--ink); background: var(--green); overflow: hidden; }
.map-art { width: 100%; height: 100%; }
.map-sea { fill: var(--green); }
.map-wave { fill: none; stroke: var(--green-line); stroke-width: 1.2; }
.map-land { fill: var(--cement-2); stroke: var(--ink); stroke-width: 1.4; }
.map-contours path { fill: none; stroke: var(--grout); stroke-width: 1; }
.map-hood { stroke: var(--ink); stroke-width: 1.4; }
.map-art pattern { --tile-ground: var(--tile); }
.map-text text { font: 700 12px var(--text); fill: var(--ink); paint-order: stroke; stroke: var(--cement-2); stroke-width: 4px; stroke-linejoin: round; }
.map-text .map-water { fill: var(--on-green); stroke: var(--green); font-weight: 600; }
.map-note { font-size: 0.875rem; color: var(--ink-2); }
.map-pick {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 12px;
  background: var(--tile); box-shadow: inset 0 0 0 3px var(--ochre);
}
.map-pick[hidden] { display: none; }
.map-pick-text { flex: 1; font-weight: 600; font-size: 0.9375rem; line-height: 1.35; }
.map-pick .btn { min-height: 44px; padding: 0 14px; flex: none; }
.map-pins { position: absolute; inset: 0; }
.pin {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0;
  display: grid; place-items: center; background: none; border: 0;
  -webkit-tap-highlight-color: transparent;
}
.pin[hidden] { display: none; }
.pin-mark {
  width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--tile); border: 2px solid var(--ink); transform: rotate(45deg);
}
.pin-num { transform: rotate(-45deg); font-weight: 700; font-size: 0.8125rem; line-height: 1; }
.pin[aria-pressed="true"] .pin-mark, .pin.is-hover .pin-mark { background: var(--ochre); transform: rotate(45deg) scale(1.2); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-mark { outline: 3px solid var(--focus); outline-offset: 3px; }

/* The cards are laid like tiles: grout lines between them, no gaps of ground. */
.cards { list-style: none; padding: var(--grout-w); display: grid; gap: var(--grout-w); background: var(--grout); }
.cards[hidden] { display: none; }
.card { position: relative; background: var(--tile); display: grid; }
.card[hidden] { display: none; }
.card-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cement-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: 14px; inset-inline-start: 14px;
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--tile); border: 2px solid var(--ink); transform: rotate(45deg);
}
.card-badge span { transform: rotate(-45deg); font-weight: 700; font-size: 0.9375rem; }
.card-body { display: grid; gap: 6px; padding: 14px 16px 18px; }
.card-hood { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--ink-2); font-weight: 600; }
.card-hood svg { width: 20px; height: 20px; }
.card-title { font: 700 1.1875rem/1.3 var(--text); }
.card-open { all: unset; cursor: pointer; }
.card-open::after { content: ''; position: absolute; inset: 0; }
.card-open:focus-visible { outline: none; }
.card:has(.card-open:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; z-index: 1; }
.card-meta { font-size: 0.9375rem; color: var(--ink-2); }
.card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 4px; }
.card-price strong { font: 400 1.5rem/1.1 var(--display); }
.card-ill { font-size: 0.8125rem; color: var(--ink-2); }
.card.is-lit { box-shadow: inset 0 0 0 4px var(--ochre); }
.card.is-lit .card-badge { background: var(--ochre); }

.empty { padding: 28px 20px; background: var(--tile); border: 2px dashed var(--ink); display: grid; gap: 10px; justify-items: start; }
.empty[hidden] { display: none; }
.empty-title { font: 400 1.5rem/1.2 var(--display); }

/* ---------- sellers ---------- */
.sellers { background: var(--green); color: var(--on-green); padding: 56px var(--gutter); display: grid; gap: 24px; --focus: #e6a92a; }
.sellers-copy p { margin-top: 12px; max-width: var(--measure); }
.sellers-list { list-style: none; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--green-line); }
.sellers-list li {
  position: relative; padding: 14px 0; padding-inline-start: 28px;
  border-bottom: 1px solid var(--green-line); font-size: 1.0625rem;
}
.sellers-list li::before {
  content: ''; position: absolute; inset-inline-start: 2px; top: 1.3em;
  width: 8px; height: 8px; background: var(--on-green-2);
}
.sellers .kit-note { color: var(--ink); }

/* ---------- contact ---------- */
.contact { padding: 56px var(--gutter) 64px; display: grid; gap: 12px; }
.contact-lede { color: var(--ink-2); }
.contact-grid { display: grid; gap: 22px; margin-top: 16px; }
.contact-group { display: grid; gap: 8px; }
.contact-main { grid-template-columns: 1fr 1fr; }
.contact-label { font-weight: 700; font-size: 0.9375rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-row .btn { flex: 1 1 auto; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-deep); color: var(--on-green); padding: 40px var(--gutter) 48px; display: grid; gap: 12px; --focus: #e6a92a; }
.footer-tile { width: 36px; height: 36px; }
.site-footer p { max-width: 40rem; font-size: 0.9375rem; }
.footer-small { color: var(--on-green-2); }
.footer-top { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; width: fit-content; }

/* ---------- the listing sheet (native dialog) ---------- */
.sheet {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0;
  border: 0; background: var(--cement); color: var(--ink); overflow-y: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(21, 54, 43, 0.72); }
.sheet-bar {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end;
  padding: 8px var(--gutter); background: var(--cement); border-bottom: 1px solid var(--grout);
}
.sheet-close { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 2px solid var(--ink); }
.sheet-grid { display: grid; }
.gallery { display: grid; gap: 8px; padding-bottom: 8px; }
.gallery-frame { aspect-ratio: 4 / 3; background: var(--cement-2); overflow: hidden; }
.gallery-frame img { width: 100%; height: 100%; object-fit: cover; }
.gallery-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); }
.gallery-step { width: 48px; height: 48px; display: grid; place-items: center; background: var(--tile); border: 2px solid var(--ink); }
[dir="rtl"] .icon-prev { transform: scaleX(-1); }
[dir="ltr"] .icon-next { transform: scaleX(-1); }
.gallery-count { font-size: 0.9375rem; font-weight: 600; }
.thumbs { list-style: none; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumbs button { display: block; width: 100%; padding: 0; border: 2px solid transparent; background: none; aspect-ratio: 4 / 3; overflow: hidden; min-height: 44px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs button[aria-current="true"] img { opacity: 1; }
.credit { padding: 0 var(--gutter); font-size: 0.8125rem; color: var(--ink-2); }
.sheet-body { padding: 16px var(--gutter) 32px; display: grid; gap: 10px; align-content: start; }
.sheet-hood { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); font-size: 0.9375rem; }
.sheet-hood svg { width: 22px; height: 22px; }
.sheet-title { font: 400 clamp(1.75rem, 1.3rem + 2vw, 2.5rem)/1.1 var(--display); text-wrap: balance; }
.sheet-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sheet-price > span:first-child { font: 400 1.75rem/1.1 var(--display); }
.sheet-ill { font-size: 0.875rem; color: var(--ink-2); }
.sheet-text { max-width: var(--measure); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--ink); margin-top: 6px; }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--grout); display: grid; gap: 2px; }
.facts div:nth-child(odd) { padding-inline-end: 12px; }
.facts dt { font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; }
.facts dd { font-weight: 700; }
.sheet-action { display: grid; gap: 6px; margin-top: 8px; }
.sheet-action .actions { margin-top: 0; }
.sheet-action .btn-wa { width: 100%; }
.sheet-small { font-size: 0.8125rem; color: var(--ink-2); }
html.sheet-open { overflow: hidden; }

/* ---------- wider screens ---------- */
@media (min-width: 600px) {
  :root { --gutter: 28px; }
  .brand-agent { display: inline; }
  .hood-row { grid-template-columns: repeat(4, minmax(0, auto)); }
  .cards { grid-template-columns: 1fr 1fr; }
  .contact-main { grid-template-columns: repeat(2, minmax(0, 260px)); }
}

/* Tablet: the four tiles lie in one row, so the floor does not push the plan off the first screens. */
@media (min-width: 600px) and (max-width: 899px) {
  .floor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .floor-name { font-size: 0.9375rem; }
}

@media (min-width: 900px) {
  :root { --gutter: 40px; --header-h: 68px; }
  .menu-toggle { display: none; }
  .nav { order: 0; }
  .nav-list { display: flex; position: static; padding: 0; gap: 4px; background: none; border: 0; }
  .nav-list a { min-height: 44px; padding: 0 12px; font-family: var(--text); font-size: 1rem; font-weight: 600; border: 0; }
  .nav-list a:hover { text-decoration: underline; }
  .site-header { gap: 16px; }

  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center;
    gap: 56px; padding-top: 56px; padding-bottom: 72px; max-width: 1360px; margin: 0 auto;
  }
  .floor { max-width: 560px; justify-self: end; width: 100%; }
  .hero .actions .btn-wa, .hero .actions .btn-line { flex: 0 0 auto; }

  .plan-track {
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto 1fr; column-gap: 56px;
    max-width: 1360px; margin: 0 auto; padding: 72px var(--gutter);
  }
  .plan-head { grid-column: 1; grid-row: 1; padding: 0; }
  .plan-pin { grid-column: 2; grid-row: 1 / span 2; }
  .plan-stage { align-content: start; }
  .plan-figure { width: min(100%, calc((100svh - var(--header-h) - 170px) * 0.7826)); justify-self: center; }
  .plan-caption { padding: 0; }
  .plan-beats { grid-column: 1; grid-row: 2; padding: 40px 0 0; align-content: start; }

  .listings { max-width: 1360px; margin: 0 auto; padding-top: 72px; padding-bottom: 80px; }
  .filters { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 24px 32px; }
  .filters .hoods { grid-column: 1 / -1; }
  .listings-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 32px; }
  .map-wrap { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 16px); }
  .results-col { grid-column: 1; grid-row: 1; }

  .sellers { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; padding: 80px max(var(--gutter), calc((100% - 1280px) / 2)); }
  .sellers-list { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .sellers-action { grid-column: 1; }

  .contact { max-width: 1360px; margin: 0 auto; padding-top: 80px; padding-bottom: 88px; }
  .contact-grid { grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 32px; }
  .contact-main { grid-template-columns: auto auto; }
  .site-footer { padding-inline: max(var(--gutter), calc((100% - 1280px) / 2)); }

  .sheet {
    width: min(1040px, calc(100% - 64px)); height: auto; max-height: calc(100% - 64px);
    margin: auto; border: 2px solid var(--ink);
  }
  .sheet-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .gallery { padding: 0 0 20px; }
  .sheet-body { padding: 4px 28px 28px; }
}

/* ---------- the plan is pinned only while the scroll controller runs ---------- */
/* The pin travel is a spacer inside the pin box: sticky never travels into padding. */
html[data-motion="on"] .plan-pin::after { content: ""; display: block; height: 45svh; }
html[data-motion="on"] .plan-stage { position: sticky; top: var(--stage-top, var(--header-h)); }
html[data-motion="on"] .plan-light { will-change: clip-path; }
@media (min-width: 900px) {
  html[data-motion="on"] .plan-pin::after { display: none; }
  html[data-motion="on"] .plan-beats { padding-bottom: 60svh; gap: 34svh; padding-top: 4svh; }
  html[data-motion="on"] .plan-stage { top: calc(var(--header-h) + 24px); }
}
@media (max-height: 560px) {
  html[data-motion="on"] .plan-pin::after { display: none; }
  html[data-motion="on"] .plan-stage { position: static; }
}

/* ---------- motion: responses to touch, the sheet opening. Nothing moves under reduce. ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .seg-row span, .chip > span, .floor-tile, .pin, .gallery-step, .sheet-close, .thumbs button, .lang-toggle, .menu-toggle {
    transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
  }
  .btn:active, .seg-row label:active span, .chip:active > span, .gallery-step:active, .sheet-close:active, .lang-toggle:active, .menu-toggle:active { transform: scale(0.97); }
  .floor-tile:active { transform: scale(0.98); }
  .pin-mark { transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease-out; }
  .card { transition: box-shadow 200ms ease-out; }
  .card-badge { transition: background-color 200ms ease-out; }
  .thumbs img { transition: opacity 160ms ease-out; }
  .chip .swatch, .chip .tick { transition: opacity 160ms ease-out; }
  /* Toggles: transitions with a starting style, so a second tap retargets instead of restarting. */
  .kit-note, .nav-list { transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1), transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
  @starting-style {
    .kit-note:not([hidden]), .nav-list.open { opacity: 0; transform: translateY(-6px); }
  }
  .sheet[open] { animation: sheet-in 260ms cubic-bezier(0.23, 1, 0.32, 1); }
  .sheet[open]::backdrop { animation: fade-in 260ms ease-out; }
  @media (hover: hover) and (pointer: fine) {
    .btn-wa:hover { background: var(--wa-press); }
    .btn-line:hover, .btn-mark:hover { border-color: var(--ink); background: var(--tile); }
    .floor-tile:hover .floor-band { background: var(--light); }
    .floor-band { transition: background-color 160ms ease-out; }
    .card-photo img { transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1); }
    .card:hover .card-photo img { transform: scale(1.03); }
    .seg-row span:hover { background: var(--light); }
    .seg-row input:checked + span:hover { background: var(--ochre); }
  }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } }
  @keyframes fade-in { from { opacity: 0; } }
}

/* Reduced motion: fewer and gentler, not none. Opacity only, nothing travels. */
@media (prefers-reduced-motion: reduce) {
  .sheet[open], .sheet[open]::backdrop { animation: fade-only 160ms ease-out; }
  @keyframes fade-only { from { opacity: 0; } }
}
