@font-face {
  font-family: Manrope;
  src: url("assets/manrope-cyrillic.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Manrope;
  src: url("assets/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  font-family: Manrope, system-ui, sans-serif;
  color: #161c29;
  background: #f4f6fa;
  --paper: #f4f6fa;
  --blue: #173ec6;
  --muted: #475369;
  --line: #c9d2e0;
  --edge: clamp(16px, 4.4vw, 64px);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.journey {
  position: relative;
  min-height: calc(var(--catalog-start, 360svh) + var(--shelf-travel, 1225px) + 100svh);
}

.chapter-anchor { position: absolute; left: 0; pointer-events: none; }
#interior { top: var(--interior-start, 220svh); }
#collection { top: var(--catalog-start, 360svh); }

.scene {
  position: sticky;
  top: 0;
  height: 100svh;
  isolation: isolate;
  overflow: clip;
  background: #e3edfc;
}

.backdrop, .scene-film, .interior-still, .shelf-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.backdrop { background: #e3edfc url("assets/gallery/moscow-2k.webp") center / cover no-repeat; }
.scene-film { object-fit: cover; object-position: center; }
.interior-still, .shelf-still { opacity: 0; background-position: center; background-size: cover; }
.interior-still { background-image: url("assets/gallery/room-2k.webp"); }
.shelf-still { background-image: url("assets/gallery/shelf-2k.webp"); }
.scene[data-stage="catalog"] .shelf-still { opacity: 1; }
.scene[data-video="unavailable"][data-stage="interior"] .interior-still { opacity: 1; }

.scene-header, .catalog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.scene-header {
  position: absolute;
  z-index: 3;
  inset: 24px var(--edge) auto;
}

.scene-header > * {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--paper);
  white-space: nowrap;
}

.scene-header > a:last-child {
  color: var(--blue);
  font-size: .875rem;
  font-weight: 750;
}

.scene-header > a:last-child:hover { background: #e1e9ff; }

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #152033;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: .075em;
  white-space: nowrap;
}

.wordmark small { color: var(--blue); font-size: .75rem; font-weight: 700; }

.scene-caption {
  position: absolute;
  bottom: clamp(24px, 7svh, 80px);
  left: var(--edge);
  width: fit-content;
  max-width: calc(100% - 2 * var(--edge));
  padding: clamp(20px, 3.4vw, 48px);
  background: var(--paper);
}

.scene-caption h1, .scene-caption h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(3rem, 6.8vw, 7.5rem);
  font-weight: 750;
  letter-spacing: -.09em;
  line-height: .87;
}

.scene-caption h2 { font-size: clamp(2rem, 4.2vw, 4.5rem); }
.scene-caption p { margin: 20px 0 0; color: var(--muted); font-size: .875rem; }
.interior-caption { opacity: 0; }

.catalog {
  position: absolute;
  inset: 0;
  opacity: var(--catalog-opacity, 0);
  pointer-events: none;
}

.catalog[inert] { visibility: hidden; }

.catalog-panel {
  position: absolute;
  inset: auto 0 0;
  background: var(--paper);
  transform: translateY(var(--panel-offset, 24px));
  pointer-events: auto;
}

.catalog-footer {
  min-height: 58px;
  padding-inline: var(--edge);
  border-top: 1px solid var(--line);
}

.shelf {
  position: absolute;
  inset: 0;
  isolation: isolate;
  opacity: var(--shelf-opacity, 0);
  pointer-events: none;
}

.shelf[inert] .flacon { pointer-events: none; }

.flacon {
  position: absolute;
  left: 50%;
  bottom: calc(100% - var(--shelf-line, 54%));
  width: clamp(118px, 18vw, 278px);
  height: min(36svh, var(--shelf-height, 36svh));
  min-height: 64px;
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(calc(var(--x, 0px) - 50%)) scale(var(--size, 1));
  transform-origin: center bottom;
  filter: brightness(var(--light, 1));
}

.flacon-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: drop-shadow(0 5px 9px #030b3460);
}

.flacon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.flacon .cap { transform: translateY(calc(var(--cap-offset) + var(--lift, 0px))); }

.details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(255px, .54fr);
  align-items: end;
  gap: clamp(24px, 6vw, 96px);
  padding: 20px var(--edge);
}

.descriptions { display: grid; align-items: end; min-width: 0; }
.description { grid-area: 1 / 1; min-width: 0; }
.description[aria-hidden="true"] { visibility: hidden; }

.house, .samples h3 {
  margin: 0;
  color: var(--blue);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.description h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.875rem, 3.5vw, 3.75rem);
  font-weight: 750;
  letter-spacing: -.075em;
  line-height: 1.03;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.notes { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.full-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 8px 0 0; }
.full-price span { color: var(--muted); font-size: .75rem; }
.full-price strong { color: var(--blue); font-size: 1.125rem; white-space: nowrap; }

.samples { padding-left: 20px; border-left: 1px solid var(--line); }
.samples ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 10px 0 0; padding: 0; list-style: none; }
.samples li { display: grid; justify-items: center; gap: 3px; min-width: 0; }
.samples li + li { border-left: 1px solid var(--line); }
.samples strong { font-size: .875rem; white-space: nowrap; }
.sample-volume { color: var(--blue); font-size: .75rem; white-space: nowrap; }

.sample-vial {
  position: relative;
  display: grid;
  place-items: end center;
  width: 23px;
  height: 60px;
}

.sample-vial img { display: block; width: 100%; height: var(--vial-height, 60px); object-fit: contain; object-position: bottom; }
.samples li:first-child .sample-vial { --vial-height: 37px; }
.samples li:nth-child(2) .sample-vial { --vial-height: 49px; }
.sample-vial span {
  position: absolute;
  bottom: calc(var(--vial-height, 60px) * .17);
  left: 50%;
  width: 54%;
  transform: translateX(-50%);
  background: #f5f8ff;
  color: #12368c;
  font-size: 3px;
  line-height: 1.06;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: center;
}

.scroll-label, .price-note { color: var(--muted); font-size: .75rem; }

.controls { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.controls button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #a7b7e3;
  border-radius: 3px;
  background: #e9efff;
  color: var(--blue);
  cursor: pointer;
}

.controls button:disabled { opacity: .45; cursor: default; }
.controls button:not(:disabled):hover { background: #dbe5ff; }
.controls output { min-width: 44px; color: var(--blue); font-size: .75rem; text-align: center; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.flacon:focus-visible { outline-color: #fff; }

@media (max-width: 760px) {
  .scene-header { inset: 14px var(--edge) auto; gap: 4px; }
  .scene-header > * { padding-inline: 8px; }
  .scene-header > a:last-child { font-size: .6875rem; }
  .wordmark { font-size: .9375rem; }
  .scene-caption { padding: 16px 20px; }
  .scene-caption h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .scene-caption p { margin-top: 12px; }
  .catalog-footer { min-height: 52px; gap: 6px; }
  .details { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 10px; padding-block: 12px; }
  .description h2 { font-size: clamp(1.25rem, 5.4vw, 2rem); }
  .house, .samples h3 { font-size: .625rem; letter-spacing: .06em; }
  .notes { font-size: .75rem; }
  .full-price { gap: 2px 8px; margin-top: 6px; }
  .full-price span { font-size: .625rem; }
  .full-price strong { font-size: .875rem; }
  .samples { padding-left: 8px; }
  .samples ul { margin-top: 6px; }
  .samples strong, .sample-volume { font-size: .625rem; }
  .scroll-label, .price-note { font-size: .625rem; }
  .price-note { max-width: 82px; text-align: center; }
  .controls { gap: 3px; }
  .controls button { width: 36px; height: 36px; }
  .controls output { min-width: 34px; font-size: .625rem; }
  .flacon { width: clamp(100px, 37vw, 185px); height: min(28svh, var(--shelf-height, 28svh)); }
}

@media (max-height: 540px) {
  .catalog-footer { min-height: 44px; }
  .details { padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-film { display: none; }
  .scene[data-stage="interior"] .interior-still { opacity: 1; }
  .catalog-panel { transform: none; }
  .flacon .cap { transform: translateY(var(--cap-offset)); }
}

.flight-status {
  position: absolute;
  z-index: 2;
  top: clamp(65px, 9svh, 92px);
  left: var(--edge);
  max-width: min(67%, 30rem);
  margin: 0;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: .8rem;
}
