@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@200;300;400;500;600;700;800&family=Sarabun:wght@400;500;600&display=swap');

:root {
  --night: #0d1712;      /* พื้นหลักโทนป่าลึก */
  --night-2: #13221a;
  --night-3: #1b2e24;
  --gold: #e0b44c;
  --gold-dark: #c99a2e;
  --forest: #1d4a37;
  --jade: #23a69a;
  --jade-soft: #e3f4f1;
  --sand: #f7f4ec;
  --ink: #1f2a24;
  --muted: #5f6d65;
  --on-dark: rgba(255, 255, 255, .78);
  --line: #dfe5df;
  --warn-soft: #fdf3e1;
  --bad: #c0392b;
  --bad-soft: #fbe9e7;
  --good: #2e7d4f;
  --good-soft: #e5f3ea;
  --line-green: #06c755;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Sarabun', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #fff;
  background: var(--night);
}
h1, h2, h3, .brand, .btn { font-family: 'Kanit', 'Sarabun', sans-serif; }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 700; margin: 0 0 .4em; }
h2 .gold, h1 .gold, .gold-text {
  background: linear-gradient(100deg, #f7e2a0 0%, #e0b44c 30%, #b98a2c 55%, #f3d27a 75%, #e0b44c 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 .3em; }
a { color: var(--gold); }
img { max-width: 100%; }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(640px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--on-dark); }
.small { font-size: .9rem; }
.eyebrow { display: block; font: 400 .95rem 'Kanit', sans-serif; letter-spacing: .04em; color: var(--gold); margin-bottom: .4rem; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 23, 18, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar.over { position: absolute; left: 0; right: 0; background: linear-gradient(180deg, rgba(8, 14, 10, .75), rgba(8, 14, 10, 0)); border: 0; backdrop-filter: none; }
.topbar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand small { display: block; font-weight: 300; font-size: .8rem; color: var(--on-dark); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: #fff; text-decoration: none; font: 500 1rem 'Kanit', sans-serif; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.nav a:not(.btn):hover { color: var(--gold); }
@media (max-width: 860px) { .nav a:not(.btn) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  background: linear-gradient(135deg, #f3d27a, #e0b44c 45%, #c99a2e); color: #1a1a12;
  box-shadow: 0 6px 20px rgba(224, 180, 76, .25), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 10px 30px rgba(224, 180, 76, .4), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: rgba(8, 14, 10, .35); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75); backdrop-filter: blur(6px); }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 2px #fff; }
.btn.dark { background: var(--forest); color: #fff; }
.btn.dark:hover { background: #163a2b; }
.btn.line { background: var(--line-green); color: #fff; font-size: 1.1rem; padding: .85rem 1.6rem; }
.btn.line:hover { background: #05a948; }
.btn.bad { background: var(--bad); color: #fff; }
.btn.sm { padding: .45rem 1rem; font-size: .92rem; }

/* ---------- hero (ชั้น: รูป → เงา → หิ่งห้อย → ตัวหนังสือ) ---------- */
.hero { position: relative; overflow: hidden; min-height: min(780px, 94vh); display: flex; align-items: center; background: var(--night-2); isolation: isolate; }
.hero-bg { position: absolute; inset: -8% 0 -8% 0; background: url('img/hero.jpg') center 45% / cover no-repeat; z-index: -3; will-change: transform; }
.hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 14, 10, .9) 0%, rgba(8, 14, 10, .6) 33%, rgba(8, 14, 10, .08) 58%, rgba(8, 14, 10, 0) 70%),
    radial-gradient(60% 50% at 18% 60%, rgba(35, 166, 154, .18), transparent 70%),
    linear-gradient(0deg, var(--night) 0%, rgba(13, 23, 18, 0) 22%);
}
.fireflies { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero .wrap { padding: 7rem 0 5rem; }
.hero-text { max-width: 600px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); font-weight: 800; line-height: 1.06; margin: .5rem 0 1.1rem; }
.hero p.lead { font-size: 1.22rem; color: rgba(255, 255, 255, .9); max-width: 32em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 1.4rem; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 14px; }
.scroll-cue::after { content: ''; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 760px) {
  .hero { align-items: flex-end; min-height: 88vh; }
  .hero-bg { background-image: url('img/hero-m.jpg'); background-position: center top; }
  .hero-shade { background: linear-gradient(0deg, var(--night) 0%, rgba(8, 14, 10, .82) 42%, rgba(8, 14, 10, .15) 75%, rgba(8, 14, 10, .45) 100%); }
  .hero .wrap { padding: 6rem 0 3.5rem; }
  .scroll-cue { display: none; }
}

/* ---------- sections ---------- */
section.block { position: relative; padding: 5.5rem 0; isolation: isolate; overflow: hidden; }
section.block.alt { background: var(--night-2); }
/* แสงออโรร่าจางๆ หลังแต่ละหัวข้อ สลับซ้าย-ขวา */
section.block::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; top: -20%; right: -20%;
  background: radial-gradient(closest-side, rgba(35, 166, 154, .16), rgba(35, 166, 154, 0));
  filter: blur(40px);
}
section.block.alt::before { right: auto; left: -25%; top: 10%; background: radial-gradient(closest-side, rgba(224, 180, 76, .11), rgba(224, 180, 76, 0)); }
section.block::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 50vw; height: 50vw; max-width: 640px; max-height: 640px; bottom: -25%; left: 10%;
  background: radial-gradient(closest-side, rgba(63, 143, 95, .12), rgba(63, 143, 95, 0));
  filter: blur(40px);
}
/* เกรนฟิล์มทั้งหน้า */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-head { max-width: 980px; margin-bottom: 2.4rem; }
h1, h2, .hero p.lead, .section-head p { text-wrap: balance; }
.section-head p { color: var(--on-dark); margin: 0; }
.grid { display: grid; gap: 1.2rem; }
.card {
  background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card h2 { color: var(--forest); }
.card .muted { color: var(--muted); }
.card a { color: var(--jade); }

/* Leave No Trace — ตัวเลขเส้นขอบทอง */
.lnt { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem 1rem; grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1000px) { .lnt { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .lnt { grid-template-columns: repeat(2, 1fr); } }
.lnt li { border-top: 2px solid rgba(224, 180, 76, .5); padding-top: .7rem; }
.lnt b { display: block; font: 200 4rem/1 'Kanit', sans-serif; color: transparent; -webkit-text-stroke: 1.5px var(--gold); }
.lnt span { display: block; font: 400 1rem/1.4 'Kanit', sans-serif; margin-top: .5rem; }
.lnt small { display: block; font-size: .78rem; color: var(--on-dark); margin-top: .2rem; }

/* เกี่ยวกับ */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 2rem; } }
.about .pic { aspect-ratio: 4 / 3; border-radius: 24px; background: url('img/about.jpg') center / cover; box-shadow: var(--shadow); }
.about p { color: var(--on-dark); font-size: 1.08rem; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 1.4rem 0 1.8rem; }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }
.pillars div { border: 1px solid rgba(224, 180, 76, .4); border-radius: 14px; padding: .9rem 1rem; font: 600 1rem 'Kanit', sans-serif; }
.pillars small { display: block; font: 400 .88rem 'Sarabun', sans-serif; color: var(--on-dark); }

/* ขั้นตอน */
.steps { counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }
.step { position: relative; background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .015) 60%); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(6px); border-radius: var(--radius); padding: 1.5rem 1.3rem 1.3rem; transition: transform .25s, border-color .25s, box-shadow .25s; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .8rem;
  border-radius: 50%; background: var(--gold); color: #1a1a12;
  font: 700 1.2rem 'Kanit', sans-serif;
}
.step p { color: var(--on-dark); font-size: .95rem; margin: 0 0 .6rem; }
.step .where { display: inline-block; font: 400 .8rem 'Kanit', sans-serif; padding: .1rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--on-dark); }
.step .where.ours { background: rgba(224, 180, 76, .18); color: var(--gold); }

/* FAQ */
details.faq { background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .015) 60%); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(6px); border-radius: 12px; padding: 1rem 1.2rem; }
details.faq + details.faq { margin-top: .7rem; }
details.faq summary { cursor: pointer; font: 500 1.05rem 'Kanit', sans-serif; }
details.faq p { margin: .6rem 0 0; color: var(--on-dark); }

/* ติดต่อ */
.contact-list { display: flex; flex-wrap: wrap; gap: .8rem; }

footer.site { background: #08100c; color: var(--on-dark); padding: 2.2rem 0; font-size: .92rem; }

/* ---------- ฟอร์ม / หน้าสมาชิก (การ์ดขาวบนพื้นป่า) ---------- */
.page { padding: 2.4rem 0 4rem; min-height: calc(100vh - 72px); background: linear-gradient(180deg, rgba(13, 23, 18, .9), var(--night) 420px), url('img/hero.jpg') center top / cover no-repeat; }
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field label { font-weight: 600; }
.field .hint { font-size: .85rem; color: var(--muted); }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 180, 76, .25); }
.row2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; }

.notice { border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1rem; color: var(--ink); }
.notice.info { background: var(--jade-soft); }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.good { background: var(--good-soft); color: var(--good); }

.pdpa { max-height: 9.5rem; overflow-y: auto; font-size: .88rem; color: var(--muted); background: var(--sand); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .8rem; }

/* แถบความคืบหน้า (อยู่บนพื้นเข้ม) */
.progress { display: flex; gap: .3rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.progress li { flex: 1; text-align: center; font: 400 .8rem 'Kanit', sans-serif; color: var(--on-dark); }
.progress li::before { content: ''; display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .15); margin-bottom: .35rem; }
.progress li.done::before { background: rgba(224, 180, 76, .6); }
.progress li.now { color: var(--gold); font-weight: 600; }
.progress li.now::before { background: var(--gold); }

.profile-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.profile-head img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, .15); }

.drop {
  display: grid; place-items: center; gap: .4rem; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.8rem 1rem;
  cursor: pointer; background: #fff; transition: border-color .15s;
}
.drop:hover, .drop.over { border-color: var(--gold); }
.drop img.preview { max-height: 260px; border-radius: 8px; }
.big-icon { font-size: 2.6rem; line-height: 1; }

/* ---------- หลังบ้าน ---------- */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tabs button { border: 0; padding: .55rem 1.1rem; border-radius: 999px; background: var(--night-3); font: 600 .95rem 'Kanit', sans-serif; color: var(--on-dark); cursor: pointer; }
.tabs button.on { background: var(--gold); color: #1a1a12; }
.badge { display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--bad); color: #fff; font-size: .78rem; text-align: center; margin-left: .3rem; }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stats .card { flex: 1; min-width: 150px; padding: 1rem 1.2rem; }
.stats b { display: block; font: 700 1.8rem 'Kanit', sans-serif; color: var(--forest); }

.review { display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem; }
.review + .review { margin-top: 1rem; }
@media (max-width: 640px) { .review { grid-template-columns: 1fr; } }
.review .thumb { display: grid; place-items: center; min-height: 160px; border-radius: 10px; background: var(--sand); overflow: hidden; text-decoration: none; color: var(--forest); font-weight: 600; }
.review .thumb img { width: 100%; height: 100%; object-fit: contain; }
.review dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: 0 0 .8rem; }
.review dt { color: var(--muted); }
.review dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions input { flex: 1; min-width: 180px; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: #fff; color: var(--ink); padding: .7rem 1.3rem; border-radius: 999px; z-index: 50; box-shadow: var(--shadow); font-weight: 600; }

/* เตรียมตัว */
.kit { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .kit { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kit { grid-template-columns: 1fr; } }
.kit-card { background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .015) 60%); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(6px); border-radius: var(--radius); padding: 1.4rem 1.3rem; transition: transform .25s, border-color .25s, box-shadow .25s; }
.kit-card i { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; background: rgba(224, 180, 76, .15); font-style: normal; font-size: 1.5rem; margin-bottom: .8rem; }
.kit-card ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.kit-card li { position: relative; padding-left: 1.5rem; color: var(--on-dark); font-size: .95rem; margin-bottom: .35rem; }
.kit-card li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.note { margin: 1.4rem 0 0; color: var(--on-dark); font-size: .95rem; }

/* การเดินทาง */
.travel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 860px) { .travel { grid-template-columns: 1fr; } }
.map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); background: var(--night-3); display: block; margin-bottom: .8rem; }
.travel-info p { color: var(--on-dark); }
.travel-info .small a { color: var(--gold); }
.bus { display: grid; grid-template-columns: 2fr 1fr; gap: .8rem; margin-top: .8rem; }
.bus table, table.fee { width: 100%; border-collapse: collapse; font-size: .95rem; }
.bus th { font: 500 .85rem 'Kanit', sans-serif; color: var(--gold); padding: .3rem; border-bottom: 1px solid rgba(224, 180, 76, .4); }
.bus td { text-align: center; padding: .28rem; border-bottom: 1px solid rgba(255, 255, 255, .06); font-variant-numeric: tabular-nums; }
table.fee { margin: .8rem 0 .4rem; }
table.fee td { padding: .4rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); color: var(--on-dark); }
table.fee td:last-child { text-align: right; color: #fff; font-weight: 600; white-space: nowrap; }
@media (min-width: 861px) { .map { position: sticky; top: 90px; } }
.bus td { height: 2.3rem; }
.store { display: flex; flex-wrap: wrap; gap: .5rem; }

.step:hover, .kit-card:hover { transform: translateY(-4px); border-color: rgba(224, 180, 76, .45); box-shadow: 0 16px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(224, 180, 76, .15); }
.step::before { background: linear-gradient(135deg, #f3d27a, #c99a2e); box-shadow: 0 0 20px rgba(224, 180, 76, .35); }
.lnt li { transition: border-color .3s; }
.lnt li:hover b { color: var(--gold); -webkit-text-stroke-color: var(--gold); text-shadow: 0 0 24px rgba(224, 180, 76, .45); }
.lnt b { transition: color .3s, text-shadow .3s; }
.about .pic { transition: transform .4s; }
.about .pic:hover { transform: scale(1.015); }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; }
.eyebrow::before { content: ''; width: 1.8rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }

/* ลดการเคลื่อนไหวตามที่ผู้ใช้ตั้งค่าไว้ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fireflies, .scroll-cue { display: none; }
}
