@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #001c2a;
  --navy: #003a52;
  --blue: #0089c6;
  --blue-dark: #00658f;
  --blue-deep: #005f8a;
  --sky: #5ec8f2;
  --cyan: #8fdcff;
  --pale: #d9f6ff;
  --paper: #f4fbff;
  --night: #02131b;
  --green: #39ff9e;
  --pixel: "Press Start 2P", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--pixel);
  font-size: 11px;
  font-weight: 400;
  line-height: 2;
  -webkit-font-smoothing: none;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-deep);
}

::selection {
  color: #fff;
  background: var(--blue);
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--pixel);
  font-size: 9px;
  line-height: 1.6;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* ------------------------------------------------------------------ */
/* Background: unchanged :3 mosaic + RGB strips                        */
/* ------------------------------------------------------------------ */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--night);
}

.scene__mosaic {
  position: absolute;
  inset: -80px;
  background-image: url("../img/mosaic.svg");
  background-repeat: repeat;
  background-size: 640px 640px;
  opacity: 0.88;
  animation: mosaic-drift 240s linear infinite;
  will-change: background-position;
}

.scene__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 50% 38%,
      rgba(2, 19, 27, 0) 0%,
      rgba(2, 19, 27, 0) 38%,
      rgba(2, 19, 27, 0.5) 78%,
      rgba(2, 19, 27, 0.72) 100%
    ),
    radial-gradient(ellipse at 50% 6%, rgba(94, 200, 242, 0.22), transparent 56%),
    linear-gradient(
      180deg,
      rgba(2, 19, 27, 0.46) 0%,
      rgba(2, 19, 27, 0.58) 42%,
      rgba(2, 19, 27, 0.82) 100%
    );
}

.scene__veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.16) 0,
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.35;
}

@keyframes mosaic-drift {
  to {
    background-position: 640px 640px;
  }
}

.rgb-strip {
  position: fixed;
  right: 0;
  left: 0;
  z-index: 40;
  height: 8px;
  overflow: hidden;
  pointer-events: none;
  background: var(--night);
  box-shadow:
    0 0 10px rgba(0, 229, 255, 0.5),
    0 0 22px rgba(255, 45, 85, 0.24);
}

.rgb-strip::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(100% + 140px);
  background-image: repeating-linear-gradient(
    90deg,
    #ff2d55 0 20px,
    #ff9f0a 20px 40px,
    #ffe600 40px 60px,
    #2dff85 60px 80px,
    #00e5ff 80px 100px,
    #4b6bff 100px 120px,
    #c04bff 120px 140px
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: rgb-slide 2.4s linear infinite;
  will-change: transform;
}

.rgb-strip--top {
  top: 0;
}

.rgb-strip--bottom {
  bottom: 0;
}

.rgb-strip--bottom::before {
  animation-direction: reverse;
}

@keyframes rgb-slide {
  to {
    transform: translate3d(-140px, 0, 0);
  }
}

/* ------------------------------------------------------------------ */
/* Simple content sheet                                                */
/* ------------------------------------------------------------------ */

.page {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 52px);
  background: var(--paper);
  border: 1px solid rgba(0, 58, 82, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hero-screen {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  gap: clamp(22px, 4vh, 36px);
  padding: clamp(32px, 5vh, 56px) 0;
}

.album-screen {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 5vw, 48px) 0 clamp(48px, 8vw, 80px);
  scroll-margin-top: 20px;
}

.scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: min(100%, 620px);
  padding: 8px 14px;
  color: var(--pale);
  background: var(--navy);
  border: 1px solid rgba(217, 246, 255, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
  text-decoration: none;
}

.scroll-cue:hover {
  color: #fff;
  background: var(--blue-dark);
  border-color: #fff;
}

.scroll-cue__arrow {
  flex: none;
  font-size: 15px;
  line-height: 1;
}

.scroll-cue__label {
  flex: 0 1 auto;
}

.intro {
  text-align: center;
}

.intro__coin {
  --coin-w: 180px;
  --coin-h: calc(var(--coin-w) * 516 / 789);
  --coin-depth: 12px;
  width: var(--coin-w);
  height: var(--coin-h);
  margin: 0 auto 24px;
  perspective: 700px;
}

.intro__coin-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: coin-spin 4.5s linear infinite;
  will-change: transform;
}

.intro__coin-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.intro__coin-face--front {
  transform: translateZ(calc(var(--coin-depth) / 2));
}

.intro__coin-face--back {
  transform: rotateY(180deg) translateZ(calc(var(--coin-depth) / 2)) scaleX(-1);
}

.intro__coin-slice {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.75) saturate(0.9);
  transform: translateZ(var(--z));
}

@keyframes coin-spin {
  to {
    transform: rotateY(360deg);
  }
}

.intro__title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(20px, 4.5vw, 32px);
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.intro__tagline {
  max-width: 54ch;
  margin: 16px auto 0;
  color: var(--blue-deep);
  font-size: 11px;
  line-height: 2;
}

.intro__text {
  max-width: 62ch;
  margin: 18px auto 0;
  color: #0e3f55;
  font-size: 11px;
  line-height: 2.1;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-top: 28px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  font-size: 11px;
  line-height: 1.6;
  text-decoration: none;
}

.social:hover {
  border-bottom-color: currentColor;
}

.social__icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.social--discord {
  color: var(--blue-dark);
}

.social--telegram {
  color: var(--blue-deep);
}

.social--github {
  color: var(--navy);
}

/* ------------------------------------------------------------------ */
/* Album section                                                       */
/* ------------------------------------------------------------------ */

.photos {
  margin: 0;
  padding: 0;
  border: 0;
}

.photos__title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 400;
  line-height: 1.5;
}



/* Photo album ------------------------------------------------------- */

.photo-album {
  margin-top: 20px;
  columns: 2;
  column-gap: 18px;
}

.photo {
  break-inside: avoid;
  margin: 0 0 18px;
  padding: 3px;
  background: #fff;
  border: 1px solid rgba(0, 58, 82, 0.16);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  transform: rotate(-0.5deg);
}

.photo:nth-child(3n + 2) {
  transform: rotate(0.5deg);
}

.photo:nth-child(4n + 3) {
  transform: rotate(-0.8deg);
}

.photo:nth-child(5n) {
  transform: rotate(0.25deg);
}

.photo__link {
  display: block;
  cursor: zoom-in;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo__video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(36px, 5vw, 52px);
  padding-top: 20px;
  border-top: 1px solid #b9e7f7;
  color: var(--blue-deep);
  font-size: 9px;
  line-height: 1.8;
}

.footer a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:hover {
  color: var(--navy);
}

/* ------------------------------------------------------------------ */
/* Lightbox                                                            */
/* ------------------------------------------------------------------ */

.lightbox {
  width: min(860px, 94vw);
  max-width: 860px;
  padding: 34px 16px 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.lightbox::backdrop {
  background: rgba(2, 19, 27, 0.88);
}

.lightbox__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border: 0;
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover {
  color: var(--blue);
}

.lightbox__stage {
  position: relative;
}

.lightbox__img {
  display: block;
  width: 100%;
  max-height: 68vh;
  background: var(--ink);
  border: 1px solid var(--ink);
  object-fit: contain;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  background: rgba(2, 19, 27, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-family: var(--pixel);
  font-size: 16px;
  cursor: pointer;
  opacity: 0.9;
  transform: translateY(-50%);
}

.lightbox__arrow:hover {
  background: rgba(2, 19, 27, 0.92);
  opacity: 1;
}

.lightbox__arrow--prev {
  left: 8px;
}

.lightbox__arrow--next {
  right: 8px;
}

.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding-top: 12px;
  color: var(--navy);
  font-size: 10px;
  line-height: 1.8;
}

.lightbox__caption strong {
  font-size: 11px;
  font-weight: 400;
}

.lightbox__caption strong:empty,
.lightbox__meta:empty {
  display: none;
}

.lightbox__meta {
  color: var(--blue-deep);
  font-size: 9px;
}

.lightbox__hint {
  margin-left: auto;
  color: var(--blue-deep);
  font-size: 9px;
}

body:has(dialog[open]),
html.is-modal-open {
  overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 700px) {
  .page {
    width: calc(100% - 20px);
    margin: 0 auto;
    padding: 24px 16px 28px;
  }

  .hero-screen {
    gap: 20px;
    padding: 24px 0;
  }

  .album-screen {
    padding: 16px 0 40px;
    scroll-margin-top: 16px;
  }

  .scroll-cue {
    gap: 8px;
    font-size: 9px;
  }

  .scroll-cue__arrow {
    font-size: 13px;
  }

  .intro__coin {
    --coin-w: 150px;
    margin-bottom: 20px;
  }

  .intro__title {
    font-size: clamp(20px, 7vw, 28px);
  }

  .photo-album {
    columns: 1;
  }

  .scene__mosaic {
    background-size: 520px 520px;
  }

  .rgb-strip {
    height: 7px;
  }

  .lightbox {
    padding: 32px 10px 12px;
  }
}

@media (max-width: 380px) {
  .page {
    padding: 20px 12px 24px;
  }

  .intro__title {
    font-size: 19px;
  }

  .socials {
    gap: 8px 16px;
  }

  .lightbox__hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scene__mosaic,
  .rgb-strip::before,
  .intro__coin-inner {
    animation: none !important;
  }
}

@media print {
  .scene,
  .rgb-strip,
  .skip-link,
  .lightbox,
  .scroll-cue {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .hero-screen {
    display: block;
    min-height: 0;
    padding: 0;
  }

  .album-screen {
    padding: 0;
  }

  .page {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .intro__coin-inner {
    animation: none;
  }

  .intro__coin-face--front {
    transform: none;
  }

  .intro__coin-face--back,
  .intro__coin-slice {
    display: none;
  }
}
