/* VNVNC guest landing. Tokens, controls, reveals, FAQ, footer and type scale
   come from the Moscow site (base.css, home.css); layout is mobile-first.
   Motion: transitions for anything a guest triggers (interruptible), keyframes
   only for one-off entrances and the explanatory illustrations. */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0020-007e, U+00a0-00bb, U+00d7, U+2010-2014, U+2018-201e, U+2022, U+2026, U+20bd, U+2191-2193;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0020-007e, U+00a0-00bb, U+00d7, U+2010-2014, U+2018-201e, U+2022, U+2026, U+20bd, U+2191-2193;
}

:root {
  color-scheme: dark;
  --font-brand: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --bg: #070609;
  --bg-raised: #121014;
  --bg-soft: #18151a;
  --paper: #f7f5f2;
  --paper-soft: #e7e3e4;
  --muted: #b5afb4;
  --muted-dark: #8f8a92;
  --accent: #e3344f;
  /* Filled red behind white text: the Moscow #e3344f gives 4.3:1, this 4.6:1. */
  --accent-fill: #dc2f4b;
  --accent-fill-hover: #c92942;
  --line: rgba(255, 255, 255, 0.08);
  --line-top: rgba(255, 255, 255, 0.14);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --control-height: 3.25rem;
  --control-radius: 0.5rem;
  --surface-radius: 0.75rem;
  --media-radius: clamp(0.75rem, 1.5vw, 1.3rem);
  --max-width: 1360px;
  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --bleed: max(var(--gutter), calc((100% - var(--max-width)) / 2));
  --section-space: clamp(6rem, 11vw, 10rem);
  --header-height: 4.25rem;
}

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

html {
  background: var(--bg);
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.3vw + 0.94rem, 1.0625rem);
  line-height: 1.5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--accent-fill);
  color: var(--paper);
}

:where(a, button, input, summary, label):focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  border-radius: var(--control-radius);
  background: var(--paper);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Controls ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.primary-action,
.secondary-action,
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: var(--control-height);
  padding: 0 1.2rem;
  border-radius: var(--control-radius);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

.primary-action {
  background: var(--accent-fill);
  color: #fff;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--paper);
}

.text-action {
  min-height: 2.75rem;
  padding: 0;
  color: var(--muted);
}

/* Lucide arrow-up-right from the inline sprite, painted in currentColor. */
.arrow {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease-out);
}

.primary-action:active,
.secondary-action:active,
.text-action:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .primary-action:hover {
    background: var(--accent-fill-hover);
  }

  .secondary-action:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
  }

  .text-action:hover {
    color: var(--paper);
  }

  :is(.primary-action, .secondary-action, .text-action):hover .arrow {
    transform: translate(2px, -2px);
  }
}

/* ---------- Header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
  padding: max(0.5rem, env(safe-area-inset-top)) var(--bleed) 0.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 6, 9, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

.brand {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.brand img {
  width: 2.3rem;
  height: 2.3rem;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: clamp(0.25rem, 1.2vw, 1.25rem);
}

.desktop-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  color: #ddd7dc;
  font-size: 0.8rem;
  font-weight: 650;
  transition: color 200ms ease;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  bottom: 0.55rem;
  left: 0.5rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .desktop-nav a:hover {
    color: #fff;
  }

  .desktop-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }
}

/* Mobile menu is a <details> disclosure: it opens without JS, and site.js
   only adds closing on link tap, Escape and outside click. */
.menu > summary {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(14, 11, 16, 0.45);
  cursor: pointer;
  list-style: none;
  transition: transform 160ms var(--ease-out);
}

.menu > summary:active {
  transform: scale(0.95);
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: currentColor;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  transition: transform 200ms var(--ease-out);
}

.menu-icon::before {
  transform: translateY(-0.36rem);
}

.menu-icon::after {
  transform: translateY(0.36rem);
}

.menu[open] .menu-icon {
  background: transparent;
}

.menu[open] .menu-icon::before {
  transform: rotate(45deg);
}

.menu[open] .menu-icon::after {
  transform: rotate(-45deg);
}

.menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: grid;
  max-height: calc(100svh - var(--header-height));
  overflow-y: auto;
  padding: 0.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 6, 9, 0.97);
  transform-origin: top;
}

.menu[open] .menu-panel {
  animation: menu-in 200ms var(--ease-out);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 3.6rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-brand);
  font-size: clamp(1.4rem, 6.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

@media (min-width: 45rem) {
  :root {
    --header-height: 4.75rem;
  }

  .desktop-nav {
    display: flex;
  }

  .menu {
    display: none;
  }
}

/* ---------- Hero ---------- */

/* The hero slides under the translucent sticky header, as on the Moscow site. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  gap: 2rem;
  min-height: min(100vh, 62rem);
  min-height: min(100svh, 62rem);
  margin-top: calc(var(--header-height) * -1);
  padding: calc(var(--header-height) + 5rem) var(--bleed) clamp(2rem, 6vh, 4.5rem);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg-soft);
}

.hero-photo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 700ms ease, transform 1400ms var(--ease-expo);
}

/* Separate rules: a browser without :has() must still show the SPb photo. */
.hero-photo--spb {
  opacity: 1;
  transform: none;
}

.hero:has(#city-msk:checked) .hero-photo--msk {
  opacity: 1;
  transform: none;
}

.hero:has(#city-msk:checked) .hero-photo--spb {
  opacity: 0;
  transform: scale(1.04);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  filter: saturate(0.94) contrast(1.05);
}

/* Transform only: an opacity fade would hold back the LCP paint. */
.hero-photo--spb img {
  animation: photo-in 1800ms var(--ease-expo) both;
}

@keyframes photo-in {
  from {
    transform: scale(1.1);
  }
}

/* Photo location plate, in the Moscow hall-number style. */
.hero-photo figcaption {
  position: absolute;
  top: calc(var(--header-height) + 0.9rem);
  right: var(--bleed);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(7, 6, 9, 0.68);
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero-photo figcaption::before {
  content: '';
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 9, 0.55) 0%, rgba(7, 6, 9, 0.1) 20%, rgba(7, 6, 9, 0.45) 40%, rgba(7, 6, 9, 0.9) 60%, #070609 82%);
}

.hero-title {
  display: grid;
  justify-items: start;
  gap: 0.6rem;
  font-family: var(--font-brand);
  font-weight: 700;
}

/* Five equal slices of one cached image, so each letter rises on its own.
   clip-path cuts only the bottom edge, leaving room for the hover lift. */
.wordmark {
  display: flex;
  width: min(54vw, 15rem);
  aspect-ratio: 2362 / 2328;
  filter: drop-shadow(0 1.5rem 3rem rgba(0, 0, 0, 0.55));
}

.wordmark__slice {
  position: relative;
  flex: 1 1 0;
  clip-path: inset(-25% -12% 0 -12%);
}

.wordmark__slice img {
  position: absolute;
  top: 0;
  left: 0;
  width: 500%;
  height: 100%;
  max-width: none;
  animation: letter-rise 1200ms var(--ease-expo) 160ms both;
  transition: translate 420ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

.wordmark__slice:nth-child(2) img {
  left: -100%;
  animation-delay: 230ms;
}

.wordmark__slice:nth-child(3) img {
  left: -200%;
  animation-delay: 300ms;
}

.wordmark__slice:nth-child(4) img {
  left: -300%;
  animation-delay: 370ms;
}

.wordmark__slice:nth-child(5) img {
  left: -400%;
  animation-delay: 440ms;
}

@keyframes letter-rise {
  from {
    transform: translateY(104%);
  }
}

/* translate, not transform: the entrance holds transform. */
@media (hover: hover) and (pointer: fine) {
  .wordmark__slice:hover img {
    translate: 0 -4%;
  }
}

.hero-title__line {
  color: var(--accent);
  font-size: clamp(2.2rem, 11vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.065em;
  animation: rise 900ms var(--ease-expo) 480ms both;
}

.hero-side {
  display: grid;
  gap: 1.75rem;
  width: min(100%, 36rem);
}

.hero-lead {
  max-width: 30rem;
  color: #d4ced3;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  animation: rise 900ms var(--ease-expo) 560ms both;
}

.launch {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  animation: rise 900ms var(--ease-expo) 620ms both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
}

/* The paper thumb slides to the chosen city; labels only change colour. */
.city-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line-top);
  border-radius: calc(var(--control-radius) + 0.25rem);
  background: rgba(7, 6, 9, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.city-switch::before {
  content: '';
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: calc(50% - 0.375rem);
  border-radius: var(--control-radius);
  background: var(--paper);
  transition: transform 280ms var(--ease-drawer);
}

#city-msk:checked ~ .city-switch::before {
  transform: translateX(calc(100% + 0.25rem));
}

.city-switch label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: var(--control-radius);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 200ms ease, transform 160ms var(--ease-out);
}

.city-switch label:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .city-switch label:hover {
    color: var(--paper);
  }
}

#city-spb:checked ~ .city-switch [for="city-spb"],
#city-msk:checked ~ .city-switch [for="city-msk"] {
  color: #131015;
}

#city-spb:focus-visible ~ .city-switch [for="city-spb"],
#city-msk:focus-visible ~ .city-switch [for="city-msk"] {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

#city-spb:checked ~ .cta[data-city="msk"],
#city-msk:checked ~ .cta[data-city="spb"] {
  display: none;
}

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: clamp(4.75rem, 8vw, 6.5rem);
  overflow: hidden;
  padding: 0.75rem clamp(1.1rem, 2.5vw, 2rem);
  border-radius: var(--surface-radius);
  background: var(--accent-fill);
  color: #fff;
  font-family: var(--font-brand);
  font-size: clamp(1.0625rem, 0.7rem + 1.6vw, 2.125rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  box-shadow: 0 1.5rem 4rem -1.5rem rgba(227, 52, 79, 0.55);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
}

.cta > span {
  position: relative;
  text-wrap: balance;
}

.cta .arrow {
  position: relative;
  width: 1.2em;
  height: 1.2em;
}

/* Hover light: sweeps across once on enter, snaps back unseen on leave. */
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  pointer-events: none;
}

.cta:active {
  transform: scale(0.98);
}

/* After a city change the new button settles in, so the switch registers. */
.launch[data-switched] .cta {
  animation: cta-swap 260ms var(--ease-out);
}

@keyframes cta-swap {
  from {
    opacity: 0.4;
    transform: translateY(0.35rem);
    filter: blur(2px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .cta:hover {
    box-shadow: 0 1.75rem 4.5rem -1.25rem rgba(227, 52, 79, 0.8);
  }

  .cta:hover::before {
    transform: translateX(100%);
    transition: transform 700ms var(--ease-in-out);
  }

  .cta:hover .arrow {
    transform: translate(3px, -3px);
  }
}

@media (min-width: 68.75rem) {
  .hero {
    grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
    align-content: end;
    padding-top: calc(var(--header-height) + 4rem);
  }

  .hero-title,
  .hero-side {
    grid-column: 1;
  }

  .wordmark {
    width: clamp(14rem, 24vw, 22rem);
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(7, 6, 9, 0.94) 0%, rgba(7, 6, 9, 0.7) 34%, rgba(7, 6, 9, 0.1) 66%, rgba(7, 6, 9, 0.3) 100%),
      linear-gradient(0deg, #070609 1%, rgba(7, 6, 9, 0.5) 22%, rgba(7, 6, 9, 0) 45%),
      linear-gradient(180deg, rgba(7, 6, 9, 0.6) 0%, rgba(7, 6, 9, 0) 20%);
  }

  .hero-photo figcaption {
    top: auto;
    bottom: clamp(2rem, 6vh, 4.5rem);
  }
}

/* ---------- Sections ---------- */

.section {
  width: min(100%, calc(var(--max-width) + 2 * var(--gutter)));
  margin: var(--section-space) auto 0;
  padding-inline: var(--gutter);
}

.section-title {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  font-family: var(--font-brand);
  font-size: clamp(2rem, 4.6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.06em;
}

/* Steps: each starts with its illustration; the top rule draws in on entry. */
.steps {
  display: grid;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-content: start;
  gap: 0.5rem 1rem;
  padding: 1.75rem 0 2.25rem;
}

.steps li::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line-top);
  transform-origin: left;
}

.step-art {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}

.step-art .mg {
  max-width: 22rem;
}

.step-n {
  grid-row: 2 / span 2;
  color: var(--accent);
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
}

.steps h3,
.pair h3,
.msk-rows h3 {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.steps h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.2;
}

.steps p,
.chapter-copy p,
.pair p,
.msk-rows p,
.vpiska-body p {
  color: var(--muted);
  line-height: 1.65;
}

@media (min-width: 53.75rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 4rem);
  }

  .steps li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    padding-bottom: 0;
  }

  .step-n {
    grid-row: auto;
    margin-bottom: 0.75rem;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }
}

/* ---------- Cities ---------- */

.city-title {
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 10.5vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.city-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.city-address {
  color: var(--paper-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.city-photo,
.msk-photo {
  overflow: hidden;
  border-radius: var(--media-radius);
  background: var(--bg-soft);
}

.city-photo {
  aspect-ratio: 3 / 2;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.msk-photo {
  aspect-ratio: 3 / 2;
}

.city-photo img,
.msk-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.05);
}

@media (min-width: 53.75rem) {
  .city-photo {
    aspect-ratio: 2 / 1;
  }
}

/* Chapters: copy beside its pictures, sides alternate like the Moscow halls. */
.chapter {
  display: grid;
  gap: 2.5rem;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}

.chapter-copy {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 1rem;
  max-width: 32rem;
}

.chapter-copy h3 {
  margin-bottom: 0.5rem;
  font-family: var(--font-brand);
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.chapter-copy .actions {
  margin-top: 0.5rem;
}

.chapter-art .mg {
  max-width: 32rem;
  margin-inline: auto;
}

@media (min-width: 53.75rem) {
  .chapter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(2rem, 6vw, 6rem);
  }

  .chapter--flip .chapter-copy {
    order: 2;
  }
}

/* Two real screens side by side, the second one raised and tucked behind.
   They overlap only by the bezel and screen margin, so no UI is hidden. */
.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  width: min(100%, 30rem);
  margin-inline: auto;
}

.phone {
  position: relative;
  grid-row: 1;
  transition: opacity 800ms var(--ease-expo), translate 1100ms var(--ease-expo);
}

.phone--front {
  grid-column: 1;
  z-index: 2;
  margin-top: 14%;
}

.phone--back {
  grid-column: 2;
  z-index: 1;
  margin-left: -4%;
  transition-delay: 90ms;
}

.duo--flip .phone--front {
  grid-column: 2;
  margin-left: -4%;
}

.duo--flip .phone--back {
  grid-column: 1;
  margin-left: 0;
}

.phone__frame {
  position: relative;
  display: block;
  padding: 3%;
  border-radius: 14% / 6.5%;
  background: #0e0c10;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 2rem 4rem -1.5rem rgba(0, 0, 0, 0.85),
    0 0 5rem -2rem rgba(227, 52, 79, 0.35);
  transition: transform 320ms var(--ease-out);
}

.phone__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  border-radius: 11.5% / 5.3%;
  background: var(--bg-soft);
}

/* The rear screen sits a little in shadow. */
.phone--back .phone__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(7, 6, 9, 0.22);
  pointer-events: none;
  transition: opacity 240ms ease;
}

.phone figcaption {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-left: 6%;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phone figcaption::before {
  content: '';
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Pointing at the pair brings the rear screen forward to be read. */
@media (hover: hover) and (pointer: fine) {
  .duo:hover .phone--back .phone__frame {
    transform: translateY(-2%);
  }

  .duo:hover .phone--back .phone__frame::after {
    opacity: 0;
  }

  .duo:hover .phone--front .phone__frame {
    transform: translateY(2%);
  }
}

.pair {
  display: grid;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}

.pair li,
.msk-rows li {
  display: grid;
  gap: 0.75rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}

.pair h3,
.msk-rows h3 {
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1.05;
}

.pair p,
.msk-rows p {
  max-width: 34rem;
}

@media (min-width: 53.75rem) {
  .pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 6vw, 6rem);
  }
}

.msk {
  display: grid;
  gap: 2.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.msk-rows {
  border-top: 1px solid var(--line);
}

@media (min-width: 53.75rem) {
  .msk {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
    column-gap: clamp(2rem, 5vw, 5rem);
  }

  .msk-photo {
    max-width: 45rem;
  }
}

/* ---------- Illustrations ----------
   Inline SVG, drawn in the page palette. Each loop explains one action and
   holds on the result; site.js pauses it offscreen and in hidden tabs. */

.mg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--paper);
  fill: none;
  stroke: var(--paper);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mg * {
  transform-box: fill-box;
  transform-origin: center;
}

.mg-dim {
  stroke: rgba(255, 255, 255, 0.24);
}

.mg-dash {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-dasharray: 3 7;
}

.mg-red {
  fill: var(--accent-fill);
  stroke: none;
}

.mg-paper {
  fill: var(--paper);
  stroke: none;
}

.mg-solid,
.mg-ticket {
  fill: var(--bg-raised);
}

.mg-ticket--dim,
.mg-dimicon {
  stroke: rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.34);
}

.mg-qr {
  stroke-width: 1.6;
}

.mg-tick,
.mg-checkin__tick,
.mg-open__label {
  stroke: #fff;
  stroke-width: 2.5;
}

.mg-open__labels {
  stroke: var(--muted-dark);
  stroke-width: 3;
}

/* Choose a city, press: once for each city. */
.mg-open__thumb {
  animation: open-thumb 6s var(--ease-in-out) infinite;
}

@keyframes open-thumb {
  0%, 18% { transform: translateX(0); }
  30%, 62% { transform: translateX(82px); }
  74%, 100% { transform: translateX(0); }
}

.mg-open__cta {
  animation: open-press 6s var(--ease-out) infinite;
}

@keyframes open-press {
  0%, 36%, 46%, 80%, 90%, 100% { transform: scale(1); }
  40%, 84% { transform: scale(0.95); }
}

.mg-open__glow {
  stroke: var(--accent);
  opacity: 0;
  animation: open-glow 6s var(--ease-out) infinite;
}

@keyframes open-glow {
  0%, 40% { opacity: 0; transform: scale(1); }
  42% { opacity: 0.8; transform: scale(1); }
  58% { opacity: 0; transform: scale(1.12); }
  59%, 84% { opacity: 0; transform: scale(1); }
  86% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}

/* Scan the plate at the entrance, then a tick. */
.mg-checkin__scan {
  stroke: var(--accent);
  opacity: 0;
  animation: checkin-scan 5.4s linear infinite;
}

@keyframes checkin-scan {
  0%, 8% { opacity: 0; transform: translateY(0); }
  12% { opacity: 1; }
  40% { opacity: 1; transform: translateY(32px); }
  44%, 100% { opacity: 0; transform: translateY(32px); }
}

.mg-checkin__beam {
  fill: var(--accent);
  stroke: none;
  opacity: 0;
  animation: checkin-beam 5.4s ease infinite;
}

@keyframes checkin-beam {
  0%, 8% { opacity: 0; }
  14%, 38% { opacity: 0.22; }
  46%, 100% { opacity: 0; }
}

.mg-checkin__finder {
  animation: checkin-finder 5.4s var(--ease-out) infinite;
}

@keyframes checkin-finder {
  0%, 42% { transform: scale(1); }
  47% { transform: scale(0.88); }
  54%, 100% { transform: scale(1); }
}

.mg-checkin__ok {
  opacity: 0;
  animation: checkin-ok 5.4s var(--ease-out) infinite;
}

@keyframes checkin-ok {
  0%, 46% { opacity: 0; transform: scale(0.7); }
  54%, 88% { opacity: 1; transform: scale(1); }
  96%, 100% { opacity: 0; transform: scale(1); }
}

.mg-checkin__tick {
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  animation: checkin-tick 5.4s var(--ease-out) infinite;
}

@keyframes checkin-tick {
  0%, 50% { stroke-dashoffset: 18; }
  62%, 100% { stroke-dashoffset: 0; }
}

/* The prize leaves the chest, turns into its code, staff confirm. */
.mg-redeem__lid {
  transform-origin: 0% 100%;
  animation: redeem-lid 6s var(--ease-out) infinite;
}

@keyframes redeem-lid {
  0%, 8% { transform: rotate(0deg); }
  16%, 34% { transform: rotate(-16deg); }
  44%, 100% { transform: rotate(0deg); }
}

.mg-redeem__ticket {
  animation: redeem-rise 6s var(--ease-expo) infinite;
}

@keyframes redeem-rise {
  0%, 12% { opacity: 0; transform: translateY(40px); }
  16% { opacity: 1; }
  34%, 88% { opacity: 1; transform: translateY(0); }
  96%, 100% { opacity: 0; transform: translateY(0); }
}

.mg-redeem__face {
  animation: redeem-face 6s ease infinite;
}

@keyframes redeem-face {
  0%, 46% { opacity: 1; }
  54%, 100% { opacity: 0; }
}

.mg-redeem__code {
  opacity: 0;
  animation: redeem-code 6s var(--ease-out) infinite;
}

@keyframes redeem-code {
  0%, 48% { opacity: 0; transform: scale(0.85); }
  58%, 100% { opacity: 1; transform: scale(1); }
}

.mg-redeem__staff {
  opacity: 0;
  animation: redeem-staff 6s var(--ease-out) infinite;
}

@keyframes redeem-staff {
  0%, 60% { opacity: 0; transform: scale(0.7); }
  68%, 88% { opacity: 1; transform: scale(1); }
  96%, 100% { opacity: 0; transform: scale(1); }
}

/* A giftable prize arcs to a friend; the locked one twitches and stays.
   X and Y run on nested groups, so the flight is a true arc. */
.mg-gift__x {
  animation: gift-x 6s var(--ease-in-out) infinite;
}

@keyframes gift-x {
  0%, 14% { opacity: 1; transform: translateX(0); }
  52%, 86% { opacity: 1; transform: translateX(180px); }
  92% { opacity: 0; transform: translateX(180px); }
  96% { opacity: 0; transform: translateX(0); }
  100% { opacity: 1; transform: translateX(0); }
}

.mg-gift__y {
  animation: gift-y 6s infinite;
}

@keyframes gift-y {
  0%, 14% { transform: translateY(0); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  33% { transform: translateY(-32px); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  52%, 100% { transform: translateY(0); }
}

.mg-gift__locked {
  animation: gift-locked 6s ease infinite;
}

@keyframes gift-locked {
  0%, 14%, 24%, 100% { transform: translateX(0); }
  16% { transform: translateX(-2px); }
  18% { transform: translateX(2px); }
  20% { transform: translateX(-1.5px); }
  22% { transform: translateX(1px); }
}

.mg-gift__ring {
  stroke: var(--accent);
  opacity: 0;
  animation: gift-ring 6s var(--ease-out) infinite;
}

@keyframes gift-ring {
  0%, 50% { opacity: 0; transform: scale(0.8); }
  54% { opacity: 0.9; }
  72%, 100% { opacity: 0; transform: scale(1.5); }
}

/* The three steps start a beat apart, so they read in order. */
.steps li:nth-child(2) .mg * {
  animation-delay: 700ms;
}

.steps li:nth-child(3) .mg * {
  animation-delay: 1400ms;
}

.js .mg:not(.is-live) *,
.js.is-hidden .mg * {
  animation-play-state: paused;
}

/* ---------- VPISKA ---------- */

.vpiska {
  display: grid;
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-block: 1px solid var(--line);
}

.vpiska-title {
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.vpiska-body {
  display: grid;
  justify-items: start;
  gap: 1rem;
  max-width: 36rem;
}

.vpiska-body .vpiska-lead {
  color: var(--paper-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.5;
}

.vpiska-body .actions {
  margin-top: 0.5rem;
}

@media (min-width: 53.75rem) {
  .vpiska {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* ---------- FAQ ---------- */

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
  padding: 1.1rem 0;
  font-family: var(--font-brand);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  position: relative;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-top);
  border-radius: 50%;
  transition: background-color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out);
}

.faq-item summary:active .faq-icon {
  transform: scale(0.92);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.75rem;
  height: 1.5px;
  background: var(--paper);
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 200ms var(--ease-out);
}

.faq-item[open] .faq-icon {
  border-color: var(--accent);
  background: var(--accent);
}

.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%);
}

.faq-answer {
  max-width: 48rem;
  padding-bottom: 1.6rem;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item[open] .faq-answer {
  animation: faq-open 220ms var(--ease-out);
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
}

@media (hover: hover) and (pointer: fine) {
  .faq-item summary:hover .faq-icon {
    background: rgba(255, 255, 255, 0.08);
  }

  .faq-item[open] summary:hover .faq-icon {
    background: var(--accent);
  }
}

@media (min-width: 45rem) {
  .faq-answer {
    padding-right: 3.75rem;
  }
}

/* ---------- Footer ---------- */

.footer {
  margin-top: var(--section-space);
  padding: 0 var(--bleed) max(1.5rem, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 100%, rgba(227, 52, 79, 0.2), transparent 70%),
    var(--bg);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 2rem;
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}

.footer-links p {
  margin-bottom: 0.7rem;
  color: var(--muted-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  color: var(--paper-soft);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--accent);
  }
}

/* The letters rise from the floor, as on the Moscow footer. */
.footer-wordmark {
  height: clamp(8rem, 26vw, 24rem);
  margin-top: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.footer-wordmark img {
  width: 100%;
  height: auto;
  aspect-ratio: 2362 / 2328;
}

.footer-age {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---------- Entrances ----------
   site.js marks only blocks that start below the fold as "waiting", so the
   first screen never flashes and the page is complete without JS. */

[data-reveal="up"],
[data-reveal="list"] > li {
  transition: opacity 800ms var(--ease-expo), transform 1000ms var(--ease-expo);
}

[data-reveal="up"][data-state="waiting"],
[data-reveal="list"][data-state="waiting"] > li {
  opacity: 0;
  transform: translate3d(0, 1.5rem, 0);
}

[data-reveal="list"] > li:nth-child(2) { transition-delay: 70ms; }
[data-reveal="list"] > li:nth-child(3) { transition-delay: 140ms; }

.steps li::before {
  transition: transform 900ms var(--ease-expo) 120ms;
}

.steps li:nth-child(2)::before { transition-delay: 190ms; }
.steps li:nth-child(3)::before { transition-delay: 260ms; }

.steps[data-state="waiting"] li::before {
  transform: scaleX(0);
}

/* Photos wipe open from a smaller rounded window, as the Moscow halls do. */
[data-reveal="photo"] {
  clip-path: inset(0 round var(--media-radius));
  transition: clip-path 1100ms var(--ease-expo);
}

[data-reveal="photo"] img {
  transition: transform 1400ms var(--ease-expo);
}

[data-reveal="photo"][data-state="waiting"] {
  clip-path: inset(10% 5% round var(--media-radius));
}

[data-reveal="photo"][data-state="waiting"] img {
  transform: scale(1.1);
}

[data-reveal="duo"][data-state="waiting"] .phone {
  opacity: 0;
  translate: 0 3rem;
}

.footer-wordmark img {
  transition: transform 1400ms var(--ease-expo);
}

[data-reveal="floor"][data-state="waiting"] img {
  transform: translateY(40%);
}

/* ---------- Preferences ---------- */

/* Reduced motion keeps fades and colour changes, drops movement, and shows
   each illustration's end state instead of its loop. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-property: opacity, color, background-color, border-color, box-shadow !important;
  }

  [data-reveal][data-state="waiting"],
  [data-reveal][data-state="waiting"] * {
    transform: none !important;
    translate: none !important;
    clip-path: none !important;
  }

  .hero-photo {
    transform: none !important;
  }

  .mg-open__glow,
  .mg-checkin__scan,
  .mg-checkin__beam,
  .mg-redeem__face,
  .mg-gift__ring {
    opacity: 0;
  }

  .mg-checkin__ok,
  .mg-redeem__code,
  .mg-redeem__staff {
    opacity: 1;
  }

  .mg-checkin__tick {
    stroke-dashoffset: 0;
  }

  .mg-gift__x {
    transform: translateX(180px);
  }
}

@media (forced-colors: active) {
  .city-switch::before {
    display: none;
  }

  #city-spb:checked ~ .city-switch [for="city-spb"],
  #city-msk:checked ~ .city-switch [for="city-msk"] {
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }
}

@media print {
  [data-reveal][data-state="waiting"],
  [data-reveal][data-state="waiting"] * {
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    clip-path: none !important;
  }
}
