/* =========================================================
   ขายที่ดิน 2 ไร่ — Dark Glass (โทนเดียวกับ AKSPACE)
   ออกแบบโดย ทีมบ้านดี
   ========================================================= */
@font-face { font-family: 'LINE Seed Sans TH'; src: url('fonts/LINESeedSansTH_W_Rg.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'LINE Seed Sans TH'; src: url('fonts/LINESeedSansTH_W_Bd.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'LINE Seed Sans TH'; src: url('fonts/LINESeedSansTH_W_XBd.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'LINE Seed Sans TH'; src: url('fonts/LINESeedSansTH_W_He.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0d14;
  --bg-2: #10131c;
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, .66);
  --text-3: rgba(235, 235, 245, .38);
  --glass: rgba(40, 44, 58, .38);
  --glass-strong: rgba(17, 19, 28, .82);
  --hair: rgba(255, 255, 255, .08);
  --hair-2: rgba(255, 255, 255, .14);
  --fill: rgba(118, 118, 128, .16);
  --blue: #0a84ff;
  --green: #30d158;
  --leaf: #7bdc6a;
  --gold: #ffcf6b;
  --orange: #ff9f0a;
  --red: #ff453a;
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --blur: blur(28px) saturate(1.8);
  --shadow: 0 12px 44px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3),
            inset 0 1px 0 rgba(255, 255, 255, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1180px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--bg); }
body {
  margin: 0;
  font-family: 'LINE Seed Sans TH', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { /* ambient glow */
  content: ''; position: fixed; inset: -20vh -20vw; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 12% 8%, rgba(48, 209, 88, .13), transparent 60%),
    radial-gradient(45vw 45vw at 92% 30%, rgba(10, 132, 255, .12), transparent 60%),
    radial-gradient(40vw 40vw at 50% 100%, rgba(255, 159, 10, .08), transparent 60%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.glass {
  background: var(--glass); border: 1px solid var(--hair);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-xl); box-shadow: var(--shadow);
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(11, 13, 20, .72); border-color: var(--hair);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.bar { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.logo .mark { width: 34px; height: 34px; border-radius: 10px; display: block; box-shadow: 0 6px 18px rgba(48, 209, 88, .35); }
.logo .mark img { width: 34px; height: 34px; display: block; }
.logo span:last-child { font-size: 19px; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  text-decoration: none; color: var(--text-2); font-size: 15px; padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.topnav a:hover { color: var(--text); background: var(--fill); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--hair-2);
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  color: var(--text); background: var(--fill);
  transition: transform .35s var(--ease), background .2s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); background: rgba(118, 118, 128, .26); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: linear-gradient(135deg, #34d45c, #1fb84a); border-color: transparent; color: #04210c; box-shadow: 0 10px 30px rgba(48, 209, 88, .35); }
.btn.primary:hover { box-shadow: 0 14px 38px rgba(48, 209, 88, .5); background: linear-gradient(135deg, #3ee066, #22c24f); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn.lg { height: 54px; padding: 0 28px; font-size: 17px; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: flex-end; padding: 120px 0 56px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); animation: kenburns 24s ease-in-out infinite alternate; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 13, 20, .55) 0%, rgba(11, 13, 20, .1) 30%, rgba(11, 13, 20, .55) 65%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11, 13, 20, .7) 0%, transparent 70%);
}
@keyframes kenburns { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.18) translate(-2%, -2%); } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(255, 69, 58, .16); border: 1px solid rgba(255, 69, 58, .35); color: #ffb1ab;
  font-size: 14px; font-weight: 700;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 69, 58, .7); animation: ping 1.8s infinite; margin-left: 4px; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255, 69, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); } }
.hero h1 {
  font-size: clamp(40px, 7.5vw, 88px); line-height: 1.05; letter-spacing: -.03em; font-weight: 900;
  margin: 18px 0 14px; max-width: 14ch;
}
.hero h1 .grad { background: linear-gradient(120deg, #a8f0a0 0%, #30d158 40%, #5ac8fa 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 2.1vw, 21px); color: var(--text-2); max-width: 46ch; margin: 0 0 28px; }
.hero .lead b { color: var(--text); font-weight: 700; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 48px; }
.stat { padding: 18px 20px; border-radius: var(--r-lg); }
.stat .k { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat .k svg { width: 16px; height: 16px; color: var(--leaf); }
.stat .v { font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin-top: 4px; }
.stat .s { font-size: 13px; color: var(--text-3); }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head .tag { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.12; letter-spacing: -.025em; margin: 6px 0 0; font-weight: 800; }
.sec-head p { color: var(--text-2); margin: 0; max-width: 46ch; }

/* ---------- 3D ---------- */
.viewer { position: relative; height: min(76vh, 680px); min-height: 440px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--hair); box-shadow: var(--shadow); background: #8fb8d8; }
.viewer canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.v-ui { position: absolute; left: 14px; right: 14px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.v-ui.top { top: 14px; justify-content: space-between; }
.v-ui.bottom { bottom: 14px; justify-content: center; }
.v-ui > * { pointer-events: auto; }
.seg {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: rgba(17, 19, 28, .62); border: 1px solid var(--hair-2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.seg button {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--text-2); background: transparent; border: 0;
  height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background .25s, color .25s;
}
.seg button svg { width: 16px; height: 16px; }
.seg button.on { background: rgba(255, 255, 255, .92); color: #0b0d14; }
.seg button:not(.on):hover { color: var(--text); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  background: rgba(17, 19, 28, .62); border: 1px solid var(--hair-2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.chip b { color: var(--text); }
.label3d {
  position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(17, 19, 28, .78); border: 1px solid var(--hair-2); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity .3s;
}
.label3d.big { font-size: 15px; padding: 7px 14px; background: linear-gradient(135deg, rgba(48, 209, 88, .95), rgba(31, 184, 74, .95)); color: #04210c; border: 0; box-shadow: 0 8px 24px rgba(48, 209, 88, .45); }
.label3d.road { background: rgba(255, 207, 107, .92); color: #2a1d00; border: 0; }
.v-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(180deg, #8fb8d8, #5d7d55); transition: opacity .6s; }
.v-loading.hide { opacity: 0; pointer-events: none; }
.v-hint { font-size: 13px; color: var(--text-3); margin-top: 12px; text-align: center; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feat { padding: 24px; border-radius: var(--r-lg); transition: transform .4s var(--ease), background .3s; }
.feat:hover { transform: translateY(-4px); background: rgba(52, 57, 74, .44); }
.feat .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.feat .ic svg { width: 24px; height: 24px; }
.feat h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.feat p { margin: 0; color: var(--text-2); font-size: 15px; }
.ic.g { background: rgba(48, 209, 88, .16); color: var(--green); }
.ic.b { background: rgba(10, 132, 255, .16); color: #4f9dff; }
.ic.o { background: rgba(255, 159, 10, .16); color: var(--orange); }
.ic.y { background: rgba(255, 207, 107, .16); color: var(--gold); }
.ic.p { background: rgba(191, 90, 242, .16); color: #d38bff; }
.ic.r { background: rgba(255, 69, 58, .16); color: #ff7a70; }

.spec { margin-top: 14px; padding: 8px 24px; border-radius: var(--r-lg); }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.spec-row:last-child { border-bottom: 0; }
.spec-row span { color: var(--text-2); }
.spec-row b { text-align: right; font-weight: 700; }
.note { font-size: 13px; color: var(--text-3); margin-top: 10px; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 10px; }
.gallery button {
  position: relative; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; background: var(--bg-2);
}
.gallery button:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery button:nth-child(6) { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; }
.gallery button:hover img { transform: scale(1.06); filter: brightness(1.08); }
.gallery button::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hair); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(5, 6, 10, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.lightbox.open { display: flex; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); user-select: none; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--hair-2);
  background: rgba(40, 44, 58, .6); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.lb-btn svg { width: 22px; height: 22px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; } .lb-close { top: 16px; right: 16px; }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 14px; color: var(--text-2); }

/* ---------- nearby ---------- */
.places { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.place { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--r-lg); transition: transform .4s var(--ease), background .3s; }
.place:hover { transform: translateY(-3px); background: rgba(52, 57, 74, .44); }
.place .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.place .ic svg { width: 22px; height: 22px; }
.place b { display: block; font-size: 17px; font-weight: 700; line-height: 1.35; }
.place span { font-size: 14px; color: var(--text-2); }
.place .dist { margin-left: auto; font-size: 26px; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.place .dist small { font-size: 14px; font-weight: 700; color: var(--text-2); }
.place:first-child { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(255, 69, 58, .16), rgba(40, 44, 58, .38)); border-color: rgba(255, 69, 58, .3); }
.place:first-child .dist { font-size: 34px; color: #ff8a80; }

/* ---------- map ---------- */
.map-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.map-frame { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--hair); min-height: 420px; background: var(--bg-2); }
.map-frame iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
.map-info { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.map-info h3 { margin: 0; font-size: 22px; font-weight: 800; }
.addr { color: var(--text-2); margin: 0; }
.near { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.near li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.near li svg { width: 18px; height: 18px; color: var(--leaf); flex: none; margin-top: 3px; }
.coords { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.map-info .btns { display: grid; gap: 10px; margin-top: auto; }

/* ---------- contact ---------- */
.contact { position: relative; overflow: hidden; padding: 56px 32px; text-align: center; border-radius: 36px; }
.contact::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(60% 80% at 50% 0%, rgba(48, 209, 88, .35), transparent 70%);
}
.contact h2 { font-size: clamp(30px, 5vw, 52px); letter-spacing: -.03em; margin: 0 0 8px; font-weight: 900; line-height: 1.1; }
.contact p { color: var(--text-2); margin: 0 auto 26px; max-width: 44ch; }
.phone-big { display: block; font-size: clamp(36px, 7vw, 68px); font-weight: 900; letter-spacing: -.02em; text-decoration: none; margin: 4px 0 24px; font-variant-numeric: tabular-nums; }
.phone-big:hover { color: var(--green); }
.contact .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
footer { padding: 40px 0 120px; text-align: center; color: var(--text-3); font-size: 14px; }
footer .credit {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 16px 8px 8px; border-radius: 999px;
  text-decoration: none; color: var(--text-2); background: var(--fill); border: 1px solid var(--hair);
  transition: color .2s, background .2s, transform .3s var(--ease);
}
footer .credit:hover { color: var(--text); background: rgba(118, 118, 128, .26); transform: translateY(-2px); }
footer .credit .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #bf5af2, #0a84ff); color: #fff; font-weight: 900; font-size: 13px; }
footer .credit b { color: var(--text); }

/* ---------- sticky call (mobile) ---------- */
.callbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: none; gap: 8px; padding: 8px; border-radius: 999px;
  background: rgba(17, 19, 28, .8); border: 1px solid var(--hair-2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.callbar .btn { flex: 1; height: 48px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .map-grid { grid-template-columns: 1fr; }
  .places { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 160px; }
  .gallery button:nth-child(6) { grid-column: auto; }
}
@media (max-width: 640px) {
  .topnav { display: none; }
  .bar .btn.sm { margin-left: auto; }
  section { padding: 64px 0; }
  .hero { padding-bottom: 32px; }
  .stats { gap: 8px; margin-top: 32px; }
  .stat { padding: 14px; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: 8px; }
  .viewer { height: 72vh; min-height: 420px; border-radius: 22px; }
  .seg button { padding: 0 11px; font-size: 13px; }
  .seg button .t { display: none; }
  .label3d { font-size: 11px; padding: 4px 9px; }
  .label3d.big { font-size: 13px; }
  .callbar { display: flex; }
  .contact { padding: 40px 18px; border-radius: 28px; }
  .lb-prev, .lb-next { bottom: 16px; top: auto; }
  .lb-prev { left: 16px; } .lb-next { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
