/* พายช้า, round 2: minimal earth tones.
   Linen page, roast ink, latte clay for print details, canal sage for water.
   Taviraj (looped Thai serif, the printed-menu voice) + Anuphan (quiet modern sans for UI). */

/* ---------- Tokens ---------- */
:root {
  /* raw palette */
  --linen: #F3EEE6;
  --paper: #FAF7F1;
  --sand: #EAE2D6;
  --roast: #2C1E16;
  --roast-2: #46332A;
  --roast-deep: #1F1510;
  --muted: #6A5546;
  --clay: #A47E5B;          /* decoration only (leaders, rules, stars) */
  --clay-ink: #7E5D40;      /* clay when it has to be read */
  --clay-light: #D2B597;    /* clay on dark grounds */
  --sage: #7D8B74;          /* the waterline */
  --sage-ink: #55624E;
  --canal: #46523F;         /* deep canal band */
  --on-canal-muted: #CDCCC1;

  /* the nine roles (silk token architecture) */
  --background: var(--linen);
  --card: var(--paper);
  --foreground: var(--roast);
  --primary-cta: var(--roast);
  --primary-cta-text: var(--linen);
  --secondary-cta: transparent;
  --secondary-cta-text: var(--roast);
  --accent: var(--clay);
  --background-accent: var(--sage);

  /* one radius knob */
  --radius: 0.5rem;
  --radius-lg: var(--radius);
  --radius-md: calc(var(--radius) - 2px);
  --radius-sm: calc(var(--radius) - 4px);

  /* type */
  --serif: "Taviraj", "Noto Serif Thai", Georgia, serif;
  --sans: "Anuphan", "Noto Sans Thai", "Thonburi", system-ui, sans-serif;

  --fs-xs: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --fs-sm: clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem);
  --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
  --fs-xl: clamp(1.375rem, 1.22rem + 0.7vw, 1.875rem);
  --fs-2xl: clamp(1.75rem, 1.35rem + 1.8vw, 3rem);
  --fs-3xl: clamp(2.25rem, 1.6rem + 2.9vw, 4.25rem);
  --fs-score: clamp(4.5rem, 3rem + 7vw, 9rem);
  --fs-display: clamp(4.5rem, 1.6rem + 13vw, 13.5rem);

  /* layout */
  --gutter: max(clamp(1.25rem, 4.5vw, 3.5rem), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --wrap: 80rem;
  --col-gap: clamp(1.25rem, 2.4vw, 2.5rem);
  --space-section: clamp(6rem, 3.5rem + 11vw, 13rem);
  --head-h: 4.25rem;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --feather: clamp(3rem, 9vh, 7rem);
}

@media (min-width: 900px) {
  :root { --head-h: 5rem; }
}

/* ---------- Foundation ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgb(125 139 116 / 0.18);
  background: var(--background);
  scroll-padding-top: calc(var(--head-h) + 1rem);
  scroll-padding-bottom: 5rem;
}
@media (min-width: 900px) {
  html { scroll-padding-bottom: 1rem; }
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgb(44 30 22 / 0.28) transparent;
}

/* kill rubber-band only for mouse/trackpad; touch keeps pull-to-refresh */
@media (pointer: fine) {
  html, body { overscroll-behavior: none; }
}

a, button, summary, [role="button"] { touch-action: manipulation; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.75;
  overflow-x: clip;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
}

/* very subtle paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.05;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .12 0 0 0 0 .09 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
figure { margin: 0; }
address { font-style: normal; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
}

p, li, blockquote, dd { text-wrap: pretty; }

::selection { background: rgb(125 139 116 / 0.35); color: var(--roast); }

:focus-visible {
  outline: 2px solid var(--roast);
  outline-offset: 3px;
  border-radius: 3px;
}

[id] { scroll-margin-top: calc(var(--head-h) + 1rem); }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 1rem;
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--roast);
  color: var(--linen);
  border-radius: var(--radius-md);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.4s var(--ease);
}
.skip:focus { transform: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* ---------- Phrase masks (Thai-safe: generous room for tone marks and below-vowels) ---------- */
.ph {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.28em 0.04em 0.4em;
  margin: -0.28em -0.04em -0.4em;
}
.ph__in { display: inline-block; will-change: transform; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.55rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease), border-color 0.6s var(--ease);
}
.btn svg { flex: none; }
.btn--sm { min-height: 2.75rem; padding: 0.45rem 1.15rem; }
.btn--roast { background: var(--primary-cta); color: var(--primary-cta-text); }
.btn--roast:hover { background: var(--roast-2); }
.btn--sage { background: var(--sage-ink); color: var(--linen); }
.btn--sage:hover { background: var(--canal); }
.btn--ghost { border-color: rgb(44 30 22 / 0.55); color: var(--roast); background: transparent; }
.btn--ghost:hover { border-color: var(--roast); background: rgb(44 30 22 / 0.04); }

.link {
  display: inline-block;
  padding-block: 0.6rem;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.55rem) / 100% 1px no-repeat;
  transition: background-size 0.7s var(--ease);
}
.link:hover { background-size: 0 1px; background-position: 100% calc(100% - 0.55rem); }

/* ---------- Header ---------- */
.head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--head-h);
  display: flex;
  align-items: center;
  transition: background-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.head.is-scrolled {
  background: rgb(243 238 230 / 0.94);
  box-shadow: 0 1px 0 rgb(44 30 22 / 0.08);
}
.head__in {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3125rem;
  line-height: 1;
  color: var(--roast);
}
.logo span { padding-top: 0.15em; }
.badge {
  margin: 0;
  padding: 0.2rem 0.7rem;
  border: 1px solid rgb(44 30 22 / 0.18);
  border-radius: 999px;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
}
.nav {
  display: none;
  margin-left: auto;
  gap: clamp(1rem, 2.2vw, 2.25rem);
}
.nav a {
  position: relative;
  padding: 0.6rem 0;
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--roast);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.35rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.7s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left center; }
.head__line { display: none; }

@media (max-width: 379px) {
  .logo span { font-size: 1.1875rem; }
  .badge { padding-inline: 0.55rem; }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .head__line { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: var(--head-h);
}
.hero__top {
  position: relative;
  z-index: 2;
  min-height: calc(40vh - var(--head-h));
  min-height: calc(40svh - var(--head-h));
  display: grid;
  align-content: end;
  gap: 0.25rem 2rem;
  padding-top: clamp(1.5rem, 5vh, 3rem);
  padding-bottom: clamp(0.75rem, 2.4vh, 1.75rem);
}
.hero__where {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.hero__mark {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-left: -0.04em;
  white-space: nowrap;
}
.hero__side {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
  padding-bottom: 0.5rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
}
.hero__actions .link { font-size: var(--fs-sm); }

@media (min-width: 900px) {
  .hero__top {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .hero__where { grid-column: 1 / -1; }
  .hero__side { justify-items: end; text-align: right; padding-bottom: clamp(1.5rem, 3vw, 3rem); }
}

.hero__water {
  position: relative;
  height: clamp(28rem, 84vh, 60rem);
  height: clamp(28rem, 84svh, 60rem);
  overflow: hidden;
}
.tide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgb(0 0 0 / 0.55) calc(var(--feather) * 0.55), #000 var(--feather));
  mask-image: linear-gradient(to bottom, transparent 0, rgb(0 0 0 / 0.55) calc(var(--feather) * 0.55), #000 var(--feather));
}
.tide__pic { position: absolute; inset: 0; }
.tide__drift {
  position: absolute;
  inset: -9% 0;
  will-change: transform;
}
.tide__drift img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
  filter: saturate(0.8) contrast(0.95) sepia(0.08);
  transform: scale(1.06);
}
.tide__pic::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(243 238 230 / 0.18) 0%, rgb(243 238 230 / 0) 35%),
    linear-gradient(180deg, rgb(125 139 116 / 0) 55%, rgb(44 30 22 / 0.22) 100%);
}
.waterline {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--feather) * 0.38);
  height: 0.75rem;
  overflow: hidden;
  color: var(--sage);
  transform-origin: left center;
  pointer-events: none;
}
.waterline svg {
  width: 200%;
  max-width: none;
  height: 100%;
}

/* the photo settles once as the water rises (finite; drift after that is scroll-linked) */
.intro .tide__drift img { transform: scale(1.14); }
.intro-go .tide__drift img { transform: scale(1.06); transition: transform 2.6s var(--ease) 0.05s; }

/* Intro: the waterline draws, the canal rises to meet it, the name surfaces.
   States exist only while html.intro is set by the inline head script (never with reduced motion). */
.intro .waterline { animation: draw 1s var(--ease) 0.1s both; }
@keyframes draw {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
.intro .tide { transform: translate3d(0, 100%, 0); }
.intro .tide__pic { transform: translate3d(0, -100%, 0); }
.intro .hero .ph__in { transform: translate3d(0, 115%, 0); }
.intro [data-intro] { opacity: 0; transform: translate3d(0, 0.9rem, 0); }
.intro .head { opacity: 0; }
.intro .head:focus-within,
.intro [data-intro]:focus-within { opacity: 1; transform: none; transition: none; }

.intro-go .tide,
.intro-go .tide__pic {
  transform: translate3d(0, 0, 0);
  transition: transform 1.9s var(--ease) 0.05s;
}
.intro-go .hero .ph__in {
  transform: translate3d(0, 0, 0);
  transition: transform 1.3s var(--ease);
  transition-delay: calc(0.5s + var(--i, 0) * 0.14s);
}
.intro-go [data-intro] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(0.85s + var(--d, 0) * 0.12s);
}
.intro-go .head {
  opacity: 1;
  transition: opacity 1s var(--ease) 0.5s, background-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

/* ---------- Status pill ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--muted);
}
.status[hidden] { display: none; }
.status__dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--clay);
  flex: none;
}
a.status { text-decoration: none; min-height: 2.75rem; }
a.status [data-status-text] {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.7s var(--ease);
}
a.status:hover [data-status-text] { background-size: 100% 1px; }
.status.is-open { color: var(--sage-ink); }
.status.is-open .status__dot {
  background: var(--sage);
  box-shadow: 0 0 0 0.25rem rgb(125 139 116 / 0.2);
}

/* ---------- Sections ---------- */
.sec { padding-block: var(--space-section); }
.h2 {
  font-size: var(--fs-3xl);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.lede {
  max-width: 30em;
  margin-top: 1.25rem;
  color: var(--muted);
}
.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--sand);
}
.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.96) sepia(0.06);
}
figcaption {
  margin-top: 0.8rem;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Statement ---------- */
.statement {
  padding-block: clamp(5rem, 3rem + 9vw, 11rem) clamp(2rem, 1rem + 4vw, 5rem);
}
.statement__text {
  max-width: 21em;
  margin: 0 0 0 auto;
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-2xl);
  line-height: 1.55;
}
@media (min-width: 900px) {
  .statement__text { margin-right: 4%; }
}

/* ---------- Menu ---------- */
.menu__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}
.menu__pic { margin-top: clamp(2rem, 4vw, 3.5rem); }
.menu__pic .frame { aspect-ratio: 4 / 3; }

@media (min-width: 960px) {
  .menu__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: start;
  }
  .menu__side {
    grid-column: 1 / span 4;
    position: sticky;
    top: calc(var(--head-h) + 2.5rem);
  }
  .menu__pic .frame { aspect-ratio: 4 / 5; }
  .card { grid-column: 6 / -1; }
}

/* The printed card */
.card {
  background: var(--card);
  border: 1px solid rgb(164 126 91 / 0.28);
  border-radius: var(--radius-sm);
  padding: clamp(0.4rem, 1vw, 0.6rem);
  box-shadow:
    0 0.7px 0.7px -0.67px rgb(44 30 22 / 0.03),
    0 1.8px 1.8px -1.3px rgb(44 30 22 / 0.04),
    0 3.6px 3.6px -2px rgb(44 30 22 / 0.04),
    0 6.9px 6.9px -2.7px rgb(44 30 22 / 0.05),
    0 13px 13px -3.3px rgb(44 30 22 / 0.05),
    0 30px 30px -4px rgb(44 30 22 / 0.06);
}
.card__in {
  border: 1px solid rgb(164 126 91 / 0.45);
  border-radius: 2px;
  padding: clamp(2rem, 5vw, 4.25rem) clamp(1.1rem, 4.6vw, 4.25rem);
}
.card__top {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
  text-align: center;
  color: var(--roast);
}
.card__meta { margin: 0; font-size: var(--fs-xs); color: var(--muted); }

.mg + .mg {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 8'%3E%3Cpath d='M1 4c3.8 0 3.8-2.6 7.6-2.6S12.4 4 16.2 4 20 1.4 23.8 1.4 27.6 4 31.4 4s3.8-2.6 7.6-2.6S42.8 4 47 4' fill='none' stroke='%23A47E5B' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E")
    center top / 3rem 0.5rem no-repeat;
}
.mg__title {
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}
.mg__note {
  max-width: 28em;
  margin: 0.5rem auto clamp(1.75rem, 3.5vw, 2.5rem);
  text-align: center;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--muted);
}
.items { display: grid; gap: clamp(1.4rem, 2.6vw, 1.9rem); }
.item__row {
  display: flex;
  align-items: baseline;
  align-items: last baseline;
  gap: 0.6rem;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: 1.55;
}
.item__name { flex: 0 1 auto; min-width: 0; }
.lead {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  height: 0.5em;
  background: radial-gradient(circle, var(--clay) 0.7px, transparent 1.15px) left bottom / 6px 4px repeat-x;
  transform-origin: left center;
}
.price {
  flex: none;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.price small {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  color: var(--clay-ink);
  margin-right: 0.15em;
}
.item__desc {
  max-width: 34em;
  margin: 0.25rem 0 0;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- Recommended picks (editable from the demo admin) ---------- */
.picks { padding-top: clamp(3rem, 2rem + 5vw, 6rem); padding-bottom: 0; }
.picks__grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3rem) var(--col-gap);
}
.pick .frame { aspect-ratio: 4 / 3; }
.pick__row {
  display: flex;
  align-items: baseline;
  align-items: last baseline;
  gap: 0.6rem;
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: 1.5;
}
.pick__name { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }

@media (min-width: 700px) {
  .picks__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .pick .frame { aspect-ratio: 4 / 5; }
  .pick:nth-child(2) { margin-top: clamp(2.5rem, 6vw, 5.5rem); }
}

/* ---------- Story ---------- */
.story__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}
.story__title { max-width: 14em; }
.story__pic .frame { aspect-ratio: 4 / 5; }
.story__pic img {
  top: -7%;
  bottom: auto;
  height: 114%;
}
.story__text { max-width: 33em; }
.story__sign {
  margin-top: 2rem;
  font-family: var(--serif);
  font-size: var(--fs-lg);
  color: var(--clay-ink);
}
.timeline {
  display: grid;
  gap: 1.75rem;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid rgb(44 30 22 / 0.14);
}
.timeline li { display: grid; gap: 0.25rem; font-size: var(--fs-sm); line-height: 1.7; color: var(--muted); }
.timeline__year {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-xl);
  line-height: 1.3;
  color: var(--roast);
  font-variant-numeric: lining-nums;
}

@media (min-width: 640px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); }
}
@media (min-width: 960px) {
  .story__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: clamp(3rem, 6vw, 6rem);
  }
  .story__title { grid-column: 1 / span 9; }
  .story__pic { grid-column: 1 / span 5; }
  .story__text { grid-column: 7 / span 5; align-self: end; padding-bottom: 2.5rem; }
  .timeline { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Gallery ---------- */
.gallery { padding-top: 0; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 2.5rem) var(--col-gap);
}
.g .frame { aspect-ratio: 4 / 5; }
.g--a { grid-column: 1 / -1; }
.g--a .frame { aspect-ratio: 4 / 3; }

@media (min-width: 960px) {
  .gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: clamp(3rem, 6vw, 5.5rem);
    align-items: end;
  }
  .g--a { grid-column: 1 / span 7; }
  .g--a .frame { aspect-ratio: 16 / 11; }
  .g--b { grid-column: 9 / span 4; }
  .g--c { grid-column: 2 / span 3; align-self: start; }
  .g--c .frame { aspect-ratio: 1; }
  .g--d { grid-column: 6 / span 3; align-self: start; margin-top: clamp(3rem, 7vw, 7rem); }
  .g--e { grid-column: 10 / span 3; align-self: start; }
}

/* ---------- Reviews: the canal band ---------- */
.reviews {
  background: var(--canal);
  color: var(--linen);
}
.reviews :focus-visible { outline-color: var(--linen); }
.reviews__grid { display: grid; gap: clamp(3rem, 6vw, 5rem); }
.score { display: grid; gap: 0.25rem; margin-top: clamp(1.5rem, 4vw, 3rem); }
.score__num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-score);
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.score__text { font-size: var(--fs-sm); color: var(--on-canal-muted); }
.reviews__list { display: grid; }
.review {
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-top: 1px solid rgb(243 238 230 / 0.2);
}
.review:last-child { border-bottom: 1px solid rgb(243 238 230 / 0.2); }
.stars {
  margin: 0 0 0.9rem;
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  color: var(--clay-light);
}
.stars__off { color: rgb(243 238 230 / 0.3); }
.review blockquote {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-lg);
  line-height: 1.7;
}
.review figcaption {
  margin-top: 1.1rem;
  font-size: var(--fs-sm);
  color: var(--linen);
}
.review figcaption span { color: var(--on-canal-muted); margin-left: 0.6rem; }

@media (min-width: 960px) {
  .reviews__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .reviews__head { grid-column: 1 / span 4; }
  .reviews__list { grid-column: 6 / -1; }
}

/* ---------- Visit ---------- */
.visit__grid { display: grid; gap: clamp(4rem, 8vw, 6rem); }
.h2--sm { font-size: var(--fs-2xl); line-height: 1.35; }
.visit .h2 { margin-bottom: 1.5rem; }
.hours .status { margin-bottom: 1.25rem; }
.hours__table {
  width: 100%;
  max-width: 28rem;
  border-collapse: collapse;
  font-size: var(--fs-base);
}
.hours__table th,
.hours__table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgb(44 30 22 / 0.12);
  text-align: left;
  font-weight: 400;
  line-height: 1.6;
}
.hours__table td { text-align: right; font-variant-numeric: tabular-nums; }
.hours__table tr.is-closed { color: var(--muted); }
.hours__table tr.is-today th,
.hours__table tr.is-today td { font-weight: 500; }
.hours__table tr.is-today th::after {
  content: "วันนี้";
  margin-left: 0.6rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: rgb(125 139 116 / 0.2);
  color: var(--roast);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.note {
  max-width: 30em;
  margin-top: 1.25rem;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--muted);
}
.where address {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  line-height: 1.7;
}
.where__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1.75rem 2.25rem;
}
.ways { display: grid; gap: 1rem; max-width: 34em; }
.ways li {
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.7;
  color: var(--muted);
}
.ways li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85em;
  width: 0.6rem; height: 1px;
  background: var(--clay);
}
.ways strong { font-weight: 500; color: var(--roast); margin-right: 0.35rem; }

.order {
  display: grid;
  gap: 2rem;
  margin-top: clamp(5rem, 10vw, 8rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid rgb(44 30 22 / 0.14);
}
.order__text p { max-width: 34em; }
.order__text .h2 + p { margin-top: -0.25rem; }
.order__btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.order__demo { min-height: 1.6em; margin-top: 1rem; font-size: var(--fs-sm); color: var(--sage-ink); }

@media (min-width: 960px) {
  .visit__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .hours { grid-column: 1 / span 5; }
  .where { grid-column: 7 / -1; }
  .order { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
  .order__text { grid-column: 1 / span 6; }
  .order__actions { grid-column: 7 / -1; justify-self: end; }
}

/* ---------- FAQ ---------- */
.faq { padding-top: 0; }
.faq__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.faq__list { border-top: 1px solid rgb(44 30 22 / 0.14); }
.faq details { border-bottom: 1px solid rgb(44 30 22 / 0.14); }
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 1.1rem 2.75rem 1.1rem 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: 1.5;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 0.95rem;
  height: 1px;
  background: var(--roast);
  transition: transform 0.6s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--roast-2); }
.faq__a { padding: 0 2.75rem 1.6rem 0; color: var(--muted); max-width: 40em; }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .faq__a { animation: rise 0.8s var(--ease) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, -0.4rem, 0); }
  to   { opacity: 1; transform: none; }
}

@media (min-width: 960px) {
  .faq__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .faq__head { grid-column: 1 / span 4; }
  .faq__list { grid-column: 6 / -1; }
}

/* ---------- Footer ---------- */
.foot {
  background: var(--sand);
  padding-block: clamp(4rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 3.5rem);
}
.foot__grid { display: grid; gap: 2.25rem; }
.foot__mark {
  margin-bottom: 0.75rem;
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-3xl);
  line-height: 1.2;
}
.foot__brand p:not(.foot__mark) { color: var(--muted); font-size: var(--fs-sm); }
.foot__links { display: grid; gap: 0.1rem; align-content: start; font-size: var(--fs-sm); }
.foot__copy {
  margin: 0;
  padding-top: 1.75rem;
  border-top: 1px solid rgb(44 30 22 / 0.12);
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--muted);
}
@media (min-width: 900px) {
  .foot__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .foot__brand { grid-column: 1 / span 6; }
  .foot__links { grid-column: 9 / -1; }
  .foot__copy { grid-column: 1 / -1; }
}

/* ---------- PV Dev strip ---------- */
.pvdev {
  background: var(--roast-deep);
  color: rgb(243 238 230 / 0.78);
  padding: 0.3rem var(--gutter);
  text-align: center;
}
.pvdev p { margin: 0; font-size: var(--fs-xs); line-height: 1.7; }
.pvdev a {
  color: var(--clay-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  display: inline-block;
  padding-block: 0.7rem;
}
.pvdev a:hover { color: var(--linen); }
.pvdev :focus-visible { outline-color: var(--linen); }

/* ---------- Mobile contact dock ---------- */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 1px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--roast);
  box-shadow: 0 -1px 0 rgb(243 238 230 / 0.06);
}
.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 4rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--linen);
  background: var(--roast);
}
.dock .dock__line { background: var(--sage-ink); }
.dock .dock__main { background: var(--linen); color: var(--roast); }
.dock :focus-visible { outline: 2px solid var(--clay-light); outline-offset: -4px; }
@media (min-width: 900px) {
  .dock { display: none; }
}

/* ---------- Cursor ring (desktop, fine pointer only; native cursor stays) ---------- */
.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 90;
  width: 2.25rem; height: 2.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.cursor::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgb(44 30 22 / 0.35);
  border-radius: 50%;
  transition: transform 0.6s var(--ease), background-color 0.6s var(--ease), border-color 0.6s var(--ease);
}
.cursor.is-on { opacity: 1; }
.cursor.is-link::after { transform: scale(1.55); background: rgb(164 126 91 / 0.1); border-color: rgb(164 126 91 / 0.5); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cursor { display: none; }
}
