/* ===== Weng Kee — custom styles layered over Tailwind ===== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* offset fixed nav when jumping to anchors */
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Navigation states --- */
[data-nav] {
  background: transparent;
}
/* applied via JS once the user scrolls past the hero */
[data-nav].nav-scrolled {
  background: rgba(251, 246, 236, 0.92); /* wk-cream */
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(200, 160, 75, 0.25), 0 8px 24px rgba(36, 26, 22, 0.08);
}

/* Brand colours flip when over the dark hero vs the light scrolled bar */
[data-nav]:not(.nav-scrolled) [data-brand] { color: #fbf6ec; }
[data-nav]:not(.nav-scrolled) [data-brand-sub] { color: #e6c878; }
[data-nav]:not(.nav-scrolled) [data-links] .nav-link { color: #fbf6ec; }

.nav-link {
  position: relative;
  color: #241a16;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: #c8a04b;
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link:hover { color: #c8a04b; }

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #241a16;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.mobile-link:hover { background: rgba(140, 28, 19, 0.08); color: #8c1c13; }

/* --- Decorative diamond grid pattern --- */
.pattern-grid {
  background-image:
    linear-gradient(45deg, currentColor 1px, transparent 1px),
    linear-gradient(-45deg, currentColor 1px, transparent 1px);
  background-size: 28px 28px;
  color: #e6c878;
}

/* --- Menu chips (community section) --- */
.menu-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(251, 246, 236, 0.1);
  border: 1px solid rgba(230, 200, 120, 0.3);
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
.menu-chip::before {
  content: "•";
  color: #e6c878;
  font-size: 1.2rem;
  line-height: 1;
}
.menu-chip:hover {
  transform: translateY(-2px);
  background: rgba(251, 246, 236, 0.18);
}

/* --- Scroll reveal animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== Notable Moments photo fallback ===== */
.photo-fallback {
  display: none;            /* toggled to flex by onerror */
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 22rem;
  padding: 2rem;
  background:
    repeating-linear-gradient(45deg, rgba(200,160,75,0.08) 0 14px, transparent 14px 28px),
    #fbf6ec;
}
.photo-fallback code {
  font-size: 0.8rem;
  color: #8c1c13;
  background: rgba(140, 28, 19, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
}

/* ===== Menu ===== */
.wk-cat { break-inside: avoid; }
.wk-cat-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  color: #8c1c13;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid rgba(200, 160, 75, 0.4);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.wk-cat-note {
  font-family: Inter, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #c8a04b;
  white-space: nowrap;
}
.wk-list { margin-top: 0.85rem; }
.wk-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted rgba(36, 26, 22, 0.12);
}
.wk-item-main { flex: 1 1 auto; min-width: 0; }
.wk-item-name { color: #241a16; font-weight: 500; }
.wk-item-num { color: #c8a04b; font-weight: 600; margin-right: 0.15rem; }
.wk-item-desc {
  display: block;
  font-size: 0.82rem;
  color: rgba(36, 26, 22, 0.6);
  line-height: 1.4;
  margin-top: 0.15rem;
}
.wk-item-dots {
  flex: 1 1 auto;
  align-self: flex-end;
  margin-bottom: 0.28rem;
  border-bottom: 1px dotted rgba(140, 28, 19, 0.35);
  min-width: 1rem;
}
.wk-item-price {
  flex: 0 0 auto;
  font-weight: 600;
  color: #8c1c13;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Menu tags */
.wk-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  line-height: 1;
  vertical-align: middle;
}
.wk-tag-nut {
  height: 1.1em;
  width: 1.1em;
  border-radius: 9999px;
  background: #8c1c13;
  color: #fbf6ec;
  font-size: 0.62rem;
  font-weight: 700;
  font-style: italic;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .animate-pulse { animation: none; }
}
