/* ══════════════════════════════════════════════════════════════════════
   ลาบ ก้อย ซ.นานา — Organic design system tokens + page styles
   ══════════════════════════════════════════════════════════════════ */

:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #d2601e;
  --color-accent-2: #6f9440;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe0d0;
  --color-accent-300: #ffc4a5;
  --color-accent-400: #fe9963;
  --color-accent-500: #df773f;
  --color-accent-600: #d3520c;
  --color-accent-700: #934013;
  --color-accent-800: #692d0d;
  --color-accent-900: #43200d;

  --color-accent-2-100: #f0fedd;
  --color-accent-2-200: #e0f3c7;
  --color-accent-2-300: #ccef9d;
  --color-accent-2-400: #aed67b;
  --color-accent-2-500: #90b65c;
  --color-accent-2-600: #729642;
  --color-accent-2-700: #56752d;
  --color-accent-2-800: #3d551d;
  --color-accent-2-900: #273712;

  /* Caprasimo/Figtree carry the Latin glyphs and numerals exactly as designed;
     Mitr + Noto Sans Thai pick up the Thai, which those two families don't cover. */
  --font-heading: "Caprasimo", "Mitr", system-ui, sans-serif;
  --font-heading-weight: 400;
  --font-body: "Figtree", "Noto Sans Thai", system-ui, sans-serif;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-6: 26.4px;
  --space-8: 35.2px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);

  --page-max: 1240px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }

p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.washed { filter: saturate(1.12) contrast(1.03) brightness(1.02); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sr-only:focus, .sr-only:focus-visible {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  width: auto; height: auto; margin: 0; overflow: visible;
  clip: auto; clip-path: none; white-space: normal;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface); color: var(--color-text);
  border-radius: 999px; box-shadow: var(--shadow-md);
  font-size: 14px; text-decoration: none;
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 999px;
  transition: background 0.18s ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-lg { padding: 14px 26px; font-size: 14px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3);
  border-radius: calc(var(--radius-lg) * 1.15);
  background: var(--color-surface);
}
.card-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 17px; line-height: 1.2; }
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px; border-radius: 999px;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.table td:last-child { text-align: right; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════════════
   Page layout
   ══════════════════════════════════════════════════════════════════ */

.section {
  padding: var(--space-4) var(--space-8) var(--space-8);
  max-width: var(--page-max);
  margin: 0 auto;
  scroll-margin-top: 20px;
}
.section-kicker {
  font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.06em;
  color: var(--color-accent); margin-bottom: 10px;
}
.section-head { margin-bottom: 30px; }
.section-head h2 { margin: 0; }

/* — nav — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-8);
  max-width: var(--page-max); margin: 0 auto;
  flex-wrap: wrap;
}
.nav-logo { height: 52px; width: auto; object-fit: contain; margin-right: var(--space-2); }
.nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; flex-wrap: wrap; }
.nav-links a { color: inherit; text-decoration: none; font-size: 14px; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--color-accent); }
/* ปุ่ม CTA ในแถบเมนูโดน .nav-links a เขียนทับสีตัวอักษร ทำให้ต่างจากปุ่มอื่นอีก 6 จุด */
.nav-links a.btn-primary { color: var(--color-bg); }
.nav-links a.btn-primary:hover { color: var(--color-bg); }

/* — hero — */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-8);
  align-items: center;
  padding: var(--space-4) var(--space-8) var(--space-8);
  max-width: var(--page-max); margin: 0 auto;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.14;
  margin: 14px 0 18px; color: var(--color-text);
}
.hero-tag { margin-bottom: 22px; }
.hero-lead { font-size: 16.5px; max-width: 480px; opacity: 0.85; margin: 0 0 26px; }
.hero-stats {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 28px; font-size: 14px;
}
.hero-stats .stat { display: flex; align-items: center; gap: 5px; }
.hero-stats .star { color: var(--color-accent); }
.hero-stats .muted { opacity: 0.75; }
.hero-stats .dot { opacity: 0.4; }
.hero-stats .count { opacity: 0.65; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-media::before {
  content: ""; position: absolute; top: -24px; right: -24px;
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--color-accent-2-100); z-index: 0;
}
.hero-media img {
  position: relative; width: 100%; height: 420px; object-fit: cover;
  border-radius: 28px; box-shadow: var(--shadow-lg);
}

/* — story — */
.story {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-8);
  align-items: start;
}
.story-photo {
  width: 100%; height: 340px; object-fit: cover;
  border-radius: 24px; box-shadow: var(--shadow-md);
}
.story p { font-size: 15.5px; opacity: 0.85; margin: 0 0 14px; }
.story p:last-of-type { margin-bottom: 26px; }
.story h2 { margin: 0 0 16px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-row .card { text-align: center; align-items: center; }
.stat-row .figure { font-family: var(--font-heading); font-size: 22px; color: var(--color-accent-700); }
.stat-row .label { font-size: 12px; opacity: 0.7; }

/* — menu — */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: var(--space-4); }
.dish { padding: 0; overflow: hidden; gap: 0; }
.dish img { width: 100%; height: 160px; object-fit: cover; }
@media (min-width: 600px) { .dish img { height: auto; aspect-ratio: 3 / 2; } }
.dish-info {
  padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
}
.dish-name { font-size: 15.5px; }
.dish-meta { margin-top: 4px; }
.dish-price {
  font-family: var(--font-heading); color: var(--color-accent-700);
  font-size: 17px; white-space: nowrap;
}

/* — gallery — */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: var(--space-3); }
.gallery figure { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.span-2 { grid-column: span 2; }
.row-2 { grid-row: span 2; }

/* — reviews — */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-4); }
.review .stars { color: var(--color-accent); font-size: 14px; }
.review p { opacity: 0.9; font-size: 15px; }
.review-by { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-name { font-family: var(--font-heading); font-size: 13px; color: var(--color-accent-700); }

/* — branches — */
.section-sub { font-size: 14.5px; opacity: 0.75; margin: 8px 0 0; max-width: 540px; }
.branch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-6); }
.branch { padding: 0; overflow: hidden; gap: 0; }
.branch > img { display: block; width: 100%; height: 230px; object-fit: cover; }
.branch-body { padding: 22px 24px 24px; }
.branch-body h3 { font-size: 22px; margin: 12px 0 6px; }
.branch-address { font-size: 14.5px; opacity: 0.8; margin: 0 0 18px; }
.branch-hours { margin-bottom: 18px; }
.facility-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.branch-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* — full menu sheets — */
.fullmenu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: var(--space-4);
}
.menu-sheet {
  display: block; background: #000;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.menu-sheet:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.menu-sheet img { display: block; width: 100%; height: auto; }
/* ปุ่มสลับสาขา — ใช้ accent-700 ให้ตัวอักษรบนปุ่มที่เลือกอยู่ผ่าน AA (5.72:1) */
.menu-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.menu-tab {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2;
  padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--color-divider);
  background: transparent; color: var(--color-text);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.menu-tab:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.menu-tab[aria-selected="true"] {
  background: var(--color-accent-700); color: var(--color-bg);
  border-color: transparent;
}
.menu-tab[aria-selected="true"]:hover { background: var(--color-accent-800); }
.menu-panel:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .menu-tab { transition: none; } }
.menu-note {
  margin: var(--space-3) 0 0; font-size: 12.5px; max-width: 640px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .menu-sheet { transition: none; }
  .menu-sheet:hover { transform: none; }
}

/* — video — */
.video-row { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-4); align-items: stretch; }
.video-card { padding: 0; overflow: hidden; gap: 0; }
.video-card video {
  display: block; width: 100%; height: 460px;
  object-fit: contain; background: #141210;
}
.video-caption { padding: 16px 18px; }
.video-caption .card-title { font-size: 16px; }
.video-caption .card-meta { margin-top: 4px; }
.ig-card { justify-content: center; }
.ig-title { font-family: var(--font-heading); font-size: 21px; line-height: 1.3; margin-bottom: 10px; }
.ig-body { font-size: 14.5px; opacity: 0.8; margin: 0 0 22px; }
.ig-btn { align-self: flex-start; }

/* — events — */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.event-grid-portrait {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}
.event-grid-wide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.event-photo {
  display: block; width: 100%; height: auto;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}
.event-wide { grid-column: 1 / -1; aspect-ratio: 3 / 2; max-width: 840px; margin-inline: auto; }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-3x4 { aspect-ratio: 3 / 4; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.event-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--space-6); }
.event-divider {
  height: 1px; border: 0; background: var(--color-divider);
  margin: var(--space-8) 0 30px;
}
#events .section-head + .event-grid { margin-top: 0; }

/* — pull quote — */
.pull-quote {
  margin: 0 0 22px; padding-left: 18px;
  border-left: 3px solid var(--color-accent);
  font-family: var(--font-heading); font-size: 17px; line-height: 1.45;
  color: var(--color-accent-700);
}

/* — footer — */
.footer { background: var(--color-surface); padding: 44px var(--space-8); }
.footer-inner {
  max-width: var(--page-max); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 32px;
  justify-content: space-between; align-items: flex-start;
}
.footer-logo { height: 60px; width: auto; object-fit: contain; margin-bottom: 10px; }
.footer-tagline { font-size: 13.5px; opacity: 0.75; margin: 0; max-width: 280px; }
.footer-cols { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-head { font-family: var(--font-heading); font-size: 13px; margin-bottom: 10px; }
.footer a.footer-link { display: block; font-size: 13.5px; margin-bottom: 8px; color: var(--color-text); text-decoration: none; }
.footer a.footer-link:hover { color: var(--color-accent); text-decoration: underline; }
.footer-hours { font-size: 13.5px; opacity: 0.8; }
.footer-bottom {
  max-width: var(--page-max); margin: 32px auto 0;
  border-top: 1px solid var(--color-divider);
  padding-top: 18px; font-size: 12px; opacity: 0.75;
}

/* ══════════════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 980px) {
  .hero, .story { grid-template-columns: 1fr; }
  .hero { gap: var(--space-6); }
  .hero-media { order: -1; }
  .hero-media img { height: 300px; }
  .hero-lead { max-width: none; }
  .story-photo { height: 260px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .video-row { grid-template-columns: 1fr; }
  .video-card video { height: 380px; }
}

@media (max-width: 720px) {
  .section, .hero, .nav, .footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  h2 { font-size: 26px; }
  .nav { gap: var(--space-2); row-gap: var(--space-3); }
  .nav-logo { height: 44px; }
  .nav-links { gap: 16px; width: 100%; margin-left: 0; justify-content: space-between; }
  .nav-links .btn { margin-left: auto; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row .card { flex-direction: row; justify-content: center; gap: 8px; }
  .hero-stats { gap: 8px; font-size: 13px; }
  .hero-stats .dot { display: none; }
  .hero-stats > * { width: 100%; }
  .branch > img { height: 180px; }
  .branch-body { padding: 18px 18px 20px; }
  .video-card video { height: 300px; }
  .branch-ctas .btn { flex: 1; }
}

/* .event-grid มี 3 รูปเล็ก — คง 3 คอลัมน์ไว้จนถึงจอแคบ ไม่งั้นเหลือช่องโหว่ 1 ช่อง
   ส่วนอีกสองกริดมี 4 รูป ลงตัวทั้ง 4 และ 2 คอลัมน์ */
@media (max-width: 900px) {
  .event-grid-portrait, .event-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .event-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 180px; }
  .event-grid-portrait, .event-grid-wide { grid-template-columns: 1fr; }
  .span-2, .row-2 { grid-column: span 1; grid-row: span 1; }
  .hero-ctas .btn { flex: 1; }
}
