/* Fatty Uncle Ultimate Food Guide
   Brand palette pulled from the seal logo:
   - crimson #B8242C  (primary)
   - deep blood #7F1014 (hover/dark)
   - flame orange #F26B1A (accent)
   - gold #D4A434 (dragon)
   - cream #FBF6EC (page bg)
   - ink #1B1110 (body text)
*/
:root {
  --red: #B8242C;
  --red-dark: #7F1014;
  --flame: #F26B1A;
  --gold: #D4A434;
  --cream: #FBF6EC;
  --ink: #1B1110;
  --ink-soft: #4A3A38;
  --line: rgba(27,17,16,.12);
  --shadow-card: 0 1px 2px rgba(27,17,16,.06), 0 12px 30px -16px rgba(27,17,16,.18);
  --shadow-pop: 0 30px 60px -20px rgba(27,17,16,.35);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1280px;
  --th: 'Bai Jamjuree', 'Inter', system-ui, sans-serif;
  --serif: 'Noto Serif Display', 'Bai Jamjuree', serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--th);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, select, input { font: inherit; color: inherit; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 24px;
  background: rgba(251,246,236,.9);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-seal {
  width: 44px; height: 44px; border-radius: 50%;
  box-shadow: 0 2px 8px rgba(184,36,44,.35), inset 0 0 0 2px var(--gold);
  background: var(--red);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-tag { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.topnav { display: flex; align-items: center; gap: 18px; }
.navlink {
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14px;
  padding: 6px 10px; border-radius: 8px;
}
.navlink:hover { background: rgba(184,36,44,.08); color: var(--red-dark); }

/* hero */
.hero {
  position: relative; isolation: isolate;
  padding: 72px 24px 48px;
  background: linear-gradient(180deg, #2a0c10 0%, #4a0f15 60%, var(--red-dark) 100%);
  color: #fff8ed; overflow: hidden;
}
.hero-collage {
  position: absolute; inset: 0; z-index: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  opacity: .35;
  filter: saturate(120%);
}
.hero-collage img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.04);
}
.hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(60% 80% at 20% 30%, rgba(242,107,26,.28), transparent 70%),
    radial-gradient(70% 90% at 90% 90%, rgba(212,164,52,.24), transparent 65%),
    linear-gradient(180deg, rgba(20,5,7,.55), rgba(20,5,7,.85));
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto;
}
.eyebrow {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  margin: 0 0 18px;
  color: #fff8ed;
  letter-spacing: -.01em;
}
.hero-flame { color: var(--flame); }
.lede { font-size: clamp(15px, 1.4vw, 18px); max-width: 640px; color: rgba(255,248,237,.82); margin: 0 0 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,248,237,.08);
  border: 1px solid rgba(255,248,237,.18);
  color: #fff8ed;
  padding: 8px 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  backdrop-filter: blur(4px);
}
.stat .num { color: var(--gold); font-variant-numeric: tabular-nums; }

/* controls */
.controls {
  position: sticky; top: 64px; z-index: 30;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px 12px;
}
.controls-row { max-width: var(--max); margin: 0 auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.controls-row.primary { padding-bottom: 10px; }
.controls-row.filters { padding-top: 4px; }

.search {
  flex: 1 1 360px;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 16px;
  box-shadow: var(--shadow-card);
  color: var(--ink-soft);
}
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(184,36,44,.12); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: var(--ink-soft); }

.view-toggle { display: inline-flex; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-card); }
.vt {
  border: 0; background: transparent;
  padding: 8px 18px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--ink-soft);
}
.vt.active { background: var(--red); color: #fff; box-shadow: 0 4px 14px -4px rgba(184,36,44,.6); }

.ctl { display: inline-flex; flex-direction: column; gap: 4px; min-width: 0; }
.ctl > span { font-size: 11px; font-weight: 600; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }
.ctl select {
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%231B1110' d='M6 8 0 0h12z'/%3E%3C/svg%3E") right 14px center / 10px no-repeat;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 36px 9px 14px;
  font-weight: 500; font-size: 14px; min-width: 180px;
  cursor: pointer;
}
.ctl select:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(184,36,44,.12); }

/* multi-select */
.multi { position: relative; }
.multi-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600; font-size: 14px; color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.multi-trigger:hover { border-color: var(--red); color: var(--red-dark); }
.multi-trigger[aria-expanded="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(184,36,44,.12); }
.multi-trigger.has-selection { background: var(--ink); color: #fff8ed; border-color: var(--ink); }
.multi-trigger.has-selection:hover { background: #000; }
.multi-trigger svg { opacity: .5; }
.multi-label { font-weight: 600; }
.multi-count { font-weight: 500; opacity: .75; font-size: 13px; }
.multi-trigger.has-selection .multi-count { opacity: 1; color: var(--gold); }

.multi-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 25;
  width: min(320px, 90vw);
  background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 20px 50px -16px rgba(27,17,16,.28), 0 6px 16px -8px rgba(27,17,16,.12);
  display: flex; flex-direction: column;
  max-height: min(440px, 70vh);
  overflow: hidden;
}
.multi-pop[hidden] { display: none; }
.multi-pop-head { padding: 12px 12px 8px; border-bottom: 1px solid var(--line); }
.multi-search {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 14px;
  background: var(--cream);
}
.multi-search:focus { outline: 0; border-color: var(--red); background: #fff; }
.multi-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; }
.quicklink {
  border: 1px solid var(--line); background: var(--cream);
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink);
}
.quicklink:hover { border-color: var(--red); color: var(--red-dark); background: #fff; }
.multi-pop-actions { display: flex; gap: 14px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.lnk {
  border: 0; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--red-dark);
  text-decoration: underline; text-underline-offset: 2px;
  padding: 2px 0;
}
.lnk:hover { color: var(--red); }
.multi-list {
  overflow-y: auto; flex: 1;
  padding: 4px 0;
}
.cb {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px; cursor: pointer;
  font-size: 14px; line-height: 1.3;
}
.cb:hover { background: rgba(184,36,44,.06); }
.cb input { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; flex: 0 0 auto; }
.cb span { display: flex; flex-direction: column; gap: 1px; }
.cb b { font-weight: 600; color: var(--ink); }
.cb small { font-size: 11px; color: var(--ink-soft); }
.cb-empty { padding: 16px 14px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.multi-pop-foot { padding: 8px 12px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.multi-done {
  border: 0; background: var(--red); color: #fff8ed;
  padding: 8px 18px; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: 13px;
}
.multi-done:hover { background: var(--red-dark); }

.reset {
  border: 0; background: transparent; cursor: pointer;
  color: var(--ink-soft); font-weight: 600; font-size: 13px;
  padding: 9px 6px; margin-left: auto;
  text-decoration: underline; text-underline-offset: 3px;
}
.reset:hover { color: var(--red-dark); }

/* result bar */
.resultbar {
  max-width: var(--max); margin: 18px auto 6px; padding: 0 24px;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px;
}
#resultCount { font-family: var(--serif); font-style: italic; font-size: 22px; }
.note { font-size: 12px; color: var(--ink-soft); }

/* grid */
.grid {
  max-width: var(--max); margin: 0 auto; padding: 6px 24px 40px;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid var(--line);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.thumb {
  position: relative; aspect-ratio: 16/10; background: #1b1110; overflow: hidden;
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .thumb img { transform: scale(1.06); }
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.45));
  pointer-events: none;
}
.tier-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--red); color: #fff8ed;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px -4px rgba(184,36,44,.7);
}
.tier-badge.gold { background: var(--gold); color: #1b1110; }
.tier-badge.flame { background: var(--flame); color: #fff8ed; }
.views-pill {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.55); color: #fff8ed;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.005em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--ink-soft); }
.meta-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(184,36,44,.08); color: var(--red-dark);
  padding: 3px 9px; border-radius: 999px;
  font-weight: 600; font-size: 11px;
}
.meta-pill.type { background: rgba(212,164,52,.18); color: #6b520f; }
.menu-line { font-size: 13px; color: var(--ink); }
.menu-line strong { color: var(--red-dark); font-weight: 700; }
.desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 12px; border-radius: 10px; cursor: pointer;
  font-weight: 600; font-size: 13px; text-decoration: none;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--red); color: var(--red-dark); }
.btn.primary { background: var(--red); color: #fff8ed; border-color: var(--red); }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff8ed; }
.btn.dark { background: var(--ink); color: #fff8ed; border-color: var(--ink); }
.btn.dark:hover { background: #000; color: #fff8ed; }

/* load more */
.loadmore { display: flex; justify-content: center; padding: 20px 0 60px; }
.more-btn {
  border: 1px solid var(--line); background: #fff;
  padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: var(--shadow-card);
}
.more-btn:hover { border-color: var(--red); color: var(--red-dark); }
.more-btn[hidden] { display: none; }

/* map */
.content { display: none; }
.content.active { display: block; }
#map { width: 100%; height: calc(100vh - 220px); min-height: 480px; overflow: hidden; }
.leaflet-container { background: #fff; overflow: hidden; }
.leaflet-tile-loaded { opacity: 1 !important; }
.fu-marker {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--flame), var(--red) 60%, var(--red-dark) 100%);
  border: 2px solid #fff8ed;
  box-shadow: 0 4px 12px -3px rgba(184,36,44,.7);
}
.leaflet-popup-content { font-family: var(--th); }

/* about */
.about { padding: 80px 24px 60px; background: #fff; border-top: 1px solid var(--line); }
.about-inner { max-width: 760px; margin: 0 auto; }
.about h2 { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(28px, 4vw, 44px); margin: 0 0 16px; color: var(--red-dark); }
.about p { font-size: 16px; line-height: 1.7; color: var(--ink); margin: 0; }

footer {
  background: #1b1110; color: rgba(255,248,237,.7);
  padding: 28px 24px; font-size: 13px;
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}
footer .dot { color: var(--gold); }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20,5,7,.78);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--cream); color: var(--ink);
  width: min(720px, 100%); max-height: calc(100vh - 48px);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
}
.modal-hero { position: relative; aspect-ratio: 16/9; background: #1b1110; }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.85)); }
.modal-title {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 22px 24px; color: #fff8ed;
}
.modal-title h2 { margin: 0 0 4px; font-family: var(--serif); font-style: italic; font-size: 32px; line-height: 1.1; }
.modal-title .sub { font-size: 13px; color: rgba(255,248,237,.85); }
.close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff8ed;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.close:hover { background: var(--red); }
.modal-body { padding: 22px 24px 24px; overflow-y: auto; }
.modal-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin: 0 0 10px;
}
.strip-thumb {
  position: relative; aspect-ratio: 16/9;
  border: 2px solid transparent; border-radius: 10px;
  background: #1b1110; padding: 0; cursor: pointer; overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.strip-thumb:hover { transform: translateY(-1px); }
.strip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.strip-thumb.active { border-color: var(--red); box-shadow: 0 0 0 2px rgba(184,36,44,.15); }
.strip-note { font-size: 11px; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.4; }
.modal-body p.lead { font-size: 15px; line-height: 1.65; color: var(--ink); margin: 0 0 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.detail {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.detail small { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.detail strong { font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.4; }
.modal .actions { gap: 8px; }

/* responsive */
@media (max-width: 720px) {
  .topbar { padding: 8px 16px; }
  .brand-tag { display: none; }
  .topnav { gap: 4px; }
  .navlink { padding: 6px 8px; font-size: 13px; }
  .hero { padding: 56px 20px 40px; }
  .hero h1 { font-size: 38px; }
  .controls { padding: 12px 16px 10px; top: 60px; }
  .search { flex-basis: 100%; }
  .view-toggle { margin-left: auto; }
  .ctl select { min-width: 0; width: 100%; }
  .ctl { flex: 1 1 calc(50% - 5px); }
  .reset { margin-left: 0; }
  .grid { padding: 6px 16px 30px; gap: 16px; }
  .resultbar { padding: 0 16px; }
  .modal-overlay { padding: 0; }
  .modal { border-radius: 0; max-height: 100vh; height: 100vh; width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .about { padding: 56px 20px; }
}

/* hide visually but keep for assistive tech */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
