@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

:root {
  --paper: #f2e6ce;
  --rice: #f9f0df;
  --lacquer: #253229;
  --chili: #862c25;
  --ink: #29221b;
  --muted: #665446;
  --brass: #bd9659;
  --line: #b9a17b;
  --display: Georgia, "Songti SC", "SimSun", "Playfair Display", serif;
  --gutter: clamp(1.2rem, 5vw, 5rem);
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  font: 1rem/1.6 "DM Sans", system-ui, -apple-system, sans-serif;
}

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

body, h1, h2, h3, p, figure, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, #0000 0 3px, #694b2707 3px 4px);
  color: var(--ink);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
  transition: color 0.18s ease;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(189, 150, 89, 0.3);
}

img {
  width: 100%;
  height: auto;
  display: block;
}

button, input, select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline-offset: 4px;
  outline: 2px solid var(--chili);
}

.wrap {
  width: min(100% - 2 * var(--gutter), 74rem);
  margin-inline: auto;
}

.skip {
  z-index: 100;
  color: var(--ink);
  background: var(--rice);
  padding: 0.55rem 0.85rem;
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  border: 1px solid var(--line);
}

.skip:not(:focus) {
  clip-path: inset(50%);
}

/* ---------------------------------------------------- */
/* Header - Exact clean aesthetic from reference       */
/* ---------------------------------------------------- */
.site-header {
  color: var(--rice);
  background: var(--lacquer);
  border-bottom: 4px double var(--brass);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand menu language";
  align-items: center;
  gap: 0.25rem 2rem;
  min-height: 5rem;
  padding-block: 0.65rem;
  display: grid;
}

.wordmark {
  width: fit-content;
  min-height: 2.75rem;
  font: 700 1.42rem/1 var(--display);
  grid-area: brand;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  display: inline-flex;
  color: var(--rice);
}

.wordmark span {
  color: var(--rice);
  background: var(--chili);
  border: 1px solid #dca273;
  padding: 0.35rem 0.3rem;
  font: 800 0.7rem/1 "DM Sans", sans-serif;
  letter-spacing: 0.04em;
}

.main-nav, .languages {
  flex-wrap: wrap;
  align-items: center;
  display: flex;
}

.main-nav {
  grid-area: menu;
  justify-content: center;
  gap: 0 clamp(0.65rem, 2vw, 1.6rem);
}

.languages {
  grid-area: language;
  justify-content: end;
  gap: 0 0.85rem;
}

.site-header nav a, .site-header .languages button {
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  position: relative;
  color: var(--rice);
  cursor: pointer;
}

.site-header nav a::after, .site-header .languages button::after {
  content: "";
  inset-inline: 0;
  transform-origin: 0;
  background: currentColor;
  height: 2px;
  transition: transform 0.22s ease-out;
  position: absolute;
  bottom: 0.42rem;
  transform: scaleX(0);
}

.site-header nav a:is(:hover, :focus-visible, :active, [aria-current]),
.site-header .languages button:is(:hover, :focus-visible, :active, .active) {
  color: #ffdb9b;
}

.site-header nav a:is(:hover, :focus-visible, :active, [aria-current])::after,
.site-header .languages button:is(:hover, :focus-visible, :active, .active)::after {
  transform: scaleX(1);
}

/* ---------------------------------------------------- */
/* Hero Section                                        */
/* ---------------------------------------------------- */
.hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3.5rem);
  display: grid;
}

.place-tag {
  color: var(--chili);
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-weight: 800;
  display: flex;
  font-size: 0.95rem;
}

.place-tag span + span {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

h1, h2, h3 {
  font-family: var(--display);
  color: var(--lacquer);
  text-wrap: balance;
}

h1 {
  letter-spacing: -0.07em;
  margin-top: 0.65rem;
  font-size: clamp(3.3rem, 7.1vw, 7.4rem);
  font-weight: 700;
  line-height: 0.89;
}

h2 {
  letter-spacing: -0.045em;
  font-size: clamp(2rem, 4vw, 3.65rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.2;
}

.tagline {
  font-family: var(--display);
  color: var(--chili);
  margin-top: 1.2rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
}

.hero-summary {
  max-width: 43ch;
  margin-top: 0.55rem;
  font-size: 1.05rem;
  color: #3e3228;
}

.actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.15rem;
  margin-top: 1.45rem;
  display: flex;
}

.button {
  border: 1px solid var(--lacquer);
  cursor: pointer;
  border-radius: 2px;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.55rem 1.15rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.16s, background 0.18s;
  display: inline-flex;
  font-size: 0.95rem;
}

.button-primary {
  color: var(--rice);
  background: var(--lacquer);
}

.button-primary:hover {
  background: #394a3d;
}

.button-primary:focus-visible {
  outline-color: var(--chili);
}

.button-outline {
  color: var(--lacquer);
  background: transparent;
}

.button-outline:hover {
  background: #e6d6b9;
}

.button:active {
  transform: translateY(2px);
}

.text-link {
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.text-link:hover {
  text-decoration-thickness: 0.15em;
  color: var(--chili);
}

.actions .text-link {
  align-items: center;
  gap: 0.3em;
  min-height: 2.75rem;
  display: inline-flex;
}

.link-arrow {
  --arrow-travel: translate(3px, -3px);
  transition: transform 0.18s ease-out;
  display: inline-block;
}

.arrow-down {
  --arrow-travel: translateY(4px);
}

a:is(:hover, :focus-visible, :active) .link-arrow,
button:is(:hover, :focus-visible, :active) .link-arrow {
  transform: var(--arrow-travel);
}

/* Signboard Hero Graphic */
.signboard {
  aspect-ratio: 4/3;
  text-align: center;
  color: #ffdb9b;
  background: radial-gradient(ellipse at center, #394837, var(--lacquer));
  border: 8px double var(--brass);
  outline: 1px solid var(--lacquer);
  outline-offset: 5px;
  align-content: center;
  justify-items: center;
  min-height: 20rem;
  padding: 1rem;
  display: grid;
  position: relative;
  box-shadow: 0.55rem 0.6rem #5c3a232e;
}

.signboard .hero-shutter {
  background: var(--lacquer);
  pointer-events: none;
  transform-origin: bottom;
  position: absolute;
  inset: 0;
  transform: scaleY(0);
}

.signboard strong {
  font: 700 clamp(2.25rem, 5.2vw, 4.8rem)/1 var(--display);
}

.signboard small {
  border: 1px solid;
  margin-top: 0.6rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.85rem;
}

/* ---------------------------------------------------- */
/* Auto-Moving Food Gallery Carousel (Between Hero & Menu) */
/* ---------------------------------------------------- */
.food-gallery-section {
  padding-block: 1.25rem 2.5rem;
  overflow: hidden;
  background: var(--paper);
  border-top: 1px solid var(--line);
  position: relative;
}

.gallery-label-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.gallery-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--lacquer);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--chili);
  border-radius: 50%;
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 1.5rem;
  padding-block: 0.35rem 0.75rem;
  mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}

.marquee-track {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
  animation: continuous-carousel 36s linear infinite;
  will-change: transform;
}

@keyframes continuous-carousel {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% - 1.5rem));
  }
}

.gallery-card {
  width: 280px;
  flex-shrink: 0;
  background: var(--rice);
  border: 1px solid var(--line);
  padding: 0.55rem;
  box-shadow: 0.35rem 0.4rem #5c3a2318;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: block;
}

.gallery-card:hover {
  transform: translateY(-4px);
}

.gallery-card .img-frame {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #392b1f;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-card figcaption {
  padding-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gallery-card .card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-card .card-tag {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------------------------------------------------- */
/* Sections & Split Layout                              */
/* ---------------------------------------------------- */
.section {
  padding-block: clamp(3rem, 6vw, 5.75rem);
  scroll-margin-block-start: 0.75rem;
}

.split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5.5rem);
  display: grid;
}

.framed {
  border: 1px solid var(--line);
  background: var(--rice);
  padding: 0.6rem;
  box-shadow: 0.4rem 0.45rem #5c3a231c;
}

.photo-window {
  position: relative;
  overflow: clip;
}

.photo-window img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .photo-window img {
    transition: transform 0.48s cubic-bezier(0.2, 0.65, 0.3, 1);
  }
  .photo-window:hover img {
    transform: scale(1.06);
  }
}

.framed figcaption {
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.45rem 0.15rem 0;
  font-size: 0.82rem;
  display: flex;
}

/* Menu Section */
.menu-section, .visit {
  background: var(--rice);
  border-block: 1px solid var(--line);
}

.menu-section .split {
  grid-template-areas: "meal details";
}

.menu-copy {
  grid-area: details;
}

.meal {
  grid-area: meal;
}

.dishes {
  border-block: 3px double var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.5rem;
  margin-block: 1.1rem;
  padding-block: 0.75rem;
  padding-inline-start: 1.2rem;
  display: grid;
  list-style: disc;
}

.dishes li::marker {
  color: var(--chili);
}

.dishes li {
  font-weight: 600;
  color: var(--ink);
}

.price {
  color: var(--chili);
  font: 700 2.1rem/1.2 var(--display);
  font-variant-numeric: tabular-nums;
  margin-top: 0.75rem;
}

.price small {
  font: 700 0.95rem "DM Sans", sans-serif;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  margin-top: 0.45rem;
  font-size: 0.9rem;
}

/* Guide Section */
.tips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem clamp(1rem, 4vw, 3rem);
  margin-top: 1.35rem;
  display: grid;
}

.tip-rule {
  border-top: 3px double var(--line);
  transform-origin: 0;
  margin-bottom: 0.85rem;
  display: block;
}

.tips p, #shop h2 + p {
  margin-top: 0.6rem;
  color: #4b3c31;
}

/* ---------------------------------------------------- */
/* Story Section - REFINED: WARM, READABLE BACKGROUND   */
/* ---------------------------------------------------- */
.story {
  color: var(--ink);
  background: var(--rice); /* Warm rice paper background instead of murky dark */
  border-block: 4px double var(--brass);
}

.story h2 {
  color: var(--lacquer);
  margin-bottom: 0.85rem;
}

.story .split > div {
  max-width: 39rem;
}

.story .story-text {
  font-size: 1.05rem;
  line-height: 1.68;
  color: #2e261f; /* High contrast, crisp readable ink */
  margin-bottom: 1.2rem;
}

.story .split:not(:has(figure)) {
  grid-template-columns: 1fr;
}

.story a {
  margin-top: 0.8rem;
  display: inline-block;
  color: var(--chili);
  font-weight: 800;
}

.stamp, .demo-label {
  width: fit-content;
  color: var(--rice);
  background: var(--chili);
  border: 3px double;
  margin-bottom: 0.75rem;
  padding: 0.22rem 0.55rem;
  font-weight: 800;
  font-size: 0.85rem;
}

/* ---------------------------------------------------- */
/* Noma-Inspired Shop & Micro-Transaction Section       */
/* ---------------------------------------------------- */
.shop-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.order-form-container {
  background: var(--rice);
  border: 4px double var(--line);
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
  box-shadow: 0.45rem 0.5rem #5c3a2318;
}

.form-group-title {
  font: 700 1.15rem/1.2 var(--display);
  color: var(--lacquer);
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}

.form-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.qty-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #876f51;
  background: #fffbf3;
  border-radius: 2px;
}

.btn-qty {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lacquer);
}

.btn-qty:hover {
  background: var(--paper);
}

.qty-val {
  width: 2rem;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.segmented-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.seg-btn {
  border: 1px solid #876f51;
  background: #fffbf3;
  border-radius: 2px;
  padding: 0.55rem 0.4rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.15s;
}

.seg-btn:hover {
  background: #f4e8d2;
}

.seg-btn.active {
  background: var(--lacquer);
  color: var(--rice);
  border-color: var(--lacquer);
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.65rem;
  border-bottom: 1px solid rgba(185, 161, 123, 0.4);
}

.product-row p {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.product-row span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Noma-style Receipt Panel */
.receipt-box {
  background: var(--rice);
  border: 4px double var(--line);
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
  box-shadow: 0.45rem 0.5rem #5c3a2318;
}

.receipt-header {
  font: 700 1.25rem/1.2 var(--display);
  color: var(--lacquer);
  border-bottom: 3px double var(--line);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.receipt-lines {
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.receipt-line.total {
  border-top: 3px double var(--line);
  padding-top: 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--lacquer);
}

.receipt-line.total strong {
  font: 700 1.6rem/1 var(--display);
  color: var(--chili);
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(37, 50, 41, 0.82);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  background: var(--rice);
  border: 6px double var(--brass);
  outline: 1px solid var(--lacquer);
  outline-offset: 4px;
  width: min(100%, 34rem);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
  box-shadow: 0.75rem 0.85rem #1920194d;
}

.modal-close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  font-size: 1.5rem;
  color: var(--muted);
  line-height: 1;
  padding: 0.3rem 0.6rem;
}

.modal-close-btn:hover {
  color: var(--chili);
}

.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.75rem;
  display: inline-block;
  margin-block: 0.8rem;
}

.qr-box img {
  width: 150px;
  height: 150px;
}

/* ---------------------------------------------------- */
/* Visit Section & Footer                               */
/* ---------------------------------------------------- */
.visit-details {
  border-top: 3px double var(--line);
}

.visit-details div {
  border-bottom: 1px solid var(--line);
  padding-block: 0.65rem;
}

.visit-details dt {
  color: var(--lacquer);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.visit-details dd {
  margin-top: 0.2rem;
  font-size: 1.05rem;
}

.copy-status {
  min-height: 1.6rem;
  margin-top: 0.5rem;
  font-weight: 800;
  color: var(--chili);
}

.site-footer {
  color: var(--rice);
  background: var(--lacquer);
  border-top: 4px double var(--brass);
}

.footer-inner {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
  padding-block: 1.4rem;
  font-size: 0.88rem;
  display: flex;
}

.footer-inner span {
  font-weight: 800;
}

.footer-inner p {
  margin-right: auto;
  color: #dfd5c2;
}

.footer-inner a {
  color: var(--rice);
}

.footer-inner a:hover {
  color: #ffdb9b;
}

/* ---------------------------------------------------- */
/* Responsive Queries                                   */
/* ---------------------------------------------------- */
@media (width <= 1040px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand language" "menu menu";
  }
  .main-nav {
    justify-content: start;
    margin-top: 0.3rem;
  }
}

@media (width <= 760px) {
  .hero, .split, .tips, .shop-layout {
    grid-template-columns: 1fr;
  }
  .menu-section .split {
    grid-template-areas: "details" "meal";
  }
  .signboard {
    min-height: 13rem;
  }
  .segmented-choice {
    grid-template-columns: 1fr;
  }
}

@media (width <= 480px) {
  .header-inner {
    column-gap: 0.7rem;
  }
  .wordmark {
    white-space: nowrap;
    font-size: 1.18rem;
  }
  .languages {
    flex-wrap: nowrap;
    gap: 0 0.6rem;
  }
  .site-header .languages button {
    white-space: nowrap;
    font-size: 0.82rem;
  }
  .main-nav {
    column-gap: 0.6rem;
  }
  .site-header .main-nav a {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  .button, .site-header nav a::after, .link-arrow, .marquee-track {
    transition: none;
    animation: none;
  }
  .button:active, a:is(:hover, :focus-visible, :active) .link-arrow {
    transform: none;
  }
}
