@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 48%, rgba(82, 232, 159, 0.34), transparent 28%),
    radial-gradient(circle at 76% 56%, rgba(229, 182, 91, 0.28), transparent 30%),
    linear-gradient(135deg, #09100d 0%, #050706 58%, #120f08 100%);
  color: #fff7e8;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
}

body::before {
  inset: auto auto -23vw -18vw;
  width: min(900px, 72vw);
  aspect-ratio: 1;
  border: 1px solid rgba(82, 232, 159, 0.36);
  box-shadow:
    0 0 54px rgba(82, 232, 159, 0.24),
    inset 0 0 70px rgba(82, 232, 159, 0.1);
  transform: rotate(-18deg);
}

body::after {
  inset: -18vw -12vw auto auto;
  width: min(820px, 66vw);
  aspect-ratio: 1;
  border: 1px solid rgba(229, 182, 91, 0.34);
  box-shadow:
    0 0 60px rgba(229, 182, 91, 0.24),
    inset 0 0 76px rgba(229, 182, 91, 0.1);
}

.qr-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(18px, 4vw, 54px);
  isolation: isolate;
}

.qr-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 247, 232, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 247, 232, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, #000 0 46%, transparent 82%);
}

h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-link {
  position: absolute;
  top: clamp(18px, 3vw, 34px);
  left: clamp(18px, 3vw, 34px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px 0 14px;
  border: 1px solid rgba(255, 247, 232, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 247, 232, 0.12), rgba(255, 247, 232, 0.035)),
    rgba(5, 7, 6, 0.48);
  color: #fff7e8;
  font: 400 0.93rem/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 232, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.home-link span {
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.home-link:hover,
.home-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(82, 232, 159, 0.45);
  background:
    linear-gradient(135deg, rgba(82, 232, 159, 0.16), rgba(255, 247, 232, 0.05)),
    rgba(5, 7, 6, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 232, 0.16),
    0 18px 48px rgba(0, 0, 0, 0.3),
    0 0 32px rgba(82, 232, 159, 0.14);
}

.home-link:active {
  transform: translateY(0) scale(0.98);
}

.home-link:focus-visible {
  outline: 2px solid #52e89f;
  outline-offset: 4px;
}

.qr-card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(760px, 92vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 247, 232, 0.2);
  border-radius: clamp(28px, 5vw, 62px);
  background:
    linear-gradient(135deg, rgba(255, 247, 232, 0.13), rgba(255, 247, 232, 0.02)),
    rgba(10, 15, 13, 0.78);
  box-shadow:
    0 44px 130px rgba(0, 0, 0, 0.5),
    0 0 70px rgba(82, 232, 159, 0.18),
    0 0 86px rgba(229, 182, 91, 0.16);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.qr-card::before,
.qr-card::after {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: inherit;
  pointer-events: none;
}

.qr-card::before {
  border: 1px solid rgba(82, 232, 159, 0.26);
  box-shadow: inset 0 0 56px rgba(82, 232, 159, 0.08);
}

.qr-card::after {
  inset: -21% -14% auto auto;
  width: 82%;
  aspect-ratio: 1;
  border: 1px solid rgba(229, 182, 91, 0.28);
  border-radius: 50%;
}

.qr-panel {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(560px, 72vw);
  aspect-ratio: 1;
  padding: clamp(18px, 4vw, 38px);
  border-radius: clamp(18px, 3.5vw, 34px);
  background: #fff7e8;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 247, 232, 0.5);
}

.qr-panel img {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 560px) {
  body {
    overflow: auto;
  }

  .qr-stage {
    min-height: 100svh;
    padding: 74px 16px 16px;
    align-content: start;
  }

  .home-link {
    top: 16px;
    left: 16px;
    min-height: 40px;
    padding-inline: 13px 15px;
  }

  .qr-card {
    width: min(100%, 420px);
  }

  .qr-panel {
    width: min(310px, 76vw);
  }
}

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