:root {
  --bg: #120c0a;
  --bg-card: rgba(28, 18, 14, 0.72);
  --gold: #c9a55c;
  --gold-dim: #8a7344;
  --cream: #f0e4d4;
  --cream-muted: #b8a898;
  --accent: #8b3a3a;
  --line: rgba(201, 165, 92, 0.22);

  /* iPhone 12+ layout (390–430 CSS px) */
  --page-max: 100%;
  --page-pad-x: max(
    1rem,
    env(safe-area-inset-left, 0px),
    env(safe-area-inset-right, 0px)
  );
  --page-pad-top: calc(1rem + env(safe-area-inset-top, 0px));
  --page-pad-bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  --touch-min: 3.25rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--cream);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.14;
  pointer-events: none;
}

.glow--left {
  top: -18%;
  left: -30%;
  background: radial-gradient(circle, #5c2a28 0%, transparent 70%);
}

.glow--right {
  bottom: -25%;
  right: -25%;
  background: radial-gradient(circle, #3d3520 0%, transparent 70%);
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--page-pad-top) var(--page-pad-x) var(--page-pad-bottom);
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fade-up 0.9s ease both;
}

.header__age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.85rem;
  font-family: "Marcellus", serif;
  font-size: 1.25rem;
  color: var(--bg);
  background: linear-gradient(145deg, var(--gold) 0%, #a8843f 100%);
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(201, 165, 92, 0.3);
}

.header__title {
  font-family: "Marcellus", serif;
  font-size: clamp(1.75rem, 9.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 0.3rem;
}

.header__subtitle {
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.header__rule {
  width: 3.5rem;
  height: 1px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-label {
  font-family: "Marcellus", serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: center;
  margin-bottom: 1.25rem;
  animation: fade-up 0.9s ease 0.15s both;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cocktail {
  border: 1px solid var(--line);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: fade-up 0.7s ease both;
}

/* fallback, если sibling-index() недоступен */
.menu > .cocktail:nth-child(1) { animation-delay: 0.2s; }
.menu > .cocktail:nth-child(2) { animation-delay: 0.28s; }
.menu > .cocktail:nth-child(3) { animation-delay: 0.36s; }
.menu > .cocktail:nth-child(4) { animation-delay: 0.44s; }
.menu > .cocktail:nth-child(5) { animation-delay: 0.52s; }
.menu > .cocktail:nth-child(6) { animation-delay: 0.6s; }
.menu > .cocktail:nth-child(7) { animation-delay: 0.68s; }
.menu > .cocktail:nth-child(8) { animation-delay: 0.76s; }
.menu > .cocktail:nth-child(9) { animation-delay: 0.84s; }
.menu > .cocktail:nth-child(10) { animation-delay: 0.92s; }

/* stagger для любого числа пунктов */
.menu > .cocktail {
  animation-delay: calc(0.2s + (sibling-index() - 1) * 0.08s);
}

.cocktail__trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.85rem 1rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.cocktail__trigger::-webkit-details-marker {
  display: none;
}

.cocktail__trigger::marker {
  display: none;
}

.cocktail__num {
  flex-shrink: 0;
  font-family: "Marcellus", serif;
  font-size: 0.75rem;
  color: var(--gold-dim);
  width: 1.35rem;
}

.cocktail__info {
  flex: 1;
  min-width: 0;
}

.cocktail__name {
  display: block;
  font-family: "Marcellus", serif;
  font-size: 1.125rem;
  letter-spacing: 0.03em;
  color: var(--cream);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cocktail__tag {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--cream-muted);
  line-height: 1.3;
}

.cocktail__chevron {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.15rem;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.35s ease;
}

.cocktail[open] .cocktail__chevron {
  transform: rotate(-135deg) translateY(2px);
}

.cocktail[open] .cocktail__trigger {
  border-bottom: 1px solid var(--line);
}

.cocktail__body {
  padding: 0.25rem 1rem 1rem 2.85rem;
  animation: expand-in 0.35s ease;
}

.cocktail__label {
  font-family: "Marcellus", serif;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0.5rem 0 0.55rem;
}

.ingredients {
  list-style: none;
}

.ingredients li {
  position: relative;
  padding-left: 0.9rem;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: var(--cream-muted);
  line-height: 1.4;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.ingredients li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.7;
}

.ingredients li strong {
  font-weight: 600;
  color: var(--cream);
}

.variant {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
}

.variant__title {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.footer {
  margin-top: 2rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  text-align: center;
  font-style: italic;
  font-size: 1rem;
  color: var(--gold-dim);
  animation: fade-up 0.9s ease 0.8s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expand-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* iPhone 12 mini и узкие экраны (375px) */
@media (max-width: 389px) {
  .header__subtitle {
    letter-spacing: 0.1em;
    font-size: 0.9rem;
  }

  .section-label {
    letter-spacing: 0.18em;
  }

  .cocktail__body {
    padding-left: 2.65rem;
  }
}

/* iPhone 12 / 13 / 14 / 15 — стандарт 390px */
@media (min-width: 390px) and (max-width: 429px) {
  :root {
    --page-pad-x: max(1.125rem, env(safe-area-inset-left, 0px));
  }

  .page {
    padding-left: max(1.125rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.125rem, env(safe-area-inset-right, 0px));
  }
}

/* iPhone 12 Pro Max, 14 Plus, 15 Plus (428–430px) */
@media (min-width: 428px) {
  :root {
    --page-max: 26rem;
    --page-pad-top: calc(1.5rem + env(safe-area-inset-top, 0px));
    --page-pad-bottom: calc(2.25rem + env(safe-area-inset-bottom, 0px));
  }

  body {
    font-size: 1.125rem;
  }

  .glow {
    width: 65vmax;
    height: 65vmax;
    filter: blur(88px);
    opacity: 0.16;
  }

  .header {
    margin-bottom: 2.5rem;
  }

  .header__age {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.35rem;
  }

  .header__subtitle {
    font-size: 1.05rem;
    letter-spacing: 0.2em;
  }

  .section-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    margin-bottom: 1.5rem;
  }

  .menu {
    gap: 0.65rem;
  }

  .cocktail__trigger {
    padding: 1rem 1.15rem;
  }

  .cocktail__name {
    font-size: 1.2rem;
  }

  .cocktail__body {
    padding: 0.25rem 1.15rem 1.15rem 3.25rem;
  }

  .ingredients li {
    font-size: 1.05rem;
  }

  .footer {
    margin-top: 2.5rem;
    font-size: 1.125rem;
  }
}

/* Планшеты и десктоп */
@media (min-width: 768px) {
  :root {
    --page-max: 32rem;
    --page-pad-top: calc(2.5rem + env(safe-area-inset-top, 0px));
    --page-pad-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
  }

  .glow {
    width: 70vmax;
    height: 70vmax;
    filter: blur(100px);
    opacity: 0.18;
  }

  .cocktail__trigger {
    padding: 1.2rem 1.35rem;
  }

  .cocktail__body {
    padding-left: 3.6rem;
    padding-right: 1.35rem;
  }
}
