@font-face {
  font-family: Manrope;
  src: url('./assets/manrope.d3d85ded78.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Golos Text';
  src: url('./assets/golos.9a12d6556b.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --black: #000;
  --ink: #f4ede2;
  --muted: #beb6ab;
  --red: #8f4450;
  --rose: #c9949c;
  --rule: #3a332b;
  --inset: 5%;
  --display: 88px;
  --heading-gap: 26px;
  --description-gap: 36px;
  --button-gap: 32px;
  --header-clearance: 130px;
  --hero-lift: 48px;
  --movie-gap: 16px;
  --action-h: 64px;
  --film-fade: 360ms;
  color-scheme: dark;
  font-family: 'Golos Text', Arial, sans-serif;
  color: var(--ink);
  background: var(--black);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, p { margin: 0; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 5px;
}

[hidden] { display: none !important; }

.stage {
  --sound-bottom: max(12px, env(safe-area-inset-bottom));
  --sound-size: calc(40px * var(--sound-scale, 1));
  --sound-hit-size: calc(44px * var(--sound-scale, 1));
  --sound-inset: calc(20px * var(--sound-scale, 1));
  --sound-stack-size: var(--sound-hit-size);
  --footer-clearance: calc(var(--sound-bottom) + var(--sound-stack-size) + 44px);
  --footer-space: max(56px, calc(var(--footer-clearance) - var(--hero-lift)));
  position: relative;
  display: grid;
  grid-template-rows: minmax(var(--header-clearance), 1fr) auto minmax(var(--footer-space), 1fr) var(--hero-lift);
  min-block-size: max(600px, 100svh);
  container-type: inline-size;
  isolation: isolate;
  transition: opacity 240ms ease;
}

.stage.is-reloading { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .stage:not(.is-reloading) { animation: page-appear 240ms ease-out; }
  @keyframes page-appear { from { opacity: 0; } to { opacity: 1; } }
}

.film {
  position: absolute;
  inset: calc(100px + var(--movie-gap)) 0 max(96px, 10svh);
  overflow: hidden;
  background: var(--black);
  pointer-events: none;
}

.film video {
  display: block;
  visibility: hidden;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  object-position: center top;
}

.is-film-active .film video { visibility: visible; }

.site-header {
  --header-row-height: 88px;
  --search-side: 160px;
  position: absolute;
  z-index: 3;
  inset: 0 var(--inset) auto;
  padding-block: 6px 5px;
  border-block-end: 1px solid var(--rule);
}

.header-row {
  min-block-size: var(--header-row-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.header-panel { display: contents; }

.wordmark {
  position: absolute;
  z-index: 2;
  inset-block-start: 6px;
  inset-inline-start: 0;
  display: inline-flex;
  align-items: center;
  block-size: var(--header-row-height);
}

.wordmark img {
  display: block;
  inline-size: 123.117px;
  block-size: auto;
  translate: 0 -.5px;
}

.navigation, .header-actions {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.08333vw, 40px);
  font-size: 17px;
  line-height: 1.25;
  white-space: nowrap;
}

.navigation a, .utility {
  min-block-size: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
}

.navigation { grid-column: 2; }
.header-actions { grid-column: 3; justify-self: end; gap: clamp(12px, 1.46vw, 28px); }

.utility {
  padding: 0;
  gap: 9px;
  border: 0;
  background: transparent;
  font-weight: 500;
}

.navigation a, .utility { transition: color 160ms ease; }

@media (hover: hover) {
  .navigation a:hover, .utility:hover { color: var(--red); }
}

.menu-toggle { display: none; }

.site-search {
  min-block-size: var(--header-row-height);
  display: grid;
  grid-template-columns: minmax(var(--search-side), 1fr) minmax(0, 416px) minmax(var(--search-side), 1fr);
  align-items: center;
  gap: 12px;
}

.search-field {
  grid-column: 2;
  display: flex;
  align-items: center;
  min-block-size: 48px;
  padding-inline-start: 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.search-field:focus-within { border-color: var(--rose); }

.site-search input {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
}

.site-search input::placeholder { color: var(--muted); }

.search-submit {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.search-close {
  grid-column: 3;
  justify-self: end;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 48px;
  padding: 0;
  border: 0;
  background: transparent;
}

.search-close span {
  grid-area: 1 / 1;
  inline-size: 19px;
  block-size: 1.5px;
  background: currentColor;
}

.search-close span:first-child { rotate: 45deg; }
.search-close span:last-child { rotate: -45deg; }

#main-content {
  grid-row: 2;
  padding-inline: var(--inset);
}

.hero {
  display: grid;
  justify-items: center;
  gap: var(--button-gap);
  text-align: center;
}

.announcement { position: relative; min-inline-size: 0; }

.error-code {
  margin-block-end: var(--heading-gap);
  color: var(--rose);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .2em;
}

h1 {
  font: 400 var(--display) / 1.01 Manrope, Arial, sans-serif;
  letter-spacing: -.032em;
  text-wrap: balance;
}

h1 span { display: block; }

.error-message {
  max-inline-size: 880px;
  margin: var(--description-gap) auto 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.35;
  text-wrap: pretty;
}

.home-action {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: min(304px, 100%);
  min-block-size: var(--action-h);
  padding: 11px 10px 13px;
  border-radius: 2px;
  background: var(--red);
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  transition: background-color 160ms ease;
}

@media (hover: hover) {
  .home-action:hover { background: #a34b61; }
}

[data-film-content] { transition: opacity var(--film-fade) ease; }
[data-film-hidden] { visibility: hidden; opacity: 0; pointer-events: none; }

.site-footer {
  position: absolute;
  z-index: 1;
  inset-inline: 0;
  inset-block-end: calc(var(--sound-bottom) + var(--sound-stack-size) + 12px);
  padding-inline: var(--inset);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
}

.sound-toggle {
  position: absolute;
  z-index: 2;
  inset-inline-end: var(--sound-inset);
  inset-block-end: var(--sound-inset);
  display: grid;
  place-items: end;
  inline-size: var(--sound-hit-size);
  block-size: var(--sound-hit-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #000;
}

.stage.is-compact-embed { --sound-stack-size: 0px; }

.sound-toggle__face {
  display: grid;
  place-items: center;
  inline-size: var(--sound-size);
  block-size: var(--sound-size);
  border-radius: inherit;
  background: #fff;
  transition: transform 300ms ease;
}

.sound-toggle[aria-pressed="true"] { color: #fff; }

.sound-toggle[aria-pressed="true"] .sound-toggle__face {
  background: #000;
  box-shadow: inset 0 0 0 calc(1px * var(--sound-scale, 1)) rgb(255 255 255 / 75%);
}

.sound-toggle svg {
  inline-size: 40%;
  block-size: auto;
}

.sound-toggle__waves,
.sound-toggle__mute {
  transition: opacity 300ms ease;
}

.sound-toggle__waves,
.sound-toggle[aria-pressed="true"] .sound-toggle__mute { opacity: 0; }
.sound-toggle[aria-pressed="true"] .sound-toggle__waves { opacity: 1; }

@media (hover: hover) {
  .sound-toggle:not([aria-pressed="true"]):hover .sound-toggle__face { background: #eee; }
}

@media (prefers-reduced-motion: no-preference) {
  .sound-toggle:not([hidden]) { animation: sound-appear 240ms ease-out both; }
  .sound-toggle:active .sound-toggle__face { transform: scale(.7); }
  @keyframes sound-appear { from { opacity: 0; } to { opacity: 1; } }
}

@media (min-width: 1440px) {
  :root { --display: 104px; --heading-gap: 30px; }
}

@media (min-width: 1680px) {
  :root {
    --display: 124px;
    --heading-gap: 34px;
    --description-gap: 40px;
    --button-gap: 59px;
    --hero-lift: 74px;
  }
}

@media (max-width: 1180px) {
  :root { --display: 72px; --header-clearance: 98px; }
  .site-header { --header-row-height: 68px; }
  .header-row { grid-template-columns: 1fr auto; }

  .menu-toggle {
    position: relative;
    grid-column: 2;
    z-index: 2;
    inline-size: 48px;
    block-size: 48px;
    display: grid;
    place-content: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .menu-toggle span {
    display: block;
    inline-size: 24px;
    block-size: 1.5px;
    background: var(--ink);
    transition: transform 180ms ease;
  }

  .menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

  .header-panel {
    display: none;
    position: fixed;
    inset: 0;
    overflow: auto;
    padding: 96px var(--inset) 32px;
    background: var(--black);
  }

  .menu-open { overflow: hidden; }
  .menu-open .header-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .navigation {
    display: grid;
    gap: 2px;
    border-block: 1px solid var(--rule);
    padding-block: 11px;
  }

  .navigation a { font-size: 20px; min-block-size: 48px; }
  .header-actions { justify-self: auto; gap: 26px; margin-block-start: 16px; }
  .site-search { gap: 8px; }
}

@media (max-width: 820px) {
  :root { --display: 56px; --heading-gap: 24px; --description-gap: 30px; --button-gap: 28px; }
  .error-message { max-inline-size: 650px; font-size: 18px; }
}

@media (max-width: 610px) {
  :root { --display: 44px; --heading-gap: 22px; --description-gap: 24px; --button-gap: 24px; }
  .site-header { --search-side: 78px; }
  .site-header:has(.site-search:not([hidden])) .wordmark img { inline-size: 57.6px; }
  .search-field { padding-inline-start: 8px; }
}

@media (max-width: 430px) {
  :root { --display: 36px; --inset: 6%; }
  .error-message { font-size: 17px; }
}

@media (max-width: 350px) {
  :root { --display: 32px; }
}

@media (max-height: 760px) and (min-width: 821px) {
  :root { --display: 72px; --heading-gap: 20px; --hero-lift: 32px; }
}

@media (max-width: 1180px), (pointer: coarse) {
  .stage {
    --movie-height: min(56.25cqi, max(96px, calc(100svh - 272px)));
    --footer-space: max(var(--footer-clearance), calc((100svh - var(--movie-height)) / 2 - var(--movie-gap) - var(--action-h)));
    grid-template-rows: minmax(var(--header-clearance), 1fr) auto var(--footer-space) 0;
    min-block-size: 100svh;
  }

  .film { inset: 0; }

  .film video {
    position: absolute;
    inset: 50svh auto auto 50%;
    inline-size: auto;
    block-size: var(--movie-height);
    aspect-ratio: 16 / 9;
    object-fit: contain;
    translate: -50% -50%;
  }

  @media (max-height: 500px) {
    .stage { --display: 32px; --heading-gap: 12px; --description-gap: 16px; --button-gap: 16px; --header-clearance: 92px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
