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

:root {
  --color-bg: #1a1a1a;
  --color-black: #000;
  --color-text: #f4f4f4;
  --color-text-muted: #b5b5b5;
  --color-section: #ececec;
  --text-shadow-menu: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 6px rgba(0, 0, 0, 0.45);
  --text-shadow-section: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.5);
  --color-indicator-bg: transparent;
  --color-overlay: rgba(0, 0, 0, 0.45);
  --color-indicator-active: #f0f0f0;
  --color-indicator-inactive: #666;

  --banner-ratio: 1492 / 1054;
  --banner-visible-fraction: 0.34;
  --banner-height: calc(100vw * var(--banner-ratio) * var(--banner-visible-fraction));
  --indicator-height: calc(3.25rem + env(safe-area-inset-bottom, 0px));
  --side-aspect: 1054 / 1492;
  --side-width: calc(100dvh * var(--side-aspect));
  --side-offset: 5%;
  --content-padding-x: 11%;
  --menu-volume-width: 2.75rem;

  --font-family: "Sansation", system-ui, -apple-system, sans-serif;
}

@font-face {
  font-family: "Sansation";
  src: url("../fonts/Sansation-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sansation";
  src: url("../fonts/Sansation-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--color-text);
  background: var(--color-black);
  -webkit-font-smoothing: antialiased;
}

/* Background layer */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--color-bg);
  background-image: url("../assets/background.png");
  background-image: image-set(
    url("../assets/background.webp") type("image/webp"),
    url("../assets/background.png") type("image/png")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: var(--color-overlay);
  pointer-events: none;
}

.side-track {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  height: 100dvh;
  width: calc(100vw * var(--page-count, 2));
  will-change: transform;
  pointer-events: none;
}

.side-page {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

/* Side illustration strips — one pair per menu page */
.side {
  position: absolute;
  top: 0;
  width: var(--side-width);
  height: 100dvh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.side--left {
  left: 0;
  object-position: top left;
}

.side--right {
  right: 0;
  object-position: top right;
}

.side-page:first-child .side--left {
  transform: translateX(calc(-1 * var(--side-offset)));
}

.side-page:last-child .side--right {
  transform: translateX(var(--side-offset));
}

/* Banner header */
.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  height: var(--banner-height);
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  pointer-events: none;
}

.banner__img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

/* Horizontal swiper */
.swiper {
  position: fixed;
  top: var(--banner-height);
  left: 0;
  right: 0;
  bottom: var(--indicator-height);
  z-index: 3;
  isolation: isolate;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}

.swiper::-webkit-scrollbar {
  display: none;
}

.page {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page::-webkit-scrollbar {
  display: none;
}

.page__inner {
  width: 100%;
  padding: 0.75rem var(--content-padding-x) 1.5rem;
  min-height: 100%;
}

/* Section styles */
.section {
  margin-bottom: 1.25rem;
}

.section__title {
  margin: 0 0 0.625rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-section);
  text-align: center;
  text-shadow: var(--text-shadow-section);
}

.menu-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.section--has-volume .menu-item--cols-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--menu-volume-width) auto;
  gap: 0.25rem 0.35rem;
  align-items: baseline;
}

.menu-item--indent {
  padding-left: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.menu-item__name {
  flex: 1;
  min-width: 0;
  text-shadow: var(--text-shadow-menu);
}

.menu-item__volume {
  text-align: center;
  white-space: nowrap;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.menu-item__volume:empty {
  visibility: hidden;
}

.menu-item__price {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 700;
  text-shadow: var(--text-shadow-menu);
}

.menu-item__price:empty {
  display: none;
}

/* Page indicator */
.page-indicator {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-indicator-bg);
}

.page-indicator__arrow {
  min-width: 2.5rem;
  padding: 0.375rem 0.5rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-indicator-active);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}

.page-indicator__arrow:disabled {
  color: var(--color-indicator-inactive);
  cursor: default;
  opacity: 0.35;
}

.page-indicator__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-indicator-active);
  white-space: nowrap;
}

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

  .page-indicator__arrow {
    transition: none;
  }
}
