:root {
  --yellow: #ffd500;
  --ink: #333340;
  --navy: #25233f;
  --vh: 1vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--yellow);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body.is-modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.welcome {
  position: relative;
  min-height: 100vh;
  min-height: calc(var(--vh) * 100);
  display: grid;
  place-items: center;
  background: var(--yellow);
  overflow: hidden;
}

.magic-stage {
  position: relative;
  width: min(100vw, calc(var(--vh) * 100 * 4 / 3));
  height: min(calc(var(--vh) * 100), 75vw);
  aspect-ratio: 4 / 3;
}

.magic-stage__art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
}

.main-text {
  position: absolute;
  z-index: 2;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-style: normal;
  font-weight: 900;
  line-height: 1.22;
}

.main-text--locations {
  left: 1.5%;
  bottom: 3.8%;
  display: grid;
  gap: 0.25em;
  padding-left: 2%;
  font-size: clamp(0.72rem, 1.9vw, 1.45rem);
}

.main-text--locations::before {
  content: "";
  position: absolute;
  left: 0;
  top: -0.04em;
  width: 0.8em;
  height: 0.8em;
  border: 0.12em solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.main-text--contacts {
  right: 1.8%;
  bottom: 3.8%;
  display: grid;
  gap: 0.18em;
  font-size: clamp(0.72rem, 1.9vw, 1.45rem);
  text-align: right;
}

.main-text--contacts a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.main-text--contacts a:hover,
.main-text--contacts a:focus-visible {
  text-decoration: underline;
}

.main-text--contacts a::before {
  display: inline-block;
  min-width: 1.1em;
  margin-right: 0.12em;
  text-align: center;
}

.main-text--contacts a:nth-child(1)::before {
  content: "tel";
  font-size: 0.72em;
  text-transform: uppercase;
}

.main-text--contacts a:nth-child(2)::before {
  content: "ig";
  font-size: 0.72em;
  text-transform: uppercase;
}

.main-text--contacts a:nth-child(3)::before {
  content: "f";
}

.partners-button {
  position: absolute;
  left: 50%;
  bottom: 2.8%;
  z-index: 2;
  min-width: 150px;
  min-height: 46px;
  padding: 10px 24px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(37, 35, 63, 0.9);
  box-shadow: 0 12px 28px rgba(37, 35, 63, 0.24);
  color: #ffffff;
  cursor: pointer;
  font: 900 1rem / 1 Arial, Helvetica, sans-serif;
  transform: translateX(-50%);
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.partners-button:hover,
.partners-button:focus-visible {
  background: var(--navy);
  box-shadow: 0 16px 34px rgba(37, 35, 63, 0.32);
  transform: translate(-50%, -2px);
}

.partners-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 20, 35, 0.68);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: calc(var(--vh) * 92);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(22, 20, 35, 0.36);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid #eeeeee;
}

.modal__title {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.1;
}

.modal__close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--navy);
  cursor: pointer;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.modal__close:hover,
.modal__close:focus-visible {
  background: #f2c600;
}

.modal__close:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.modal__image {
  display: block;
  width: 100%;
  max-height: calc(var(--vh) * 92 - 56px);
  object-fit: contain;
  background: #ffffff;
}

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

@media (max-width: 700px) {
  .welcome {
    min-height: calc(var(--vh) * 100);
    display: block;
    overflow: hidden;
  }

  .magic-stage {
    width: 100%;
    height: calc(var(--vh) * 100);
    min-height: 560px;
    display: block;
    aspect-ratio: auto;
    overflow: hidden;
  }

  .magic-stage__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center center;
  }

  .main-text {
    position: absolute;
    color: var(--navy);
    font-size: clamp(0.68rem, 2.85vw, 0.86rem);
    line-height: 1.15;
  }

  .main-text--locations {
    left: 14px;
    right: 14px;
    bottom: 124px;
    width: auto;
    display: grid;
    gap: 3px;
    padding: 8px 10px 8px 32px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background: rgba(255, 213, 0, 0.92);
    box-shadow: 0 12px 28px rgba(37, 35, 63, 0.18);
  }

  .main-text--locations::before {
    left: 13px;
    top: 11px;
    width: 11px;
    height: 11px;
    border-width: 2px;
  }

  .main-text--contacts {
    left: 14px;
    right: 14px;
    bottom: 66px;
    width: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 8px 10px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background: rgba(255, 213, 0, 0.92);
    box-shadow: 0 12px 28px rgba(37, 35, 63, 0.18);
    text-align: left;
  }

  .main-text--contacts a {
    min-height: 22px;
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
  }

  .main-text--contacts a:first-child {
    grid-column: 1 / -1;
  }

  .main-text--contacts a::before {
    min-width: 22px;
    margin-right: 5px;
    padding: 2px 3px;
    border: 1.5px solid currentColor;
    border-radius: 5px;
    line-height: 1;
  }

  .main-text--contacts a:nth-child(3)::before {
    font-size: 0.92em;
    font-weight: 900;
    text-transform: uppercase;
  }

  .partners-button {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 9px 18px;
    transform: none;
  }

  .partners-button:hover,
  .partners-button:focus-visible {
    transform: translateY(-2px);
  }

  .modal {
    padding: 12px;
  }

  .modal__panel {
    width: 100%;
    max-height: calc(var(--vh) * 94);
  }

  .modal__image {
    max-height: calc(var(--vh) * 94 - 56px);
  }
}

@media (max-width: 360px) {
  .main-text {
    font-size: 0.66rem;
  }

  .main-text--locations {
    bottom: 132px;
  }

  .main-text--contacts {
    bottom: 62px;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .main-text--contacts a {
    min-height: 18px;
  }

  .partners-button {
    min-height: 38px;
  }
}
