:root {
  color-scheme: dark;
  --night: #101a19;
  --night-soft: #14211f;
  --surface: #172522;
  --surface-light: #20302a;
  --ink: #f1eee4;
  --body: #d1d5ca;
  --muted: #abb7a9;
  --quiet: #89998c;
  --line: rgba(196, 205, 183, .18);
  --gold: #e5c891;
  --gold-bright: #f2d9a7;
  --gold-muted: #ad9160;
  --green: #a8bfae;
  --serif: "Noto Serif Thai", Thonburi, Georgia, serif;
  --sans: "Noto Sans Thai", "Leelawadee UI", Thonburi, Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 76% 13%, rgba(113, 141, 107, .15), transparent 36rem),
    radial-gradient(ellipse at 13% 49%, rgba(120, 93, 56, .07), transparent 36rem),
    var(--night);
  color: var(--ink);
  font: 16px/1.8 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 5px; }

.skip-link {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 9px 14px;
  transform: translateY(-160%);
  border-radius: 4px;
  background: var(--gold-bright);
  color: #14201a;
}

.skip-link:focus { transform: translateY(0); }
.site-shell { width: min(1140px, calc(100% - 64px)); margin-inline: auto; }

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font: 500 18px/1.2 Georgia, var(--serif);
  letter-spacing: .035em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(229, 200, 145, .72);
  border-radius: 50%;
  color: var(--gold);
  font: 17px Georgia, serif;
}

.header-link {
  padding-block: 8px;
  color: var(--muted);
  font-size: 13px;
  text-decoration-color: rgba(171, 183, 169, .45);
  text-underline-offset: 5px;
}

.header-link:hover { color: var(--gold-bright); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .98fr);
  align-items: center;
  gap: clamp(42px, 6.2vw, 86px);
  padding-block: clamp(54px, 8vw, 94px) clamp(78px, 10vw, 116px);
}

.hero-copy { max-width: 590px; }
.eyebrow { margin: 0; color: var(--gold); font-size: 13px; letter-spacing: .045em; }
h1, h2, h3, p, blockquote { margin-top: 0; }

.hero h1 {
  display: grid;
  gap: 0;
  margin: 0 0 21px;
  font: 500 clamp(39px, 5.5vw, 64px)/1.34 var(--serif);
  letter-spacing: 0;
}

.hero h1 span:last-child { color: var(--gold-bright); }
.hero-lead { max-width: 520px; margin-bottom: 24px; color: var(--body); font-size: 17px; line-height: 1.95; }

.button {
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.button-primary { background: var(--gold); color: #17201a; }
.hero-cue { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.cue-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px rgba(229, 200, 145, .45); }

.cafe-scene {
  position: relative;
  width: min(100%, 510px);
  min-height: 0;
  justify-self: end;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(229, 200, 145, .33);
  border-radius: 9px;
  background: #152423;
  box-shadow: 0 29px 80px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .04);
  isolation: isolate;
}

.cafe-picture, .spread-picture { display: block; width: 100%; }
.cafe-photo { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 788; object-fit: contain; object-position: center; transition: transform 1.5s ease, filter 1.5s ease; }

.scene-caption { position: relative; z-index: 2; margin-top: 0; padding: 18px 20px 20px; border-top: 1px solid rgba(229, 200, 145, .2); background: linear-gradient(180deg, rgba(18, 29, 26, .9), #17231f 100%); }
.scene-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.scene-topline p { margin: 0; }
.scene-topline > span { color: var(--gold); font: 11px Georgia, serif; letter-spacing: .09em; }
.scene-caption h2 { margin: 8px 0 0; font: 500 21px/1.5 var(--serif); }
.scene-caption blockquote { margin: 0 0 10px; color: var(--gold-bright); font: 500 15px/1.7 var(--serif); }
.choice-heading { margin: 0 0 7px; color: var(--quiet); font-size: 11px; }
.scene-choices { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: scene-choice; }
.scene-choices li { min-height: 35px; display: grid; grid-template-columns: 22px 1px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 0; color: var(--body); font-size: 13px; line-height: 1.6; }
.choice-number { color: var(--gold); font: 11px Georgia, serif; letter-spacing: .08em; }
.choice-divider { width: 1px; min-height: 18px; align-self: stretch; background: var(--gold-muted); opacity: .68; }
.scene-index { position: absolute; z-index: 2; top: 16px; left: 17px; display: flex; align-items: center; gap: 9px; color: rgba(241, 238, 228, .83); font: 10px Arial, sans-serif; letter-spacing: .13em; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.scene-index i { width: 18px; height: 1px; background: var(--gold); }

.story-spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  grid-template-rows: auto auto auto;
  grid-template-areas: "eyebrow art" "title art" "quote art";
  align-items: center;
  column-gap: clamp(24px, 5vw, 78px);
  width: 100vw;
  min-height: 580px;
  margin-inline: calc(50% - 50vw);
  padding: 76px max(32px, calc((100vw - 1140px) / 2));
  overflow: hidden;
  border-block: 1px solid rgba(196, 205, 183, .14);
  background:
    radial-gradient(ellipse at 77% 54%, rgba(188, 146, 84, .12), transparent 31rem),
    linear-gradient(100deg, #111b19 0%, #14201d 48%, #18221d 100%);
}

.spread-eyebrow { grid-area: eyebrow; align-self: end; color: var(--gold); font-size: 13px; letter-spacing: .06em; }
.spread-title { grid-area: title; display: grid; align-self: center; margin: 14px 0 18px; font: 500 clamp(72px, 9.7vw, 132px)/1.08 var(--serif); letter-spacing: -.025em; }
.spread-title span:last-child { color: var(--gold-bright); }
.spread-quote { grid-area: quote; align-self: start; margin: 0; color: var(--body); font: 400 clamp(19px, 2.2vw, 27px)/1.7 var(--serif); }
.spread-picture { grid-area: art; align-self: center; }
.spread-photo { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 788; object-fit: contain; object-position: center; border: 1px solid rgba(229, 200, 145, .2); box-shadow: 0 24px 64px rgba(0, 0, 0, .25); }

.status-endcap {
  display: grid;
  grid-template-columns: minmax(160px, .5fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 115px;
  margin-block: 42px 54px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-endcap .eyebrow { color: var(--quiet); font: 11px/1.5 Arial, sans-serif; letter-spacing: .18em; }
.status-endcap h2 { margin: 0; color: var(--ink); font: 500 clamp(19px, 2.2vw, 25px)/1.5 var(--serif); }
.status-endcap > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }

.site-footer { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--quiet); }
.footer-brand { color: var(--body); font-size: 14px; }
.site-footer > span { font-size: 12px; }

.not-found-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.not-found { width: min(100%, 540px); padding: clamp(25px, 6vw, 56px); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 25px 80px rgba(0, 0, 0, .25); }
.not-found .eyebrow { margin-top: 52px; }
.not-found h1 { margin: 7px 0 9px; font: 500 clamp(27px, 6vw, 38px)/1.5 var(--serif); }
.not-found > p:not(.eyebrow) { margin-bottom: 22px; color: var(--muted); }

@media (max-width: 760px) {
  .site-shell { width: min(100% - 38px, 580px); }
  .site-header { min-height: 72px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 31px; height: 31px; }
  .header-link { max-width: 136px; font-size: 12px; text-align: right; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 49px 60px; }
  .hero h1 { margin-block: 0 15px; font-size: clamp(36px, 9.4vw, 54px); line-height: 1.38; }
  .hero-lead { margin-bottom: 20px; font-size: 16px; line-height: 1.9; }
  .cafe-scene { width: 100%; min-height: 0; justify-self: stretch; }
  .scene-caption { padding: 16px 15px 17px; }
  .scene-caption h2 { font-size: 19px; }
  .scene-choices li { min-height: 36px; font-size: 12px; }
  .story-spread { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "eyebrow" "title" "art" "quote"; row-gap: 0; min-height: 0; padding-block: 54px 48px; }
  .spread-eyebrow { align-self: auto; margin-bottom: 7px; }
  .spread-title { margin: 0 0 13px; font-size: clamp(72px, 17vw, 88px); line-height: 1.06; }
  .cafe-photo, .spread-photo { aspect-ratio: 4 / 5; }
  .spread-quote { align-self: start; margin-top: 5px; font-size: 20px; }
  .status-endcap { grid-template-columns: minmax(0, 1fr); gap: 5px; min-height: 0; margin-block: 30px 39px; padding-block: 18px; }
  .status-endcap h2 { font-size: 21px; }
  .status-endcap > p:last-child { font-size: 13px; }
  .site-footer { min-height: 76px; flex-wrap: wrap; justify-content: flex-start; gap: 5px 12px; padding-block: 14px; }
  .site-footer > span { margin-left: auto; }
}

@media (max-width: 400px) {
  .site-shell { width: calc(100% - 30px); }
  .hero { padding-block: 39px 49px; }
  .hero h1 { font-size: clamp(33px, 9.2vw, 39px); }
  .hero-lead { font-size: 15px; }
  .scene-caption { padding: 15px 13px 16px; }
  .scene-topline { font-size: 10px; }
  .scene-choices li { min-height: 35px; padding-block: 6px; font-size: 12px; }
  .story-spread { padding-inline: 19px; }
  .spread-title { font-size: clamp(62px, 16vw, 76px); }
  .cafe-photo, .spread-photo { aspect-ratio: 4 / 5; }
}

@media (max-width: 340px) {
  .site-header { min-height: 66px; }
  .brand { gap: 8px; font-size: 16px; }
  .header-link { max-width: 116px; font-size: 11px; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: 32px; }
  .hero-cue { font-size: 11px; }
  .scene-caption { padding-inline: 12px; }
  .scene-topline { align-items: flex-start; }
  .scene-choices li { grid-template-columns: 20px 1px minmax(0, 1fr); gap: 8px; font-size: 12px; }
  .spread-title { font-size: 58px; }
  .spread-quote { font-size: 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  html.motion-ready .hero-copy > * { animation: hero-enter .68s cubic-bezier(.2, .7, .2, 1) both; }
  html.motion-ready .hero-copy > :nth-child(1) { animation-delay: .06s; }
  html.motion-ready .hero-copy > :nth-child(2) { animation-delay: .14s; }
  html.motion-ready .hero-copy > :nth-child(3) { animation-delay: .22s; }
  html.motion-ready .hero-copy > :nth-child(4) { animation-delay: .30s; }
  html.motion-ready .cafe-scene { animation: hero-enter .85s .18s cubic-bezier(.2, .7, .2, 1) both; }
  html.motion-ready .cafe-scene.is-active .cafe-photo { transform: scale(1.012); filter: brightness(1.025); }
  html.motion-ready [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(16px); }
  html.motion-ready [data-reveal].is-visible { animation: reveal-enter .64s cubic-bezier(.2, .7, .2, 1) both; }
  html.motion-ready .story-spread.is-visible .spread-photo { animation: photo-reveal .95s ease-out both; }
  html.motion-ready .story-spread.is-visible .spread-quote { animation: quote-enter .75s .15s cubic-bezier(.2, .7, .2, 1) both; }
  .button-primary { transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
  .button-primary:is(:hover, :focus-visible) { transform: translateY(-2px); background: var(--gold-bright); box-shadow: 0 8px 24px rgba(229, 200, 145, .2); }
  .header-link, .footer-brand { transition: color .2s ease; }
  .header-link:is(:hover, :focus-visible), .footer-brand:is(:hover, :focus-visible) { color: var(--gold-bright); }
}

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes quote-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes photo-reveal {
  from { opacity: .86; transform: scale(1.018); }
  to { opacity: 1; transform: scale(1); }
}

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