/* baanbua.bsnjoy.com — one stylesheet for all languages. Colours come from the house:
   white walls, teak, navy fabric, the pool. */
:root {
  --bg: #fbf9f5;
  --paper: #fff;
  --ink: #16233a;
  --text: #2c3545;
  --muted: #667085;
  --line: #e7e0d4;
  --wood: #9a6a35;
  --sand: #f3ede2;
  --pool: #0e7f86;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", "Noto Serif Thai", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Noto Sans Thai", "Leelawadee UI", Thonburi, sans-serif;
  --row: 230px;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 600; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -0.015em; margin: 0 0 18px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 56px 0 18px; }
h3 { font-size: 1.15rem; margin: 30px 0 12px; }
p { margin: 0 0 16px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--pool); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Thai: taller lines for the marks above and below, and no letter-spacing, which pulls them apart. */
:lang(th) body { line-height: 1.8; }
:lang(th) h1, :lang(th) h2, :lang(th) h3 { line-height: 1.4; letter-spacing: 0; }
:lang(th) .eyebrow, :lang(th) .fgroup h3, :lang(th) .loc h3, :lang(th) .card .label { letter-spacing: 0; font-size: .95rem; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 249, 245, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 22px; min-height: 60px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; margin-right: auto; }
.nav { display: flex; gap: 22px; }
.nav a, .langs a { color: var(--text); text-decoration: none; font-size: .95rem; }
.nav a:hover, .langs a:hover { color: var(--wood); }
.langs { display: flex; gap: 4px; }
.langs a { padding: 4px 8px; border-radius: 6px; font-weight: 600; font-size: .82rem; letter-spacing: .04em; }
.langs a[aria-current] { background: var(--ink); color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; border-radius: 999px; padding: 12px 22px; line-height: 1.2; transition: background .15s, transform .15s; }
.btn:hover { background: #24375a; }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 8px 16px; font-size: .92rem; }
.btn.wide { width: 100%; }
.btn svg { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* Intro */
.intro { padding-top: 46px; padding-bottom: 30px; }
.eyebrow { color: var(--wood); font-weight: 600; font-size: .86rem; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 14px; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 46em; color: var(--text); margin: 0; }

/* Mosaic of five photos under the title */
.mosaic { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: clamp(300px, 44vw, 540px); border-radius: var(--radius); overflow: hidden; }
.mosaic a { position: relative; display: block; overflow: hidden; background: var(--sand); }
.mosaic .m0 { grid-row: span 2; }
.mosaic img, .g img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.mosaic a:hover img, .g a:hover img { transform: scale(1.03); }
.mosaic .more { position: absolute; right: 14px; bottom: 14px; background: rgba(255, 255, 255, .94); color: var(--ink); font-weight: 600; font-size: .92rem; padding: 9px 16px; border-radius: 999px; text-decoration: none; box-shadow: 0 2px 10px rgba(22, 35, 58, .18); }
.mosaic .more:hover { background: #fff; }

/* Details: text on the left, the price card on the right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 64px; align-items: start; padding-top: 34px; }
.split .main > h2:first-of-type { margin-top: 34px; }
.main p { max-width: 44em; }
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, auto); justify-content: space-between; gap: 14px 22px; border-bottom: 1px solid var(--line); padding-bottom: 26px; }
.chips li { color: var(--muted); font-size: .92rem; line-height: 1.3; }
.chips b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.55rem; color: var(--ink); white-space: nowrap; }

.card { position: sticky; top: 84px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 10px 30px rgba(22, 35, 58, .06); }
.card .label { color: var(--muted); font-size: .86rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 4px; }
.card .price { font-family: var(--serif); font-weight: 600; font-size: 2rem; color: var(--ink); margin: 0 0 16px; line-height: 1.1; white-space: nowrap; }
.mini { list-style: none; margin: 0 0 20px; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: .92rem; color: var(--muted); }
.mini b { color: var(--ink); }

.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dist div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts dt, .dist dt { color: var(--muted); }
.facts dd, .dist dd { margin: 0; color: var(--ink); font-weight: 500; }
.dist dd { text-align: right; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 44px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px 22px; }
.fgroup h3 { margin-top: 0; font-family: var(--sans); font-size: .86rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wood); }
.fgroup ul { list-style: none; margin: 0; padding: 0; }
.fgroup li { position: relative; padding: 0 0 10px 20px; font-size: .97rem; line-height: 1.45; }
.fgroup li::before { content: ""; position: absolute; left: 0; top: .58em; width: 8px; height: 8px; border-radius: 50%; background: var(--pool); opacity: .75; }

/* Gallery: rows of equal height, each photo as wide as its shape asks */
.g { display: flex; flex-wrap: wrap; gap: 8px; }
.g a { height: var(--row); overflow: hidden; border-radius: 10px; background: var(--sand); }
.g .land { flex: 1.78 1 calc(var(--row) * 1.78); }
.g .port { flex: .5625 1 calc(var(--row) * .5625); }
.g .sq { flex: 1 1 var(--row); }
.g::after { content: ""; flex: 12 1 0; }

/* Location */
.loc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 44px; align-items: start; }
.loc h3 { font-family: var(--sans); font-size: .86rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wood); margin-top: 24px; }
.dist { margin: 0 0 20px; }
.link { display: inline-flex; align-items: center; gap: 8px; color: var(--pool); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link svg { width: 20px; height: 20px; fill: currentColor; }
.map { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); }

/* Contact */
#contact { padding-top: 64px; padding-bottom: 72px; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 44px; align-items: center; background: var(--ink); color: #dfe5ee; border-radius: 22px; padding: clamp(26px, 5vw, 54px); }
.contact h2 { color: #fff; margin: 0 0 14px; }
.contact p { margin-bottom: 10px; max-width: 34em; }
.contact .muted { color: #9fb0c8; margin: 0; }
.buttons { display: grid; gap: 12px; }
.buttons .btn { justify-content: flex-start; background: #fff; color: var(--ink); padding: 14px 22px; border-radius: 14px; font-weight: 400; }
.buttons .btn:hover { background: var(--sand); }
.buttons .btn b { display: block; font-weight: 600; }
.buttons .btn span { font-size: .95rem; color: var(--muted); line-height: 1.3; }
.buttons .btn span b { color: var(--ink); font-size: 1.02rem; }
.buttons .tg svg { fill: #229ed9; }
.buttons .ph svg { fill: var(--ink); }
.buttons .btn svg { width: 28px; height: 28px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 22px 0 30px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Photo viewer */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(12, 18, 30, .96); display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; }
.lb[hidden] { display: none; }
.lb figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; height: 100dvh; padding: 54px 0 14px; }
.lb img { max-width: 100%; max-height: calc(100% - 46px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lb figcaption { color: #c9d3e2; font-size: .93rem; text-align: center; padding: 12px 8px 0; min-height: 46px; }
.lb .lb-n { color: #8493ab; margin-right: 6px; font-variant-numeric: tabular-nums; }
.lb button { background: none; border: 0; color: #fff; cursor: pointer; font: 300 44px/1 var(--sans); width: 64px; height: 100%; opacity: .75; padding: 0; }
.lb button:hover { opacity: 1; }
.lb .lb-prev { grid-column: 1; grid-row: 1; }
.lb .lb-next { grid-column: 3; grid-row: 1; }
.lb .lb-close { position: absolute; top: 4px; right: 4px; width: 56px; height: 56px; font-size: 38px; z-index: 2; }
body.lb-open { overflow: hidden; }

@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; gap: 0; }
  .card { position: static; order: -1; margin-bottom: 30px; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 20px; }
  .card .label { grid-column: 1; }
  .card .price { grid-column: 1; margin: 0; }
  .card .mini { display: none; }
  .card .btn { grid-column: 2; grid-row: 1 / span 2; width: auto; }
  .split { display: flex; flex-direction: column; align-items: stretch; }
  .features { grid-template-columns: 1fr 1fr; }
  .loc, .contact { grid-template-columns: 1fr; gap: 26px; }
  .map { height: 340px; }
}

@media (max-width: 700px) {
  :root { --row: 150px; }
  body { font-size: 16px; }
  .nav { display: none; }
  .top .wrap { gap: 10px; padding: 0 16px; }
  .langs a { padding: 4px 6px; }
  .btn.small { padding: 8px 13px; font-size: .88rem; white-space: nowrap; }
  .intro { padding-top: 30px; padding-bottom: 22px; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; height: auto; aspect-ratio: 4 / 4.2; gap: 6px; }
  .mosaic .m0 { grid-row: auto; grid-column: span 2; }
  .mosaic .m3, .mosaic .m4 { display: none; }
  .chips { grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .chips b { font-size: 1.3rem; }
  .card { grid-template-columns: 1fr; padding: 20px; }
  .card .price { font-size: 1.75rem; margin-bottom: 14px; }
  .card .btn { grid-column: 1; grid-row: auto; width: 100%; }
  .features { grid-template-columns: 1fr; padding: 22px 20px 12px; }
  .facts div { grid-template-columns: 110px minmax(0, 1fr); }
  h2 { margin-top: 44px; }
  /* On a phone a photo is as wide as the screen and keeps its shape; upright ones go two in a row. */
  .g a { height: auto; }
  .g .land { flex: 1 1 100%; aspect-ratio: 16 / 9; }
  .g .sq { flex: 1 1 100%; aspect-ratio: 1; }
  .g .port { flex: 0 1 calc(50% - 4px); aspect-ratio: 9 / 16; }
  .g::after { content: none; }
  .lb { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .lb figure { padding-left: 6px; padding-right: 6px; }
  .lb .lb-prev, .lb .lb-next { position: absolute; bottom: 0; height: 64px; width: 50%; z-index: 1; opacity: .9; font-size: 40px; }
  .lb .lb-prev { left: 0; } .lb .lb-next { right: 0; }
  .lb figure { padding-bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mosaic img, .g img, .btn { transition: none; }
}

@media print {
  .top, .lb, .map, .mosaic .more { display: none; }
  body { background: #fff; }
}

/* Narrow phones: the top bar keeps the estate's name and drops the house number. */
@media (max-width: 480px) {
  .brand span { display: none; }
}
@media (max-width: 350px) {
  .top .btn { display: none; }
  .chips { gap: 14px 12px; }
  .chips b { font-size: 1.15rem; }
}
