/* Wanjai, Draft 2: quiet and formal. White page, one photo, one accent color. */

/* Dark mode, and the default for everyone: Wanjai only opens in the evening, so the site starts dark.
   Same layout, same type, only the colours change. Guests can switch to light in the footer. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #000000;   /* pure black */
  --ink: #F1EAE3;
  --soft: #A6A6A2;
  --lacquer: #F07A3C;   /* brighter orange so it still reads on the dark ground */
  --rule: #2B2B2B;
  --field: #121212;
  --callout: rgba(240, 122, 60, .09);
  --glass: rgba(10, 10, 10, .6);
}
:root[data-theme="dark"] { --shadow-soft: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px -12px rgba(0, 0, 0, .6), 0 28px 60px -24px rgba(240, 122, 60, .28); }
:root[data-theme="dark"] { --media-bg: #141414; }
:root[data-theme="dark"] .button:hover { background: #FF9257; color: #000000; }
:root[data-theme="dark"] .slot input:checked + span,
:root[data-theme="dark"] .button-line:hover,
:root[data-theme="dark"] .button { color: #000000; }
:root[data-theme="dark"] .skip { color: #000000; }
/* the outline button keeps the orange text: the filled-button rule above would paint it black on black */
:root[data-theme="dark"] .button-line { color: var(--lacquer); }
:root[data-theme="dark"] .map iframe { filter: sepia(.45) saturate(1.5) hue-rotate(-12deg) brightness(.8); }
body { transition: background-color .5s ease, color .5s ease; }

:root {
  --paper: #FFFFFF;
  --ink: #3F3A37;
  --soft: #736A64;
  --lacquer: #C4490F;   /* Wanjai orange, as bright as stays readable on white (contrast 4.9:1) */
  --rule: #D9D3CE;
  --field: #FAF8F6;
  --callout: rgba(196, 73, 15, .05);
  --glass: rgba(255, 255, 255, .72);
  --media-bg: #F2EEEA;   /* the quiet grey behind a video while it loads */

  color-scheme: light;

  --caps: "Marcellus SC", "Trajan Pro", Georgia, serif;
  --text: "EB Garamond", Garamond, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p, blockquote { margin: 0; }
a { color: var(--lacquer); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 1px solid var(--lacquer); outline-offset: 4px; }

.skip { position: absolute; left: 16px; top: -60px; background: var(--lacquer); color: #fff; padding: 8px 14px; }
.skip:focus { top: 16px; }

/* ---------- Page frame ---------- */
.page {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) 16px 32px;
  min-height: 100svh;
  display: flex; flex-direction: column;
}

.logo { align-self: center; margin-bottom: clamp(32px, 5vw, 48px); }
.logo img { width: clamp(180px, 26vw, 240px); }

/* small caps used for nav, headings, labels */
.caps {
  font-family: var(--caps);
  text-transform: lowercase;
  letter-spacing: 0.14em;
  font-weight: 400;
}

/* ---------- Main nav ---------- */
.nav { margin-top: clamp(32px, 5vw, 44px); }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; row-gap: 8px;
  font-size: 0.9375rem;
}
.nav li + li::before { content: "|"; color: var(--rule); margin: 0 14px; }
.nav a { padding-block: 4px; }
.nav-top { margin: 0 0 clamp(36px, 5vw, 52px); }
.nav a:hover { text-decoration: none; border-bottom: 1px solid currentColor; }

/* on wide screens keep the whole menu on one line */
@media (min-width: 900px) {
  .nav ul { font-size: 0.9375rem; }
  .nav a { letter-spacing: 0.12em; }
  .nav li + li::before { margin: 0 14px; }
  /* the menu may run a little wider than the page column so every link fits on one line */
  .nav { align-self: center; width: max-content; max-width: calc(100vw - 32px); }
}
/* nine links: step the size down so the menu always stays on one line */
@media (min-width: 900px) and (max-width: 1299px) {
  .nav ul { font-size: 0.84375rem; }
  .nav a { letter-spacing: 0.1em; }
  .nav li + li::before { margin: 0 10px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .nav ul { font-size: 0.78125rem; }
  .nav a { letter-spacing: 0.09em; }
  .nav li + li::before { margin: 0 8px; }
}
@media (min-width: 900px) and (max-width: 989px) {
  .nav ul { font-size: 0.71875rem; }
  .nav a { letter-spacing: 0.08em; }
  .nav li + li::before { margin: 0 7px; }
}

.meta {
  margin-top: 20px; text-align: center; color: var(--soft); font-size: 0.9375rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0;
}
.meta span + span::before { content: "|"; color: var(--rule); margin: 0 12px; }
.status.is-open { color: var(--ink); }

/* ---------- Home ---------- */
.hero img { width: 100%; aspect-ratio: 876 / 388; object-fit: cover; object-position: 50% 58%; }
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--media-bg); pointer-events: none; }
/* laptops and desktops: the homepage video runs wider than the text column, centered, for a more cinematic open */
@media (min-width: 1000px) {
  .hero-video { width: min(1240px, calc(100vw - 96px)); position: relative; left: 50%; transform: translateX(-50%); }
  /* wide but not too tall, so the menu under it still shows on a laptop screen without scrolling */
  .hero-video video { max-height: 64vh; }
}

/* ratings row, sits where The French Laundry shows its awards */
.acclaim {
  list-style: none; margin: clamp(28px, 4vw, 40px) 0 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap;
}
.acclaim li + li { border-left: 1px solid var(--rule); }
.acclaim a {
  display: grid; justify-items: center; gap: 2px;
  padding: 4px clamp(24px, 5vw, 44px);
  color: var(--ink); text-decoration: none;
}
.acclaim a:hover .rating-count { text-decoration: underline; text-underline-offset: .2em; }
/* the Google G beside the review count, in its own colours so it reads at a glance */
.g-mark { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
.rating-stars {
  position: relative; display: inline-block;
  font-size: 1rem; line-height: 1; letter-spacing: 0.18em; color: var(--rule);
}
.rating-stars::before { content: "★★★★★"; }
.rating-stars::after {
  content: "★★★★★"; position: absolute; left: 0; top: 0;
  width: calc(var(--rating) / 5 * 100%); overflow: hidden; white-space: nowrap;
  color: var(--lacquer);
}
.rating-score { font-size: 1.125rem; margin-top: 4px; }
.rating-score .caps { font-size: .8125rem; color: var(--lacquer); }
.rating-count { font-size: .875rem; color: var(--soft); }

/* guest quotes under the rating */
/* kept small and grey so the video and logo stay the focus */
.guest-words { max-width: 720px; width: 100%; margin: clamp(22px, 3vw, 30px) auto 0; }
.guest-words .quotes-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
.guest-words .quotes-row figure { gap: 4px; }
.guest-words .quotes-row blockquote p { font-size: 0.875rem; line-height: 1.5; }
.guest-words .quotes-row figcaption { margin-top: 2px; font-size: 0.75rem; color: #9A918B; }
.guest-words .quotes-row .stars { font-size: 0.625rem; margin-bottom: 0; }
.guest-words .review-source { margin-top: 14px; font-size: 0.75rem; }

/* ---------- Inner pages ---------- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 64px);
  align-items: start;
}
.side { display: grid; gap: 12px; font-size: 0.9375rem; line-height: 1.55; }
.side h1, .side h2 { font-size: 0.9375rem; color: var(--lacquer); }
.side h2 { margin-top: 8px; }
.side .links { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.9375rem; }
/* small line icons in front of the menu categories */
.side .links a { display: inline-flex; align-items: center; gap: 9px; }
.link-icon { width: 15px; height: 15px; flex: none; color: var(--lacquer); opacity: .65; transition: opacity .2s, transform .2s; }
.side .links a:hover .link-icon { opacity: 1; transform: translateY(-1px); }
.frame img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.frame-stack { display: grid; gap: 16px; }

/* menu by taste: four dishes in the space one photo used to take */
.frame-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frame-grid figure { margin: 0; }
.frame-grid img { aspect-ratio: 16 / 9; }

/* a dish photo inside a menu section: full frame, no crop */
.dish-photo { margin-bottom: 20px; }
.dish-photo img { aspect-ratio: 16 / 9; }

/* Menu page: the video, photo and dishes share one column so the section links can follow along */
.menu-main { display: grid; }

/* Menu page on computers: the section links follow the guest down the page */
@media (min-width: 721px) {
  .side-sticky {
    position: sticky; top: clamp(16px, 3vh, 28px); align-self: start;
    max-height: calc(100vh - 56px); overflow-y: auto; overscroll-behavior: contain;
  }
}

.frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--media-bg); pointer-events: none; }

.body { max-width: 560px; margin: clamp(48px, 7vw, 72px) auto 0; width: 100%; }
/* the eyebrow the printed card puts over khao soi */
.body .eyebrow { text-align: center; font-size: .75rem; letter-spacing: .2em; color: var(--lacquer); margin-bottom: 6px; }
.body h2 { font-size: 0.9375rem; color: var(--lacquer); text-align: center; margin-bottom: 18px; }
.body section + section { margin-top: 48px; }
.body .lead { text-align: center; color: var(--soft); margin-bottom: 22px; font-style: italic; }

/* featured drink inside the menu (Singha draught) */
.feature { display: grid; gap: 12px; margin-bottom: 28px; }
.feature-title { font-size: 1rem; color: var(--lacquer); text-align: center; }
.feature p { color: var(--ink); }
.feature-photos { display: flex; justify-content: center; gap: 10px; align-items: flex-start; margin-top: 6px; }
.feature-photos img { min-width: 0; width: 100%; height: auto; }
.feature-photos img:only-child { max-width: 420px; }
.drink-group { margin-top: 36px; }
.drink-title { font-size: 0.875rem; color: var(--lacquer); text-align: center; }
.drink-hint { text-align: center; font-size: 0.875rem; font-style: italic; color: var(--soft); margin: 2px 0 6px; }

/* menu lines */
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; }
.menu-list li::after { content: none; }
.menu-list .dots { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-4px); }
.menu-list .price { font-variant-numeric: lining-nums tabular-nums; }
.menu-list li:has(.desc) { flex-wrap: wrap; row-gap: 2px; padding: 9px 0; }
.menu-list .desc { flex-basis: 100%; font-size: 0.9375rem; line-height: 1.45; color: var(--soft); }

/* dish names read like the printed card: the Thai name in ink, the English one in orange */
.menu-list .dish-en { color: var(--lacquer); }

/* dishes the kitchen is not serving yet */
.soon {
  display: inline-block; margin-left: 8px; padding: 2px 7px;
  font-size: .625rem; letter-spacing: .14em; white-space: nowrap;
  color: var(--soft); border: 1px solid var(--rule); border-radius: 1px;
  vertical-align: 2px;
}
.body h2 .soon { vertical-align: 3px; }

/* a dish with a photo: the name is tappable and carries a small camera */
.dish-photo-link { color: inherit; text-decoration: none; }
.dish-cam {
  width: 13px; height: 13px; margin-left: 6px; vertical-align: -1px;
  color: var(--lacquer); opacity: .55; transition: opacity .2s;
}
.dish-photo-link:hover { text-decoration: none; }
.dish-photo-link:hover .dish-cam { opacity: 1; }
.dish-cam-link { text-decoration: none; }
.dish-cam-link:hover { text-decoration: none; }
.dish-cam-link:hover .dish-cam { opacity: 1; }
.note { display: grid; gap: 8px; }
.note { text-align: center; color: var(--soft); font-size: 0.9375rem; margin-top: 28px; }

.draft { border: 1px dashed var(--lacquer); color: var(--lacquer); padding: 10px 14px; font-size: 0.9375rem; }

.divider { width: 28px; margin: 40px auto; opacity: .9; }

/* photo row on the info page: small, whole photos, nothing cropped */
.gallery {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start;
  margin-top: clamp(40px, 6vw, 64px);
}
.gallery img { width: 100%; height: auto; }

/* about page: renovation photos come first, above the story */
.build { margin-bottom: clamp(40px, 6vw, 64px); text-align: center; }
.build h2 { font-size: 0.9375rem; color: var(--lacquer); margin-bottom: 8px; }
.build p { color: var(--soft); max-width: 36em; margin-inline: auto; }
.build .gallery { margin-top: 18px; }
/* private dining page: party photos, whole and uncropped, in flowing columns */
.party { margin-top: clamp(56px, 8vw, 88px); text-align: center; }
.party h2 { font-size: 0.9375rem; color: var(--lacquer); }
.party > p { color: var(--soft); max-width: 36em; margin: 8px auto 0; }
.party-photos { columns: 3; column-gap: 10px; margin-top: clamp(20px, 3vw, 32px); }
.party-photos a { display: block; break-inside: avoid; margin-bottom: 10px; cursor: zoom-in; }
.party-photos img { width: 100%; height: auto; transition: opacity .2s; }
.party-photos a:hover img { opacity: .88; }
@media (max-width: 720px) { .party-photos { columns: 2; column-gap: 8px; } .party-photos a { margin-bottom: 8px; } }

/* Back to the top: phones only, sits just above the orange book-a-table bar */
.to-top { display: none; }
@media (max-width: 720px) {
  .to-top {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 21;
    width: 50px; height: 50px; padding: 0;
    border: 1px solid var(--rule); border-radius: 50%;
    background: var(--paper); color: var(--lacquer);
    font-size: .5625rem; letter-spacing: .14em; line-height: 1;
    box-shadow: var(--shadow-soft, 0 6px 18px -10px rgba(63, 58, 55, .5));
    opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
    cursor: pointer;
  }
  .to-top.is-visible { opacity: 1; transform: none; }
  .to-top[hidden] { display: none; }
}


.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(30, 26, 24, .88); }
.lightbox img { display: block; max-width: 94vw; max-height: 86vh; width: auto; height: auto; cursor: zoom-out; }
.lightbox-close { display: block; margin: 12px auto 0; background: none; border: 0; color: #fff; font-size: .875rem; cursor: pointer; padding: 6px 12px; }

/* rewards page */
.rewards-offer { font-family: var(--caps); text-transform: lowercase; letter-spacing: 0.12em; font-size: 1.125rem; color: var(--ink); }
.giftcards, .promo { text-align: center; display: grid; gap: 14px; justify-items: center; }
.giftcards-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.promo-text { color: var(--soft); }
.promo-code { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; border: 1px dashed var(--lacquer); padding: 12px 18px; }
.promo-code [data-promo-code] { font-size: 1.25rem; letter-spacing: 0.22em; color: var(--lacquer); text-transform: uppercase; }
.promo-how { font-size: 0.9375rem; color: var(--soft); }

/* about page, last section: the founders, two framed portraits under the clover */
.founders { margin-top: clamp(56px, 8vw, 88px); text-align: center; }
.founders-mark { width: 26px; margin: 0 auto 14px; }
.founders h2 { font-size: 0.9375rem; color: var(--lacquer); }
.founders-lead { color: var(--soft); font-style: italic; margin-top: 4px; }
.founders-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); justify-content: center;
  gap: clamp(18px, 5vw, 56px); margin-top: clamp(24px, 4vw, 36px); align-items: start;
}
.founders-row figure { display: grid; gap: 14px; }
/* thin mat around each photo, like a framed print */
.founders-row img { width: 100%; height: auto; padding: 6px; border: 1px solid var(--rule); background: var(--paper); }
/* second portrait sits a little lower on wide screens */
@media (min-width: 721px) { .founders-row figure:nth-child(2) { margin-top: 48px; } }
.founders-row figcaption { display: grid; gap: 2px; }
.founders-name { font-size: 1rem; color: var(--ink); letter-spacing: 0.2em; }
.founders-role { font-size: 0.75rem; color: var(--lacquer); letter-spacing: 0.18em; }

/* second block on the info page: parking */
.parking-row { margin-top: clamp(40px, 6vw, 64px); }
.parking-row .button { margin-top: 6px; }

/* map */
.map { aspect-ratio: 3 / 2; background: var(--field); }
.map { outline: 1px solid var(--lacquer); outline-offset: 6px; }
/* full color, warmed toward Wanjai orange */
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: sepia(.45) saturate(1.7) hue-rotate(-12deg) contrast(.98); }

/* reviews */
.quotes { display: grid; gap: 32px; }
.quotes figure { text-align: center; }
/* guest quotes in Wanjai orange so they stand out from the rest of the page */
.quotes blockquote p { font-size: 1.1875rem; line-height: 1.5; font-style: italic; color: var(--lacquer); }
.quotes figcaption { margin-top: 8px; color: var(--soft); font-size: 0.875rem; }
.quotes figcaption::before { content: "— "; }
.stars { color: var(--lacquer); letter-spacing: .2em; font-size: .8125rem; margin-bottom: 6px; }
.review-source { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: .875rem; color: var(--soft); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .field legend { font-family: var(--caps); text-transform: lowercase; letter-spacing: .14em; font-size: .8125rem; color: var(--soft); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1.0625rem/1.4 var(--text); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  padding: 8px 0; min-height: 44px;
}
.field select { appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23736A64'/%3E%3C/svg%3E") no-repeat right 4px center; }
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-bottom-color: var(--lacquer); box-shadow: 0 1px 0 var(--lacquer); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.field-hint { font-size: .875rem; color: var(--soft); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; margin-top: 8px; }
.field .slot { position: relative; font-family: var(--text); text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 1rem; }
a[href^="tel:"] { white-space: nowrap; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span {
  display: flex; align-items: center; justify-content: center; min-height: 40px;
  border: 1px solid var(--rule); cursor: pointer; font-size: .9375rem; font-variant-numeric: lining-nums;
}
.slot span:hover { border-color: var(--lacquer); }
.slot input:checked + span { background: var(--lacquer); border-color: var(--lacquer); color: #fff; }
.slot input:focus-visible + span { outline: 1px solid var(--lacquer); outline-offset: 2px; }
.slot input:disabled + span { color: #B9B1AB; text-decoration: line-through; cursor: not-allowed; border-style: dashed; }
.slots-empty { grid-column: 1 / -1; color: var(--soft); }

.button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  justify-self: start;
  font-family: var(--caps); text-transform: lowercase; letter-spacing: .16em; font-size: .875rem;
  color: #fff; background: var(--lacquer); border: 1px solid var(--lacquer);
  padding: 12px 26px; min-height: 44px; cursor: pointer;
}
.button:hover { background: #A63C0E; text-decoration: none; }
.button:disabled { opacity: .6; cursor: progress; }
.button-line { background: transparent; color: var(--lacquer); }
.button-line:hover { background: var(--lacquer); color: #fff; }

.form-message { font-size: .9375rem; color: #9B1C1C; border-left: 2px solid currentColor; padding-left: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.confirmation { display: grid; gap: 12px; }
.confirmation h2 { font-size: .9375rem; color: var(--lacquer); }

/* ---------- Clover cursor (computers only) ---------- */
/* the browser draws it, so it moves exactly with the mouse; links and buttons get a darker, larger clover */
@media (pointer: fine) {
  body { cursor: url("images/cursor-clover.svg") 14 14, auto; }
  a, button, label, select, summary, [role=button], .slot, .slot span, .button, .lightbox-close, input[type=submit], input[type=checkbox], input[type=radio] {
    cursor: url("images/cursor-clover-hover.svg") 17 17, pointer;
  }
  input:not([type=submit]):not([type=checkbox]):not([type=radio]), textarea { cursor: text; }
}

/* ---------- Footer ---------- */
.footer {
  margin-top: auto; padding-top: clamp(40px, 6vw, 56px);
  display: grid; justify-items: center; gap: 10px; text-align: center;
}
.footer img { width: 26px; }
.footer .name { font-size: .75rem; letter-spacing: .22em; color: var(--soft); }
.footer .small { font-size: .8125rem; color: var(--soft); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.footer .social { display: inline-flex; align-items: center; gap: 6px; }
.social-link { display: inline-flex; padding: 6px; color: var(--lacquer); }
.social-link:hover { color: var(--ink); }
.social-link svg { display: block; }
/* the Facebook circle is drawn taller than the Instagram square; match its height so both sit on the same line */
.social-link-facebook svg { transform: scale(.9); }
.footer .small > * + *::before { content: "|"; color: var(--rule); margin: 0 10px; }
/* rewards and careers live here, first in the footer (above the clover), instead of in the main menu */
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; font-size: .9375rem; letter-spacing: .14em; margin: 0 0 14px; }
.footer-links a { line-height: 1.2; }
.footer-links a + a { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--rule); }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  /* phone order: logo, menu, content, details, footer */
  .page > .logo { order: 0; margin-bottom: 24px; }
  .nav { order: 1; margin: 0 0 28px; }
  .content { order: 2; }
  .meta { order: 3; }
  .acclaim { order: 3; }
  .guest-words { order: 3; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .guest-words .quotes-row { grid-template-columns: 1fr; gap: 18px; }
  /* on phones: a narrow centered column, each quote at most two lines */
  .guest-words .quotes-row figure { max-width: 300px; margin-inline: auto; }
  .guest-words .quotes-row blockquote p {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
  /* phones: the footer's parts join the page column, so the newsletter box can sit
     between the rewards/careers links and the clover logo + restaurant name */
  /* phones: the menu parts go back to being direct children, so the old stacking order still applies */
  .menu-main { display: contents; }
  .footer { display: contents; }
  .footer-links { order: 4; margin: auto 0 14px; padding-top: clamp(40px, 6vw, 56px); }
  .signup { order: 5; margin: clamp(26px, 5vw, 34px) auto clamp(18px, 4vw, 26px); }
  .footer > img { order: 6; align-self: center; margin-top: 10px; }
  .footer .name { order: 7; text-align: center; margin-top: 10px; }
  .footer .small { order: 8; margin-top: 10px; }
  .nav ul { flex-direction: column; align-items: center; gap: 6px; font-size: 1.0625rem; }
  .nav li + li::before { content: none; }
  .nav a { display: inline-block; padding-block: 6px; }
  .meta { flex-direction: column; align-items: center; }
  .meta span + span::before { content: none; }
  .hero img { aspect-ratio: 4 / 3; }
  /* phones: homepage video runs edge to edge (cancels the page's 16px side padding) */
  .hero-video { margin-inline: -16px; }
  .two-col { grid-template-columns: 1fr; }
  .two-col > .frame, .two-col > .frame-stack, .two-col > .map { order: -1; }
  /* the menu page keeps the video on top too, now that it sits inside .menu-main */
  .menu-main > .frame-stack { order: -1; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Finishing touches: soft shadows ---------- */
/* shadows are warm (tinted toward the ink and Wanjai orange), never grey-blue, and stay faint */
:root {
  --shadow-soft: 0 1px 2px rgba(63, 58, 55, .06), 0 10px 28px -10px rgba(63, 58, 55, .28), 0 28px 60px -24px rgba(196, 73, 15, .22);
}

/* videos and the main photo on each page float slightly off the white page */
.hero-video video, .frame img, .frame video { box-shadow: var(--shadow-soft); border-radius: 2px; }
.hero-video { border-radius: 2px; }

/* a soft shelf shadow under the main menu row, fading out at both ends */
.nav { position: relative; padding-bottom: 18px; }
.nav::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 0; height: 14px; pointer-events: none;
  background: radial-gradient(50% 100% at 50% 0%, rgba(63, 58, 55, .14), rgba(63, 58, 55, 0));
}
/* menu links glow a little when pointed at */
.nav a, .footer-links a, .side .links a { transition: text-shadow .2s, color .2s; }
.nav a:hover, .footer-links a:hover, .side .links a:hover { text-shadow: 0 2px 10px rgba(196, 73, 15, .35); }

/* buttons sit on a soft orange shadow and lift slightly on hover */
.button { box-shadow: 0 1px 2px rgba(196, 73, 15, .2), 0 8px 18px -8px rgba(196, 73, 15, .55); transition: background .2s, color .2s, box-shadow .2s, transform .2s; }
.button:hover { box-shadow: 0 2px 4px rgba(196, 73, 15, .22), 0 14px 26px -10px rgba(196, 73, 15, .6); transform: translateY(-1px); }
.button:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(196, 73, 15, .25); }
.button-line { box-shadow: 0 6px 16px -10px rgba(196, 73, 15, .45); }
@media (prefers-reduced-motion: reduce) { .button:hover { transform: none; } }

/* ---------- Google rating (homepage) ---------- */
/* a big 5.0 with stars under it, no box; the laurel branches were removed on the owner's request (2026-09-21) */
.acclaim a { position: relative; gap: 6px; padding: 8px 16px; transition: transform .2s; }
.acclaim a:hover { transform: translateY(-2px); }
.acclaim .rating-big { font-family: var(--text); font-size: clamp(2.5rem, 5vw, 3rem); line-height: 1; color: var(--ink); font-variant-numeric: lining-nums; }
.acclaim .rating-stars { font-size: 1.125rem; letter-spacing: .14em; }
.acclaim .rating-count { font-size: .9375rem; color: var(--soft); }
.acclaim .rating-count .caps { color: var(--lacquer); font-size: .875rem; }
@media (prefers-reduced-motion: reduce) { .acclaim a:hover { transform: none; } }

/* careers: open positions line */
.careers-open { display: grid; gap: 2px; }
.careers-open .caps { font-size: .8125rem; color: var(--lacquer); }

/* happy hour: days and time */
.hh-time { display: grid; gap: 2px; font-size: 1.125rem; color: var(--ink); }
.hh-time .caps { font-size: .8125rem; color: var(--lacquer); }
/* the "any four small plates" deal leads the happy hour list */
.menu-list .hh-deal { font-size: 1.125rem; }
.menu-list .hh-deal span:first-child { color: var(--lacquer); }


/* party photos: gentle tilt toward the mouse (js/gallery.js), small zoom inside the frame, soft shadow */
.party-photos a { overflow: hidden; border-radius: 2px; transition: transform .35s ease, box-shadow .35s ease; will-change: transform; }
.party-photos a img { transition: transform .5s ease, opacity .2s; }
.party-photos a.is-tilted { transition: transform .08s linear, box-shadow .35s ease; box-shadow: var(--shadow-soft); }
.party-photos a:hover img { transform: scale(1.05); opacity: 1; }

/* private dining: event request form */
.event-request { max-width: 560px; width: 100%; margin: clamp(56px, 8vw, 88px) auto 0; }
.event-request > h2 { font-size: 0.9375rem; color: var(--lacquer); text-align: center; }
.event-lead { text-align: center; color: var(--soft); margin: 8px 0 24px; }
.event-request .button { justify-self: center; }

/* phones: a small booking bar pinned to the bottom (not on the booking page itself) */
.book-bar { display: none; }
@media (max-width: 720px) {
  /* a floating button, not a full-width band: it keeps the dish photos in view */
.book-bar {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  min-height: 50px; padding: 0 26px; white-space: nowrap;
  text-align: center; font-size: .9375rem; letter-spacing: .16em;
  color: var(--lacquer); background: var(--glass); border: 1px solid var(--lacquer);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .55);
}
.book-bar::before {
  content: ""; flex: none; width: 17px; height: 17px;
  background: url(images/clover.png) center / contain no-repeat;
}
  .book-bar:hover { text-decoration: none; }
  .book-bar:active { transform: translateX(-50%) scale(.97); }
  /* room so the pill never covers the last line of the page */
  .page { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 380px) {
  .book-bar { padding: 0 18px; font-size: .875rem; letter-spacing: .1em; }
}

/* homepage: newsletter signup */
.signup { max-width: 520px; width: 100%; margin: clamp(40px, 6vw, 56px) auto 0; text-align: center; display: grid; gap: 8px; justify-items: center; }
.signup h2 { font-size: .9375rem; color: var(--lacquer); }
.signup p { color: var(--soft); font-size: .9375rem; }
.signup-form { display: flex; flex-wrap: wrap; justify-content: center; align-items: end; gap: 10px; margin-top: 6px; width: 100%; }
.signup-form label[for] { position: absolute; left: -9999px; }
.signup-form input[type=email] {
  flex: 1 1 220px; min-width: 0; padding: 10px 2px; font: inherit; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule); text-align: center;
}
.signup-form input[type=email]:focus-visible { outline: none; border-bottom-color: var(--lacquer); box-shadow: 0 1px 0 var(--lacquer); }
.signup-message { color: var(--lacquer); font-size: .9375rem; }

/* ---------- Fortune sticks game (hidden page, shared by QR code) ---------- */
.fortune { display: grid; justify-items: center; gap: 18px; text-align: center; }
.fortune-cup-wrap { display: grid; justify-items: center; padding: 8px 0 4px; }
.fortune-cup { width: min(220px, 55vw); height: auto; color: var(--lacquer); }
.fortune-cup .fortune-sticks { opacity: .55; }
.fortune-cup-wrap.is-shaking { animation: cup-shake .26s ease-in-out 5; transform-origin: 50% 85%; }
@keyframes cup-shake { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.fortune-stick { transition: transform .6s cubic-bezier(.2, .8, .3, 1); }
.fortune-cup-wrap.has-stick .fortune-stick { transform: translate(6px, -34px) rotate(9deg); }
.fortune-result { display: grid; gap: 8px; justify-items: center; max-width: 34ch; }
.fortune-number { font-size: .8125rem; letter-spacing: .16em; color: var(--soft); }
.fortune-text { font-family: var(--text); font-style: italic; font-size: 1.125rem; line-height: 1.5; }
.fortune-prize { font-size: 1rem; letter-spacing: .14em; color: var(--lacquer); }
.fortune-note { font-size: .9375rem; color: var(--soft); }
.fortune-claim { display: grid; gap: 8px; justify-items: center; max-width: 34ch; border-top: 1px solid var(--rule); padding-top: 18px; width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .fortune-cup-wrap.is-shaking { animation: none; }
  .fortune-stick { transition: none; }
}

/* ---------- Homepage motion (phones and computers, off for reduced motion) ---------- */
/* Nothing is hidden unless the script is running, so the page still reads with JavaScript off. */
.has-motion [data-reveal] { opacity: 0; transform: translateY(16px); }
.has-motion [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .3, 1); }
.has-motion .logo img { animation: logo-in .9s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes logo-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .has-motion [data-reveal] { opacity: 1; transform: none; }
  .has-motion .logo img { animation: none; }
}

/* ---------- Floating khao soi bowl: a shortcut to the menu from any page ---------- */
.round-link {
  position: fixed; left: 14px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 21;
  display: grid; place-items: center; width: 54px; height: 54px;
  border: 1px solid var(--rule); border-radius: 50%;
  background: var(--paper); color: var(--lacquer);
  box-shadow: var(--shadow-soft, 0 6px 18px -10px rgba(63, 58, 55, .5));
  animation: round-float 3.4s ease-in-out infinite;
  transition: transform .2s, box-shadow .2s;
}
.round-link svg { width: 30px; height: 30px; }
.round-link:hover { transform: translateY(-3px); text-decoration: none; }
.round-link:active { transform: scale(.94); }
@keyframes round-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
/* phones: sit on the same row as the book-a-table button */
@media (max-width: 720px) {
  .round-link { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 50px; height: 50px; }
  .round-link svg { width: 27px; height: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .round-link { animation: none; }
  .round-link:hover { transform: none; }
}

/* the day / night switch in the footer */
.theme-switch { display: flex; justify-content: center; align-items: center; gap: 10px; margin: -14px 0 clamp(18px, 3vw, 26px); }
.theme-sep { color: var(--rule); }
.theme-option {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 2px 0; cursor: pointer;
  font-family: var(--caps); font-size: .75rem; letter-spacing: .14em; text-transform: lowercase;
  color: var(--soft); transition: color .2s;
}
.theme-option svg { width: 15px; height: 15px; }
.theme-option:hover { color: var(--ink); }
.theme-option[aria-pressed="true"] { color: var(--lacquer); border-bottom: 1px solid currentColor; }

/* the clover rain easter egg (three taps on the footer clover) */
.clover-rain { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }
.clover-rain img { position: absolute; top: -48px; opacity: .9; animation: clover-fall linear forwards; }
@keyframes clover-fall { to { transform: translateY(112vh) rotate(340deg); } }
@media (prefers-reduced-motion: reduce) { .clover-rain { display: none; } }

/* ---------- A. The doors open: a short curtain over the homepage ---------- */
.intro { position: fixed; inset: 0; z-index: 60; pointer-events: auto; }
.intro-panel { position: absolute; top: 0; bottom: 0; width: 50.2%; background: var(--paper); transition: transform 1.7s cubic-bezier(.62, 0, .2, 1); }
.intro-left { left: 0; }
.intro-right { right: 0; }
.intro-mark {
  position: absolute; left: 50%; top: 50%; width: min(260px, 56vw); height: auto;
  transform: translate(-50%, -50%) scale(.98); opacity: 0;
  transition: opacity .7s ease, transform 1.2s cubic-bezier(.2, .8, .3, 1);
}
.intro.is-ready .intro-mark { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.intro.is-open .intro-mark { opacity: 0; transition: opacity .5s ease; }
.intro.is-open .intro-left { transform: translateX(-101%); }
.intro.is-open .intro-right { transform: translateX(101%); }
.intro.is-skipping { opacity: 0; pointer-events: none; transition: opacity .28s ease; }
html.intro-running, html.intro-running body { overflow: hidden; }

/* ---------- C. Moving between pages: fade, no white flash ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .22s ease both; }
::view-transition-new(root) { animation: page-in .34s ease both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- D. Buttons and links answer the hand ---------- */
.nav a, .side .links a, .footer-links a { position: relative; }
@media (pointer: fine) {
  .nav a::after, .side .links a::after, .footer-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: left center;
    transition: transform .32s cubic-bezier(.2, .8, .3, 1);
  }
  .nav a:hover::after, .side .links a:hover::after, .footer-links a:hover::after { transform: scaleX(1); }
  
/* the page you are on already has its own line */
  .nav a[aria-current="page"]::after, .side .links a[aria-current="page"]::after { content: none; }
  .nav a:hover, .side .links a:hover, .footer-links a:hover { text-decoration: none; }
  .magnetic { transition: transform .25s cubic-bezier(.2, .8, .3, 1); }
}
a:active, button:active { transform: scale(.97); }


@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  a:active, button:active { transform: none; }
}

/* ---------- One clover sits above the page you are on ---------- */
.nav a[aria-current="page"] { padding-top: 13px; padding-left: 0; padding-right: 0; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: 50%; top: 0; right: auto; bottom: auto;
  transform: translateX(-50%);
  width: 12px; height: 12px; background: url(images/clover.png) center / contain no-repeat;
}
.nav a[aria-current="page"]::after { content: none; }
.footer-links a[aria-current="page"] { text-decoration: none; }

/* same-day tables are by phone only */
.call-today {
  border: 1px solid var(--rule); border-left: 2px solid var(--lacquer);
  padding: 12px 16px; margin-bottom: 22px; font-size: .9375rem; color: var(--soft);
}
.call-today a { white-space: nowrap; }
.note-call {
  border: 1px solid var(--rule); border-left: 3px solid var(--lacquer);
  background: var(--callout); padding: 16px 20px; margin: 0 0 clamp(26px, 4vw, 36px);
  font-size: 1.0625rem; line-height: 1.6; color: var(--ink);
}
.note-call .caps {
  display: block; color: var(--lacquer); font-size: .8125rem;
  letter-spacing: .14em; margin: 0 0 6px;
}
.note-call a { color: var(--lacquer); white-space: nowrap; }

/* the house rule, right where people press the booking button */
.hold-note {
  margin-top: 16px; font-size: .9375rem; line-height: 1.55; color: var(--soft);
  border-top: 1px solid var(--rule); padding-top: 14px;
}
.hold-note a { white-space: nowrap; }
@media (max-width: 720px) { .note-call { font-size: 1rem; padding: 14px 16px; } }

/* small print inside a menu section: add-ons, what comes on the tray */
.menu-note { margin-top: 10px; font-size: .875rem; line-height: 1.5; color: var(--soft); }
.body section + section { margin-top: 48px; }

/* the small leaf beside a dish that can be made vegetarian */
.veg { width: 11px; height: 11px; display: inline-block; vertical-align: baseline; color: #4E8C5B; opacity: .9; }
:root[data-theme="dark"] .veg { color: #7CC08C; }
.veg-note { display: flex; align-items: center; gap: 7px; }
