/* Rentory — drawing-sheet theme. Brand: Ink, Navy, Blue, Copper; Sarabun. */
:root {
  --ink: #12253A;
  --navy: #1B3A5C;
  --blue: #2C5480;
  --copper: #A85F14;
  --copper-soft: #F3E6D6;
  --paper: #F7F4EE;
  --paper-2: #EFEAE1;
  --white: #FFFDF9;
  --line: rgba(18, 37, 58, 0.14);
  --line-strong: rgba(18, 37, 58, 0.55);
  --muted: #55657A;
  --radius: 2px;
  --wrap: 1120px;
  --mono: "IBM Plex Mono", "Sarabun", ui-monospace, monospace;
  --sans: "Sarabun", "Thonburi", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* drafting grid: 8px minor, 40px major */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(rgba(18,37,58,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,37,58,.045) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -1px -1px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--copper); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.label b { color: var(--copper); font-weight: 600; }

/* language: show only the active language */
html[lang="th"] [lang="en"]:not(html) { display: none !important; }
html[lang="en"] [lang="th"]:not(html) { display: none !important; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 244, 238, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line-strong);
}
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.logo { width: 26px; height: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.logo i { background: var(--ink); }
.logo i:nth-child(2) { background: var(--copper); }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: .01em; }
.brand-name small { display: block; font-family: var(--mono); font-weight: 400; font-size: 9.5px; letter-spacing: .14em; color: var(--muted); margin-top: -4px; text-transform: uppercase; }
.brand-logo { display: block; height: 19px; width: auto; }
.brand-name .brand-logo + small { margin-top: 6px; }
.site-foot .brand-logo { height: 17px; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-toggle { display: flex; border: 1px solid var(--line-strong); }
.lang-toggle button {
  font: 600 12px var(--mono); letter-spacing: .08em;
  padding: 6px 9px; border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px var(--sans);
  padding: 11px 18px; border-radius: var(--radius);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { background: var(--copper); border-color: var(--copper); color: var(--white); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.small { padding: 7px 12px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 28px; position: relative; }
.hero .label { margin-bottom: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero h1 {
  font-size: clamp(34px, 7.4vw, 66px);
  line-height: 1.12; font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 18px; max-width: 15ch;
}
html[lang="th"] .hero h1 { line-height: 1.25; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--copper); }
.hero p.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--navy); max-width: 46ch; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* reveal on load */
.rise { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.rise.d1 { animation-delay: .08s } .rise.d2 { animation-delay: .18s } .rise.d3 { animation-delay: .3s } .rise.d4 { animation-delay: .45s }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------- BTS strip ---------- */
.strip {
  margin: 34px 0 8px; padding: 18px 18px 10px;
  background: var(--white); border: 1px solid var(--line-strong);
  position: relative;
}
.strip-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.strip svg { width: 100%; height: auto; overflow: visible; }
.strip .road { stroke: var(--ink); stroke-width: 3; }
.strip .rail { stroke: #6BAA3C; stroke-width: 6; stroke-linecap: round; }
.strip .stn circle { fill: var(--white); stroke: var(--ink); stroke-width: 2.5; }
.strip .stn text { font: 600 13px var(--sans); fill: var(--ink); }
.strip .stn .name { font: 700 16px var(--sans); paint-order: stroke; stroke: var(--white); stroke-width: 5px; }
.strip .stn .code { font: 600 11px var(--mono); fill: var(--ink); }
.strip .bld line { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.strip .bld rect { fill: var(--ink); }
.strip .bld.live rect { fill: var(--copper); }
.strip .bld text { font: 500 14px var(--sans); fill: var(--navy); }
.strip .bld.live text { fill: var(--copper); font-weight: 700; }
.strip-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.strip-scroll svg { min-width: 640px; }
.strip-foot { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 9px; height: 9px; display: inline-block; background: var(--ink); }
.key i.c { background: var(--copper); }

/* ---------- sections ---------- */
section { padding: 52px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--line-strong); padding-bottom: 12px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; margin: 4px 0 0; }
.sec-num { font-family: var(--mono); color: var(--copper); font-size: 12px; letter-spacing: .14em; }

/* ---------- unit card (drawing sheet) ---------- */
.units { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.sheet {
  background: var(--white); border: 1.5px solid var(--ink);
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  position: relative; transition: transform .2s, box-shadow .2s;
}
.sheet:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 6px 6px 0 var(--ink); }
.sheet::before { /* inner frame like a drawing border */
  content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; z-index: 2;
}
.sheet-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); position: relative; }
.sheet-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.sheet:hover .sheet-img img { transform: scale(1.03); }
.tag {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase;
  background: var(--copper); color: var(--white); padding: 4px 8px;
}
.sheet-body { padding: 16px 16px 12px; }
.sheet-body h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.sheet-body .where { color: var(--muted); font-size: 15px; margin-top: 2px; }
.price { font-size: 26px; font-weight: 700; margin-top: 10px; }
.price small { font-size: 14px; font-weight: 400; color: var(--muted); }

/* title block — the signature element */
.tblock { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); margin-top: auto; }
.tblock > div { padding: 8px 10px; border-right: 1px solid var(--line-strong); min-width: 0; }
.tblock > div:last-child { border-right: 0; }
.tblock .k { font: 500 9.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tblock .v { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tblock.check { grid-template-columns: 1.3fr 1fr; border-top: 1px solid var(--line-strong); }
.tblock.check .v { font-size: 13px; white-space: normal; }
.tblock .v .pending { color: var(--copper); }

/* ---------- empty slot ---------- */
.sheet.empty { border-style: dashed; background: transparent; justify-content: center; align-items: center; text-align: center; padding: 30px 22px; min-height: 260px; }
.sheet.empty:hover { box-shadow: none; transform: none; }
.sheet.empty::before { display: none; }
.sheet.empty p { margin: 6px 0 16px; color: var(--navy); max-width: 30ch; }

/* ---------- how / about ---------- */
.steps { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border: 1.5px solid var(--ink); background: var(--white); }
.step { padding: 20px 18px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.step h3 { margin: 6px 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--navy); font-size: 15.5px; }

.about { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .about { grid-template-columns: 1.1fr .9fr; } }
.about p { margin: 0 0 14px; }
.stamp {
  border: 1.5px solid var(--ink); background: var(--white); padding: 18px; position: relative;
}
.stamp .seal {
  width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--copper); color: var(--copper);
  display: grid; place-items: center; text-align: center; font: 600 10px/1.25 var(--mono); letter-spacing: .06em;
  transform: rotate(-8deg); float: right; margin: 0 0 8px 12px;
}
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0 8px 28px; border-bottom: 1px dashed var(--line-strong); position: relative; font-size: 15.5px; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 12px; height: 12px; border: 1.5px solid var(--ink); }
.checklist li.done::before { background: var(--copper); border-color: var(--copper); }

/* ---------- form ---------- */
.ask { background: var(--ink); color: var(--paper); background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 40px 40px; }
.ask .sec-head { border-color: rgba(247,244,238,.4); }
.ask .label { color: #AFC0D4; }
.ask h2 { color: var(--paper); }
.ask .intro { color: #D9E2EC; max-width: 52ch; margin: 0 0 22px; }
form.req { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { form.req { grid-template-columns: 1fr 1fr; } .full { grid-column: 1 / -1; } }
.field label, .field legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; color: var(--paper); }
.field .hint { font-weight: 400; color: #AFC0D4; font-size: 13.5px; }
.field input[type=text], .field input[type=tel], .field input[type=date], .field input[type=number], .field select, .field textarea {
  width: 100%; font: 16px var(--sans); color: var(--ink);
  background: var(--paper); border: 1.5px solid transparent; border-radius: var(--radius); padding: 11px 12px;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px rgba(168,95,20,.35); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; font-weight: 500; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 7px 12px; border: 1.5px solid rgba(247,244,238,.5); color: var(--paper);
  font-size: 14.5px; cursor: pointer; user-select: none; transition: background .15s, border-color .15s;
}
.chips input:checked + span { background: var(--copper); border-color: var(--copper); }
.chips input:focus-visible + span { outline: 2px solid var(--paper); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: #D9E2EC; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--copper); flex: none; }
.consent a { color: #F2C894; }
.ask .btn { background: var(--copper); border-color: var(--copper); }
.ask .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.form-note { font-size: 13.5px; color: #AFC0D4; margin: 8px 0 0; }
.result { background: var(--paper); color: var(--ink); padding: 18px; border-left: 4px solid var(--copper); }
.result pre { white-space: pre-wrap; font: 14px/1.6 var(--sans); background: var(--white); border: 1px solid var(--line-strong); padding: 12px; margin: 10px 0; }
.err { color: #FFB4A2; font-size: 14px; margin-top: 4px; }

/* ---------- unit page ---------- */
.crumbs { padding: 18px 0 0; font-size: 14.5px; }
.unit-head { padding: 18px 0 18px; display: grid; gap: 18px; }
@media (min-width: 900px) { .unit-head { grid-template-columns: 1fr 360px; align-items: end; } }
.unit-head h1 { font-size: clamp(30px, 5.6vw, 52px); line-height: 1.12; margin: 6px 0 6px; }
.unit-head .where { color: var(--navy); font-size: 17px; }

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 620px); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
.gallery figure { margin: 0; scroll-snap-align: start; background: var(--white); border: 1.5px solid var(--ink); }
.gallery button { all: unset; cursor: zoom-in; display: block; width: 100%; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font: 500 11px var(--mono); letter-spacing: .08em; padding: 6px 10px; color: var(--muted); border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; }
.gallery-hint { font-size: 13px; color: var(--muted); }

.unit-grid { display: grid; gap: 22px; margin-top: 26px; }
@media (min-width: 900px) { .unit-grid { grid-template-columns: 1fr 360px; align-items: start; } .unit-side { position: sticky; top: 80px; } }
.panel { background: var(--white); border: 1.5px solid var(--ink); }
.panel-h { padding: 10px 14px; border-bottom: 1px solid var(--line-strong); display: flex; justify-content: space-between; align-items: center; }
.panel-b { padding: 14px; }
.spec { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.spec th, .spec td { text-align: left; padding: 9px 0; border-bottom: 1px dashed var(--line-strong); vertical-align: top; }
.spec th { font-weight: 400; color: var(--muted); width: 42%; padding-right: 10px; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.terms { width: 100%; border-collapse: collapse; }
.terms td { padding: 8px 0; border-bottom: 1px dashed var(--line-strong); }
.terms td:last-child { text-align: right; font-weight: 700; font-size: 18px; }
.signing { margin: 12px 0 4px; font-size: 17px; line-height: 1.45; }
.signing small { font-size: 13.5px; color: var(--muted); }
.spec td small { color: var(--muted); font-size: 14px; }
.feat { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.feat li { border: 1px solid var(--line-strong); padding: 5px 10px; font-size: 14.5px; background: var(--paper); }
.side-actions { display: grid; gap: 8px; }
.fine { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }

.lightbox { position: fixed; inset: 0; background: rgba(10, 20, 32, .94); z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 86vh; max-width: 100%; object-fit: contain; border: 1px solid rgba(255,255,255,.2); }
.lightbox .lb-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; color: var(--paper); font: 500 12px var(--mono); letter-spacing: .08em; }
.lightbox button { font: 600 14px var(--sans); background: transparent; color: var(--paper); border: 1px solid rgba(255,255,255,.5); padding: 8px 12px; cursor: pointer; }
.lightbox .lb-close { position: absolute; top: 14px; right: 14px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1.5px solid var(--ink); background: var(--paper-2); padding: 28px 0 40px; font-size: 14.5px; }
.site-foot .wrap { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-foot p { margin: 4px 0; }

/* mobile sticky contact bar */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--ink); }
.mbar .btn { flex: 1; padding: 10px; font-size: 15px; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.mbar .btn.c { background: var(--copper); border-color: var(--copper); color: var(--white); }
@media (min-width: 760px) { .mbar { display: none; } }
@media (max-width: 759px) { body { padding-bottom: 72px; } .head-actions .btn { display: none; } }

.prose { max-width: 70ch; }
.prose h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.2; }
.prose h2 { font-size: 22px; margin-top: 28px; }

/* ---------- tiers + filters ---------- */
.tag.checked { background: var(--copper); }
.tag.listed { background: var(--white); color: var(--ink); border: 1px solid var(--ink); }
.tag.reserved { left: auto; right: 12px; background: var(--ink); }
.tag.video { top: auto; bottom: 12px; background: var(--ink); }
.label .tag { position: static; display: inline-block; }
.sheet.is-checked { border-color: var(--copper); }
.sheet.is-checked .tblock { border-top-color: var(--copper); }

.filters { display: grid; gap: 12px; margin: 0 0 22px; padding: 14px; background: var(--white); border: 1.5px solid var(--ink); }
@media (min-width: 900px) { .filters { grid-template-columns: auto auto 1fr auto; align-items: end; } }
.filters .k { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 7px 11px; font-size: 14.5px; cursor: pointer; border-right: 1px solid var(--line); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--copper); outline-offset: -2px; }
.filters select { font: 15px var(--sans); padding: 8px 10px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); border-radius: var(--radius); }
.filters .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; padding: 7px 0; }
.toggle input { width: 18px; height: 18px; accent-color: var(--copper); }

.tiers { display: grid; gap: 0; grid-template-columns: 1fr; border: 1.5px solid var(--ink); background: var(--white); }
@media (min-width: 760px) { .tiers { grid-template-columns: 1fr 1fr; } .tiers.t3 { grid-template-columns: repeat(3, 1fr); } }
.tier { padding: 22px 20px; border-bottom: 1px solid var(--line-strong); }
@media (min-width: 760px) { .tier { border-bottom: 0; border-right: 1px solid var(--line-strong); } .tier:last-child { border-right: 0; } }
.tier h3 { margin: 10px 0 8px; font-size: 21px; }
.tier .tag { position: static; display: inline-block; }
.tier.c { background: var(--copper-soft); }
.pending { color: var(--copper); }
/* Thai text inside mono labels: no wide tracking */
html[lang="th"] .label, html[lang="th"] .tblock .k, html[lang="th"] .tag, html[lang="th"] .filters .k { letter-spacing: .02em; }
html[lang="th"] .label, html[lang="th"] .tblock .k { font-size: 12.5px; }
@media (max-width: 480px) { .brand-name small { display: none; } }
.crumbs { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.crumbs .ref { color: var(--muted); font-size: 13px; letter-spacing: .02em; white-space: nowrap; }
.crumbs { flex-wrap: wrap; }
.crumbs .bld { margin: 0 auto 0 18px; color: var(--ink); font-weight: 600; }
