/* Палитра и особые блоки демо «Nebula Lounge» (кальянная). Общие компоненты — в ../demo.css. */

:root {
  --bg: #0d0b14;
  --surface: #161226;
  --ink: #f1ecff;
  --muted: #a49cc0;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --accent: #b072ff;
  --accent-ink: #0d0b14;
  --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --floor-bg: #1b1630;
  --sofa: #4b3a72;
  --map-label: rgba(241, 236, 255, 0.45);

  color-scheme: dark;
}

/* ============ Старт ============ */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: var(--space-7);
  min-height: 60vh;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.glow {
  background: linear-gradient(120deg, #f1ecff 20%, #b072ff 60%, #ff5fa2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.age-note {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Неоновая «туманность» из трёх размытых кругов. */
.orb {
  position: relative;
  aspect-ratio: 1;
  width: min(380px, 70vw);
  justify-self: center;
}

.orb i {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  filter: blur(40px);
  animation: orb 9s ease-in-out infinite alternate;
}

.orb i:nth-child(1) {
  background: #b072ff;
}

.orb i:nth-child(2) {
  background: #ff5fa2;
  inset: 25% 5% 15% 30%;
  animation-delay: -3s;
}

.orb i:nth-child(3) {
  background: #3fd0ff;
  inset: 35% 35% 5% 10%;
  animation-delay: -6s;
}

@keyframes orb {
  to {
    transform: translate(8%, -6%) scale(1.15);
  }
}

.highlights {
  margin-top: var(--space-7);
}

.highlights .big {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--accent);
}

.highlights h3 {
  margin: var(--space-2) 0;
  font-size: 18px;
}

.highlights p {
  margin: 0;
}

/* ============ Конструктор ============ */

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 280px;
  gap: var(--space-5);
  align-items: start;
}

.bowl-wrap {
  position: sticky;
  top: 88px;
}

.bowl {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(176, 114, 255, 0.25));
}

#bowl-hint {
  fill: rgba(255, 236, 214, 0.75);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
}

/* Кусочки фруктов «высыпаются» в чашу от центра к краю. */
.piece-pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  animation-delay: var(--d, 0ms);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0) translateY(-12px);
  }
}

.flavour-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.counter {
  font-weight: 800;
  color: var(--accent);
}

.flavours {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.flavour {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 52px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  background: transparent;
  font-size: var(--control-font);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.flavour svg {
  flex: none;
  width: 32px;
  height: 32px;
}

.flavour:hover {
  border-color: var(--ink);
}

.flavour.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.builder-side .chips {
  margin-bottom: var(--space-5);
}

.summary {
  position: sticky;
  top: 88px;
}

.hookah {
  display: block;
  width: 140px;
  height: auto;
  margin: 0 auto var(--space-3);
}

.hookah .vase {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(241, 236, 255, 0.55);
  stroke-width: 3;
}

.hookah .hose {
  fill: none;
  stroke: #2b2440;
  stroke-width: 8;
  stroke-linecap: round;
}

.hookah #liquid {
  transition:
    fill 0.6s,
    opacity 0.6s;
}

.hookah .bubbles circle {
  fill: rgba(255, 255, 255, 0.7);
  animation: bubble 2.2s ease-in infinite;
}

.hookah .bubbles circle:nth-child(2) {
  animation-delay: 0.7s;
}

.hookah .bubbles circle:nth-child(3) {
  animation-delay: 1.4s;
}

@keyframes bubble {
  to {
    transform: translateY(-70px);
    opacity: 0;
  }
}

.hookah .smoke {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 6;
  stroke-linecap: round;
  transform: translateY(52px);
  animation: smoke 3s ease-in-out infinite;
}

@keyframes smoke {
  from {
    opacity: 0.6;
  }

  to {
    opacity: 0;
    transform: translateY(20px) scale(1.2);
  }
}

.total {
  font-family: var(--font-display);
  font-size: 22px;
}

/* ============ Меню ============ */

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5) var(--space-7);
}

.menu-grid h3 {
  margin: var(--space-4) 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent);
}

/* ============ Адаптивность ============ */

@media (max-width: 1100px) {
  .builder {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  /* Итог уходит на всю ширину под чашу, поэтому чаша больше не «липнет» к экрану —
     иначе она наезжала бы на итог при прокрутке. */
  .bowl-wrap {
    position: static;
  }

  .summary {
    grid-column: 1 / -1;
    position: static;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: center;
    gap: 0 var(--space-5);
  }

  .summary .hookah {
    grid-row: span 3;
    margin: 0;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .orb {
    order: -1;
    width: min(240px, 60vw);
  }
}

@media (max-width: 760px) {
  .builder,
  .menu-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bowl-wrap {
    max-width: 340px;
    margin: 0 auto;
  }

  .summary {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .summary .hookah {
    width: 96px;
  }
}
