/* ฟอนต์เก็บบนเซิร์ฟเวอร์เอง (Mali, Mitr — SIL Open Font License, ดู fonts/OFL.txt) ตัดเหลือตัวอักษรไทย+ละติน */
@font-face { font-family: "Mali"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/mali-400.woff") format("woff"); }
@font-face { font-family: "Mali"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/mali-700.woff") format("woff"); }
@font-face { font-family: "Mitr"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/mitr-600.woff") format("woff"); }

:root {
  --head: "Mitr", "Mali", "Leelawadee UI", Tahoma, sans-serif;
  --orange: #F28C28;
  --orange-d: #C86A12;
  --cream: #FFF6E9;
  --cream-2: #FFE9CC;
  --brown: #3E2614;
  --mint: #BDEBC8;
  --pink: #FFB3B3;
  --radius: 22px;
  --shadow: 4px 5px 0 var(--brown);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Mali", "Itim", "Sarabun", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--brown);
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 64 64'%3E%3Cg fill='%23F28C28' fill-opacity='.10' transform='rotate(-18 32 32) scale(.5) translate(32 32)'%3E%3Cellipse cx='32' cy='42' rx='14' ry='11'/%3E%3Cellipse cx='14' cy='26' rx='6' ry='8'/%3E%3Cellipse cx='26' cy='15' rx='6' ry='8'/%3E%3Cellipse cx='38' cy='15' rx='6' ry='8'/%3E%3Cellipse cx='50' cy='26' rx='6' ry='8'/%3E%3C/g%3E%3C/svg%3E");
}
.wrap { width: min(1000px, 100% - 2rem); margin-inline: auto; }
svg { display: block; }
.ico { width: 1.1em; height: 1.1em; fill: var(--orange); stroke: var(--brown); stroke-width: 2.5; paint-order: stroke; flex: none; }

/* หัวเว็บ */
.hero { background: var(--orange); border-bottom: 4px solid var(--brown); position: relative; padding: 1.5rem 0 3.2rem; }
.hero-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .1rem .8rem; background: var(--cream); border: 3px solid var(--brown); border-radius: 999px; font-weight: 700; font-size: .95rem; }
h1, h2, h3, .btn, .badge, .price { font-family: var(--head); font-weight: 600; }
h1 { font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.15; margin: .6rem 0 .2rem; text-shadow: 2px 3px 0 rgba(255,246,233,.75); }
.tagline { margin: 0 0 1.1rem; font-size: 1.15rem; }
.hero-cat { width: clamp(130px, 28vw, 230px); aspect-ratio: 140 / 150; flex: none; transform-origin: 50% 100%; }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 30px; fill: var(--cream); }
.wave { transform: translateY(100%); fill: var(--orange); stroke: none; }

/* ปุ่ม */
.btn {
  display: inline-block; padding: .7rem 1.6rem; background: var(--cream); color: var(--brown);
  border: 3px solid var(--brown); border-radius: 999px; font-family: var(--head); font-size: inherit; font-weight: 600; text-decoration: none;
  box-shadow: 3px 4px 0 var(--brown); transition: transform .12s, box-shadow .12s;
}
.btn:hover, .btn:focus-visible { transform: translate(2px, 2px); box-shadow: 1px 2px 0 var(--brown); }
.btn:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; }
.btn-line { background: #B6EE9A; }
[hidden] { display: none !important; }

/* หัวข้อ */
main { padding-top: 3.2rem; padding-bottom: 2rem; }
section { margin-bottom: 2.6rem; }
h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.6rem; margin: 0 0 .5rem; padding-bottom: .35rem; border-bottom: 4px dashed var(--orange); }
.count { margin: .4rem 0 1rem; font-weight: 700; }

/* การ์ดห้อง */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.3rem; }
.card { position: relative; background: #fff; border: 3px solid var(--brown); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.2rem; box-shadow: var(--shadow); }
.card h3 { margin: .2rem 4.2rem .1rem 0; font-size: 1.2rem; line-height: 1.3; }
.badge { position: absolute; top: -.8rem; right: 1rem; padding: .05rem .9rem; background: var(--mint); border: 3px solid var(--brown); border-radius: 999px; font-weight: 600; transform: rotate(4deg); }
.area, .meta { margin: 0; color: #6B4A33; }
.card-rented { background: #FBF4EA; }
.badge-rented { background: #E6DCD0; transform: rotate(-3deg); }
.price { margin: .7rem 0 0; font-size: 1.35rem; font-weight: 600; color: var(--orange-d); }

/* ห้องเต็ม */
.empty { text-align: center; background: var(--cream-2); border: 3px dashed var(--brown); border-radius: var(--radius); padding: 1.4rem 1.2rem 1.6rem; }
.empty-cat { width: 180px; aspect-ratio: 160 / 100; margin: 0 auto .4rem; }
.empty h3 { margin: 0 0 .3rem; font-size: 1.35rem; }
.empty p { margin: 0 auto; max-width: 34em; }

/* โซน */
.chips { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.chip { background: #fff; border: 3px solid var(--brown); border-radius: 999px; padding: .25rem 1rem; box-shadow: 2px 3px 0 var(--brown); }
.chip span { color: #6B4A33; }

/* ติดต่อ */
.contact-card { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: var(--cream-2); border: 3px solid var(--brown); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); margin-top: 1rem; }
.contact-cat { width: 110px; aspect-ratio: 140 / 150; }
.contact-btns { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ท้ายเว็บ */
footer { text-align: center; padding: 1rem 0 2.2rem; color: #6B4A33; }
.paws { display: flex; justify-content: center; gap: 1.4rem; margin-bottom: .6rem; }
.paws svg { width: 28px; height: 28px; fill: var(--orange); opacity: .8; }
.paws svg:nth-child(odd) { transform: translateY(8px) rotate(-14deg); }
.paws svg:nth-child(even) { transform: rotate(14deg); }
footer p { margin: 0; font-size: .95rem; }

/* ขยับเล็กน้อย (ปิดเมื่อผู้ใช้ตั้งลดการเคลื่อนไหว) */
@media (prefers-reduced-motion: no-preference) {
  .hero-cat { animation: bob 3.2s ease-in-out infinite; }
  .cat-tail { transform-origin: 100px 120px; animation: tail 2.4s ease-in-out infinite; }
  .cat-eyes { transform-origin: 68px 58px; animation: blink 5s infinite; }
  .zzz { animation: zzz 2.6s ease-in-out infinite; }
}
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes tail { 50% { transform: rotate(10deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes zzz { 50% { transform: translateY(-4px); opacity: .55; } }

@media (max-width: 520px) {
  .hero-in { flex-direction: column-reverse; align-items: flex-start; }
  .hero-cat { align-self: flex-end; margin-bottom: -.5rem; }
}
