@font-face {
  font-family: "Super Bouncer";
  src: url("../fonts/Super_Bouncer.ttf") format("truetype");
  font-display: swap;
}

:root {
  --plate: #41061f;
  --ink: #6d0432;
  --hot: #ff5a9d;
  --page: #6d0432;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Общая верхняя надпись */
.top {
  position: absolute;
  top: clamp(18px, 3.4vh, 38px);
  left: 50%;
  display: grid;
  width: min(96vw, 1600px);
  height: clamp(118px, 16vh, 174px);
  place-items: center;
  padding: 12px clamp(22px, 3vw, 48px);
  transform: translateX(-50%);
  border: clamp(6px, 0.65vw, 11px) solid #000;
  border-radius: 999px;
  background: var(--plate);
}

.top h1 {
  width: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "Super Bouncer", system-ui, sans-serif;
  font-size: clamp(48px, 5.5vw, 112px);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* Главная страница: ссылки */
.links {
  position: absolute;
  top: clamp(245px, 34vh, 365px);
  left: clamp(24px, 10.5vw, 202px);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3.5vh, 38px);
}

.plate {
  position: relative;
  display: flex;
  width: clamp(300px, 28.2vw, 540px);
  height: clamp(72px, 8.6vh, 96px);
  align-items: center;
  border: clamp(6px, 0.65vw, 11px) solid #000;
  border-radius: 999px;
  background: var(--plate);
  color: var(--ink);
  font-family: "Super Bouncer", system-ui, sans-serif;
  font-size: clamp(38px, 4vw, 76px);
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.plate img {
  position: absolute;
  left: clamp(12px, 1.15vw, 22px);
  width: clamp(28px, 2.7vw, 50px);
  height: clamp(28px, 2.7vw, 50px);
}

.plate span {
  flex: 1;
  padding: 0 14px 0 clamp(46px, 3.6vw, 60px);
  text-align: center;
}

.plate:hover,
.plate:focus-visible {
  background: #5a0a2c;
  color: var(--hot);
  animation: bounce 0.65s cubic-bezier(0.3, 0.7, 0.4, 1);
}

.plate:focus-visible {
  outline: 3px solid var(--hot);
  outline-offset: 4px;
}

@keyframes bounce {
  0% { transform: none; }
  25% { transform: translateY(-8px) scale(0.98, 1.04); }
  50% { transform: translateY(0) scale(1.03, 0.95); }
  70% { transform: translateY(-3px) scale(0.99, 1.02); }
  100% { transform: none; }
}

.mi {
  position: absolute;
  right: clamp(24px, 4.7vw, 90px);
  bottom: 0;
  width: min(35vw, 660px);
  max-height: 76vh;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  user-select: none;
}

.legal {
  position: absolute;
  bottom: clamp(12px, 1.5vh, 16px);
  left: clamp(24px, 7.14vw, 137px);
  z-index: 1;
  max-width: min(55vw, 940px);
  color: rgba(255, 205, 225, 0.82);
  font-size: clamp(12px, 0.73vw, 14px);
  line-height: 1.4;
}

.legal p {
  margin: 0;
}

/* Белая ссылка «Информация» во всех состояниях */
.legal-link,
.legal-link:link,
.legal-link:visited,
.legal-link:hover,
.legal-link:active,
.legal-link:focus,
.legal-link:focus-visible {
  color: #fff;
  text-decoration: none;
}

.legal-link:hover,
.legal-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Страница информации */
.info-page {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: clamp(20px, 3.4vh, 38px) 24px 22px;
  overflow-x: hidden;
}

.info-page .top {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: min(96vw, 1600px);
  height: clamp(118px, 16vh, 174px);
  margin: 0 auto;
  transform: none;
}

.info-page .top h1 {
  font-size: clamp(48px, 5.5vw, 112px);
  line-height: 1;
  white-space: nowrap;
}

.info-content {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  margin: clamp(34px, 5vh, 54px) auto 28px;
  padding: clamp(30px, 3.8vw, 52px);
  border: 4px solid #000;
  border-radius: 28px;
  background: rgba(65, 6, 31, 0.96);
  color: #fff;
  font: 400 clamp(17px, 1.15vw, 19px)/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
}

.info-content h2 {
  margin: 0 0 24px;
  color: #fff;
  font: 400 clamp(36px, 3vw, 48px)/1.15 "Super Bouncer", system-ui, sans-serif;
  text-align: center;
}

.info-content p {
  width: 100%;
  max-width: 68ch;
  min-width: 0;
  margin: 0 auto 26px;
  overflow-wrap: anywhere;
}

.info-content p:last-child {
  margin-bottom: 0;
}

.info-page a,
.info-page a:link,
.info-page a:visited,
.info-page a:hover,
.info-page a:active,
.info-page a:focus,
.info-page a:focus-visible {
  color: #fff !important;
}

.info-page .back-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.9);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

.info-page .back-link:hover,
.info-page .back-link:focus-visible {
  text-decoration-thickness: 2px;
}

.info-page .legal {
  position: static;
  width: min(920px, 100%);
  max-width: none;
  margin: auto auto 0;
  padding: 12px 0 0;
  text-align: center;
}

/* Страница 404 */
.not-found-page {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #000;
}

.error-page {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #000;
  color: #fff;
  text-align: center;
}

.error-code {
  margin: 0 0 clamp(20px, 4vh, 36px);
  color: #fff;
  font: 400 clamp(110px, 18vw, 230px)/1 "Super Bouncer", system-ui, sans-serif;
}

.error-message {
  max-width: 40ch;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 2.2vw, 28px);
  line-height: 1.45;
}

.back-btn,
.back-btn:link,
.back-btn:visited {
  display: inline-block;
  max-width: 100%;
  padding: 14px 34px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: clamp(20px, 2vw, 28px)/1.2 "Super Bouncer", system-ui, sans-serif;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.back-btn:hover,
.back-btn:focus-visible {
  background: #fff;
  color: #000;
}

/* Телефоны и узкие экраны */
@media (max-width: 900px), (max-aspect-ratio: 1 / 1) {
  .home-page {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    padding: 14px 14px 0;
  }

  .home-page .top {
    position: static;
    width: 100%;
    height: auto;
    min-height: 90px;
    padding: 12px 10px;
    transform: none;
    border-width: 7px;
  }

  .home-page .top h1 {
    font-size: clamp(30px, 8.5vw, 49px);
    white-space: nowrap;
  }

  .home-page .links {
    position: static;
    width: 100%;
    align-items: center;
    gap: clamp(14px, 4vw, 19px);
    margin-top: 26px;
  }

  .home-page .plate {
    width: min(90vw, 460px);
    height: clamp(64px, 16.5vw, 82px);
    border-width: clamp(6px, 1.6vw, 9px);
    font-size: clamp(33px, 8.5vw, 49px);
  }

  .home-page .plate img {
    left: clamp(14px, 3.6vw, 21px);
    width: clamp(29px, 7.4vw, 42px);
    height: clamp(29px, 7.4vw, 42px);
  }

  .home-page .plate span {
    padding: 0 10px 0 clamp(44px, 10vw, 56px);
  }

  .home-page .mi {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(84vw, 440px);
    max-height: none;
    align-self: flex-end;
    margin: 22px -14px 0 auto;
  }

  .home-page .legal {
    position: static;
    width: calc(100% + 28px);
    max-width: none;
    margin: auto -14px 0;
    padding: 14px 16px;
    background: rgba(65, 6, 31, 0.94);
    font-size: clamp(12px, 3.3vw, 14px);
    text-align: center;
  }

  .info-page {
    min-height: 100vh;
    min-height: 100svh;
    padding: 14px 14px 18px;
  }

  .info-page .top {
    width: 100%;
    height: auto;
    min-height: 90px;
    padding: 12px 10px;
    border-width: 7px;
  }

  .info-page .top h1 {
    font-size: clamp(30px, 8.5vw, 49px);
    white-space: nowrap;
  }

  .info-content {
    width: 100%;
    margin: 26px auto 20px;
    padding: 24px 22px;
    border-width: 4px;
    border-radius: 24px;
    font-size: 16.5px;
    line-height: 1.6;
  }

  .info-content h2 {
    margin-bottom: 18px;
    font-size: clamp(34px, 8.5vw, 42px);
  }

  .info-content p {
    max-width: 100%;
    margin-bottom: 22px;
  }

  .info-page .legal {
    width: 100%;
    margin: auto 0 0;
    padding: 12px 0 0;
    background: none;
    font-size: 12px;
  }

  .error-page {
    padding: 20px;
  }

  .error-code {
    font-size: clamp(110px, 28vw, 220px);
  }

  .error-message {
    font-size: clamp(17px, 5vw, 24px);
  }

  .back-btn {
    padding: 13px 25px;
  }
}

@media (max-width: 360px) {
  .home-page .top h1,
  .info-page .top h1 {
    font-size: 27px;
  }

  .home-page .plate {
    font-size: 29px;
  }

  .info-content {
    padding: 20px 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
