@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Noto+Sans+Thai:wght@300;400;500;600&family=Playfair+Display:wght@500;600&display=swap');

:root {
  --ink: #18221d;
  --forest: #213e31;
  --forest-2: #315744;
  --gold: #b89552;
  --gold-light: #d6bf8c;
  --cream: #f7f3ea;
  --paper: #fffdf8;
  --muted: #6d766f;
  --line: rgba(24, 34, 29, 0.12);
  --shadow: 0 24px 60px rgba(18, 35, 26, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --container: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Noto Sans Thai", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.th { font-family: "Noto Sans Thai", "DM Sans", sans-serif; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 9999;
  background: var(--paper);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 16px; }

.container { width: var(--container); margin-inline: auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.section-title {
  margin: 0;
  max-width: 760px;
  font-family: "Playfair Display", "Noto Sans Thai", serif;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.th .section-title { letter-spacing: -0.02em; line-height: 1.18; }
.section-lead { max-width: 700px; color: var(--muted); font-size: 1.05rem; }

.site-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  color: #fff;
}
.site-header.scrolled {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.07);
}
.navbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: 0.02em; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  color: var(--gold-light);
}
.scrolled .brand-mark { border-color: var(--line); color: var(--gold); }
.brand-mark svg { width: 22px; height: 22px; }
.brand span small { display: block; font-size: 0.65rem; font-weight: 400; opacity: .75; letter-spacing: .12em; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a { font-size: .9rem; font-weight: 500; opacity: .92; }
.nav-menu a:hover { color: var(--gold-light); }
.scrolled .nav-menu a:hover { color: var(--gold); }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  font-size: .82rem;
}
.scrolled .lang-switch { border-color: var(--line); }
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.menu-toggle svg { width: 27px; height: 27px; }

.hero {
  min-height: 100svh;
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #16261d;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,19,13,.79) 0%, rgba(8,19,13,.45) 52%, rgba(8,19,13,.16) 100%),
    linear-gradient(0deg, rgba(8,19,13,.72) 0%, transparent 45%),
    /*url('https://commons.wikimedia.org/wiki/Special:Redirect/file/Wat-rat-upatam.jpg') center 42% / cover no-repeat;*/
    url("images/W01.jpg") center 42% / cover no-repeat;

  transform: scale(1.03);
  animation: heroZoom 18s ease-out both;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, rgba(8,19,13,.54));
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1.02); } }
.hero-content {
  position: relative;
  z-index: 2;
  padding: 150px 0 88px;
  max-width: 900px;
}
.hero-kicker { margin-bottom: 22px; color: var(--gold-light); }
.hero h1 {
  margin: 0;
  font-family: "Playfair Display", "Noto Sans Thai", serif;
  font-size: clamp(3.25rem, 8vw, 7.3rem);
  line-height: .95;
  font-weight: 500;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.th .hero h1 { line-height: 1.08; letter-spacing: -0.025em; }
.hero p {
  max-width: 620px;
  margin: 28px 0 34px;
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 2vw, 1.2rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, border .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold-light); color: #17221c; }
.btn-outline { color: #fff; border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.05); }
.btn-dark { background: var(--forest); color: #fff; }
.btn svg { width: 18px; height: 18px; }
.hero-meta {
  position: absolute;
  z-index: 3;
  bottom: 30px;
  right: max(20px, calc((100vw - 1180px)/2));
  display: flex;
  gap: 26px;
  color: rgba(255,255,255,.72);
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intro { padding: 120px 0; background: var(--paper); }
.intro-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(50px, 8vw, 120px); align-items: start; }
.intro-number { font-family: "Playfair Display", serif; font-size: clamp(6rem, 13vw, 12rem); line-height: .75; color: rgba(184,149,82,.16); }
.intro-copy p { color: var(--muted); font-size: 1.08rem; }
.intro-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 32px; }
.fact { padding-top: 18px; border-top: 1px solid var(--line); }
.fact strong { display: block; font-family: "Playfair Display", "Noto Sans Thai", serif; font-size: 1.5rem; color: var(--forest); }
.fact span { color: var(--muted); font-size: .82rem; }

.highlights { padding: 115px 0; background: var(--cream); }
.section-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 54px; }
.section-head .section-lead { margin: 0; max-width: 470px; }
.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.place-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.place-card:nth-child(1), .place-card:nth-child(4) { grid-column: span 7; }
.place-card:nth-child(2), .place-card:nth-child(3) { grid-column: span 5; }
.place-card img { position: absolute; inset: 0; height: 100%; object-fit: cover; transition: transform .7s ease; z-index: -2; }
.place-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8,20,13,.88), rgba(8,20,13,.1) 65%); }
.place-card:hover img { transform: scale(1.045); }
.card-content { position: absolute; inset: auto 0 0; padding: 34px; }
.card-index { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 18px; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; font-size: .78rem; }
.card-content h3 { margin: 0 0 9px; font-family: "Playfair Display", "Noto Sans Thai", serif; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.1; font-weight: 500; }
.card-content p { max-width: 570px; margin: 0; color: rgba(255,255,255,.78); font-size: .94rem; }

.experience { padding: 120px 0; }
.experience-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(42px, 8vw, 100px); align-items: center; }
.photo-stack { position: relative; min-height: 650px; }
.photo-main { position: absolute; left: 0; top: 0; width: 78%; height: 84%; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.photo-small { position: absolute; right: 0; bottom: 0; width: 48%; height: 46%; object-fit: cover; border: 12px solid var(--paper); border-radius: var(--radius-md); box-shadow: var(--shadow); }
.experience-copy .section-title { font-size: clamp(2.3rem, 5vw, 4.1rem); }
.experience-list { margin: 34px 0; display: grid; gap: 18px; }
.experience-item { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.experience-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--gold); background: rgba(184,149,82,.12); }
.experience-icon svg { width: 17px; height: 17px; }
.experience-item strong { display: block; margin-bottom: 2px; }
.experience-item span { color: var(--muted); font-size: .92rem; }

.quote {
  padding: 100px 0;
  color: #fff;
  background: var(--forest);
  overflow: hidden;
}
.quote-inner { position: relative; text-align: center; }
.quote-inner::before { content: "“"; position: absolute; inset: -90px auto auto 50%; transform: translateX(-50%); color: rgba(255,255,255,.06); font-family: Georgia, serif; font-size: 18rem; line-height: 1; }
.quote blockquote { position: relative; max-width: 880px; margin: 0 auto 22px; font-family: "Playfair Display", "Noto Sans Thai", serif; font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.2; font-weight: 500; }
.quote p { margin: 0; color: var(--gold-light); letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }

.visit { padding: 120px 0; background: var(--cream); }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: stretch; }
.visit-panel { padding: clamp(30px, 5vw, 58px); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 16px 40px rgba(28,45,36,.07); }
.visit-panel.dark { display: flex; flex-direction: column; justify-content: space-between; min-height: 470px; color: #fff; background: linear-gradient(140deg, var(--forest), #142a20); }
.visit-panel h3 { margin: 0 0 16px; font-family: "Playfair Display", "Noto Sans Thai", serif; font-size: 2.2rem; line-height: 1.15; font-weight: 500; }
.visit-panel p { color: var(--muted); }
.visit-panel.dark p { color: rgba(255,255,255,.72); }
.info-list { display: grid; gap: 20px; margin-top: 30px; }
.info-row { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row svg { width: 20px; color: var(--gold); margin-top: 3px; }
.info-row strong { display: block; }
.info-row span { color: var(--muted); font-size: .9rem; }
.visit-panel.dark .eyebrow { color: var(--gold-light); }
.visit-note { padding: 20px; margin-top: 28px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; color: rgba(255,255,255,.75); font-size: .9rem; }

.footer { padding: 42px 0; background: #0f1d16; color: rgba(255,255,255,.66); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.footer-brand { color: #fff; font-family: "Playfair Display", "Noto Sans Thai", serif; font-size: 1.35rem; }
.footer small { font-size: .75rem; }
.footer-links { display: flex; gap: 18px; font-size: .8rem; }
.footer-links a:hover { color: var(--gold-light); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-menu {
    position: fixed;
    inset: 82px 20px auto;
    display: none;
    padding: 22px;
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .menu-toggle { display: block; }
  .intro-grid, .experience-grid, .visit-grid { grid-template-columns: 1fr; }
  .intro-number { display: none; }
  .section-head { align-items: start; flex-direction: column; }
  .place-card:nth-child(n) { grid-column: span 12; min-height: 480px; }
  .photo-stack { min-height: 560px; }
  .hero-meta { display: none; }
}

@media (max-width: 600px) {
  :root { --container: min(100% - 28px, 1180px); }
  .navbar { min-height: 72px; }
  .brand span { font-size: .82rem; }
  .brand span small { display: none; }
  .nav-menu { top: 72px; inset-inline: 14px; }
  .hero-content { padding: 130px 0 72px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .intro, .highlights, .experience, .visit { padding: 84px 0; }
  .intro-facts { grid-template-columns: 1fr; }
  .place-card { min-height: 430px; }
  .card-content { padding: 25px; }
  .photo-stack { min-height: 450px; }
  .photo-main { width: 88%; height: 82%; }
  .photo-small { width: 52%; height: 43%; border-width: 8px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Detail page template ---------------------------------------------------- */
.detail-page .site-header {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
}
.detail-page .brand-mark { border-color: var(--line); color: var(--gold); }
.detail-page .lang-switch { border-color: var(--line); }
.detail-page .nav-menu a:hover { color: var(--gold); }

.detail-heading {
  padding: 174px 0 78px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 15%, rgba(214,191,140,.22), transparent 28%),
    linear-gradient(135deg, #183025, var(--forest));
}
.detail-heading .eyebrow { color: var(--gold-light); }
.detail-heading h1 {
  max-width: 900px;
  margin: 0;
  font-family: "Playfair Display", "Noto Sans Thai", serif;
  font-size: clamp(3rem, 7vw, 6.3rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.th .detail-heading h1 { line-height: 1.15; letter-spacing: -0.02em; }

.detail-section { padding: 96px 0 120px; background: var(--paper); }
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
}
.detail-gallery { display: grid; gap: 16px; }
.gallery-thumbnails { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--cream);
  cursor: zoom-in;
  box-shadow: 0 15px 36px rgba(28,45,36,.08);
}
.gallery-item-main { border-radius: var(--radius-lg); }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; transition: transform .45s ease; }
.gallery-item-main img { aspect-ratio: 16 / 11; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.025); }
.gallery-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.gallery-zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(15,29,22,.82);
  backdrop-filter: blur(8px);
  font-size: 1.45rem;
  line-height: 1;
}

.detail-content {
  position: sticky;
  top: 125px;
  padding: clamp(30px, 4vw, 50px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(28,45,36,.07);
}
.detail-content h2 {
  margin: 0 0 22px;
  font-family: "Playfair Display", "Noto Sans Thai", serif;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.th .detail-content h2 { line-height: 1.24; letter-spacing: -0.015em; }
.detail-content h3 {
  margin: 34px 0 10px;
  font-family: "Playfair Display", "Noto Sans Thai", serif;
  font-size: 1.55rem;
  color: var(--forest);
}
.detail-content p, .detail-content li { color: var(--muted); font-size: 1.03rem; }
.detail-content p { margin: 0 0 18px; }
.detail-content ul, .detail-content ol { padding-left: 1.35rem; }

.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(52px, 1fr) minmax(0, 1100px) minmax(52px, 1fr);
  align-items: center;
  padding: 30px;
  color: #fff;
  background: rgba(8, 17, 12, .94);
  backdrop-filter: blur(14px);
}
.lightbox figure { grid-column: 2; margin: 0; text-align: center; }
.lightbox figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  margin: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.lightbox figcaption { min-height: 28px; margin-top: 14px; color: rgba(255,255,255,.72); font-size: .9rem; }
.lightbox-close, .lightbox-nav {
  border: 0;
  color: #fff;
  background: rgba(255,255,255,.1);
  cursor: pointer;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}
.lightbox-nav {
  width: 48px;
  height: 68px;
  border-radius: 999px;
  font-size: 2.2rem;
}
.lightbox-prev { justify-self: start; }
.lightbox-next { justify-self: end; grid-column: 3; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(214,191,140,.28); }
body.lightbox-open { overflow: hidden; }

@media (max-width: 900px) {
  .detail-heading { padding: 145px 0 65px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-content { position: static; }
  .detail-page .nav-menu { color: var(--ink); }
}

@media (max-width: 600px) {
  .detail-heading { padding: 125px 0 52px; }
  .detail-section { padding: 62px 0 80px; }
  .gallery-thumbnails { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 18px 8px; }
  .lightbox-nav { width: 38px; height: 58px; }
  .lightbox-close { top: 14px; right: 14px; }
}
