/* ปุณยมันตรา รีสอร์ท — ทอง / ม่วงเข้ม / พื้นดำ
   รอบ 2 — Beer: "มันดูธรรมดามากๆ เว็บโฆษณาเลย ... มีลูปเล่น มีความแวววาว มีความโปร่งใส มีความ AQUA"
   รอบแรกเป็นกล่องทึบวางเรียงบนพื้นดำ ซึ่งอ่านง่ายแต่ไม่มีอะไรให้มอง งานรอบนี้เพิ่มสามอย่างที่เขาขอ:
     โปร่งใส  → พื้นผิวแก้ว (backdrop-filter) ทุกใบ เห็นแสงข้างหลังทะลุผ่าน
     แวววาว   → ประกายทองกวาดผ่านตัวอักษร ปุ่ม และขอบการ์ด
     AQUA/ลูป → ชั้นแสงของเหลวไหลวนไม่หยุด + ระลอกคลื่นใต้หัวข้อ
   ทุกอนิเมชันปิดตัวเองเมื่อผู้ใช้ตั้ง prefers-reduced-motion */

:root {
  --gold: #d4af37;
  --gold-bright: #f4d97a;
  --gold-deep: #8a6f1c;
  --purple: #2a1640;
  --purple-lift: #452a66;
  --aqua: #4fd6c4;
  --aqua-dim: #1d6f68;
  --ink: #05050a;
  --ink-2: #0b0b13;
  --text: #f2ede4;
  --text-dim: #a8a196;
  --line: #ffffff1a;
  --glass: #ffffff0a;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --wrap: 1240px;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── ชั้นแสงของเหลว ────────────────────────────────────────────────
   สามก้อนสีเคลื่อนคนละความเร็ว คนละทิศ ทำให้พื้นดำ "มีชีวิต" ตลอดเวลา
   โดยไม่ต้องมีวิดีโอพื้นหลังหรือ canvas ให้หนักเครื่อง */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38rem 30rem at 18% 12%, #d4af3726, transparent 62%),
    radial-gradient(34rem 28rem at 84% 22%, #452a6659, transparent 66%),
    radial-gradient(30rem 26rem at 52% 88%, #4fd6c41f, transparent 64%);
  filter: blur(20px);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2.5%, -2%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2.5%, 0) scale(1.02); }
}

/* เส้นตารางบางๆ ให้พื้นมีพื้นผิว ไม่ใช่สีเรียบ */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(#ffffff08 1px, transparent 1px),
    linear-gradient(90deg, #ffffff08 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(circle at 50% 30%, #000 10%, transparent 78%);
}

main, header, footer { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }

/* หัวข้อทอง — ไล่เฉดแล้วให้ประกายกวาดผ่านช้าๆ */
/* ประกายทองต้องทาที่ "ตัวที่มีข้อความจริง" ไม่ใช่ที่กล่องแม่
   ข้อความสองภาษาถูกห่อด้วย <span data-th> / <span data-en> เสมอ ถ้าตั้ง color:transparent
   ไว้ที่ h1 ตัวลูกจะรับ transparent ไปด้วยแต่ไม่มีพื้นหลังของตัวเองให้ clip — หัวเรื่องหายทั้งบรรทัด
   (เจอจริงตอนถ่ายหน้าจอรอบแรก: ฮีโร่เหลือแต่ปุ่ม ไม่มีตัวหนังสือ) */
.shine [data-th], .shine [data-en], .shine.solo {
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-bright) 18%, #fff8dc 26%, var(--gold-bright) 34%, var(--gold) 60%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 7s linear infinite;
}
@keyframes sweep { to { background-position: -260% 0; } }

p { margin: 0 0 1.1em; color: var(--text-dim); }
p.lead { color: var(--text); font-size: clamp(1rem, 1.6vw, 1.16rem); }
a { color: var(--gold-bright); text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
section { padding-block: clamp(4.5rem, 10vw, 9rem); position: relative; }

.eyebrow {
  display: flex; align-items: center; gap: .8rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .32em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 3rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }

/* ระลอกคลื่นใต้หัวข้อ — ส่วน AQUA ที่ Beer ขอ */
.ripple { position: relative; padding-bottom: .5em; }
.ripple::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: min(240px, 60%); height: 2px;
  background: linear-gradient(90deg, transparent, var(--aqua), var(--gold), transparent);
  background-size: 220% 100%;
  animation: sweep 5.5s linear infinite;
  opacity: .75;
}

/* ── กระจก ──────────────────────────────────────────────────────── */
.glass {
  background: linear-gradient(150deg, #ffffff12, #ffffff05 46%, #ffffff02);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
/* ขอบบนสว่างเหมือนแสงตกกระทบผิวแก้ว */
.glass::before {
  content: "";
  position: absolute; inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffffff59 24%, #f4d97a80 50%, #ffffff59 76%, transparent);
}

/* ── Header ─────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: #05050ab8;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.4rem; min-height: 76px; }

.brand { font-family: var(--serif); font-size: 1.4rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.brand span {
  background: linear-gradient(100deg, var(--gold), #fff8dc 40%, var(--gold));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sweep 6s linear infinite;
}

.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a {
  position: relative;
  color: var(--text-dim);
  font-size: .82rem; letter-spacing: .13em; text-transform: uppercase;
  padding: .45rem 0;
  transition: color .3s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--aqua));
  transition: width .35s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-bright); }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }

.head-actions { display: flex; align-items: center; gap: .7rem; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--glass); }
.lang-switch button { background: none; border: 0; color: var(--text-dim); font: inherit; font-size: .72rem; letter-spacing: .1em; padding: .34rem .68rem; cursor: pointer; transition: .25s; }
.lang-switch button[aria-pressed="true"] { background: linear-gradient(120deg, var(--gold), var(--gold-bright)); color: #14110a; font-weight: 700; }

/* ปุ่ม — ประกายวิ่งผ่านตอน hover */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .82rem 1.7rem;
  border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .17em; text-transform: uppercase;
  border: 1px solid #d4af377a;
  color: var(--gold-bright);
  background: #d4af370f;
  backdrop-filter: blur(8px);
  cursor: pointer;
  overflow: hidden;
  transition: color .3s, border-color .3s, box-shadow .4s, transform .3s;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, #ffffff5c 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform .75s ease;
}
.btn:hover { border-color: var(--gold); box-shadow: 0 0 26px #d4af3740; transform: translateY(-2px); }
.btn:hover::after { transform: translateX(130%); }
.btn-solid { background: linear-gradient(120deg, var(--gold), var(--gold-bright)); color: #14110a; border-color: transparent; }
.btn-solid:hover { box-shadow: 0 0 30px #d4af3766; }

.nav-toggle { display: none; background: none; border: 0; color: var(--gold); font-size: 1.5rem; cursor: pointer; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { min-height: min(92vh, 900px); display: grid; align-items: end; padding-block: 0; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns { to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); } }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, #05050aE0 0%, #05050a2e 34%, #05050aF7 100%),
    linear-gradient(94deg, #2a1640b0, transparent 66%);
}
/* คลื่นแสงบางๆ พาดผ่านฮีโร่ ให้รู้สึกเหมือนผิวน้ำ */
.hero-media .caustic {
  position: absolute; inset: -30% -10%;
  background: repeating-linear-gradient(78deg, transparent 0 42px, #4fd6c412 42px 46px, transparent 46px 96px);
  mix-blend-mode: screen;
  animation: caustic 19s linear infinite;
}
@keyframes caustic { to { transform: translate3d(96px, -60px, 0); } }

/* ข้อความฮีโร่ต้องถูกยกขึ้นมาเหนือภาพ: .hero-media เป็น position:absolute ส่วน .wrap เป็น static
   และในชั้นการวาดของ CSS ตัวที่ positioned จะทับตัวที่ไม่ positioned เสมอ ไม่ว่าจะเรียงก่อนหลัง
   ผลคือหัวเรื่องกับปุ่มถูกภาพบังจนหายทั้งบล็อก — เห็นชัดตอนถ่ายหน้าจอ ฮีโร่เหลือแต่รูป */
.hero .wrap { position: relative; z-index: 2; padding-bottom: clamp(3rem, 8vw, 7rem); }
.hero h1 { max-width: 17ch; }
.hero .lead { max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.1rem; }

.scroll-hint { position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0; width: 1px; height: 54px; background: linear-gradient(var(--gold), transparent); opacity: .7; }
.scroll-hint::after { content: ""; position: absolute; inset: 0; background: var(--gold-bright); animation: drop 2.4s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ── ตาราง / การ์ดกระจก ─────────────────────────────────────────── */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.9rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* การ์ดเป็นแก้วเหมือน .glass — เขียนซ้ำตรงนี้แทนการ compose เพราะ `composes:` เป็นของ
   CSS Modules ไม่ใช่ CSS มาตรฐาน เบราว์เซอร์จะข้ามทิ้งเงียบๆ แล้วการ์ดจะกลายเป็นกล่องใส */
.card {
  background: linear-gradient(150deg, #ffffff12, #ffffff05 46%, #ffffff02);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
  transition: transform .45s cubic-bezier(.2,.7,.3,1), box-shadow .45s, border-color .45s;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent, #ffffff59 24%, #f4d97a80 50%, #ffffff59 76%, transparent);
}
.stat {
  background: linear-gradient(150deg, #ffffff10, #ffffff04);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card:hover { transform: translateY(-8px); border-color: #d4af3766; box-shadow: 0 20px 50px -22px #000, 0 0 34px -12px #d4af3733; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.3,1), filter .6s; }
.card:hover .card-media img { transform: scale(1.08); filter: saturate(1.12) brightness(1.05); }
/* แสงกวาดทับภาพตอน hover */
.card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, #ffffff2e 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .9s ease;
}
.card:hover .card-media::after { transform: translateX(120%); }

.card-body { padding: 1.5rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .3rem; }
.card-body .price { color: var(--gold); font-size: .95rem; letter-spacing: .05em; margin-bottom: .85rem; }
.card-body .btn { margin-top: auto; align-self: flex-start; }

.tick { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.tick li { position: relative; padding-left: 1.7rem; color: var(--text-dim); }
.tick li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: .5rem; height: .5rem; rotate: 45deg;
  border: 1px solid var(--gold);
  background: #d4af3722;
}

.stat { text-align: center; padding: 2.1rem 1rem; }
.stat b { display: block; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; margin-bottom: .35rem;
  background: linear-gradient(120deg, var(--gold), #fff8dc, var(--gold)); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sweep 6s linear infinite; }
.stat span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }

.band { background: linear-gradient(135deg, #2a1640b3, #100823cc); border-block: 1px solid var(--line); backdrop-filter: blur(6px); }

/* ── ลูปข้อความวิ่ง — "ลูปเล่น" ที่ Beer ขอ ─────────────────────── */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.15rem; background: #ffffff05; backdrop-filter: blur(8px); }
.marquee-track { display: flex; gap: 3.5rem; width: max-content; animation: run 34s linear infinite; }
.marquee span { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.6rem); color: #cbbfae; white-space: nowrap; display: flex; align-items: center; gap: 3.5rem; }
.marquee span::after { content: "✦"; color: var(--gold); font-size: .8em; }
@keyframes run { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem; }
th, td { text-align: left; padding: .95rem 1rem; border-bottom: 1px solid var(--line); }
th { color: var(--gold); font-weight: 600; font-size: .76rem; letter-spacing: .17em; text-transform: uppercase; }
td { color: var(--text-dim); transition: color .3s; }
tbody tr { transition: background .3s; }
tbody tr:hover { background: #ffffff08; }
tbody tr:hover td { color: var(--text); }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: .8rem; }
.gallery a { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); transition: transform .8s cubic-bezier(.2,.7,.3,1), filter .6s; }
.gallery a:hover img { transform: scale(1.09); filter: saturate(1.15); }

.field { display: grid; gap: .45rem; margin-bottom: 1.1rem; }
.field label { font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--gold); }
.field input, .field select, .field textarea {
  background: #ffffff08; border: 1px solid var(--line); color: var(--text);
  font: inherit; padding: .82rem .95rem; border-radius: 9px;
  backdrop-filter: blur(8px); transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px #d4af3722; }
.field select option { background: #0b0b13; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); background: #03030799; backdrop-filter: blur(10px); padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.foot-grid { display: grid; gap: 2.4rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.site-foot h4 { font-family: var(--sans); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
.site-foot p, .site-foot li { color: var(--text-dim); font-size: .92rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot-base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .8rem; color: #6d6961; }

.float-actions { position: fixed; right: 1rem; bottom: 1rem; z-index: 70; display: grid; gap: .55rem; }
.float-actions a {
  width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%;
  font-weight: 700; font-size: .72rem; color: #14110a;
  background: linear-gradient(130deg, var(--gold), var(--gold-bright));
  box-shadow: 0 8px 26px #00000090;
  transition: transform .3s, box-shadow .3s;
}
.float-actions a:hover { transform: scale(1.08); box-shadow: 0 10px 34px #d4af3759; }
.float-actions a.line { background: linear-gradient(130deg, #06c755, #35e07f); color: #05270f; }

html[data-lang="th"] [data-en] { display: none; }
html[data-lang="en"] [data-th] { display: none; }

@media (max-width: 880px) {
  .nav {
    position: fixed; inset: 76px 0 auto; flex-direction: column; gap: 0;
    background: #05050af2; backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--pad) 2rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .95rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; order: 3; }
  .head-actions .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
