:root {
  --bg-black: #0a0806;
  --bg-black-2: #120c0a;

  --gold: #d9c199;
  --gold-bright: #ecdcb8;
  --gold-dim: #a5854f;

  --maroon: #5a0f1e;
  --maroon-bright: #7a1626;

  --text-cream: #ece3d3;
  --text-muted: #b7a888;

  --card-border: rgba(201, 168, 118, 0.28);
  --card-bg: rgba(24, 16, 13, 0.55);

  --radius-card: 26px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;

  min-height: 100vh;

  background: var(--bg-black);
  color: var(--text-cream);

  font-family: 'Cormorant Garamond', 'Georgia', serif;

  overflow-x: hidden;
}

body {
  position: relative;

  display: flex;
  justify-content: center;
}


/* ---------- background ---------- */

.bg-layer {
  position: fixed;

  top: -8%;
  left: -8%;
  right: -8%;
  bottom: -8%;

  z-index: 0;

  background-image: url('../assets/backgrounds/bg_phone.webp');

  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  filter:
    contrast(1.12)
    brightness(0.6);

  will-change: transform;
}

@media (min-width: 601px) and (max-width: 1023px) {
  .bg-layer {
    background-image: url('../assets/backgrounds/bg_tablet.webp');
  }
}

@media (min-width: 1024px) {
  .bg-layer {
    background-image: url('../assets/backgrounds/bg_pc.webp');
  }
}


/* ---------- dark vignette ---------- */

.bg-vignette {
  position: fixed;
  inset: 0;

  z-index: 1;

  pointer-events: none;

  background:
    radial-gradient(
      ellipse at center 42% 38%,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.18) 38%,
      rgba(0, 0, 0, 0.48) 72%,
      rgba(0, 0, 0, 0.72) 100%
    );
}


/* ---------- page ---------- */

.menu-page {
  position: relative;

  z-index: 2;

  width: 100%;
  max-width: 460px;

  padding: 42px 20px 60px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- logo ---------- */

.hero {
  text-align: center;
  margin-bottom: 8px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.logo-image {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 128px;
  height: 64px;
}

.logo-image img {
  display: block;

  width: 128px;
  height: 64px;

  filter:
    brightness(0)
    saturate(100%)
    invert(70%)
    sepia(24%)
    saturate(520%)
    hue-rotate(355deg)
    brightness(92%)
    contrast(105%)
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 5px rgba(210, 165, 90, 0.18));
}

.logo-shine {
  position: absolute;
  inset: 0;

  pointer-events: none;
  z-index: 2;

  background:
    linear-gradient(
      105deg,
      transparent 0%,

      transparent calc(var(--logo-shine, -20%) - 9%),

      rgba(255, 225, 160, 0.08)
        calc(var(--logo-shine, -20%) - 7%),

      rgba(255, 241, 195, 0.45)
        calc(var(--logo-shine, -20%) - 3%),

      rgba(255, 252, 225, 0.95)
        var(--logo-shine, -20%),

      rgba(255, 241, 195, 0.45)
        calc(var(--logo-shine, -20%) + 3%),

      rgba(255, 225, 160, 0.08)
        calc(var(--logo-shine, -20%) + 7%),

      transparent
        calc(var(--logo-shine, -20%) + 9%),

      transparent 100%
    );

  mix-blend-mode: screen;

  -webkit-mask-image: url('../assets/logo.png');
  mask-image: url('../assets/logo.png');

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  -webkit-mask-position: center;
  mask-position: center;

  -webkit-mask-size: contain;
  mask-size: contain;

  opacity: 0.9;

  filter:
    drop-shadow(0 0 3px rgba(255, 235, 180, 0.35))
    drop-shadow(0 0 8px rgba(255, 210, 120, 0.18));
}

.spark {
  display: block;

  width: 18px;
  height: 18px;

  color: #e8d8b8;

  filter:
    drop-shadow(0 0 3px rgba(255, 240, 200, 0.55))
    drop-shadow(0 0 8px rgba(220, 180, 100, 0.18));
}

.spark svg {
  display: block;

  width: 100%;
  height: 100%;

  overflow: visible;
}

.spark path {
  fill: currentColor;
}

/* ---------- переключатель категорий ---------- */

.menu-switcher {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 18px;

  margin: 4px 0 34px;

  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 13px;

  letter-spacing: 3px;
  text-transform: uppercase;
}

.menu-switcher-item {
  position: relative;

  color: var(--text-muted);

  text-decoration: none;

  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

.menu-switcher-item:hover {
  color: var(--gold);
}

.menu-switcher-item.active {
  color: var(--gold-bright);
}

.menu-switcher-item.active::after {
  content: "";

  position: absolute;

  left: 10%;
  right: 10%;
  bottom: -9px;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(236, 220, 184, 0.85),
      transparent
    );

  box-shadow:
    0 0 5px rgba(236, 220, 184, 0.25);
}

/* ---------- карточки меню ---------- */

.menu-list {
  width: 100%;

  display: flex;
  flex-direction: column;
  gap: 18px;
}

.menu-category {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.menu-card {
  position: relative;
  height: auto;

  display: flex;
  align-items: center;
  gap: 16px;

  min-height: 96px;
  padding: 12px 18px 12px 12px;

  border-radius: var(--radius-card);

  border: 1px solid rgba(255, 225, 205, 0.07);

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.018) 45%,
      rgba(20, 8, 8, 0.12)
    );

  color: inherit;
  text-decoration: none;

  backdrop-filter: blur(3px) saturate(125%);
  -webkit-backdrop-filter: blur(3px) saturate(125%);

  box-shadow:
    inset 0 1px 0 rgba(255, 245, 235, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 10px 30px rgba(0, 0, 0, 0.32);

  overflow: hidden;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}


/* мягкая поверхность стекла */

.menu-card::before {
  content: "";

  position: absolute;
  inset: 0;

  border-radius: inherit;

  pointer-events: none;
  z-index: 0;

  background:
    linear-gradient(
      var(--glass-angle, 135deg),
      rgba(255, 245, 235, 0.16) 0%,
      rgba(255, 245, 235, 0.035) 18%,
      transparent 38%,
      transparent 67%,
      rgba(214, 155, 155, 0.045) 82%,
      rgba(255, 235, 220, 0.10) 100%
    );

  opacity: 0.85;

  transition:
    background 0.8s ease,
    opacity 0.8s ease;
}


/* золотой движущийся контур */

.menu-card::after {
  content: "";

  position: absolute;
  inset: 0;

  padding: 1px;

  border-radius: inherit;

  pointer-events: none;
  z-index: 3;

  background:
    conic-gradient(
      from var(--edge-angle, 215deg),

      rgba(255, 235, 220, 0.08) 0deg,
      rgba(255, 235, 220, 0.08) 35deg,

      rgba(255, 250, 242, 0.72) 48deg,
      rgba(255, 225, 210, 0.18) 61deg,

      rgba(255, 235, 220, 0.06) 105deg,

      rgba(255, 248, 238, 0.38) 145deg,
      rgba(255, 225, 210, 0.10) 158deg,

      rgba(255, 235, 220, 0.06) 220deg,

      rgba(255, 248, 238, 0.55) 275deg,
      rgba(255, 225, 210, 0.10) 290deg,

      rgba(255, 235, 220, 0.08) 360deg
    );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);

  -webkit-mask-composite: xor;

  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);

  mask-composite: exclude;

  filter:
    drop-shadow(0 0 2px rgba(255, 225, 205, 0.22))
    drop-shadow(0 0 7px rgba(255, 190, 175, 0.07));

  opacity: 0.9;
}


/* всё содержимое поверх стеклянных эффектов */

.menu-card > * {
  position: relative;
  z-index: 1;
}


/* ---------- фотография ---------- */

.menu-card-image {
  flex: 0 0 72px;

  width: 72px;
  height: 72px;

  border-radius: 20px;

  overflow: hidden;

  background: rgba(20, 10, 10, 0.35);

  box-shadow:
    inset 0 0 0 1px rgba(217, 193, 153, 0.25),
    0 0 12px rgba(0, 0, 0, 0.2);
}

.menu-card-image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

.menu-card:hover .menu-card-image img {
  transform: scale(1.04);

  filter:
    brightness(1.05)
    saturate(1.05);
}


/* ---------- текст ---------- */

.menu-card-content {
  flex: 1;
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 6px;
}

.menu-card-content h2 {
  margin: 0;

  font-family: 'Cormorant Garamond', 'Georgia', serif;

  font-size: 22px;
  line-height: 1.05;

  font-weight: 500;

  color: var(--text-cream);
}

.menu-card-meta {
  display: flex;
  flex-wrap: wrap;

  gap: 12px;

  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  font-size: 11px;
  font-weight: 300;

  letter-spacing: 1.2px;
  text-transform: uppercase;

  color: var(--gold-dim);
}


/* ---------- стрелка ---------- */

.menu-card-arrow {
  flex: none;

  font-family: Georgia, serif;

  font-size: 25px;
  font-weight: 300;

  color: var(--gold-dim);

  transition:
    transform 0.25s ease,
    color 0.25s ease;
}

.menu-card:hover .menu-card-arrow {
  transform: translateX(3px);
  color: var(--gold);
}


/* ---------- hover ---------- */

.menu-card:hover,
.menu-card:focus-visible {
  transform: translateY(-2px);

  border-color: rgba(217, 193, 153, 0.55);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 28px rgba(0,0,0,0.45),
    0 0 22px rgba(180, 140, 70, 0.15);
}

.menu-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- раскрывающаяся информация ---------- */

.menu-card {
  display: block;
  cursor: pointer;
}

.menu-card-main {
  position: relative;

  display: flex;
  align-items: center;
  gap: 16px;

  min-height: 72px;
}

.menu-card-details {
  max-height: 0;

  opacity: 0;

  margin-top: 0;

  overflow: hidden;

  transition:
    max-height 0.45s ease,
    opacity 0.3s ease,
    margin-top 0.45s ease;
}

.menu-card-details > * {
  overflow: visible;
}


/* открытая карточка */

.menu-card.is-open .menu-card-details {
  max-height: 1000px;

  opacity: 1;

  margin-top: 22px;
}


/* стрелка */

.menu-card-arrow {
  transition:
    transform 0.35s ease,
    color 0.25s ease;
}

.menu-card.is-open .menu-card-arrow {
  transform: rotate(90deg);
  color: var(--gold-bright);
}


/* ---------- КБЖУ ---------- */

.nutrition {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 8px;

  margin-bottom: 22px;
}

.nutrition > div {
  padding: 10px 6px;

  text-align: center;

  border: 1px solid rgba(217, 193, 153, 0.14);
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.025);
}

.nutrition span {
  display: block;

  margin-bottom: 4px;

  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  font-size: 9px;
  font-weight: 300;

  letter-spacing: 1px;
  text-transform: uppercase;

  color: var(--gold-dim);
}

.nutrition strong {
  display: block;

  font-family: 'Cormorant Garamond', Georgia, serif;

  font-size: 16px;
  font-weight: 500;

  color: var(--text-cream);
}


/* ---------- состав ---------- */

.ingredients {
  padding-top: 18px;

  border-top: 1px solid rgba(217, 193, 153, 0.14);
}

.ingredients h3 {
  margin: 0 0 16px;

  font-family: 'Cormorant SC', serif;

  font-size: 18px;
  font-weight: 500;

  letter-spacing: 2px;

  color: var(--gold-bright);
}

.ingredient-group {
  margin-bottom: 14px;
}

.ingredient-group:last-child {
  margin-bottom: 0;
}

.ingredient-group h4 {
  margin: 0 0 3px;

  font-family: 'Cormorant Garamond', Georgia, serif;

  font-size: 17px;
  font-weight: 500;

  color: var(--text-cream);
}

.ingredient-group p {
  margin: 0;

  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  font-size: 12px;
  line-height: 1.5;
  font-weight: 300;

  color: var(--text-muted);
}


/* ---------- мобильная версия ---------- */

@media (max-width: 380px) {

  .menu-card {
    padding-left: 10px;
    padding-right: 14px;
  }

  .menu-card-image {
    flex-basis: 64px;

    width: 64px;
    height: 64px;

    border-radius: 17px;
  }

  .menu-card-content h2 {
    font-size: 20px;
  }

  .menu-card-meta {
    font-size: 10px;
    gap: 8px;
  }

  .nutrition {
    gap: 5px;
  }

  .nutrition > div {
    padding: 9px 4px;
  }

  .nutrition strong {
    font-size: 15px;
  }
}

/* ---------- исправление высоты закрытой карточки ---------- */

.menu-card-details {
  min-height: 0;
  overflow: hidden;
}

.menu-card-details > * {
  min-height: 0;
}

/* ---------- износ и царапины стекла ---------- */

.glass-wear {
  position: absolute;
  inset: 0;

  z-index: 2;
  pointer-events: none;

  border-radius: inherit;
  overflow: hidden;

  background-image: url('../assets/glass-wear.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  opacity: 0.2;

  mix-blend-mode: screen;

  filter: contrast(1.15) brightness(1.02);

  transform-origin: center;
}

.menu-back {
  display: inline-block;

  margin-top: 12px;
  margin-bottom: 24px;

  color: var(--gold-dim);
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-decoration: none;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.menu-back:hover,
.menu-back:focus-visible {
  color: var(--gold-bright);
  transform: translateX(-2px);
}

.menu-back:focus-visible {
  outline: none;
}

/* ---------- анимация переключения меню ---------- */

.menu-list {
  position: relative;
  overflow: visible;
}

.menu-card {
  transition:
    transform 0.45s ease,
    opacity 0.45s ease;
}

/* Старые карточки уезжают */
.menu-card.menu-exit-left {
  transform: translateX(-55px);
  opacity: 0;
}

.menu-card.menu-exit-right {
  transform: translateX(55px);
  opacity: 0;
}

/* Новые карточки появляются с противоположной стороны */
.menu-list.menu-enter-right .menu-card {
  transform: translateX(55px);
  opacity: 0;
}

.menu-list.menu-enter-left .menu-card {
  transform: translateX(-55px);
  opacity: 0;
}

/* ---------- экран перехода / загрузки ---------- */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #0a0806;

  opacity: 1;
  visibility: visible;

  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
}

.loader-logo {
  position: relative;

  width: 128px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo img {
  display: block;

  width: 128px;
  height: 64px;

  filter:
    brightness(0)
    saturate(100%)
    invert(70%)
    sepia(24%)
    saturate(520%)
    hue-rotate(355deg)
    brightness(92%)
    contrast(105%)
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 5px rgba(210, 165, 90, 0.18));
}

.loader-logo-shine {
  position: absolute;
  inset: 0;

  pointer-events: none;
  z-index: 2;

  background:
    linear-gradient(
      105deg,
      transparent 0%,
      transparent 44%,
      rgba(255, 225, 160, 0.08) 46%,
      rgba(255, 241, 195, 0.45) 48.5%,
      rgba(255, 252, 225, 0.95) 50%,
      rgba(255, 241, 195, 0.45) 51.5%,
      rgba(255, 225, 160, 0.08) 54%,
      transparent 56%,
      transparent 100%
    );

  mix-blend-mode: screen;

  -webkit-mask-image: url('../assets/logo.png');
  mask-image: url('../assets/logo.png');

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  -webkit-mask-position: center;
  mask-position: center;

  -webkit-mask-size: contain;
  mask-size: contain;

  opacity: 0;

  animation: loader-shine 2.8s ease-in-out infinite;
}

@keyframes loader-shine {
  0% {
    opacity: 0;
    background-position: -120% 0;
  }

  15% {
    opacity: 0.9;
  }

  50% {
    opacity: 0.9;
    background-position: 0% 0;
  }

  75% {
    opacity: 0.9;
    background-position: 120% 0;
  }

  100% {
    opacity: 0;
    background-position: 120% 0;
  }
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .loader-logo-shine {
    animation: none;
    opacity: 0;
  }

  .page-loader {
    transition: none;
  }
}