@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Montserrat:wght@400;500;600&display=swap");

:root {
  --blue: #28c8ff;
  --blue-soft: rgba(40, 200, 255, 0.42);
  --gold: #b88a49;
  --mx: 0px;
  --my: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #02070b;
}

body {
  color: #eef7fb;
  font-family: "Montserrat", system-ui, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.hero {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  isolation: isolate;
  overflow: hidden;
  background: #02070b;
}

.backdrop,
.artwork,
.vignette,
.fog,
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  inset: -4%;
  z-index: -6;
  background:
    linear-gradient(rgba(0, 8, 13, 0.3), rgba(0, 4, 8, 0.58)),
    url("assets/stb-online.png") center 42% / cover no-repeat;
  filter: blur(18px) saturate(0.7);
  transform: scale(1.09);
}

.artwork {
  z-index: -5;
  width: min(100vh, 100vw);
  left: 50%;
  right: auto;
  background: url("assets/stb-online.png") center / contain no-repeat;
  transform: translate3d(calc(-50% + var(--mx)), var(--my), 0) scale(1.015);
  filter: saturate(0.92) contrast(1.04);
  transition: transform 1.1s cubic-bezier(0.2, 0.7, 0, 1);
}

.artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 55px 0 80px -65px #02070b, inset -55px 0 80px -65px #02070b;
}

.vignette {
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(0, 5, 9, 0.7) 0%, transparent 17%, transparent 66%, rgba(0, 4, 8, 0.9) 100%),
    radial-gradient(circle at 50% 43%, transparent 32%, rgba(0, 4, 8, 0.34) 72%, rgba(0, 3, 6, 0.9) 115%);
}

.fog {
  z-index: -2;
  opacity: 0.22;
  filter: blur(28px);
  mix-blend-mode: screen;
}

.fog--one {
  background: radial-gradient(ellipse at 20% 62%, rgba(76, 130, 148, 0.48), transparent 46%);
  animation: drift-one 13s ease-in-out infinite alternate;
}

.fog--two {
  background: radial-gradient(ellipse at 80% 53%, rgba(30, 109, 138, 0.4), transparent 43%);
  animation: drift-two 17s ease-in-out infinite alternate;
}

.topbar {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: max(24px, env(safe-area-inset-top)) clamp(22px, 4vw, 64px) 0;
}

.domain {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: rgba(226, 239, 245, 0.76);
  font-family: "Cinzel", Georgia, serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-decoration: none;
  text-shadow: 0 2px 10px #000;
  transition: color 180ms ease;
}

.domain:hover {
  color: #fff;
}

.domain__mark {
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  box-shadow: 0 0 10px rgba(184, 138, 73, 0.5);
  transform: rotate(45deg);
}

.controls {
  display: flex;
  gap: clamp(14px, 2.2vw, 30px);
  align-items: center;
}

.sound,
.fullscreen {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  color: rgba(226, 239, 245, 0.72);
  background: transparent;
  font: 600 9px/1 "Montserrat", sans-serif;
  letter-spacing: 0.18em;
  cursor: pointer;
}

.fullscreen__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(40, 200, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(40, 200, 255, 0.12);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.fullscreen__icon::before,
.fullscreen__icon::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-color: var(--blue);
  filter: drop-shadow(0 0 3px rgba(40, 200, 255, 0.65));
}

.fullscreen__icon::before {
  border-top: 1px solid;
  border-left: 1px solid;
}

.fullscreen__icon::after {
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.fullscreen.is-active .fullscreen__icon::before {
  inset: 5px 5px 10px 10px;
  border-top: 0;
  border-left: 0;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.fullscreen.is-active .fullscreen__icon::after {
  inset: 10px 10px 5px 5px;
  border-right: 0;
  border-bottom: 0;
  border-top: 1px solid;
  border-left: 1px solid;
}

.fullscreen:hover,
.sound:hover {
  color: rgba(255, 255, 255, 0.95);
}

.fullscreen:hover .fullscreen__icon,
.sound:hover .sound__bars {
  border-color: rgba(40, 200, 255, 0.72);
  box-shadow: 0 0 18px rgba(40, 200, 255, 0.26);
}

.sound__bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(40, 200, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(40, 200, 255, 0.12);
}

.sound__bars i {
  display: block;
  width: 1px;
  height: 3px;
  background: var(--blue);
  box-shadow: 0 0 5px var(--blue);
}

.sound.is-playing .sound__bars i {
  animation: equalizer 700ms ease-in-out infinite alternate;
}

.sound.is-playing .sound__bars i:nth-child(2) {
  animation-delay: -250ms;
}

.sound.is-playing .sound__bars i:nth-child(3) {
  animation-delay: -500ms;
}

.sound.is-playing .sound__bars i:nth-child(4) {
  animation-delay: -120ms;
}

.announcement {
  position: absolute;
  z-index: 3;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: minmax(36px, 9vw) auto minmax(36px, 9vw);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: clamp(16px, 2.5vw, 38px);
  width: min(900px, calc(100% - 42px));
  text-align: center;
  transform: translateX(-50%);
  animation: reveal 1.4s 250ms both cubic-bezier(0.2, 0.8, 0.2, 1);
}

.announcement__line {
  grid-row: 2;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 73, 0.6));
}

.announcement__line--right {
  background: linear-gradient(90deg, rgba(184, 138, 73, 0.6), transparent);
}

.eyebrow,
.tagline {
  grid-column: 1 / -1;
  margin: 0;
}

.visits {
  grid-column: 1 / -1;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 0;
  color: rgba(218, 230, 235, 0.42);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.visits__value {
  min-width: 28px;
  color: rgba(146, 230, 255, 0.82);
  font-family: "Cinzel", Georgia, serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(40, 200, 255, 0.35);
}

.eyebrow {
  margin-bottom: 3px;
  color: rgba(211, 192, 157, 0.8);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(8px, 0.72vw, 11px);
  font-weight: 600;
  letter-spacing: 0.34em;
}

h1 {
  grid-column: 2;
  grid-row: 2;
  margin: 3px 0;
  color: #eff7fa;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(24px, 3.1vw, 48px);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 3px 24px #000, 0 0 30px rgba(40, 200, 255, 0.1);
}

h1 span {
  color: #92e6ff;
  text-shadow: 0 0 17px rgba(40, 200, 255, 0.68), 0 3px 24px #000;
}

.tagline {
  margin-top: 5px;
  color: rgba(218, 230, 235, 0.6);
  font-size: clamp(8px, 0.65vw, 10px);
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hint {
  position: absolute;
  z-index: 3;
  bottom: 50%;
  left: clamp(16px, 2vw, 30px);
  margin: 0;
  color: rgba(216, 234, 241, 0.26);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.24em;
  writing-mode: vertical-rl;
  transform: translateY(50%) rotate(180deg);
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #5edaff;
  box-shadow: 0 0 7px #28c8ff;
  opacity: 0;
  animation: rise var(--duration) var(--delay) linear infinite;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  padding: 30px;
  color: white;
  background: #02070b;
  font-family: Georgia, serif;
  text-align: center;
}

.install-guide[hidden] {
  display: none;
}

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

.install-guide__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 5, 9, 0.82);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.install-guide__panel {
  position: relative;
  width: min(430px, 100%);
  padding: 38px 30px 28px;
  overflow: hidden;
  border: 1px solid rgba(184, 138, 73, 0.42);
  background:
    radial-gradient(circle at 50% 0, rgba(40, 200, 255, 0.11), transparent 42%),
    linear-gradient(145deg, rgba(8, 21, 29, 0.98), rgba(2, 8, 13, 0.99));
  box-shadow: 0 25px 90px #000, inset 0 0 45px rgba(40, 200, 255, 0.04);
  text-align: center;
  animation: guide-in 320ms ease-out both;
}

.install-guide__close {
  position: absolute;
  top: 9px;
  right: 11px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  color: rgba(226, 239, 245, 0.55);
  background: transparent;
  font: 300 25px/1 sans-serif;
  cursor: pointer;
}

.install-guide__diamond {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 18px;
  border: 1px solid var(--gold);
  box-shadow: 0 0 14px rgba(184, 138, 73, 0.52);
  transform: rotate(45deg);
}

.install-guide__eyebrow {
  margin: 0 0 8px;
  color: rgba(146, 230, 255, 0.72);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.install-guide h2 {
  margin: 0;
  color: #edf6f9;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.install-guide__intro {
  margin: 14px auto 21px;
  color: rgba(218, 230, 235, 0.62);
  font-size: 11px;
  line-height: 1.7;
}

.install-guide__steps {
  margin: 0;
  padding: 0;
  counter-reset: steps;
  list-style: none;
  text-align: left;
}

.install-guide__steps li {
  position: relative;
  min-height: 35px;
  padding: 7px 0 7px 43px;
  color: rgba(232, 241, 245, 0.72);
  font-size: 11px;
  line-height: 1.55;
  counter-increment: steps;
}

.install-guide__steps li::before {
  content: counter(steps);
  position: absolute;
  top: 5px;
  left: 0;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(40, 200, 255, 0.32);
  border-radius: 50%;
  color: #92e6ff;
  font-family: "Cinzel", Georgia, serif;
  font-size: 10px;
  box-shadow: 0 0 12px rgba(40, 200, 255, 0.1);
}

.share-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 3px;
  border: 1px solid rgba(146, 230, 255, 0.72);
  border-top: 0;
  vertical-align: -2px;
}

.share-icon::before {
  content: "↑";
  position: absolute;
  top: -10px;
  left: 2px;
  color: #92e6ff;
  font-size: 15px;
}

.install-guide__ok {
  width: 100%;
  min-height: 43px;
  margin-top: 22px;
  border: 1px solid rgba(40, 200, 255, 0.4);
  color: #bfeeff;
  background: rgba(40, 200, 255, 0.06);
  font: 600 9px/1 "Montserrat", sans-serif;
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.install-guide__ok:hover {
  background: rgba(40, 200, 255, 0.12);
  box-shadow: 0 0 22px rgba(40, 200, 255, 0.1);
}

@keyframes equalizer {
  from { height: 3px; }
  to { height: 10px; }
}

@keyframes reveal {
  from { opacity: 0; transform: translate(-50%, 18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes drift-one {
  from { transform: translate3d(-5%, 2%, 0) scale(1); }
  to { transform: translate3d(8%, -3%, 0) scale(1.2); }
}

@keyframes drift-two {
  from { transform: translate3d(7%, -2%, 0) scale(1.1); }
  to { transform: translate3d(-6%, 4%, 0) scale(0.95); }
}

@keyframes rise {
  0% { opacity: 0; transform: translate3d(0, 15px, 0) scale(0.5); }
  18% { opacity: 0.7; }
  80% { opacity: 0.2; }
  100% { opacity: 0; transform: translate3d(var(--drift), -33vh, 0) scale(1.4); }
}

@keyframes guide-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-aspect-ratio: 4 / 5) {
  .artwork {
    width: min(155vw, 100vh);
    max-width: none;
  }

  .backdrop {
    opacity: 0.5;
  }

  .vignette {
    background:
      linear-gradient(180deg, rgba(0, 5, 9, 0.7) 0%, transparent 22%, transparent 63%, rgba(0, 4, 8, 0.94) 100%),
      radial-gradient(circle at 50% 43%, transparent 18%, rgba(0, 4, 8, 0.26) 70%);
  }

  .topbar {
    padding-inline: 20px;
  }

  .domain {
    font-size: 9px;
  }

  .sound__label,
  .fullscreen__label,
  .hint {
    display: none;
  }

  .announcement {
    bottom: max(24px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    column-gap: 10px;
  }

  .eyebrow {
    letter-spacing: 0.22em;
  }

  h1 {
    font-size: clamp(22px, 8vw, 38px);
    letter-spacing: 0.09em;
  }

  .tagline {
    max-width: 300px;
    margin-inline: auto;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .artwork,
  .fog,
  .particle,
  .announcement {
    animation: none !important;
    transition: none !important;
  }
}
