@font-face {
  font-family: Nunito Sans;
  src: url('assets/NunitoSans-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: 'iCiel BC Cubano';
  src: url('assets/iCielBCCubano-Normal.otf') format('opentype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  scroll-behavior: smooth;
  --green: #174a37;
  --deep: #10392b;
  --cream: #f8edce;
  --paper: #fffaee;
  --ink: #17382c;
  --muted: #50665b;
  --line: #dcd4b9;
  --accent: #9c301a;
  font: 16px/1.5 'Nunito Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-padding-top: 4.6rem;
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b84622; outline-offset: 3px; }
.frame { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }

.skip {
  position: fixed;
  z-index: 5;
  top: .5rem;
  left: .5rem;
  transform: translateY(-150%);
  padding: .65rem 1rem;
  background: var(--paper);
}
.skip:focus { transform: none; }

.top { background: var(--paper); color: var(--green); }
.top-inner { display: grid; grid-template-columns: 1fr; position: relative; justify-items: center; align-items: center; min-height: 5rem; padding-block: .5rem; }
.brand { display: flex; align-items: center; justify-content: center; gap: .25rem; color: var(--green); text-decoration: none; }
.wordmark { width: 6.5rem; height: auto; }
.top-inner .table-tag { position: absolute; bottom: .25rem; }
.top-inner:has(.table-tag:not([hidden])) { padding-bottom: 2rem; }
.logo { width: 3.75rem; height: 3.75rem; object-fit: contain; }
.table-tag {
  display: inline-block;
  width: fit-content;
  padding: .2rem .7rem;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: .875rem;
  font-weight: 800;
}

.hero { background: var(--green); color: var(--cream); }
.hero-inner {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(1.25rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(1.25rem, 4vw, 3.6rem) clamp(1.5rem, 5vw, 4rem);
}
.eyebrow { font-size: .875rem; font-weight: 900; letter-spacing: .14em; }
.hero-copy { min-width: 0; container-type: inline-size; }
h1 {
  font-family: 'iCiel BC Cubano', 'Nunito Sans', sans-serif;
  font-size: clamp(2rem, 15cqi, 4.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  margin: .5rem 0 .85rem;
}
.location { color: #f1e6c8; }
.primary {
  display: inline-block;
  margin-top: 1.15rem;
  padding: .65rem 1.1rem;
  border-radius: 99px;
  background: var(--cream);
  color: var(--deep);
  font-weight: 900;
  text-decoration: none;
}
.primary:hover { background: white; }
.hero-art {
  border: 1px solid #e0c792;
  border-radius: 1rem;
  padding: .3rem;
  background: #f9e4ae;
}
.hero-art img { border-radius: .72rem; width: 100%; height: auto; }

.tabs { position: sticky; top: 0; z-index: 2; background: var(--cream); border-bottom: 1px solid var(--line); }
.tab-list { display: flex; gap: .45rem 1.45rem; align-items: center; min-height: 3.75rem; }
.tabs a { text-decoration: none; font-weight: 900; white-space: nowrap; padding-block: .65rem; }
.tabs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .35rem; }
.tabs a { position: relative; transition: color .18s ease; }
.tabs a::after { content: ''; position: absolute; left: 0; right: 0; bottom: .25rem; height: 3px; border-radius: 3px; background: var(--accent); transform: scaleX(0); transition: transform .2s ease; }
.tabs a.is-active { color: var(--accent); }
.tabs a.is-active::after { transform: scaleX(1); }
.tabs a.is-active:hover { text-decoration: none; }

.content { padding-block: 1.25rem 3.5rem; }
.legend { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--muted); margin-bottom: .85rem; }
.star { color: var(--accent); font-size: .9em; margin-right: .35rem; }
.menu-grid { display: grid; align-items: start; gap: 1.1rem; grid-template-columns: 1fr; }
.second { margin-top: 1.1rem; }
.menu-section { background: #fffdf6; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.menu-section h2 {
  padding: .8rem 1.05rem;
  background: var(--green);
  color: var(--cream);
  font-family: 'iCiel BC Cubano', 'Nunito Sans', sans-serif;
  font-weight: 400;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.3;
}
.menu-section h3 { font-size: 1.1rem; margin: 1.3rem 1rem .65rem; color: var(--green); }
.items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: 0 1rem 1rem; margin: 0; list-style: none; }
.items.hotpots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.items:last-child { margin-bottom: .45rem; }
.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: .65rem;
  padding: .6rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--paper);
}
.item > .thumb { grid-column: 1 / -1; grid-row: 1; }
.item > .item-name { grid-column: 1 / -1; grid-row: 2; align-self: start; }
.item > .add { grid-column: 2; grid-row: 3; }
.items.hotpots .item-name { font-size: 1.15rem; }
.item-name { font-weight: 800; line-height: 1.25; }
.item small, .order-line small { display: block; margin-top: .15rem; color: var(--muted); font-weight: 600; font-size: .85rem; }
.thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: .5rem;
  background: #e1e8da;
  border: 1px solid #c7d1c1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[data-photo]:not(.illustration), .photo-full.dish-photo {
  background: #ccc8c2 url('assets/xi-mang.webp') center / cover;
}
.thumb[data-photo]:not(.illustration) img { filter: drop-shadow(0 2px 2px #30160755); }
.thumb.placeholder img { width: 73%; height: 73%; object-fit: contain; filter: brightness(0); opacity: .20; }
.thumb.illustration img { object-fit: contain; background: #e1e8da; }
.price { grid-column: 1; grid-row: 3; color: var(--accent); font-weight: 950; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .95rem; }
.quantity-button {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #c4cdbf;
  border-radius: .65rem;
  background: #edf2e8;
  color: var(--deep);
  font-size: 1.24rem;
  font-weight: 950;
}
.quantity-button:hover { background: #dce8da; }
.quantity-button.added, .quantity-button.added:hover { background: var(--green); color: white; }
.sets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem 1rem;
  margin: .7rem 1rem;
  padding: .9rem;
  border: 1px solid #d5c79e;
  border-radius: .7rem;
  background: #faf0d2;
}
.sets h4 { font-size: .9rem; }
.sets strong { color: var(--accent); }
.sets p { font-size: .875rem; }
.set-sides { grid-column: 1 / -1; border-top: 1px solid #d5c79e; padding-top: .5rem; }
.sauce { border-top: 1px solid var(--line); padding: .75rem 1rem; margin-top: .4rem; color: var(--muted); font-size: .9rem; }
.sauce strong { display: block; color: var(--green); }
.footer { background: var(--deep); color: var(--cream); padding: 1.3rem 0 5rem; }

.order-button {
  position: fixed;
  z-index: 3;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(.9rem, env(safe-area-inset-bottom));
  min-height: 3rem;
  padding: .55rem .6rem .55rem 1rem;
  border: 1px solid #e7d6a4;
  border-radius: 99px;
  background: var(--deep);
  color: white;
  font-weight: 900;
  box-shadow: 0 5px 22px #162b2450;
}
.order-button:hover { background: #236249; }
.order-button span { display: inline-grid; min-width: 1.8rem; padding: .12rem .3rem; margin-left: .35rem; place-items: center; border-radius: 99px; background: var(--cream); color: var(--deep); }
dialog {
  width: min(31rem, calc(100% - 1.5rem));
  max-height: min(82dvh, 42rem);
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: #11271dcc; }
.order-head, .order-total { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.order-head h2 { font-family: 'iCiel BC Cubano', 'Nunito Sans', sans-serif; font-weight: 400; line-height: 1.3; }
dialog .table-tag { margin-top: .4rem; }
#order-note { margin-block: .6rem; color: var(--muted); }
#order-lines { padding: 0; margin: 0; list-style: none; }
.order-line { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; border-top: 1px solid var(--line); padding: .55rem 0; }
.counter { display: flex; align-items: center; gap: .5rem; }
.counter span { min-width: 1.25rem; text-align: center; font-weight: 850; }
.order-total { border-top: 1px solid var(--line); padding-top: .75rem; font-weight: 900; }
.order-total strong { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 46rem) {
  .frame { width: calc(100% - 1.5rem); }
  .hero-inner { grid-template-columns: 1fr; gap: 1rem; }
  .hero-copy { padding-inline: .2rem; }
  .primary { display: none; }
  .tab-list { justify-content: space-between; gap: .2rem; }
  .tabs a { font-size: .875rem; }
  .menu-grid { grid-template-columns: 1fr; }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; padding-inline: .65rem; }
  .items.hotpots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 23rem) {
  .frame { width: calc(100% - 1rem); }
  .item { padding: .4rem; gap: .45rem; }
  .item .price { font-size: .875rem; }
  .tabs a { font-size: .82rem; }
}

.thumb:is(button) { padding: 0; }
.thumb:is(button):hover { border-color: var(--green); }
#photo-note { color: var(--muted); margin-top: .5rem; }
.photo-full { max-height: 61dvh; width: 100%; margin-top: .75rem; object-fit: contain; }

@media (min-width: 46.01rem) and (max-width: 64rem) {
  .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .items.hotpots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 46rem) {
  .hero-inner { padding-block: 1.25rem; }
  .wordmark { width: 5.85rem; }
  .hero-art { margin-top: .15rem; }
  .content { padding-top: .85rem; }
  .menu-section h2 { padding: .65rem .8rem; }
  .menu-section h3 { margin: 1rem .7rem .55rem; }
  .item-name, .items.hotpots .item-name { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
  .item > .thumb { margin-bottom: .1rem; }
  .sets { margin-inline: .65rem; gap: .75rem; padding: .75rem; }
  .sets p { line-height: 1.4; }
  .order-button { bottom: calc(.75rem + env(safe-area-inset-bottom)); }
  #order {
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    margin: auto 0 0;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-radius: 1.2rem 1.2rem 0 0;
  }
}

.set-sides { display: flex; align-items: center; gap: .75rem; }
.set-sides img { flex: none; border-radius: .5rem; background: #ccc8c2 url('assets/xi-mang.webp') center / cover; }

.accompaniments { flex-wrap: wrap; }
.accompaniments figure { margin: 0; text-align: center; font-size: .8rem; }
.sauce img { vertical-align: middle; border-radius: .5rem; background: #ccc8c2 url('assets/xi-mang.webp') center / cover; }

#an-choi .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; padding-top: .85rem; }
#an-choi .item {
  grid-template-columns: 4.5rem minmax(0, 1fr) 2.75rem;
  grid-template-rows: 1fr auto;
  column-gap: .75rem;
  row-gap: .25rem;
  padding: .65rem;
}
#an-choi .item > .thumb { grid-column: 1; grid-row: 1 / 3; margin: 0; }
#an-choi .item > .item-name { grid-column: 2; grid-row: 1; align-self: end; font-size: 1rem; }
#an-choi .item > .price { grid-column: 2; grid-row: 2; align-self: start; }
#an-choi .item > .add { grid-column: 3; grid-row: 1 / 3; }
@media (max-width: 46rem) {
  #an-choi .items { grid-template-columns: 1fr; }
}

/* Small, non-blocking motion: keep content visible and controls responsive. */
#demo-notice { width: min(30rem, calc(100% - 2rem)); padding: 1.5rem; }
#demo-title { font-family: 'iCiel BC Cubano', 'Nunito Sans', sans-serif; font-weight: 400; line-height: 1.3; }
#demo-notice p { margin-top: .85rem; }
#demo-notice .primary { display: block; width: 100%; min-height: 2.75rem; border: 0; background: var(--green); color: var(--paper); }
#demo-notice .primary:hover { background: var(--deep); }

.item { transition: border-color .2s ease, box-shadow .2s ease; }
.thumb img { transition: transform .25s ease; }
.quantity-button, .primary, .order-button { transition: transform .16s ease, background-color .18s ease, color .18s ease; }
.quantity-button:active, .primary:active, .order-button:active { transform: scale(.95); }
@media (hover: hover) {
  .item:hover { border-color: #a3b59c; box-shadow: 0 3px 12px #17382c0d; }
  button.thumb:hover img { transform: scale(1.035); }
}
@keyframes menu-dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes menu-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
dialog[open] { animation: menu-dialog-in .22s ease-out; }
dialog[open]::backdrop { animation: menu-backdrop-in .2s ease-out; }
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
