:root {
  --ink: #120c08;
  --cream: #f7ead8;
  --tea: #e8772e;
  --tea-soft: #f3a467;
  --muted: #cdb9a2;
  --serif: "Noto Serif Thai", serif;
  --sans: "IBM Plex Sans Thai", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--ink); color: var(--cream); font-family: var(--sans); line-height: 1.6; overflow-x: clip; }
a { color: inherit; }

.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(rgba(18,12,8,.7), transparent);
}
.brand { font-family: var(--serif); font-weight: 800; font-size: 1.35rem; text-decoration: none; display: flex; align-items: baseline; gap: .5rem; }
.brand span { font-family: var(--sans); font-size: .65rem; letter-spacing: .3em; color: var(--tea-soft); }
.nav-cta { font-size: .9rem; text-decoration: none; border: 1px solid rgba(247,234,216,.4); padding: .35rem 1rem; border-radius: 99px; }

/* ---------- scroll film ---------- */
.film { height: 500vh; position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(18,12,8,.75) 100%),
    linear-gradient(transparent 60%, rgba(18,12,8,.55));
}

.beat {
  position: absolute; left: 50%; top: 50%;
  width: min(38rem, calc(100% - 2.5rem));
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0; will-change: opacity, transform;
  text-shadow: 0 2px 24px rgba(0,0,0,.6);
}
.beat.side { left: clamp(1.25rem, 6vw, 6rem); top: auto; bottom: 14vh; transform: none; text-align: left; width: min(26rem, calc(100% - 2.5rem)); }
.beat.side.right { left: auto; right: clamp(1.25rem, 6vw, 6rem); }
.beat.end { top: auto; bottom: 12vh; transform: translateX(-50%); }
/* phones: every beat sits low, under the glass, on the dark gradient */
.beat.hero { top: auto; bottom: 10vh; transform: translateX(-50%); }
@media (max-width: 899px) {
  .beat.side, .beat.side.right { left: 50%; right: auto; bottom: 9vh; transform: translateX(-50%); text-align: center; }
  .vignette { background: radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(18,12,8,.7) 100%), linear-gradient(transparent 45%, rgba(18,12,8,.9)); }
}
/* desktop: text beside the glass, never on it */
@media (min-width: 900px) {
  .beat.hero { left: clamp(1.5rem, 6vw, 6rem); top: 50%; bottom: auto; transform: translateY(-50%); text-align: left; width: min(30rem, 34vw); }
  .beat.side { top: 50%; bottom: auto; transform: translateY(-50%); width: min(24rem, 30vw); }
  .beat.end { width: min(30rem, 34vw); left: auto; right: clamp(1.5rem, 6vw, 6rem); top: 50%; bottom: auto; transform: translateY(-50%); text-align: right; }
  .vignette { background: linear-gradient(90deg, rgba(18,12,8,.85), transparent 38%, transparent 62%, rgba(18,12,8,.85)), linear-gradient(transparent 70%, rgba(18,12,8,.5)); }
}

.kicker { font-size: .85rem; letter-spacing: .15em; color: var(--tea-soft); }
h1, h2 { font-family: var(--serif); font-weight: 800; line-height: 1.25; }
h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); margin-top: .5rem; }
h1 em { font-style: normal; color: var(--tea); }
.nw { white-space: nowrap; }
h2 { font-size: clamp(1.8rem, 4.5vw, 3.2rem); }
.lead { margin-top: 1rem; color: var(--muted); }
.beat.side p:not(.num) { margin-top: .75rem; color: var(--muted); }
.num { font-family: var(--serif); color: var(--tea); font-size: 1rem; letter-spacing: .2em; }

.btn {
  display: inline-block; margin-top: 1.5rem; padding: .8rem 2rem; border-radius: 99px;
  background: var(--tea); color: var(--ink); font-weight: 600; text-decoration: none;
  box-shadow: 0 8px 30px rgba(232,119,46,.35); transition: transform .2s;
}
.btn:hover { transform: translateY(-2px); }

.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(247,234,216,.1); }
.progress span { display: block; height: 100%; width: 0; background: var(--tea); }
.scroll-hint { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); font-size: .8rem; color: var(--muted); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- normal sections ---------- */


.demo-note { border-top: 1px solid rgba(247,234,216,.1); padding: 4rem 1.25rem 5rem; text-align: center; color: var(--muted); }
.demo-note strong { color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 899px) { h1 em { color: #ffbd85; } }

/* ---------- menu rail: vertical scroll drives a horizontal slide track ---------- */
.rail { height: 340vh; position: relative; }
.rail-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #160d07; }
.rail-head {
  position: absolute; z-index: 3; left: 0; right: 0; top: 4.5rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0 clamp(1.25rem, 6vw, 6rem);
}
.rail-count { font-family: var(--serif); color: var(--muted); font-size: .95rem; white-space: nowrap; }
.rail-count b { color: var(--cream); font-size: 1.6rem; }
.rail-track { display: flex; height: 100%; width: 300vw; will-change: transform; }
.slide {
  position: relative; width: 100vw; height: 100%; flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  align-content: center; gap: 1.25rem;
  padding: 7.5rem 1.5rem 3.5rem;
  background: radial-gradient(60% 55% at 50% 32%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 72%), #160d07;
  overflow: hidden;
}
.shot {
  justify-self: center; height: min(40svh, 26rem); aspect-ratio: 3 / 4;
  border-radius: 1.5rem; overflow: hidden; will-change: transform;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(247,234,216,.08);
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.copy { position: relative; text-align: center; will-change: transform, opacity; }
.big-num {
  position: absolute; z-index: -1; left: 50%; top: -2.2rem; transform: translateX(-50%);
  font-family: var(--serif); font-weight: 800; font-size: clamp(6rem, 22vw, 15rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--glow) 70%, transparent); opacity: .8; pointer-events: none;
}
.tag { display: inline-block; font-size: .8rem; letter-spacing: .08em; padding: .2rem .8rem; border-radius: 99px; background: color-mix(in srgb, var(--glow) 22%, transparent); color: var(--glow); }
.slide h3 { font-family: var(--serif); font-weight: 800; font-size: clamp(2rem, 8vw, 5rem); line-height: 1.2; margin-top: .4rem; }
.desc { color: var(--muted); max-width: 30rem; margin: .5rem auto 0; font-size: .98rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .9rem; }
.chips li { font-size: .8rem; padding: .25rem .75rem; border: 1px solid rgba(247,234,216,.18); border-radius: 99px; color: var(--cream); }
.slide .price { font-family: var(--serif); font-weight: 800; font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: 1; margin-top: 1rem; color: var(--cream); }
.slide .price span { font-size: .45em; vertical-align: .9em; margin-right: .15em; color: var(--glow); }
.rail-dots { position: absolute; z-index: 3; bottom: 1.4rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; }
.rail-dots span { width: .5rem; height: .5rem; border-radius: 99px; background: rgba(247,234,216,.25); transition: width .3s, background .3s; }
.rail-dots span.on { width: 1.75rem; background: var(--tea); }

@media (max-width: 899px) and (max-height: 700px) {
  .chips { display: none; }
  .shot { height: 34svh; }
}
@media (min-width: 900px) {
  .slide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none;
    align-items: center; gap: 4vw; padding: 6rem clamp(2rem, 8vw, 8rem) 4rem;
    background: radial-gradient(45% 60% at 72% 50%, color-mix(in srgb, var(--glow) 50%, transparent), transparent 72%), #160d07;
  }
  .shot { order: 2; height: min(72vh, 44rem); }
  .copy { text-align: left; }
  .big-num { left: -1rem; top: -6rem; transform: none; }
  .desc { margin-left: 0; font-size: 1.1rem; }
  .chips { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .rail { height: auto; }
  .rail-stage { position: static; height: auto; }
  .rail-track { flex-direction: column; width: 100%; transform: none !important; }
  .slide { width: 100%; min-height: 100svh; }
  .rail-dots { display: none; }
}

/* phones: the glass takes whatever height the text leaves (big system fonts shrink the glass, not the text) */
.wide-only { display: none; }
@media (min-width: 900px) { .wide-only { display: inline; } }
@media (max-width: 899px) {
  .slide { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; padding: 7rem 1.25rem 3.25rem; gap: 1rem; }
  .shot { height: 100%; max-height: 26rem; min-height: 0; align-self: center; }
  .big-num { top: -1.6rem; font-size: clamp(5rem, 26vw, 8rem); }
}

/* ---------- visit: the storefront opens from a small window to full screen ---------- */
.door { height: 230vh; position: relative; }
.door-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #160d07; display: grid; place-items: center; }
.door-img { position: absolute; inset: 0; will-change: clip-path; clip-path: inset(22% 30% round 2rem); }
.door-img img { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; transform: scale(1.25); }
.door-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(18,12,8,.85)), radial-gradient(ellipse at center, transparent 50%, rgba(18,12,8,.5)); }
.door-copy { position: relative; z-index: 2; align-self: end; text-align: center; padding: 0 1.25rem 12vh; width: min(44rem, 100%); opacity: 0; will-change: opacity, transform; }
.door-copy h2 { font-size: clamp(2.4rem, 8vw, 6rem); margin-top: .6rem; }
.status { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; padding: .35rem 1rem; border-radius: 99px; background: rgba(18,12,8,.6); border: 1px solid rgba(247,234,216,.2); backdrop-filter: blur(6px); }
.status i { width: .55rem; height: .55rem; border-radius: 99px; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 1.8s infinite; }
.status.closed i { background: #f87171; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .6rem rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

.info { max-width: 76rem; margin: 0 auto; padding: 5rem clamp(1.25rem, 5vw, 4rem) 6rem; }
.info-shot { border-radius: 1.5rem; overflow: hidden; height: clamp(14rem, 42vw, 30rem); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.info-shot img { width: 100%; height: 125%; object-fit: cover; display: block; will-change: transform; }
.info-grid { margin-top: 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 900px) { .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.panel { background: linear-gradient(160deg, #22160e, #170e08); border: 1px solid rgba(247,234,216,.08); border-radius: 1.5rem; padding: 1.75rem; }
.panel .kicker { margin-bottom: 1rem; }
.hours { list-style: none; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .75rem; border-radius: .6rem; color: var(--muted); font-size: .95rem; }
.hours li.today { background: rgba(232,119,46,.14); color: var(--cream); font-weight: 600; }
.hours li.today span:first-child::after { content: " · วันนี้"; color: var(--tea-soft); font-weight: 400; font-size: .85em; }
.map { width: 100%; height: auto; border-radius: 1rem; display: block; }
.ping { transform-origin: 168px 96px; animation: ping 2s ease-out infinite; }
@keyframes ping { from { transform: scale(.4); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }
.addr { margin-top: 1rem; font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; }
.addr small { font-family: var(--sans); color: var(--muted); font-size: .75rem; }
.near { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.cta-panel { display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(90% 80% at 100% 0%, rgba(232,119,46,.35), transparent 60%), linear-gradient(160deg, #2a190d, #170e08); }
.cta-panel h3 { font-family: var(--serif); font-weight: 800; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.25; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.cta-row .btn { margin-top: 0; }
.btn.line { background: #06c755; color: #fff; box-shadow: 0 8px 30px rgba(6,199,85,.3); }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid rgba(247,234,216,.35); box-shadow: none; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.info-grid .reveal:nth-child(2) { transition-delay: .1s; }
.info-grid .reveal:nth-child(3) { transition-delay: .2s; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); opacity: 0; pointer-events: none; width: max-content; max-width: calc(100% - 2rem); padding: .75rem 1.25rem; border-radius: 1rem; background: var(--cream); color: var(--ink); font-size: .9rem; box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .3s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 899px) { .door-img { clip-path: inset(25% 14% round 1.5rem); } }
@media (prefers-reduced-motion: reduce) {
  .door { height: auto; }
  .door-stage { position: relative; min-height: 100svh; }
  .door-img { clip-path: none !important; }
  .door-copy { opacity: 1 !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .status i, .ping { animation: none; }
}
.hours li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hours li { flex-wrap: wrap; row-gap: 0; }
.hours li span:first-child { white-space: nowrap; }
.hours li span:last-child { margin-left: auto; }
.hours li.today span:first-child::after { content: "วันนี้"; display: inline-block; margin-left: .4rem; padding: 0 .45rem; border-radius: 99px; background: var(--tea); color: var(--ink); font-size: .7em; font-weight: 600; vertical-align: .15em; }
@media (max-width: 899px) { .panel { padding: 1.25rem; } .hours li { padding: .4rem .6rem; } }
