/* Porter — luxury modern homes, Bangkok
   Palette: warm white, deep graphite, natural moss green */
:root {
  --paper: #F5F3EE;
  --paper-2: #ECE8DF;
  --stone: #CFC8BA;
  --graphite: #2B2E2C;
  --graphite-2: #4A4E4B;
  --moss: #4E6650;
  --moss-deep: #364A39;
  --sage: #A9B5A2;
  --white: #FFFFFF;

  --font-head: "Anuphan", "IBM Plex Sans Thai", sans-serif;
  --font-body: "IBM Plex Sans Thai", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --space: clamp(88px, 12vw, 160px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Type scale */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.display { font-size: clamp(44px, 7.4vw, 104px); line-height: 1.05; }
h2 { font-size: clamp(34px, 4.6vw, 60px); }
h3 { font-size: 22px; line-height: 1.35; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--graphite-2); max-width: 46ch; }
.muted { color: var(--graphite-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  padding: 16px 30px; border-radius: 999px;
  border: 1.5px solid var(--graphite);
  background: var(--graphite); color: var(--paper);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--moss-deep); border-color: var(--moss-deep); }
.btn--ghost { background: transparent; color: var(--graphite); }
.btn--ghost:hover { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245,243,238,.92); backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.logo svg { width: 26px; height: 34px; }
.nav { display: flex; align-items: center; gap: 34px; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--moss); }
.nav .btn { padding: 11px 22px; font-size: 15px; }
.nav-toggle { display: none; background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; color: var(--graphite); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 0; }
.hero-text { position: relative; z-index: 2; }
.hero h1 { max-width: 14ch; }
.nw { white-space: nowrap; }
.hero .lead { margin: 28px 0 40px; }
.hero-art { margin-top: 24px; width: 100%; height: clamp(240px, 34vw, 480px); }
.hero-art .draw { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.4s cubic-bezier(.6,.1,.2,1) .2s forwards; }
.hero-art .fade { opacity: 0; animation: fade 1.2s ease 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* Sections */
.section { padding: var(--space) 0; }
.section--dark { background: var(--graphite); color: var(--paper); }
.section--dark .lead, .section--dark .muted { color: var(--stone); }
.section--green { background: var(--moss-deep); color: var(--paper); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 56px; flex-wrap: wrap; }
.section-head .lead { margin-top: 16px; }

/* Property card */
.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.prop { display: flex; flex-direction: column; }
.prop-art { aspect-ratio: 4 / 3.2; border-radius: 4px; overflow: hidden; }
.prop-art svg, .prop-art img, .detail-art img { width: 100%; height: 100%; object-fit: cover; }
.prop-art, .detail-art { background: var(--paper-2); }
.hero-photo { margin-top: 56px; height: clamp(300px, 52vw, 640px); overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; animation: settle 1.6s cubic-bezier(.2,.6,.2,1) both; }
@keyframes settle { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-photo img { animation: none; } }
.prop-body { padding-top: 20px; }
.prop-body h3 { margin-bottom: 4px; }
.prop-meta { font-size: 15px; color: var(--graphite-2); }
.prop-price { font-family: var(--font-head); font-weight: 600; font-size: 19px; margin-top: 10px; }
.prop-sold .prop-price { color: var(--graphite-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.prop-status { font-size: 14px; color: var(--moss); margin-top: 2px; }

/* Featured: one large + two */
.featured { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.featured .prop:first-child { grid-row: span 2; }
.featured .prop:first-child .prop-art { aspect-ratio: auto; flex: 1; min-height: 420px; }
.featured .prop:not(:first-child) .prop-art { aspect-ratio: 16 / 9; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid rgba(245,243,238,.18); }
.service { padding: 40px 32px 8px 0; }
.service + .service { padding-left: 32px; border-left: 1px solid rgba(245,243,238,.18); }
.service h3 { font-size: 26px; margin-bottom: 12px; }
.service p { color: var(--stone); max-width: 32ch; }

/* About + numbers */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.about p { margin-top: 24px; max-width: 42ch; color: var(--graphite-2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 32px; }
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: clamp(52px, 6vw, 84px); line-height: 1; color: var(--moss); letter-spacing: -0.03em; }
.stat-label { margin-top: 10px; color: var(--graphite-2); }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.review blockquote { font-family: var(--font-head); font-size: 22px; font-weight: 500; line-height: 1.5; }
.review cite { display: block; margin-top: 20px; font-style: normal; font-size: 15px; color: var(--sage); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); }
.contact-info { margin-top: 36px; display: grid; gap: 18px; }
.contact-info dt { font-size: 14px; color: var(--graphite-2); }
.contact-info dd { font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--graphite);
  background: var(--white); border: 1px solid var(--stone); border-radius: 6px;
  padding: 14px 16px; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(78,102,80,.18); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-error { color: #9A3B2E; font-size: 15px; }
.form-done {padding: 28px; border-radius: 6px; background: var(--paper-2); }
.form-done h3 { margin-bottom: 6px; }

/* Listings page */
.page-head { padding: clamp(56px, 8vw, 104px) 0 48px; }
.page-head .lead { margin-top: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.chip {
  font: inherit; font-size: 15px; padding: 9px 20px; border-radius: 999px;
  background: transparent; border: 1px solid var(--stone); color: var(--graphite); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: var(--paper); }
.count { color: var(--graphite-2); margin-bottom: 24px; font-size: 15px; }

/* Card links */
.prop-link { display: block; border-radius: 4px; overflow: hidden; }
.prop-link .prop-art { transition: transform .5s ease; }
.prop-link:hover .prop-art { transform: scale(1.02); }
.prop-body h3 a:hover { color: var(--moss); }
.featured .prop:first-child .prop-link { flex: 1; display: flex; }
.featured .prop:first-child .prop-link .prop-art { flex: 1; }

/* Property detail */
.detail-head { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 40px; }
.back { display: inline-block; font-size: 15px; color: var(--graphite-2); margin-bottom: 28px; border-bottom: 1px solid var(--stone); }
.back:hover { color: var(--moss); border-color: var(--moss); }
.detail-title { font-size: clamp(40px, 6vw, 80px); }
.detail-head .lead { margin-top: 14px; }
.detail-art { aspect-ratio: 16 / 7; border-radius: 4px; overflow: hidden; }
.detail-art svg { width: 100%; height: 100%; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 8vw, 120px); padding-top: 64px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; padding-bottom: 48px; border-bottom: 1px solid var(--stone); }
.facts dt { font-size: 14px; color: var(--graphite-2); }
.facts dd { font-family: var(--font-head); font-weight: 700; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; }
.detail-sub { font-size: clamp(26px, 2.6vw, 34px); margin: 48px 0 16px; }
.book .detail-sub { margin-top: 0; }
.book { background: var(--paper-2); padding: clamp(28px, 4vw, 44px); border-radius: 6px; align-self: start; }
.book .form { margin-top: 28px; }
.highlights { list-style: none; display: grid; gap: 14px; }
.highlights li { padding-left: 22px; position: relative; font-size: 18px; }
.highlights li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--moss); }

/* Floating quick contact */
.quick { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; gap: 10px; }
.quick-btn {
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--graphite); color: var(--paper);
  box-shadow: 0 8px 24px rgba(43,46,44,.22);
}
.quick-btn:hover { background: var(--moss-deep); }
.quick-line { background: #06C755; color: #fff; }
.quick-line:hover { background: #05a548; }

/* Footer */
.site-footer { background: var(--graphite); color: var(--stone); padding: 64px 0 40px; font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-end; }
.site-footer .logo { color: var(--paper); }
.site-footer nav { display: flex; gap: 28px; }
.site-footer nav a:hover { color: var(--paper); }

/* Responsive */
@media (max-width: 960px) {
  .props, .reviews { grid-template-columns: 1fr 1fr; }
  .featured { grid-template-columns: 1fr; }
  .featured .prop:first-child { grid-row: auto; }
  .featured .prop:first-child .prop-art { min-height: 0; aspect-ratio: 4 / 3; }
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 32px 0; border-left: 0; border-bottom: 1px solid rgba(245,243,238,.18); }
  .about, .contact, .detail-grid { grid-template-columns: 1fr; }
  .detail-art { aspect-ratio: 4 / 3; }
}
@media (max-width: 720px) {
  :root { --space: 72px; }
  body { font-size: 16px; line-height: 1.7; }
  .site-header .wrap { height: 64px; }
  .logo { font-size: 23px; }
  .logo img, .logo svg { width: 22px; height: 29px; }

  /* Full-screen menu with large tap targets */
  .nav { display: none; position: fixed; top: 64px; left: 0; right: 0; height: calc(100vh - 64px); height: calc(100dvh - 64px); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 32px; background: var(--paper); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { font-family: var(--font-head); font-size: 24px; font-weight: 600; padding: 18px 0; border-bottom: 1px solid var(--paper-2); }
  .nav .btn { margin-top: 28px; padding: 16px; font-size: 17px; }
  .nav-toggle { display: block; padding: 12px 0 12px 16px; font-size: 16px; }
  body.menu-open { overflow: hidden; }

  /* Hero */
  .hero { padding-top: 40px; }
  .hero .lead { margin: 18px 0 28px; }
  .hero .btn-row .btn { flex: 1; padding: 15px 12px; }
  .hero-photo { margin-top: 40px; height: 62vw; min-height: 240px; }

  /* Headings & sections */
  h2 { font-size: 32px; }
  .section-head { margin-bottom: 32px; gap: 20px; }
  .section-head > .btn { order: 2; }
  .prop-body { padding-top: 14px; }
  .props, .featured { gap: 40px; }

  /* Filters: one swipeable row */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 32px; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; padding: 10px 18px; }
  .page-head { padding: 40px 0 32px; }

  /* Services, stats, reviews */
  .service h3 { font-size: 22px; }
  .stats { gap: 32px 20px; }
  .stat-num { font-size: 48px; }
  .review blockquote { font-size: 19px; }
  .reviews { gap: 36px; }

  /* Detail */
  .detail-head { padding-top: 28px; padding-bottom: 28px; }
  .back { margin-bottom: 20px; }
  .detail-grid { padding-top: 40px; }
  .facts { gap: 20px; padding-bottom: 32px; }
  .facts dd { font-size: 22px; }
  .detail-sub { margin-top: 36px; }
  .highlights li { font-size: 16px; }
  .book { margin: 0 calc(var(--gutter) * -1); border-radius: 0; }

  /* Forms: full-width button, no iOS zoom */
  .field input, .field select, .field textarea { font-size: 16px; padding: 14px; }
  .form .btn { width: 100%; }
  .contact-info dd { font-size: 18px; }
  .props, .reviews { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .quick { left: 0; right: 0; bottom: 0; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(245,243,238,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--paper-2); }
  .quick-btn { flex: 1; text-align: center; box-shadow: none; padding: 13px; }
  body.menu-open .quick { display: none; }
  .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer nav { flex-wrap: wrap; gap: 12px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art .draw { animation: none; stroke-dashoffset: 0; }
  .hero-art .fade { animation: none; opacity: 1; }
}
