/* LP — site-wide components. Extracted from base.html inline styles (2026-07-07
   redesign) and extended with the HelpRent donor's patterns: wider container,
   two-column hero, sidebar filters, card polish, mobile tabbar. Colors and
   fonts come exclusively from tokens.css. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.fr { font-family: var(--serif); }
.mo { font-family: var(--mono); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.14;
  margin: 0 0 .4em;
  color: var(--ink);
}
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 500; }

main { max-width: var(--maxw); margin: 0 auto; padding: 22px var(--pad-x); }
main.full { max-width: none; padding: 0; }
main.w-home { max-width: var(--maxw-home); }   /* v3 home content */
main.w-cat  { max-width: var(--maxw-cat); }    /* catalog grid */

a { color: var(--clay); text-decoration: none; }
a:hover { color: var(--clay-d); }
.muted { color: var(--muted); font-size: .9rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--acc);
}
.section-h {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--clay-d); margin: 0 0 14px;
}
.section-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- nav (v3: light paper, sticky, hairline) --------------------- */
.nav {
  background: var(--bg); border-bottom: 1px solid var(--line);
  /* Above Leaflet's panes/controls (up to 1000) so maps never cover the header. */
  position: sticky; top: 0; z-index: 1100;
}
.nav-in {
  max-width: var(--maxw-home); margin: 0 auto; padding: 15px var(--pad-x);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.brand {
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--ink);
  letter-spacing: -.01em; display: flex; align-items: baseline; gap: 11px;
}
.brand-sub {
  font-family: var(--mono); font-weight: 400; font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.nav-r { display: flex; align-items: center; gap: 28px; font-size: .875rem; font-weight: 500; flex-wrap: wrap; justify-content: flex-end; }
.nav-r a { color: var(--ink); }
.nav-r a:hover { color: var(--clay); }
.nav-r a.on { color: var(--clay); border-bottom: 2px solid var(--acc2); padding-bottom: 2px; }
.lang { color: var(--muted); font-family: var(--mono); font-size: .78rem; }
.lang a { color: var(--muted); }
.lang b { color: var(--ink); font-weight: 500; }
.theme-tgl { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; line-height: 0; border-radius: var(--r-s); display: inline-flex; align-items: center; vertical-align: middle; }
.theme-tgl:hover { color: var(--ink); background: var(--sand); }
.theme-tgl .ic-light { display: none; }
:root[data-theme="dark"] .theme-tgl .ic-dark { display: none; }
:root[data-theme="dark"] .theme-tgl .ic-light { display: inline; }
.nav-signin { background: var(--ink); color: var(--bg) !important; padding: 9px 20px; border-radius: var(--r-pill); }
.nav-signin:hover { background: var(--ink-deep); color: var(--bg) !important; }
.nav-cta { background: var(--clay); color: #fff !important; padding: 7px 14px; border-radius: var(--r-pill); font-size: .86rem; }
.nav-cta:hover { background: var(--clay-d); }

/* ---- mobile bottom tabbar (HRP pattern) ------------------------- */
.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1150;
    background: var(--chrome); border-top: 1px solid rgba(241, 230, 212, .12);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    flex: 1; background: none; border: 0; color: var(--on-chrome-2);
    font: inherit; font-size: .72rem; text-align: center; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0;
  }
  .tabbar .ti { font-size: 1.15rem; line-height: 1; }
  .tabbar a:hover, .tabbar button:hover { color: var(--on-chrome); }
  body { padding-bottom: 64px; }
  #mai-fab { right: 16px; bottom: 74px; }
  #mai-panel { bottom: 148px; right: 16px; }
}
@media (max-width: 700px) { #mai-hello { display: none !important; } }

/* ---- cards & grid (v3 card recipe) -------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 18px; }
.card {
  border: 0; border-radius: 16px; overflow: hidden; background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease3), box-shadow .35s var(--ease3);
  display: block;
}
.card:hover { transform: translateY(-7px) rotate(-.3deg); box-shadow: var(--shadow-card-h); }
.card .imgwrap { position: relative; aspect-ratio: 16/11; background: var(--sand); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 13px 15px 15px; }
.card .price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .usd {
  font-family: var(--display); font-weight: 700; font-size: 1.3125rem;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.card .usd.askp { font-size: 1rem; font-weight: 600; }
.card .usd .permo { font-size: .72rem; font-weight: 500; color: var(--ink3); font-family: var(--sans); }
.card .vnd { font-size: .72rem; color: var(--ink3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card h3 { font-family: var(--sans); font-weight: 400; font-size: .86rem; color: var(--ink2); margin: 3px 0 0; }
.card .src { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .75rem; color: var(--acc); font-weight: 500; }
.card .src .dot { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--acc2); flex: none; }
.pill.feat { background: var(--acc2); color: #241F14; font-weight: 500; }
.pill {
  position: absolute; left: 9px; top: 9px; background: color-mix(in srgb, var(--card) 92%, transparent); color: var(--ink);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 7px;
}
.pill.r { right: 9px; left: auto; }
.pill.term { background: rgba(168, 68, 46, .92); color: #fff; }
.price { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---- prose content pages (safety, sources) ------------------------- */
.prose { max-width: 720px; }
.prose h2.h-sub, h2.h-sub {
  font-family: var(--display); font-weight: 700; font-size: 1.5rem;
  letter-spacing: -.01em; line-height: 1.1; margin: 32px 0 10px; color: var(--ink);
}
.prose ul { line-height: 1.75; color: var(--ink2); padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose p { color: var(--ink2); line-height: 1.7; }

/* ---- page header (v3): shared by app/content pages without a bespoke mockup */
.hero { background: var(--panel); border: 0; border-radius: 20px; padding: 40px 36px; margin: 8px 0 30px; }
.hero .eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.hero h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  letter-spacing: -.02em; line-height: 1.05; margin: 12px 0 10px; max-width: 20ch;
}
.hero h1 em { color: var(--clay); font-style: normal; font-family: var(--serif); font-weight: 600; }
.hero p { color: var(--ink2); max-width: 52ch; margin: 0; font-size: 1.02rem; }

/* ---- home hero, two columns (HRP home_v2 pattern) ----------------- */
.hero2 {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center;
  padding: 44px 0 30px;
}
.hero2 h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.04; max-width: 15ch; margin: 12px 0 10px; }
.hero2 h1 em { color: var(--clay); font-style: normal; }
.hero2 .sub { color: var(--ink2); font-size: 1.06rem; max-width: 46ch; margin: 0 0 18px; }
.heroimgs { position: relative; min-height: 340px; }
.heroimgs .ph {
  position: absolute; border-radius: var(--r-l); object-fit: cover;
  border: 1px solid var(--line); box-shadow: var(--shadow-m); background: var(--sand);
}
.heroimgs .ph1 { width: 62%; aspect-ratio: 4/3; right: 0; top: 0; }
.heroimgs .ph2 { width: 46%; aspect-ratio: 1/1; left: 0; bottom: 24px; }
.heroimgs .ph3 { width: 34%; aspect-ratio: 4/3; right: 8%; bottom: 0; }
.herostat {
  position: absolute; left: 4%; top: 12%; z-index: 2;
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 8px 15px; font-family: var(--mono); font-size: .78rem; color: var(--ink2);
  box-shadow: var(--shadow-s);
}

/* ---- big search bar + quick chips --------------------------------- */
.searchbar {
  display: flex; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 8px; box-shadow: var(--shadow-s);
  transition: box-shadow var(--dur) var(--ease);
}
.searchbar:focus-within { box-shadow: var(--focus); }
.searchbar input {
  flex: 1; border: 0; outline: none; background: none;
  font: inherit; font-size: 1.02rem; color: var(--ink); padding: 8px 10px; min-width: 0;
}
.searchbar .mapbtn {
  border: 0; background: none; font-size: 1.2rem; padding: 0 6px; cursor: pointer;
  opacity: .7; transition: opacity var(--dur) var(--ease); align-self: center;
}
.searchbar .mapbtn:hover { opacity: 1; }
/* bespoke ink-outlined search bar (catalog + services), mockup Catalog:48-54 */
.searchbar-box {
  border: 2px solid var(--ink); border-radius: 15px; padding: 6px 6px 6px 18px;
  box-shadow: 6px 6px 0 rgba(58, 69, 47, .08); max-width: 880px; background: var(--card);
}
.searchbar-box:focus-within { box-shadow: 6px 6px 0 rgba(58, 69, 47, .08); }
.searchbar-box .btn { padding: 12px 26px; border-radius: 10px; font-size: .95rem; }
.mapbtn-box {
  border: 1.5px solid var(--line); border-radius: 10px; width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; background: var(--bg); color: var(--ink); cursor: pointer; padding: 0;
  transition: border-color var(--dur) var(--ease);
}
.mapbtn-box:hover { border-color: var(--ink); }
.qchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.qchip {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink2);
  border-radius: var(--r-pill); padding: 6px 13px; font-size: .84rem; cursor: pointer; font-family: inherit;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.qchip:hover { border-color: var(--clay); color: var(--clay-d); }

/* ---- home: steps + duo teasers -------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0 0 34px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.step .n {
  font-family: var(--mono); color: var(--clay); border: 1px solid var(--line); border-radius: var(--r-pill);
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; margin-bottom: 8px; background: var(--bg);
}
.step h3 { font-size: 1.02rem; margin: 0 0 4px; }
.step p { color: var(--ink2); font-size: .92rem; margin: 0; line-height: 1.5; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 8px; }
.duo-c {
  display: block; background: var(--sand); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 20px 22px; color: var(--ink);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.duo-c:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); color: var(--ink); }
.duo-c h3 { margin: 6px 0 4px; }
.duo-c p { color: var(--ink2); font-size: .92rem; margin: 0; }
@media (max-width: 700px) { .duo { grid-template-columns: 1fr; } }

/* ---- filters + form inputs (v3) ------------------------------------ */
.chip { border: 1.5px solid var(--line); background: var(--card); color: var(--ink2); border-radius: var(--r-pill); padding: 6px 13px; font-size: .82rem; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.filters input, .filters select,
form.stack input, form.stack select, form.stack textarea {
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card);
  font-family: inherit; font-size: .95rem; color: var(--ink); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.filters input:focus, .filters select:focus,
form.stack input:focus, form.stack select:focus, form.stack textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: var(--focus);
}
form.stack label { font-weight: 500; }

/* search page: sidebar + results (v3: bare groups on paper, mobile drawer) */
.searchgrid { display: grid; grid-template-columns: 262px 1fr; gap: 28px; align-items: start; }
.searchgrid > * { min-width: 0; }  /* same grid-blowout guard as .detail */
.sidebar { position: sticky; top: 78px; }
.fdrawer > summary {
  /* R6: filters are secondary — the drawer starts closed on every viewport,
     so the toggle is always visible. */
  display: block; list-style: none; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 10px; background: var(--card);
  padding: 10px 16px; font-weight: 500; font-size: .92rem; margin-bottom: 14px;
}
.fdrawer > summary::-webkit-details-marker { display: none; }
.sidebar .fgroup { padding: 11px 0; }
.sidebar .fgroup:first-of-type { padding-top: 2px; }
.sidebar .flabel { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.sidebar select, .sidebar input[type="number"], .sidebar input[type="date"] {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); font: inherit; font-size: .92rem; color: var(--ink);
}
.sidebar .row2 { display: flex; gap: 8px; }
.sidebar .check { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink2); margin: 5px 0; border-radius: 9px; }
.sidebar .check input { accent-color: var(--ink); width: 15px; height: 15px; }
.termchips { display: flex; gap: 6px; }
.termchips label {
  flex: 1; text-align: center; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 6px 4px; font-size: .82rem; font-weight: 500; color: var(--ink2); cursor: pointer; background: var(--card);
}
.termchips input { display: none; }
.termchips input:checked + span { color: var(--bg); }
.termchips label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.savecard { background: var(--panel); border-radius: 14px; padding: 14px 16px; margin-top: 6px; }
.savecard .btn.sm { width: 100%; }
.count-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; }
.count-h h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-size: clamp(1.9rem, 5.5vw, 2.375rem); margin: 0; line-height: 1; }
.cat-meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .03em; margin: 0 0 18px; }
.bbook-cross {
  margin-top: 34px; background: var(--ink-deep); border-radius: 16px; padding: 22px 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--bg);
}
.bbook-cross .t { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.bbook-cross .s { font-size: .82rem; color: var(--on-chrome-2); margin-top: 4px; }
.bbook-cross .go { border: 1.5px solid rgba(201, 151, 46, .6); color: var(--on-dark); border-radius: 10px; padding: 10px 20px; font-size: .86rem; font-weight: 500; white-space: nowrap; }
.bbook-cross .go:hover { background: rgba(201, 151, 46, .18); color: var(--on-dark); }
@media (max-width: 900px) {
  .searchgrid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .bbook-cross { flex-direction: column; align-items: flex-start; }
}

/* ---- buttons -------------------------------------------------------- */
.btn {
  display: inline-block; background: var(--clay); color: #fff; padding: 11px 18px;
  border-radius: 11px; border: 0; font-size: 1rem; font-family: inherit; font-weight: 500; cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.btn:hover { background: var(--clay-d); color: #fff; }
.btn.ghost { background: var(--paper); color: var(--ink2); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--sand); color: var(--ink); }
.btn.sm { padding: 8px 14px; font-size: .9rem; }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.ink:hover { background: var(--ink-deep); color: var(--bg); }

/* ---- view tabs (list/map) ------------------------------------------- */
.viewtabs { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; margin: 0 0 16px; background: var(--card); }
.vt { background: none; border: 0; padding: 8px 18px; font: inherit; font-size: .86rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.vt.on { background: var(--ink); color: var(--bg); }

/* map popup card (catalog + residences maps) */
.mp { display: flex; gap: 10px; width: 228px; text-decoration: none; }
.mp img { width: 74px; height: 60px; object-fit: cover; border-radius: 8px; flex: none; }
.mp strong { display: block; color: var(--ink); font-size: .98rem; }
.mp-a { color: var(--muted); font-size: .82rem; margin: 2px 0; }
.mp-p { color: var(--clay-d); font-weight: 600; font-size: .9rem; }
.leaflet-popup-content { margin: 9px 11px; }
.mapnote { color: var(--muted); font-size: .78rem; margin: 8px 2px 0; }

/* ---- gallery / photo strip ------------------------------------------ */
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.gallery img { height: 300px; border-radius: 12px; scroll-snap-align: start; }

/* ---- detail page: content + sticky contact rail ---------------------- */
.detail { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.detail > * { min-width: 0; }  /* let the gallery scroll instead of blowing the grid out */
.dside {
  position: sticky; top: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 18px; box-shadow: var(--shadow-s);
}
.dside .contacts { margin: 10px 0 0; }
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .dside { position: static; }
  .gallery img { height: 220px; }
}

/* ---- contact buttons -------------------------------------------------- */
.contacts { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.cbtn { display: inline-block; padding: 10px 16px; border-radius: 11px; font-size: .95rem; font-weight: 500; color: #fff; }
.cbtn:hover { color: #fff; filter: brightness(1.06); }
.cbtn.wa { background: var(--wa); color: #073b23; }
.cbtn.zalo { background: var(--zalo); }
.cbtn.tg { background: var(--tg); }
.cbtn.call { background: var(--jade); color: #fff; }
.cbtn.src { background: var(--paper); color: var(--ink2); border: 1px solid var(--line); }
.cbtn.try { background: var(--paper); color: var(--ink2); border: 1px solid var(--line); font-weight: 400; }
.cbtn.try:hover { color: var(--ink); }

/* Active-filter count on the collapsed drawer (R6) */
.fdrawer summary .fcount { display: inline-block; min-width: 20px; text-align: center; background: var(--clay); color: #fff; border-radius: 999px; font-size: .74rem; padding: 2px 6px; margin-left: 4px; }

/* Mai map-screenshot upload card (R6) */
.mai-upload-btn { display: inline-block; background: var(--clay); color: #fff; border-radius: 10px; padding: 9px 15px; font-size: .92rem; font-weight: 500; cursor: pointer; }
.mai-upload-btn:hover { filter: brightness(1.07); }

/* Read-only preview of the prefilled contact message (R6) */
.prefill-prev { background: var(--sand); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; margin: 12px 0 0; }
.prefill-prev .pp-l { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.prefill-prev .pp-t { font-size: .88rem; color: var(--ink2); margin: 0 0 8px; line-height: 1.55; }
.prefill-prev .pp-copy { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: var(--ink2); font: inherit; font-size: .82rem; padding: 5px 12px; cursor: pointer; }
.prefill-prev .pp-copy:hover { color: var(--ink); }
.prefill-prev .pp-n { font-size: .76rem; margin: 8px 0 0; }

/* ---- forms / messages -------------------------------------------------- */
form.stack label { display: block; margin: 12px 0 4px; font-weight: 500; }
form.stack input, form.stack select, form.stack textarea { width: 100%; }
.msg { padding: 11px 15px; border-radius: 12px; margin: 8px 0; font-size: .92rem; border: 1px solid transparent; }
.msg.success { background: color-mix(in srgb, var(--ok) 14%, var(--card)); border-color: color-mix(in srgb, var(--ok) 45%, var(--card)); color: color-mix(in srgb, var(--ok) 72%, var(--ink)); }
.msg.error { background: color-mix(in srgb, var(--bad) 14%, var(--card)); border-color: color-mix(in srgb, var(--bad) 45%, var(--card)); color: color-mix(in srgb, var(--bad) 72%, var(--ink)); }
.msg.warning { background: color-mix(in srgb, var(--warn) 16%, var(--card)); border-color: color-mix(in srgb, var(--warn) 50%, var(--card)); color: color-mix(in srgb, var(--warn) 74%, var(--ink)); }
.errorlist { color: var(--clay-d); font-size: .85rem; }
/* Floating toast for AJAX flows (search fallback, map errors) — .msg needs a page load. */
.lp-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 1250;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 16px; font-size: .88rem; max-width: min(420px, 88vw); box-shadow: var(--shadow-l);
  opacity: 1; transition: opacity .4s;
}
.lp-toast.out { opacity: 0; }

/* ---- footer (v3: full-bleed ink spread, single row) ------------------------ */
footer {
  max-width: none; margin: 56px 0 0; padding: 0;
  background: var(--ink-deep); color: var(--on-chrome-2); font-size: .82rem;
}
.foot-in { max-width: var(--maxw-home); margin: 0 auto; padding: 40px var(--pad-x) 30px; }
footer a { color: #E0DCCB; }
footer a:hover { color: var(--on-dark); }
.foot-row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.foot-brand { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--on-dark); }
.foot-brand:hover { color: var(--on-dark); }
.foot-links { display: flex; gap: 28px; font-size: .84rem; font-weight: 500; flex-wrap: wrap; align-items: baseline; }
.foot-lang { font-family: var(--mono); font-size: .72rem; color: #9BA08D; }
.foot-legal {
  color: #8A8F7C; font-size: .72rem; line-height: 1.6; max-width: 100ch;
  border-top: 1px solid rgba(250, 247, 239, .12); padding-top: 16px; margin: 22px 0 0;
}

/* ---- Mai chat widget (v3: round M + greeting bubble) ----------------------- */
#mai-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 1200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
#mai-hello {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 4px 16px;
  padding: 12px 16px; font-size: .84rem; color: var(--ink); max-width: 250px;
  box-shadow: 0 18px 40px -18px rgba(40, 40, 20, .45);
}
#mai-hello .mono { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
#mai-bubble {
  width: 60px; height: 60px; border-radius: var(--r-pill); background: var(--acc); color: #fff; border: 2px solid var(--acc);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.55rem; cursor: pointer;
  box-shadow: 0 16px 34px -12px rgba(168, 68, 46, .65); animation: v3-float 5s ease-in-out infinite;
  transition: transform .2s; padding: 0; overflow: hidden;
}
#mai-bubble img { width: 100%; height: 100%; border-radius: var(--r-pill); object-fit: cover; display: block; }
#mai-bubble:hover { transform: scale(1.08); }
#mai-panel {
  position: fixed; right: 26px; bottom: 96px; width: min(380px, 92vw); height: min(540px, 72vh);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
  display: none; flex-direction: column; overflow: hidden; z-index: 1200; box-shadow: var(--shadow-l);
}
#mai-panel.open { display: flex; }
#mai-head { background: var(--chrome); color: var(--on-chrome); padding: 9px 14px; display: flex; align-items: center; gap: 10px; }
#mai-head .mai-ava { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
#mai-head .mai-name { display: block; font-family: var(--serif); font-weight: 600; line-height: 1.25; }
#mai-head .mai-sub { display: block; font-size: .68rem; font-weight: 400; opacity: .82; line-height: 1.35; }
#mai-head .mai-sub a { color: inherit; text-decoration: underline; }
#mai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mai-m { max-width: 85%; padding: 8px 11px; border-radius: 13px; font-size: .92rem; white-space: pre-wrap; }
.mai-u { align-self: flex-end; background: var(--clay); color: #fff; }
.mai-a { align-self: flex-start; background: var(--sand); color: var(--ink); }
.mai-card { align-self: flex-start; border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; font-size: .88rem; max-width: 90%; background: var(--card); }
.mai-card img { width: 100%; border-radius: 8px; margin-bottom: 6px; display: block; aspect-ratio: 16/10; object-fit: cover; }
.mai-card a { font-weight: 500; color: var(--clay); }
.mai-card .mc-t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mai-card .mc-match { font-family: var(--mono); font-size: .74rem; color: var(--jade); border: 1px solid var(--jade); border-radius: 10px; padding: 0 6px; white-space: nowrap; }
.mai-card .mc-price { font-family: var(--mono); font-weight: 600; margin-top: 2px; }
.mai-card .mc-why { color: var(--jade); font-size: .82rem; margin-top: 3px; }
#mai-rails { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.mai-rail { border: 1px solid var(--clay); color: var(--clay); background: var(--paper); border-radius: 14px; padding: 4px 10px; font-size: .82rem; cursor: pointer; }
#mai-form { display: flex; border-top: 1px solid var(--line); }
#mai-input { flex: 1; border: 0; padding: 11px; font-size: .95rem; outline: none; font-family: inherit; background: var(--paper); color: var(--ink); }
#mai-send { border: 0; background: var(--clay); color: #fff; padding: 0 16px; cursor: pointer; font-family: inherit; }

/* ---- home redesign 2026-07-10: sprite icons, tools, Mai band, teasers ------- */
.ic { width: 22px; height: 22px; color: var(--clay); flex: none; }
svg.ti { width: 20px; height: 20px; }

.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 4px 0 36px; }
.tool {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 18px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.tool h3 { font-size: 1.05rem; margin: 2px 0 0; }
.tool p { margin: 0; color: var(--ink2); font-size: .9rem; line-height: 1.5; }
.mapshot { width: 118px; height: auto; border-radius: 10px; box-shadow: var(--shadow-s); }

.mai-band {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center;
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 26px 28px; margin: 0 0 36px;
}
.mai-band h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 6px 0 14px; }
.mai-feat { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.mai-feat .ic { margin-top: 2px; width: 19px; height: 19px; }
.mai-feat p { margin: 0; color: var(--ink2); font-size: .95rem; }
.mai-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.mai-demo {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-s);
}
.mai-demo .mai-m { font-size: .88rem; }
.mai-demo .mai-card { align-self: stretch; max-width: none; }

.band {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 20px 22px; margin: 0 0 36px; color: var(--ink);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.band:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); color: var(--ink); }
.band h3 { margin: 6px 0 4px; }
.band p { margin: 0; color: var(--ink2); font-size: .92rem; }
.band .ic.big { width: 44px; height: 44px; color: var(--jade); opacity: .8; }

.svc-band {
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-l);
  padding: 24px 26px; margin: 0 0 36px;
}
.svc-band h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 6px 0 6px; }
.svc-sub { color: var(--ink2); font-size: .95rem; max-width: 62ch; margin: 0 0 4px; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.svc { border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg); color: var(--ink2); padding: 6px 13px; font-size: .84rem; }

.step .ic { margin-bottom: 8px; }
.why-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 36px; }
.why {
  display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: .76rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink2);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.why .ic { width: 16px; height: 16px; color: var(--jade); }

.emptystate { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-l); padding: 20px 22px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.noimg { position: relative; }
.noimg .noimg-note {
  position: absolute; left: 10px; bottom: 10px; background: rgba(20, 30, 26, .78); color: #f2ece0;
  font-size: .78rem; padding: 5px 11px; border-radius: var(--r-pill); max-width: 90%;
}

.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-top: 14px; }
.foot-col { display: flex; flex-direction: column; gap: 6px; }
.foot-h { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #9BA08D; margin-bottom: 2px; }
.foot-col .muted { color: #8A8F7C; }

/* ---- small screens ---------------------------------------------------------- */
@media (max-width: 700px) {
  .mai-band { grid-template-columns: 1fr; padding: 20px 18px; }
  .band { flex-direction: column; align-items: flex-start; }
  .band .ic.big { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 24px 18px; }
  .nav-r { gap: 11px; }
  .brand { white-space: nowrap; font-size: 1.12rem; }
  /* the mobile tabbar already carries these — an overflowing nav wraps the brand */
  .nav-r > a:not(.nav-cta) { display: none; }
  .hero2 { grid-template-columns: 1fr; padding: 26px 0 8px; gap: 22px; }
  .hero2 h1 { max-width: none; }
  .heroimgs { min-height: 260px; }
  .gallery img { height: 200px; }
}
@media (max-width: 860px) {
  .nav-r .hide-m { display: none; }
}

/* ==================== v3 redesign (2026-07) ====================
   Motion + shared primitives ported from the design-handoff mockups
   (Homepage v3 / Catalog / Services .dc.html). Scroll-driven pieces are
   progressive enhancement: default state is fully visible, `@supports
   (animation-timeline: view())` gates the animated variant, and base.html
   carries an IntersectionObserver fallback for Safari/Firefox. */

@keyframes v3-reveal { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes v3-hero { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes v3-hero-img { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes v3-caret { 0%, 55% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes v3-float { 0% { transform: translateY(0); } 50% { transform: translateY(-11px); } 100% { transform: translateY(0); } }
@keyframes v3-pulse { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.7); opacity: 0; } }

@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: v3-reveal 1s var(--ease3) both;
    animation-timeline: view();
    animation-range: entry 5% entry 38%;
  }
}

/* Count-up: server renders the real number inside <i> (static fallback);
   the animated counter takes over only when scroll timelines exist. */
@property --n { syntax: '<integer>'; initial-value: 0; inherits: false; }
@keyframes v3-count { from { --n: 0; } }
@supports (animation-timeline: view()) {
  [data-count] {
    counter-reset: v3n var(--n);
    animation: v3-count 1s cubic-bezier(.25, .6, .3, 1) both;
    animation-timeline: view();
    animation-range: entry 15% entry 65%;
  }
  [data-count]::before { content: counter(v3n); }
  [data-count] > i { display: none; }
}

/* Typewriter demo: four queries cycling via steps() width animation. The ch
   counts must match the literal string lengths in home.html. */
@keyframes v3-t1 { 0% { width: 0ch; animation-timing-function: steps(46, end); } 9% { width: 46ch; } 21% { width: 46ch; animation-timing-function: steps(46, end); } 25% { width: 0ch; } 100% { width: 0ch; } }
@keyframes v3-t2 { 0% { width: 0ch; } 25% { width: 0ch; animation-timing-function: steps(31, end); } 32% { width: 31ch; } 46% { width: 31ch; animation-timing-function: steps(31, end); } 50% { width: 0ch; } 100% { width: 0ch; } }
@keyframes v3-t3 { 0% { width: 0ch; } 50% { width: 0ch; animation-timing-function: steps(39, end); } 58% { width: 39ch; } 71% { width: 39ch; animation-timing-function: steps(39, end); } 75% { width: 0ch; } 100% { width: 0ch; } }
@keyframes v3-t4 { 0% { width: 0ch; } 75% { width: 0ch; animation-timing-function: steps(41, end); } 83% { width: 41ch; } 96% { width: 41ch; animation-timing-function: steps(41, end); } 100% { width: 0ch; } }

/* Shared v3 primitives ------------------------------------------------- */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--acc); margin: 0 0 12px;
}
.kicker::before { content: ""; width: 34px; height: 2px; background: var(--acc); }
.kicker.bare::before { display: none; }
.h-display {
  font-family: var(--display); font-weight: 700; letter-spacing: -.025em;
  line-height: 1.02; color: var(--ink); margin: 0;
}
h2.h-display { font-size: clamp(2rem, 4.2vw, 3.5rem); }
.card3 {
  background: var(--card); border-radius: 16px; overflow: hidden; border: 0;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease3), box-shadow .35s var(--ease3);
}
.card3:hover { transform: translateY(-7px) rotate(-.3deg); box-shadow: var(--shadow-card-h); }

/* Full-bleed band helper: escapes main's max-width container. body gets
   overflow-x clip (below) because 100vw includes the scrollbar. */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.bleed-in { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
body { overflow-x: clip; }

/* Hero entrance stagger (one-shot) */
.hi1 { animation: v3-hero .7s var(--ease3) .05s both; }
.hi2 { animation: v3-hero .7s var(--ease3) .15s both; }
.hi3 { animation: v3-hero .7s var(--ease3) .28s both; }
.hi4 { animation: v3-hero .7s var(--ease3) .4s both; }
.hv1 { animation: v3-hero-img .9s var(--ease3) .3s both; }
.hv2 { animation: v3-hero-img .9s var(--ease3) .65s both; }
.hv3 { animation: v3-hero-img .9s var(--ease3) .8s both; }

/* ---- v3 hero --------------------------------------------------------- */
.hero3 {
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: 44px; align-items: center; padding: 26px 0 48px;
}
.hero3 h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 5.5rem); letter-spacing: -.03em; line-height: .98;
  margin: 0 0 10px; text-wrap: balance;
}
.hero3 h1 em {
  font-family: var(--serif); font-weight: 600; font-style: normal;
  color: var(--acc); white-space: nowrap; display: inline-block;
}
.u-swash { display: block; height: 12px; margin-top: -4px; }
.u-swash svg { width: 100%; height: 12px; display: block; }
.u-swash path { stroke: var(--acc2); }
.hero3 .sub { font-size: 1.13rem; color: var(--ink2); margin: 14px 0 26px; max-width: 47ch; }
.hero3 .sub b { color: var(--ink); }
.hero-visual { position: relative; height: 540px; }
/* full-bleed: the photo runs from the column's left edge out to the right edge
   of the viewport (past the centered max-width gutter). Left corners rounded,
   right edge flush to the screen — no arch. */
.hero-full {
  position: absolute; top: 0; bottom: 0; left: 0;
  right: calc(-1 * (max(100vw - var(--maxw-home), 0px) / 2 + var(--pad-x)));
  border-radius: var(--r-xl) 0 0 var(--r-xl); overflow: hidden;
}
.hero-full img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 42%; display: block; }
.hero-full .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 33, 24, 0) 42%, rgba(30, 33, 24, .5)); pointer-events: none; }
.hero-full .cap {
  position: absolute; left: 22px; bottom: 14px; color: var(--on-dark);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; pointer-events: none;
}
.hero-badge { position: absolute; max-width: 258px; }
.hero-badge.count { right: 14px; top: 28px; }
.hero-badge.price { left: 14px; bottom: 40px; }
.hb-book, .hb-mai {
  display: flex; gap: 11px; align-items: flex-start; border-radius: 15px; padding: 13px 15px;
}
.hb-book { background: var(--chrome); color: var(--on-chrome); box-shadow: 0 20px 44px -20px rgba(40, 40, 20, .55); animation: v3-float 6s ease-in-out 1.4s infinite; }
.hb-mai { background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 rgba(58, 69, 47, .1); animation: v3-float 7s ease-in-out .6s infinite; }
.hb-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.hb-book .hb-ico { background: rgba(201, 151, 46, .18); color: var(--acc2); }
.hb-mai .hb-ico { background: var(--panel); color: var(--acc); }
.hb-ico.hb-ava { background: none; border-radius: 50%; overflow: hidden; }
.hb-ico img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.hb-ico-svg { width: 17px; height: 17px; }
.mai-inline { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; vertical-align: -7px; margin-right: 7px; }
.hb-txt { display: block; }
.hb-lead { display: block; font-family: var(--display); font-weight: 700; font-size: .92rem; line-height: 1.2; letter-spacing: -.01em; }
.hb-sub { display: block; font-size: .72rem; line-height: 1.35; margin-top: 4px; }
.hb-book .hb-sub { color: var(--on-chrome-2); }
.hb-mai .hb-sub { color: var(--ink2); }

/* hero search + typewriter over the real input */
.hero-search {
  border: 2px solid var(--ink); border-radius: 16px; padding: 6px 6px 6px 16px;
  box-shadow: 8px 8px 0 rgba(58, 69, 47, .09); position: relative; background: var(--card);
}
.type-demo {
  position: absolute; left: 26px; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-family: var(--mono); font-size: .9rem; color: #4A443B;
  white-space: nowrap; overflow: hidden; display: flex; align-items: center;
  max-width: calc(100% - 150px);
}
.tw { display: inline-block; overflow: hidden; white-space: nowrap; width: 0ch; }
.tw1 { animation: v3-t1 28s linear infinite; }
.tw2 { animation: v3-t2 28s linear infinite; }
.tw3 { animation: v3-t3 28s linear infinite; }
.tw4 { animation: v3-t4 28s linear infinite; }
.caret { width: 2px; height: 20px; background: var(--acc); margin-left: 2px; flex: none; animation: v3-caret 1.1s infinite; }
#lp-q:focus ~ .type-demo, #lp-q:not(:placeholder-shown) ~ .type-demo { display: none; }
.hero-sub { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: .84rem; color: var(--muted); flex-wrap: wrap; }
.pdot { position: relative; width: 8px; height: 8px; flex: none; display: inline-block; }
.pdot i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--acc); }
.pdot i + i { animation: v3-pulse 2s infinite; }

/* ---- v3 city numbers band -------------------------------------------- */
.cityband { position: relative; min-height: 460px; display: flex; align-items: center; background: url(/img/danang-coast-aerial.jpg) center 42%/cover; background: image-set(url(/img/danang-coast-aerial.webp) type("image/webp"), url(/img/danang-coast-aerial.jpg) type("image/jpeg")) center 42%/cover; }
/* (cityband no longer uses background-attachment: fixed — it sized the image to
   the viewport, making the perspective-shot crop unpredictable + janky.) */
.cityband .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 33, 24, .55), rgba(30, 33, 24, .28) 45%, rgba(30, 33, 24, .72)); }
.cityband .bleed-in { position: relative; padding: 72px 18px; width: 100%; }
.cityband .claim {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 3rem);
  line-height: 1.06; letter-spacing: -.01em; color: var(--on-dark); max-width: 21ch;
  text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.cb-stats { display: flex; gap: 56px; margin-top: 44px; flex-wrap: wrap; align-items: end; }
.stat-xl { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; color: var(--on-dark); letter-spacing: -.02em; }
.stat-xl.gold { color: var(--acc2); }
.stat-cap { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #E8E3D5; margin-top: 8px; }
.cb-mai {
  margin-left: auto; max-width: 40ch; display: flex; gap: 14px; align-items: flex-start; align-self: end;
  background: rgba(30, 33, 24, .55); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  padding: 16px 18px; border-radius: 16px;
}
.cb-ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }
.cb-mai-h { font-family: var(--serif); font-weight: 600; font-size: 1.06rem; color: var(--acc2); }
.cb-mai-p { font-size: .88rem; color: #E8E3D5; line-height: 1.6; margin: 6px 0 10px; }
.cb-mai-cta { background: none; border: 1.5px solid var(--acc2); color: var(--acc2); border-radius: 999px; padding: 6px 16px; font-size: .84rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: background .2s, color .2s; }
.cb-mai-cta:hover { background: var(--acc2); color: #1E2118; }

/* ---- v3 board -------------------------------------------------------- */
.board-h { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 56px 0 22px; }
.board-h .more { font-size: .95rem; font-weight: 500; color: var(--acc); border-bottom: 2px solid var(--acc2); padding-bottom: 2px; white-space: nowrap; }
.board-note { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-top: 14px; letter-spacing: .04em; }

/* ---- v3 search trio --------------------------------------------------- */
.trio-band { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 56px; }
.trio-band > .bleed-in { padding: 60px 18px 64px; }
.trio { display: grid; grid-template-columns: .9fr 1.05fr 1.05fr; gap: 20px; align-items: stretch; margin-top: 30px; }
.trio-card { background: var(--card); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; }
.trio-card.dark { background: var(--ink-deep); color: var(--bg); }
.trio-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.15; margin: 0; color: inherit; }
.trio-card p { font-size: .88rem; color: var(--muted); margin: 10px 0 16px; }
.trio-card.dark p { color: var(--on-chrome-2); }
.trio-card .foot { margin-top: auto; padding-top: 18px; }
.trio .mapwrap { position: relative; align-self: flex-start; margin-top: 4px; }
.trio .mapshot {
  width: 200px; background: #14140f; border-radius: 26px;
  padding: 7px; box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .55);
  animation: v3-float 8s ease-in-out infinite;
}
.trio .mapshot img { width: 100%; display: block; border-radius: 20px; }
.qbox { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 15px; font-size: .88rem; color: var(--ink2); background: var(--bg); }
.tok-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tok-row .becomes { font-family: var(--serif); color: var(--acc); font-size: .9rem; }
.tok { background: var(--ink); color: var(--bg); border-radius: 8px; padding: 5px 13px; font-size: .8rem; font-weight: 500; display: inline-block; }
.tok.acc { background: var(--acc); color: #fff; }
.bubs { display: flex; flex-direction: column; gap: 8px; }
.bub-row { display: flex; gap: 8px; align-items: baseline; justify-content: flex-end; }
.bub-l { font-family: var(--mono); font-size: .6rem; color: var(--muted); flex: none; }
.bub { background: var(--panel); border-radius: 12px 12px 4px 12px; padding: 8px 13px; font-size: .8rem; max-width: 82%; }
.bub.reply { background: var(--ink); color: var(--bg); border-radius: 12px 12px 12px 4px; align-self: flex-start; max-width: 88%; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }
.check-line .ok { width: 26px; height: 26px; border-radius: var(--r-pill); background: var(--panel); display: grid; place-items: center; font-family: var(--mono); font-size: .74rem; color: var(--acc); flex: none; }

/* ---- v3 building book -------------------------------------------------- */
.bbook { background: var(--ink-deep); background-image: repeating-linear-gradient(135deg, rgba(250, 247, 239, .025) 0 2px, transparent 2px 26px); color: var(--on-dark); margin-top: 64px; }
.bbook > .bleed-in { padding: 72px 18px; display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.bbook .kicker { color: var(--acc2); }
.bbook .kicker::before { background: var(--acc2); }
.bbook .giant { font-family: var(--serif); font-weight: 600; font-size: clamp(5rem, 11vw, 9.5rem); line-height: .9; color: var(--acc2); letter-spacing: -.02em; }
.bbook h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.02em; line-height: 1.05; margin: 14px 0; color: var(--on-dark); }
.bbook .lead { font-size: .95rem; color: var(--on-chrome-2); margin: 0 0 24px; max-width: 48ch; }
.btn.gold { background: var(--acc2); color: #241F14; }
.btn.gold:hover { background: #B8892A; color: #241F14; }
.brows { display: flex; flex-direction: column; gap: 12px; }
.brow {
  border: 1px solid rgba(247, 246, 242, .16); background: rgba(250, 247, 239, .03); border-radius: 16px;
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--on-dark); transition: transform .3s var(--ease3), background .3s;
}
.brow:hover { transform: translateX(8px); background: rgba(250, 247, 239, .07); color: var(--on-dark); }
.brow .bn { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.brow .bm { font-family: var(--mono); font-size: .7rem; color: #9BA08D; margin-top: 4px; letter-spacing: .04em; text-transform: uppercase; }
.brow .side { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.brow .stars { color: var(--acc2); font-size: .82rem; letter-spacing: .08em; }
.brow .go { border: 1.5px solid rgba(201, 151, 46, .6); color: var(--on-dark); border-radius: 10px; padding: 8px 16px; font-size: .82rem; font-weight: 500; }
.bbook-more { font-family: var(--mono); font-size: .72rem; color: #9BA08D; letter-spacing: .06em; padding-left: 6px; }

/* ---- v3 district tiles -------------------------------------------------- */
.dtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.dtile { position: relative; border-radius: 18px; overflow: hidden; height: 320px; display: block; }
.dtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease3); }
.dtile:hover img { transform: scale(1.07); }
.dtile .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 33, 24, 0) 38%, rgba(30, 33, 24, .82)); pointer-events: none; }
.dtile .dt { position: absolute; left: 18px; right: 18px; bottom: 16px; color: var(--on-dark); }
.dtile .dt h3 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em; margin: 0; color: var(--on-dark); }
.dtile .vibe { font-size: .8rem; color: #E0DCCB; margin-top: 2px; }
.dtile .nums { font-family: var(--mono); font-size: .66rem; color: var(--acc2); margin-top: 8px; letter-spacing: .06em; text-transform: uppercase; }
.sect-note { font-size: .95rem; color: var(--muted); max-width: 30ch; text-align: right; }

/* ---- neighbourhood guide (WS7) ----------------------------------------- */
/* R5 list-with-us: benefits grid */
.lw-benefits { gap: 14px; margin: 8px 0 6px; }
.lw-b { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px; }
.lw-b b { font-size: .95rem; }
.lw-b p { margin: 3px 0 0; font-size: .85rem; line-height: 1.5; }

/* R5 neighbourhood guides: gallery, price table, places */
.nb-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0 6px; max-width: 900px; }
.nb-gallery img { width: 100%; height: 240px; object-fit: cover; border-radius: 16px; display: block; }
.nb-credit { font-size: .72rem; margin: 6px 0 0; }
.nb-prices { width: 100%; border-collapse: collapse; margin: 10px 0 6px; font-size: .92rem; }
.nb-prices th { text-align: left; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 14px 6px 0; border-bottom: 1px solid var(--line); }
.nb-prices td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--panel); }
.nb-prices td.mono { font-family: var(--mono); }
.nb-caption { font-size: .8rem; }
.nb-places { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; margin: 12px 0; font-size: .92rem; }
@media (max-width: 640px) { .nb-gallery { grid-template-columns: 1fr; } .nb-gallery img { height: 200px; } .nb-places { grid-template-columns: 1fr; } }

/* R5 merged renting guide: icon section headers, anchor chips, scam cards */
.gsec { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.gsec .h-sub { margin: 0; }
.g-anchors { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.g-anchors .nb-chip { text-decoration: none; }
.prose [id] { scroll-margin-top: 80px; }
.g-scams { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; margin: 14px 0; }
@media (max-width: 640px) { .g-scams { grid-template-columns: 1fr; } }
.nb-tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.7rem); color: var(--acc); margin: 2px 0 12px; }
.nb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 26px 0 10px; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nb-chip { display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); color: var(--ink); background: var(--panel); }
.nb-chip.warn { background: transparent; color: var(--ink2); border-style: dashed; }
@media (max-width: 640px) { .nb-cols { grid-template-columns: 1fr; } }

/* ---- v3 services section ------------------------------------------------ */
.svc3 { display: grid; grid-template-columns: .9fr 1.35fr; gap: 44px; align-items: start; margin-top: 64px; }
.svc3 .lead { font-size: .97rem; color: var(--ink2); margin: 0 0 20px; max-width: 42ch; }
.svc3 .lead b { color: var(--ink); }
.svc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px;
  display: flex; align-items: center; gap: 13px; transition: transform .3s var(--ease3);
}
.svc-card:hover { transform: translateY(-4px); }
.svc-card b { font-weight: 500; font-size: .9rem; color: var(--ink); }
.svc-chip { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--acc) 13%, var(--card)); }
.svc-cards .svc-card:nth-child(2) .svc-chip { background: color-mix(in srgb, var(--jade) 15%, var(--card)); }
.svc-cards .svc-card:nth-child(3) .svc-chip { background: color-mix(in srgb, var(--acc2) 16%, var(--card)); }
.svc-cards .svc-card:nth-child(4) .svc-chip { background: color-mix(in srgb, var(--clay-d) 12%, var(--card)); }
.svc-chip svg { stroke: var(--ink); }
.svc-more { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin: 14px 0 0; }

/* ---- services storefront (/services/) ---------------------------------- */
.svc-rail { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 0; }
.svc-pill { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--r-pill); padding: 9px 18px; font-size: .84rem; font-weight: 500; transition: transform var(--dur) var(--ease); }
.svc-pill:hover { transform: translateY(-2px); color: var(--ink); }
.svc-pill.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.svc-pill.on:hover { color: var(--bg); }
.svc-pill .n { font-family: var(--mono); font-size: .72rem; opacity: .6; }
/* R7: category icons on pills and card tags (same art as the home teaser) */
.svc-ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.svc-meta { font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .03em; margin: 0 0 18px; }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.svc-prov { display: flex; flex-direction: column; overflow: hidden; }
.svc-prov-head { aspect-ratio: 16/10; background: repeating-linear-gradient(45deg, var(--panel) 0 14px, var(--sand) 14px 28px); position: relative; }
.svc-prov-tag { position: absolute; left: 11px; top: 11px; background: rgba(42, 51, 35, .85); color: var(--on-dark); border-radius: 7px; padding: 4px 10px; font-family: var(--mono); font-size: .62rem; letter-spacing: .07em; text-transform: uppercase; }
.svc-prov-body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.svc-prov-text { font-size: .88rem; color: var(--ink2); margin: 0 0 6px; line-height: 1.45; }
/* Two tags on one card (category + verified/studio): second docks right. */
.svc-prov-tag + .svc-prov-tag { left: auto; right: 11px; }
.svc-prov-cta { margin-top: auto; padding-top: 14px; display: block; }
.svc-prov-cta { color: var(--acc); font-weight: 500; font-size: .88rem; }
.svc-prov-cta:hover { color: var(--clay-d); }
@media (max-width: 980px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .svc-grid { grid-template-columns: 1fr; } }
/* Services "coming soon": a blurred skeleton with one readable overlay card. */
/* Cap the scaffold height so the overlay card stays in the first viewport even
   when the skeleton stacks to one column on mobile; the rest is clipped away. */
.svc-soon-wrap { position: relative; max-height: 80vh; overflow: hidden; }
.svc-blur { filter: blur(6px); opacity: .5; pointer-events: none; user-select: none; }
.svc-soon-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.svc-soon-card { max-width: 520px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 34px 32px; box-shadow: var(--shadow-card-h); }
.svc-soon-badge { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 5px 12px; }
.svc-soon-card h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 14px 0 10px; }
.svc-soon-card p { color: var(--ink2); font-size: .98rem; margin: 0 0 20px; }
.svc-soon-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.svc-prov-text .skel-line { display: block; height: 11px; border-radius: 6px; background: var(--line); margin: 0 0 9px; }
.svc-prov-text .skel-line.short { width: 55%; }
.svc-collage { display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: auto auto; gap: 14px; }
.svc-menu { align-self: start; }
.svc-menu-h { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.svc-menu-h span { color: var(--acc); }
.svc-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc-mtile { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; color: var(--ink); transition: transform .3s var(--ease3, ease), box-shadow .3s; }
.svc-mtile:hover { transform: translateY(-3px); box-shadow: var(--shadow-s); }
.svc-mico { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--panel); color: var(--acc); display: grid; place-items: center; }
.svc-mico-svg { width: 19px; height: 19px; }
.svc-photo { border-radius: 18px; overflow: hidden; position: relative; min-height: 190px; }
.svc-photo.tall { grid-row: 1 / 3; min-height: 400px; }
.svc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease3); }
.svc-photo:hover img { transform: scale(1.05); }
.svc-photo .tag {
  position: absolute; left: 14px; bottom: 12px; background: rgba(30, 33, 24, .72); color: var(--on-dark);
  border-radius: 9px; padding: 6px 12px; font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase;
}

/* ---- v3 trust / FAQ ------------------------------------------------------ */
.trust-band { background: var(--panel); border-top: 1px solid var(--line); margin-top: 64px; }
.trust-band > .bleed-in { padding: 60px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.trust-band .lead { font-size: .97rem; color: var(--ink2); margin: 0 0 22px; max-width: 48ch; }
.btn.outline { background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); }
.btn.outline:hover { background: var(--bg); color: var(--ink); }
.faqcard { background: var(--card); border-radius: 20px; padding: 26px 28px; box-shadow: var(--shadow-card); }
.faqcard h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; margin: 0 0 8px; }
.faq-i { border-top: 1px solid var(--panel); padding: 12px 0; }
.faq-i:first-of-type { border-top: 0; }
.faq-i b { font-weight: 500; font-size: .92rem; display: block; }
.faq-i p { font-size: .83rem; color: var(--muted); margin: 4px 0 0; }

/* ---- v3 owner CTA band ---------------------------------------------------- */
.ctaband { background: var(--acc); color: #FBF0E7; margin-top: 64px; }
.ctaband > .bleed-in { padding: 56px 18px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.ctaband h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.01em; color: #FBF0E7; margin: 0; }
.ctaband .sub { font-size: .95rem; color: #F2CDBD; margin-top: 10px; max-width: 60ch; }
.ctaband .acts { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-primary {
  background: #FBF0E7; color: var(--acc); border-radius: 13px; padding: 15px 26px; font-weight: 500;
  white-space: nowrap; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .4); transition: transform .2s;
}
.cta-primary:hover { color: var(--clay-d); transform: scale(1.03); }
.cta-outline { border: 2px solid #FBF0E7; color: #FBF0E7 !important; border-radius: 13px; padding: 13px 26px; font-weight: 500; white-space: nowrap; transition: transform .2s; }
.cta-outline:hover { transform: scale(1.03); }

/* ---- v3 responsive -------------------------------------------------------- */
@media (max-width: 980px) {
  .hero3 { grid-template-columns: 1fr; gap: 24px; padding-top: 12px; }
  .hero-visual { order: -1; height: 290px; }
  .hero-full { left: calc(-1 * var(--pad-x)); right: calc(-1 * var(--pad-x)); border-radius: 0; }
  .hero-badge { display: none; }
  .trio { grid-template-columns: 1fr; }
  .bbook > .bleed-in { grid-template-columns: 1fr; gap: 32px; }
  .dtiles { grid-template-columns: repeat(2, 1fr); }
  .dtile { height: 250px; }
  .svc3 { grid-template-columns: 1fr; }
  .trust-band > .bleed-in { grid-template-columns: 1fr; gap: 28px; }
  .cb-stats { gap: 32px; }
  .cb-mai { margin-left: 0; }
  .board-h { flex-wrap: wrap; }
  .sect-note { text-align: left; max-width: none; }
}
@media (max-width: 520px) {
  .dtiles { grid-template-columns: 1fr; }
  .type-demo { display: none; }
  .cityband { min-height: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-count], .tw, .caret, .pdot i,
  .hi1, .hi2, .hi3, .hi4, .hv1, .hv2, .hv3, .hb-count, .hb-price,
  .trio .mapshot { animation: none !important; }
  .tw1 { width: auto !important; }
  .card3:hover, .dtile:hover img, .svc-photo:hover img, .brow:hover, .svc-mtile:hover { transform: none; }
}

/* ---- mobile a11y/ergonomics (Phase 1) ------------------------------------- */
@media (max-width: 860px) {
  /* iOS zooms the page when a focused field renders <16px — pin touch-width
     form controls to 16px so tapping a filter or the Mai chat box doesn't jump. */
  form.stack input, form.stack select, form.stack textarea,
  .filters input, .filters select,
  .sidebar select, .sidebar input, #mai-input { font-size: 16px; }
  /* Bigger tap area for the EN·VI·RU switcher — the only header control on phones. */
  .lang a, .lang b { display: inline-block; padding: 8px 4px; }
}
@media (max-width: 560px) {
  /* Linearize the two home service grids that otherwise stay 2-col at 375px.
     Reset the collage's explicit rows so each photo auto-sizes to its own
     min-height (otherwise `grid-template-rows: auto auto` leaves a tall gap). */
  .svc-cards, .svc-collage, .svc-menu-grid { grid-template-columns: 1fr; }
  .svc-collage { grid-template-rows: none; }
  .svc-collage .svc-photo { grid-row: auto; min-height: 220px; }
}
