/* ============================================================================
   web-01 · สำรับ เจริญกรุง

   Concept: a samrap is not a list of dishes, it is a round tray with the
   curries set around the rice. So this site's organising shape is the circle,
   not the card grid — and the page is dark, because the restaurant only opens
   at night. Signature: the samrap ring (see .ring), used on the home page and
   the menu page and nowhere else.
   ============================================================================ */

:root {
  --lacquer: #241713;
  --lacquer-2: #31201A;
  --rice: #F2EDE3;
  --celadon: #8FB09A;
  --chilli: #C1272D;
  --brass: #C9A227;
  --muted: #A2938A;

  --container: 1140px;
  --pad: clamp(20px, 5vw, 48px);
  --gap: clamp(80px, 11vw, 152px);
}

body {
  background: var(--lacquer);
  color: var(--rice);
  font-family: 'IBM Plex Sans Thai', system-ui, sans-serif;
  line-height: 1.8;
}

.mono, .num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: 'Chonburi', serif; font-weight: 400; line-height: 1.35; }
h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }

.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--gap); }
.section--alt { background: var(--lacquer-2); }
.lede { color: var(--muted); max-width: 52ch; }
.rule { width: 72px; height: 2px; background: var(--brass); border: 0; margin: 0 0 24px; }

a { color: var(--celadon); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* -- buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block; padding: 16px 32px; border-radius: 0;
  text-decoration: none; font-weight: 600; transition: background .2s, color .2s;
}
.btn--primary { background: var(--chilli); color: var(--rice); }
.btn--primary:hover { background: #d43038; }
.btn--ghost { border: 1px solid var(--celadon); color: var(--celadon); }
.btn--ghost:hover { background: var(--celadon); color: var(--lacquer); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* -- header ----------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 30; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.header.is-stuck { background: var(--lacquer); border-bottom-color: rgba(201,162,39,.25); }
.header__inner {
  max-width: var(--container); margin-inline: auto; padding: 16px var(--pad);
  display: flex; align-items: center; gap: 28px;
}
.brand { font-family: 'Chonburi', serif; font-size: 1.5rem; color: var(--rice); text-decoration: none; }
.header__tel { margin-left: auto; color: var(--muted); text-decoration: none; font-size: .875rem; }
.header__tel:hover { color: var(--rice); }

.nav { display: flex; gap: 22px; margin-left: 24px; }
.nav__link { position: relative; color: var(--rice); text-decoration: none; font-size: .9375rem; padding-block: 4px; }
/* active nav is a dot, not an underline — the dots echo the dishes on the tray */
.nav__link.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: -2px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--chilli); transform: translateX(-50%);
}
.nav__link:hover { color: var(--celadon); }

.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-left: auto; }
.burger span { display: block; width: 22px; height: 2px; background: var(--rice); }

@media (max-width: 860px) {
  .burger { display: flex; }
  .header__tel { display: none; }
  .nav {
    position: fixed; inset: 0; z-index: 40;
    flex-direction: column; justify-content: center; align-items: center; gap: 28px;
    margin: 0; background: var(--lacquer);
    transform: translateY(-100%); transition: transform .3s;
  }
  .nav.is-open { transform: none; }
  .nav__link { font-size: 1.375rem; }
  body.nav-open { overflow: hidden; }
}

/* -- hero ------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1fr 1.6fr; min-height: min(82vh, 760px); }
.hero__text { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px,7vw,96px) 0 clamp(48px,7vw,96px) var(--pad); max-width: 620px; margin-left: auto; }
.hero__text > * { max-width: 46ch; }
.hero h1 { margin-bottom: 12px; }
.hero__sub { color: var(--celadon); font-size: 1.0625rem; margin-bottom: 20px; }
.hero__hours { margin-top: 28px; color: var(--muted); font-size: .875rem; }
.hero__img { position: relative; overflow: hidden; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__img { order: -1; height: 52vh; }
  .hero__text { padding: 48px var(--pad); margin-left: 0; }
}

/* -- dish trio: circles, not cards ------------------------------------------- */
.dishes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
@media (max-width: 1024px) { .dishes { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
.dish { text-align: center; }
.dish__img {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(201,162,39,.4); margin-bottom: 20px;
}
.dish__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .32s ease-out; }
.dish:hover .dish__img img { transform: scale(1.03); }
.dish h3 { font-size: 1.375rem; margin-bottom: 8px; }
.dish p { color: var(--muted); font-size: .9375rem; max-width: 30ch; margin-inline: auto; }
.dish__price { color: var(--chilli); margin-top: 10px; font-size: 1.0625rem; }
.dish__price small { color: var(--muted); font-size: .75rem; }

/* -- SIGNATURE: the samrap ring ---------------------------------------------- */
.ring-block { display: grid; grid-template-columns: 42fr 58fr; gap: clamp(32px,5vw,72px); align-items: center; }
@media (max-width: 900px) { .ring-block { grid-template-columns: 1fr; } }

.ring { width: min(600px, 100%); margin-inline: auto; display: block; }
.ring__outer { fill: none; stroke: var(--celadon); stroke-width: 1; stroke-dasharray: 2 6; }
.ring__spoke { stroke: var(--brass); stroke-width: 1; opacity: .3; }
.ring__center { fill: var(--rice); }
.ring__center-label { fill: var(--lacquer); font-size: 11px; text-anchor: middle; font-family: 'IBM Plex Sans Thai', sans-serif; }
.ring__dot { fill: var(--celadon); transition: fill .18s; }
.ring__label { fill: var(--muted); font-size: 11px; font-family: 'IBM Plex Sans Thai', sans-serif; transition: fill .18s; }
.ring__g { cursor: default; }
.ring__g:hover .ring__dot, .ring__g:focus-visible .ring__dot { fill: var(--chilli); }
.ring__g:hover .ring__label, .ring__g:focus-visible .ring__label { fill: var(--rice); }
.ring__g:hover ~ .ring__spokes .ring__spoke { opacity: .3; }

/* dots appear clockwise on first view; the whole animation is skipped under reduced motion */
.ring__g { opacity: 0; animation: ring-in .4s ease-out forwards; }
.ring.is-idle .ring__g { opacity: 1; animation: none; }
@keyframes ring-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ring__g { opacity: 1; animation: none; } }

.ring__prices { margin-top: 28px; color: var(--celadon); font-size: .9375rem; }
.ring__sizes { display: none; }
@media (max-width: 600px) {
  .ring__labels { display: none; }
  .ring__sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-top: 24px; color: var(--muted); font-size: .9375rem; }
  .ring__sizes li::before { content: '·'; color: var(--celadon); margin-right: 8px; }
}

/* -- CTA band ---------------------------------------------------------------- */
.band { background: var(--chilli); color: var(--rice); padding-block: clamp(56px,7vw,88px); text-align: center; }
.band--quiet { background: var(--lacquer-2); }
.band h2 { margin-bottom: 12px; }
.band p { color: rgba(242,237,227,.85); max-width: 56ch; margin-inline: auto; }
.band .btn-row { justify-content: center; }
.band .btn--primary { background: var(--lacquer); }
.band .btn--primary:hover { background: #150c09; }
.band .btn--ghost { border-color: var(--rice); color: var(--rice); }
.band .btn--ghost:hover { background: var(--rice); color: var(--chilli); }
.band--quiet .btn--primary { background: var(--chilli); }

/* -- generic content blocks --------------------------------------------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,72px); align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.prose { max-width: 60ch; color: var(--muted); }
.prose p + p { margin-top: 18px; }
.prose strong, .prose b { color: var(--rice); font-weight: 600; }

.people { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; margin-top: 48px; }
@media (max-width: 860px) { .people { grid-template-columns: 1fr; gap: 32px; } }
.person__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--celadon); margin-bottom: 16px; }
.person h3 { font-size: 1.375rem; margin-bottom: 4px; }
.person__role { color: var(--celadon); font-size: .875rem; margin-bottom: 10px; }
.person p { color: var(--muted); font-size: .9375rem; line-height: 1.85; }

.bleed-img { width: 100%; height: clamp(260px,32vw,460px); object-fit: cover; margin-top: 56px; }
.bleed-img--tint { filter: brightness(.8); }

.sources { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 40px; }
@media (max-width: 700px) { .sources { grid-template-columns: repeat(2,1fr); } }
.sources li { border-top: 2px solid var(--brass); padding-top: 12px; }
.sources b { display: block; font-weight: 600; }
.sources span { color: var(--muted); font-size: .875rem; }

/* -- menu -------------------------------------------------------------------- */
.menu-head { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; }
@media (max-width: 800px) { .menu-head { grid-template-columns: 1fr; gap: 20px; } }
.menu-head h1 { font-size: clamp(3rem, 9vw, 6rem); }
.menu-note { border-top: 1px solid rgba(201,162,39,.3); padding-top: 12px; margin-top: 16px; font-size: .875rem; color: var(--muted); }

/* the long menu flips to a light ground: fifteen items on a dark field is tiring, and the
   flip also says "this is the actual content, not the sell" */
.menu { background: var(--rice); color: var(--lacquer); padding-block: var(--gap); }
.menu__inner { max-width: 700px; margin-inline: auto; padding-inline: var(--pad); }
.menu__cat { font-family: 'Chonburi', serif; font-size: 1.5rem; margin: 64px 0 24px; display: flex; align-items: center; gap: 12px; }
.menu__cat:first-child { margin-top: 0; }
.menu__cat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--chilli); flex: none; }
.menu__item + .menu__item { margin-top: 22px; }
.menu__line { display: flex; align-items: baseline; gap: 10px; }
.menu__name { font-weight: 600; }
.menu__dots { flex: 1; border-bottom: 1px dotted rgba(36,23,19,.28); transform: translateY(-5px); }
.menu__price { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.menu__desc { color: rgba(36,23,19,.62); font-size: .9375rem; max-width: 52ch; margin-top: 2px; }
@media (max-width: 600px) { .menu__dots { display: none; } .menu__line { justify-content: space-between; } }

/* -- set-menu trio (menu page) ------------------------------------------------ */
.sets { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-top: 48px; }
@media (max-width: 900px) { .sets { grid-template-columns: 1fr; gap: 48px; } }
.set { padding-inline: clamp(16px,2.5vw,32px); text-align: center; border-right: 1px solid rgba(201,162,39,.2); }
.set:last-child { border-right: 0; }
@media (max-width: 900px) { .set { border-right: 0; } }
.set__tag { font-family: 'IBM Plex Mono', monospace; font-size: .75rem; color: var(--chilli); margin-bottom: 10px; min-height: 1.2em; display: block; }
.set h3 { font-size: 1.5rem; margin: 16px 0 8px; }
.set__dishes { color: var(--muted); font-size: .875rem; }
.set__price { font-family: 'IBM Plex Mono', monospace; font-size: 2rem; margin-top: 14px; }
.set__price small { font-size: .75rem; color: var(--muted); }
.set__for { color: var(--celadon); font-size: .875rem; margin-top: 4px; }

/* -- contact ------------------------------------------------------------------ */
.channels { display: grid; grid-template-columns: repeat(4,1fr); gap: 0 32px; margin-top: 48px; }
@media (max-width: 1024px) { .channels { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .channels { grid-template-columns: 1fr; } }
.channel { display: block; text-decoration: none; padding-top: 16px; border-top: 1px solid rgba(201,162,39,.3); transition: border-color .22s; }
.channel:hover, .channel:focus-visible { border-top-color: var(--chilli); }
.channel__label { color: var(--celadon); font-size: .875rem; }
.channel__value { font-family: 'Chonburi', serif; font-size: 1.375rem; color: var(--rice); margin: 4px 0 6px; }
.channel__value--mono { font-family: 'IBM Plex Mono', monospace; font-size: 1.125rem; }
.channel__note { color: var(--muted); font-size: .9375rem; }

.dl { margin-top: 32px; }
.dl__row { padding: 14px 0; border-top: 1px solid rgba(201,162,39,.2); }
.dl__row:last-child { border-bottom: 1px solid rgba(201,162,39,.2); }
.dl__label { font-family: 'IBM Plex Mono', monospace; font-size: .75rem; color: var(--celadon); }
.dl__value { color: var(--rice); }

.hours { max-width: 560px; margin-top: 32px; }
.hours tr { border-top: 1px solid rgba(201,162,39,.18); }
.hours tr:last-child { border-bottom: 1px solid rgba(201,162,39,.18); }
.hours th, .hours td { padding: 12px 0; font-weight: 400; }
.hours td { text-align: right; font-family: 'IBM Plex Mono', monospace; }
.hours .is-closed { color: var(--muted); }
.hours tr.is-today th { font-weight: 600; }
.hours tr.is-today th::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--chilli); margin-right: 8px; vertical-align: middle; }

.map { display: block; border: 1px solid rgba(201,162,39,.4); }
.map img { width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: grayscale(1) invert(.92) sepia(.35) hue-rotate(320deg) saturate(.7) brightness(.55); }

/* -- footer -------------------------------------------------------------------- */
.footer { background: var(--lacquer); border-top: 1px solid rgba(201,162,39,.2); padding-block: 56px 32px; margin-top: 0; }
.footer__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; color: var(--muted); font-size: .9375rem; }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { font-family: 'Chonburi', serif; font-size: 1.375rem; color: var(--rice); margin-bottom: 10px; }
.footer__label { color: var(--celadon); font-size: .8125rem; margin-bottom: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(201,162,39,.15); color: var(--muted); font-size: .8125rem; }

/* -- mobile action bar ---------------------------------------------------------- */
.mobilebar { display: none; }
@media (max-width: 640px) {
  .mobilebar {
    display: grid; grid-template-columns: 1fr auto; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--chilli);
  }
  .mobilebar .btn { padding: 12px 18px; text-align: center; font-size: .9375rem; }
  .mobilebar .btn--primary { background: var(--lacquer); }
  .mobilebar .btn--ghost { border-color: var(--rice); color: var(--rice); }
  body { padding-bottom: 72px; }
}

/* Schematic locator — an honest diagram of where the shophouse sits, not a fake map
   screenshot. The real map is one tap away via the Google Maps button beside it. */
.locator { width: 100%; border: 1px solid rgba(201,162,39,.35); display: block; }
