/* 72เอ็นจิเนีย — น้ำเงินเข้ม ทอง ขาวครีม ตามแบบ mockup */
:root {
  --navy: #111e38;
  --navy-2: #1a2a4d;
  --indigo: #24205e;
  --gold: #c7a369;        /* ใช้เป็นพื้นปุ่ม เส้น และตัวอักษรบนพื้นน้ำเงิน */
  --gold-2: #d9bb85;
  --gold-ink: #85652c;    /* ทองเข้มสำหรับตัวอักษรบนพื้นขาว (คอนทราสต์ผ่าน 4.5:1) */
  --ivory: #f7f5ef;
  --white: #fff;
  --ink: #111e38;
  --muted: #4c5770;
  --line: #e4dfd2;
  --line-cool: #dfe3ea;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(17 30 56 / .06), 0 8px 24px -12px rgb(17 30 56 / .18);
  --shadow-up: 0 2px 4px rgb(17 30 56 / .06), 0 16px 32px -14px rgb(17 30 56 / .28);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: 16px;
  --header-h: 68px;
  --float-h: 0px;
}
@media (min-width: 768px) { :root { --gutter: 32px; --header-h: 92px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif; font-size: 17px; line-height: 1.7;
  padding-bottom: var(--float-h); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, .h1 { line-height: 1.4; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1, .h1 { font-size: clamp(30px, 6.4vw, 60px); }
h2 { font-size: clamp(26px, 4.4vw, 42px); }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: calc(1100px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--navy); padding: 8px 16px; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ic { width: 22px; height: 22px; flex: none; }
.ic-brand { width: 22px; height: 22px; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.lead { font-size: 18px; color: var(--muted); max-width: 46em; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  padding: 0 24px; border-radius: 8px; border: 1.5px solid transparent; font-weight: 600; font-size: 17px;
  text-decoration: none; line-height: 1.4; transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s;
}
.btn .ic { width: 20px; height: 20px; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { background: #fff; color: var(--navy); border-color: var(--gold); }
.btn-line .ic-brand { color: #06c755; }
.btn-line:hover { background: var(--ivory); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--gold); }
.btn-outline:hover { background: var(--ivory); }
.btn-ghost-light { color: #fff; border-color: rgb(255 255 255 / .75); }
.btn-ghost-light:hover { background: rgb(255 255 255 / .1); }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gold-ink);
  text-decoration: none; border-bottom: 1.5px solid var(--gold); padding: 10px 0 4px; min-height: 44px; line-height: 1.5;
}
.link-arrow .ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .ic { transform: translateX(3px); }
.eyebrow { color: var(--gold-ink); font-weight: 600; font-size: 15px; letter-spacing: .04em; margin: 0 0 6px; }
.rule { display: block; width: 64px; height: 2px; background: var(--gold); margin: 6px 0 20px; }

/* ---------- แถบบนและหัวเว็บ ---------- */
.ribbon { background: var(--navy); color: #e8ebf2; font-size: 14px; }
.ribbon-in { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.ribbon-in > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ribbon-r { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.ribbon-r a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #fff; min-height: 44px; }
.ribbon-r .ic { width: 16px; height: 16px; color: var(--gold); }
.ribbon-hours { display: none; }
@media (min-width: 768px) { .ribbon-hours { display: inline; padding-right: 16px; border-right: 1px solid rgb(255 255 255 / .3); } }

.site-header { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / .97); border-bottom: 1px solid var(--line-cool); backdrop-filter: saturate(1.4) blur(8px); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand img { height: calc(var(--header-h) - 18px); width: auto; }
.menu-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0; background: transparent; color: var(--navy); border-radius: 8px; }
.menu-btn .ic { width: 28px; height: 28px; grid-area: 1 / 1; }
.menu-btn .ic:last-child { display: none; }
.menu-open .menu-btn .ic:first-child { display: none; }
.menu-open .menu-btn .ic:last-child { display: block; }
.nav {
  position: fixed; inset: calc(var(--header-h) + 38px) 0 0 0; background: #fff; padding: 12px var(--gutter) 32px;
  display: none; flex-direction: column; overflow-y: auto; z-index: 39;
}
.menu-open .nav { display: flex; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li a { display: block; padding: 14px 4px; font-size: 19px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-cool); }
.nav a[aria-current='page'] { color: var(--gold-ink); }
.nav-cta { margin-top: 20px; }
.nav-cta .btn { width: 100%; }
@media (min-width: 1024px) {
  .menu-btn { display: none; }
  .nav { position: static; display: flex; flex-direction: row; align-items: center; padding: 0; overflow: visible; background: none; gap: 20px; }
  .nav ul { display: flex; gap: 4px; }
  .nav li a { border: 0; padding: 10px 12px; font-size: 17px; position: relative; }
  .nav li a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .2s var(--ease); }
  .nav li a:hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); }
  .nav a[aria-current='page'] { color: var(--navy); }
  .nav-cta { margin: 0; }
  .nav-cta .btn { min-height: 44px; padding: 0 18px; font-size: 16px; }
}

/* ---------- แบนเนอร์สไลด์ (เต็มจอ ชนขอบ ครอปด้วยจุดโฟกัส) ---------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; height: min(70svh, 640px); min-height: 460px; }
@media (min-width: 768px) { .hero { height: min(78vh, 760px); min-height: 560px; } }
.hero-track, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; display: flex; align-items: center; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s var(--ease); }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(17 30 56 / .93) 0%, rgb(17 30 56 / .78) 38%, rgb(17 30 56 / .2) 72%, rgb(17 30 56 / 0) 100%),
              linear-gradient(0deg, rgb(17 30 56 / .55), rgb(17 30 56 / 0) 40%);
}
@media (max-width: 767px) {
  .hero-media::after { background: linear-gradient(0deg, rgb(17 30 56 / .96) 0%, rgb(17 30 56 / .88) 42%, rgb(17 30 56 / .35) 72%, rgb(17 30 56 / .05) 100%); }
  .hero-slide { align-items: flex-end; padding-bottom: 76px; }
  .hero .btn-row { flex-wrap: nowrap; gap: 10px; }
  .hero .btn { flex: 1 1 auto; padding: 0 14px; font-size: 16px; min-height: 48px; }
  .hero .rule { margin: 4px 0 12px; }
  .hero-text { font-size: 16px; margin-bottom: 16px; }
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy > * { max-width: 680px; }
.hero-eyebrow { color: var(--gold); font-weight: 600; font-size: 15px; letter-spacing: .06em; margin-bottom: 10px; }
.hero h1, .hero .h1 { margin-bottom: 10px; }
.hero h1 span, .hero .h1 span { display: block; }
.hero-text { font-size: 17px; color: #e6e9f0; }
@media (min-width: 768px) { .hero-text { font-size: 20px; } }
.hero-ctrl { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 12px; }
.hero-arrow { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgb(255 255 255 / .5); background: rgb(17 30 56 / .35); color: #fff; }
.hero-arrow:hover { background: rgb(17 30 56 / .7); }
.hero-dots { display: flex; gap: 4px; }
.hero-dot { width: 44px; height: 44px; border: 0; background: none; padding: 0; position: relative; }
.hero-dot::after { content: ''; position: absolute; left: 8px; right: 8px; top: 20px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .45); transition: background .2s; }
.hero-dot.is-active::after { background: var(--gold); }

.highlights { background: var(--navy); color: #fff; border-top: 1px solid rgb(199 163 105 / .35); }
.highlights ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 0; padding-top: 6px; padding-bottom: 6px; }
.highlights li { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 600; }
.highlights li + li { border-top: 1px solid rgb(255 255 255 / .12); }
.highlights .ic { color: var(--gold); width: 28px; height: 28px; }
@media (min-width: 768px) {
  .highlights ul { grid-template-columns: repeat(3, 1fr); padding-top: 18px; padding-bottom: 18px; }
  .highlights li { justify-content: center; padding: 6px 12px; }
  .highlights li + li { border-top: 0; border-left: 1px solid rgb(255 255 255 / .25); }
}

/* ---------- ส่วนเนื้อหา ---------- */
.sec { padding: 56px 0; }
.sec-tight { padding: 40px 0; }
@media (min-width: 768px) { .sec { padding: 88px 0; } .sec-tight { padding: 56px 0; } }
.sec-ivory { background: var(--ivory); }
.sec-head { margin-bottom: 28px; max-width: 760px; }
.sec-head p { color: var(--muted); }
.sec-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.sec-head-row h2 { margin-bottom: 0; }
.sec-note { text-align: center; color: var(--muted); margin: 28px 0 0; font-size: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; align-items: center; }
.sec-note a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; color: var(--navy); min-height: 44px; }
.sec-note .sep { color: var(--line); }
.empty-note { text-align: center; color: var(--muted); padding: 24px 0; }

.about-sec { background: var(--ivory); padding: 56px 0; }
@media (min-width: 768px) { .about-sec { padding: 88px 0; } }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.split-img { margin: 0; border-radius: var(--radius); overflow: hidden; }
.split-img img { width: 100%; height: 100%; }
.split-copy p { color: var(--muted); font-size: 18px; }

/* ตัวกรองและค้นหา */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.search-box { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-cool); border-radius: 8px; padding: 0 14px; min-height: 50px; background: #fff; }
.search-box .ic { color: var(--muted); width: 20px; height: 20px; }
.search-box input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 16px; min-width: 0; background: transparent; }
.search-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(199 163 105 / .25); }
.tabs { display: flex; border: 1px solid var(--line-cool); border-radius: 8px; overflow: hidden; background: #fff; max-width: 100%; }
.tab { border: 0; background: none; min-height: 48px; padding: 0 16px; font-weight: 600; font-size: 16px; white-space: nowrap; flex: 1 1 auto; }
.tab + .tab { border-left: 1px solid var(--line-cool); }
.tab.is-active { background: var(--gold); color: var(--navy); }
@media (max-width: 479px) { .tabs { width: 100%; } .tab { padding: 0 8px; font-size: 15px; } }

/* การ์ดแบบบ้าน: 2 / 2 / 3 / 3 คอลัมน์ */
.house-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .house-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.house-card[hidden] { display: none; }
.house-card-link { display: block; text-decoration: none; height: 100%; border-radius: var(--radius); transition: transform .2s var(--ease); }
.house-card-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; transition: box-shadow .2s var(--ease); }
.house-card-img img { width: 100%; height: 100%; }
.house-card h3 { margin-bottom: 2px; font-size: 16px; }
.price { display: block; color: var(--gold-ink); font-weight: 700; font-size: 18px; margin-bottom: 10px; }
.price small { font-size: .7em; font-weight: 600; }
.price-ask { font-size: 16px; }
.house-card .link-arrow { font-size: 15px; }
@media (min-width: 768px) { .house-card h3 { font-size: 20px; } .price { font-size: 24px; } .house-card .link-arrow { font-size: 16px; } }
@media (hover: hover) and (pointer: fine) {
  .house-card-link:hover { transform: translateY(-3px); }
  .house-card-link:hover .house-card-img { box-shadow: var(--shadow-up); }
}

/* แกลเลอรี masonry: 2 / 3 / 3 / 4 คอลัมน์ คงสัดส่วนเดิม ไม่มีกรอบ */
.masonry { columns: 2; column-gap: 10px; }
@media (min-width: 480px) { .masonry { columns: 3; column-gap: 12px; } }
@media (min-width: 1024px) { .masonry { columns: 4; column-gap: 16px; } }
.masonry-item { break-inside: avoid; margin: 0 0 10px; }
@media (min-width: 480px) { .masonry-item { margin-bottom: 12px; } }
@media (min-width: 1024px) { .masonry-item { margin-bottom: 16px; } }
.masonry-item[hidden] { display: none; }
.masonry-item a { display: block; border-radius: 6px; overflow: hidden; cursor: zoom-in; }
.masonry-item img { width: 100%; transition: transform .4s var(--ease); }
@media (hover: hover) and (pointer: fine) { .masonry-item a:hover img { transform: scale(1.03); } }
.masonry-item figcaption { font-size: 14px; color: var(--muted); padding: 6px 2px 0; }

/* โปรโมชั่น */
.promo { background: radial-gradient(120% 90% at 85% 10%, #1d3263 0%, var(--navy) 60%); color: #fff; padding: 56px 0; }
@media (min-width: 768px) { .promo { padding: 88px 0; } }
.promo-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .promo-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.promo .eyebrow { color: var(--gold); }
.promo h2 { color: #fff; }
.promo-lead { color: var(--gold); font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.promo-lead::before { content: ''; width: 40px; height: 1.5px; background: var(--gold); }
.promo-items { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.promo-items li { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid rgb(199 163 105 / .55); border-radius: var(--radius); background: rgb(255 255 255 / .04); }
.promo-items .num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--navy); font-weight: 700; flex: none; }
.promo-items strong { display: block; font-size: 18px; }
.promo-items small { color: #d5dae5; font-size: 15px; }
.promo-note { color: #d5dae5; font-size: 15px; }
.promo-poster { margin: 0; max-width: 460px; justify-self: center; }
.promo-poster a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px -20px rgb(0 0 0 / .6); cursor: zoom-in; }

/* รีวิว */
.review-grid { display: grid; gap: 12px; }
@media (min-width: 768px) { .review-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.review { margin: 0; background: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.review-head figcaption { font-weight: 600; }
.stars { display: inline-flex; gap: 2px; }
.stars .ic { width: 18px; height: 18px; }
.star-on { color: #d99a26; fill: currentColor; }
.star-off { color: #c9ced8; }
.review blockquote { margin: 0; color: var(--ink); }
.review-src { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* วิดีโอ: เลื่อนแนวนอนบนมือถือ 3 คอลัมน์บนจอใหญ่ */
.video-row { display: grid; grid-auto-flow: column; grid-auto-columns: 68%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: 0 var(--gutter); }
.video-card { scroll-snap-align: start; }
@media (min-width: 768px) { .video-row { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 24px; overflow: visible; margin: 0; padding: 0; } }
.video-cover { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--navy); margin-bottom: 12px; }
.video-cover img { width: 100%; }
.video-cover .play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgb(17 30 56 / .6); border: 2px solid #fff; color: #fff; transition: transform .2s var(--ease), background .2s; }
.video-cover .play .ic { width: 28px; height: 28px; margin-left: 3px; }
.video-cover:hover .play { transform: scale(1.06); background: rgb(17 30 56 / .8); }
.video-card h3 { font-size: 17px; margin-bottom: 6px; }

/* ขั้นตอน */
.process { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
@media (min-width: 768px) { .process { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.process-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.process .num { font-size: 34px; font-weight: 700; color: var(--gold-ink); line-height: 1.4; }
.process .ic { width: 40px; height: 40px; color: var(--gold-ink); }
.process p { color: var(--muted); }

/* บทความ */
.article-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .article-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
.article-card a { display: grid; grid-template-columns: 38% 1fr; gap: 16px; text-decoration: none; align-items: start; }
.article-img { border-radius: var(--radius); overflow: hidden; }
.article-img img { width: 100%; height: 100%; }
.article-body h3 { font-size: 17px; margin-bottom: 6px; }
.article-body p { color: var(--muted); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) { .article-body h3 { font-size: 20px; } }

/* FAQ */
.faq-split { display: grid; gap: 24px; }
@media (min-width: 900px) { .faq-split { grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; } }
.faq { display: grid; gap: 10px; }
.faq-item { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 600; cursor: pointer; min-height: 56px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { transition: transform .2s var(--ease); color: var(--gold-ink); }
.faq-item[open] summary .ic { transform: rotate(180deg); }
.faq-a { padding: 0 18px 4px; color: var(--muted); }

/* ติดต่อ + ฟอร์ม */
.contact { padding: 56px 0; }
@media (min-width: 768px) { .contact { padding: 88px 0; } }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; } }
.contact-name { font-weight: 700; font-size: 19px; margin-bottom: 0; }
.contact-list { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 10px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .ic { color: var(--gold-ink); margin-top: 3px; }
.contact-list .ic-brand { color: #06c755; }
.contact-list a { text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; }
.contact-list a:hover { text-decoration: underline; }
.contact-photo { margin: 20px 0 16px; border-radius: var(--radius); overflow: hidden; }
.contact-photo img { width: 100%; height: 100%; }
.lead-form { background: var(--ivory); border-radius: 14px; padding: 24px 20px; }
@media (min-width: 768px) { .lead-form { padding: 32px 28px; } }
.lead-form h3 { font-size: 21px; margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 16px; }
.field .req { color: #b42318; }
.field input[type='text'], .field input[type='tel'], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; min-height: 50px; border: 1px solid #cdd3dd; border-radius: 8px; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgb(199 163 105 / .3); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: #b42318; }
.field-err { color: #b42318; font-size: 15px; margin: 6px 0 0; min-height: 0; }
.field-err:empty { display: none; }
.field-check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.field-check input { width: 22px; height: 22px; margin: 4px 0 0; accent-color: var(--navy); }
.field-check label { font-weight: 400; margin: 0; line-height: 1.7; }
.field-check label a { display: inline-block; padding: 8px 0; margin: -8px 0; min-width: 44px; min-height: 44px; }
.field-check input, .hp input { font-size: 16px; }
.field-check .field-err { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 12px 0 0; font-weight: 600; }
.form-status.ok { color: #1a7f37; background: #eaf6ec; padding: 12px 14px; border-radius: 8px; }
.form-status.err { color: #b42318; }
.lead-form button[disabled] { opacity: .65; cursor: progress; }

/* หัวหน้าย่อย */
.page-head { background: linear-gradient(90deg, var(--navy), var(--navy-2)); color: #fff; padding: 32px 0 36px; }
@media (min-width: 768px) { .page-head { padding: 48px 0 56px; } }
.page-head h1 { font-size: clamp(28px, 5vw, 48px); margin-bottom: 8px; }
.page-head .lead { color: #d9dee8; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: #c3cad8; margin-bottom: 12px; }
.crumbs a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .ic { width: 14px; height: 14px; }

.values { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .values { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.values li { padding: 24px; border-radius: var(--radius); background: var(--ivory); }
.values .ic { width: 36px; height: 36px; color: var(--gold-ink); margin-bottom: 10px; }
.values h2 { font-size: 20px; margin-bottom: 6px; }
.values p { color: var(--muted); margin: 0; }

.prose { max-width: 760px; }
.prose h2 { font-size: clamp(22px, 3.2vw, 28px); margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }
.prose-img { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; }
.prose-img img { width: 100%; height: 100%; }
.prose-cta { margin-top: 32px; }
.err-list { color: #b42318; }

.house-detail { display: grid; gap: 24px; }
@media (min-width: 900px) { .house-detail { grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; } }
.house-main { margin: 0; border-radius: var(--radius); overflow: hidden; }
.house-main a { cursor: zoom-in; display: block; }
.house-main img { width: 100%; height: 100%; }
.house-price .price { font-size: 30px; }
.specs { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.specs li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs strong { margin-left: auto; }
.specs .ic { color: var(--gold-ink); }

/* ท้ายเว็บ */
.site-footer { background: var(--navy); color: #d9dee8; padding: 48px 0 0; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr .8fr 1fr; gap: 40px; } }
.footer-brand img { width: 200px; margin-bottom: 16px; }
.footer-addr { font-size: 15px; color: #b9c1d1; }
.site-footer h2 { color: var(--gold); font-size: 18px; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.site-footer ul a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 8px 0; min-height: 44px; min-width: 44px; }
.site-footer ul a:hover { color: #fff; text-decoration: underline; }
.footer-contact .ic { color: var(--gold); width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid rgb(199 163 105 / .4); margin-top: 32px; padding: 18px var(--gutter); text-align: center; font-size: 14px; }
.footer-bottom p { margin: 0; }

/* ปุ่มลอยมือถือ: ไลน์ + โทร สูง 56px */
.float-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: 1fr 1fr; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px -8px rgb(17 30 56 / .35); }
.float-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; text-decoration: none; font-size: 17px; }
.float-line { background: #06c755; color: #fff; }
.float-call { background: var(--navy); color: #fff; }
.float-call .ic { color: var(--gold); }
@media (max-width: 1023px) { :root { --float-h: calc(56px + env(safe-area-inset-bottom)); } }
@media (min-width: 1024px) { .float-bar { display: none; } }

/* หน้าต่างดูภาพ/วิดีโอ */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(8 14 28 / .9); }
.modal-box { position: relative; width: min(1200px, 100vw); height: 100%; display: grid; place-items: center; padding: 56px 12px 24px; }
.modal-content { max-width: 100%; max-height: 100%; display: grid; place-items: center; }
.modal-content img { max-width: 100%; max-height: calc(100svh - 120px); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.modal-content p { color: #e6e9f0; text-align: center; margin: 10px 0 0; font-size: 15px; }
.modal-content iframe, .modal-content video { width: min(380px, 92vw); aspect-ratio: 9 / 16; max-height: calc(100svh - 110px); border: 0; border-radius: 10px; background: #000; }
.modal-close, .modal-nav { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; z-index: 2; }
.modal-close { top: 8px; right: 8px; }
.modal-nav { top: 50%; transform: translateY(-50%); }
.modal-prev { left: 8px; }
.modal-next { right: 8px; }
.modal-nav[hidden] { display: none; }
.modal-close:hover, .modal-nav:hover { background: rgb(255 255 255 / .25); }

/* ปรากฏตอนเลื่อนถึง: ขยับขึ้น 20px จางเข้า 500ms เล่นครั้งเดียว */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-img { height: 100%; }
}
