:root {
  color: #17130f;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #b9874c;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(255, 244, 213, 0.12),
      transparent 34rem
    ),
    linear-gradient(180deg, rgba(60, 31, 7, 0.04), rgba(37, 20, 7, 0.24)),
    url("/plywood.jpg") center / cover fixed;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(65, 35, 12, 0.16),
      transparent 20%,
      transparent 80%,
      rgba(65, 35, 12, 0.16)
    ),
    linear-gradient(
      180deg,
      rgba(255, 244, 220, 0.08),
      transparent 30%,
      rgba(45, 24, 7, 0.2)
    );
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

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

main {
  width: min(1280px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 28px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  animation: reveal 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.brand {
  display: block;
  width: 220px;
  height: 78px;
  overflow: hidden;
}

.brand img {
  display: block;
  width: 220px;
  height: 78px;
  object-fit: contain;
}

.hero {
  padding: 20px 0 8px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 24px;
  animation: reveal 700ms 100ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.eyebrow {
  margin: 0 0 6px;
  color: rgba(37, 23, 12, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-family: "Fugaz One", sans-serif;
  font-size: clamp(2.5rem, 5.4vw, 5.7rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-wrap: balance;
}

.intro-copy {
  max-width: 30rem;
  margin: 0 0 0.45rem;
  color: rgba(31, 20, 11, 0.77);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 650;
  line-height: 1.45;
}

.game-stage {
  animation: stage-in 850ms 180ms cubic-bezier(0.18, 0.82, 0.25, 1) both;
}

.game-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 970 / 600;
  border: 8px solid rgba(24, 17, 12, 0.94);
  border-radius: 22px;
  background: #171717;
  box-shadow:
    0 30px 60px rgba(49, 27, 8, 0.26),
    0 8px 16px rgba(49, 27, 8, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.12);
}

.game-frame::before {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #ff7d00, #74f978 50%, #00b7ff);
  content: "";
  pointer-events: none;
}

.game-frame iframe {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #171717;
}

.loader {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(74, 248, 168, 0.12),
      transparent 35%
    ),
    #171717;
  font-family: "Fugaz One", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: opacity 300ms ease;
}

.loader.loaded {
  opacity: 0;
}

.loader span {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-top-color: #70f78f;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.loader p {
  margin: 0;
}

.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px 2px 0;
}

.stage-footer p {
  margin: 0;
  color: rgba(37, 23, 12, 0.66);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.viverse-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.viverse-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.viverse-link--quiet {
  padding: 11px 15px;
  background: rgba(255, 248, 232, 0.5);
  box-shadow: inset 0 0 0 1px rgba(56, 33, 13, 0.12);
  backdrop-filter: blur(10px);
}

.viverse-link--primary {
  padding: 13px 18px;
  color: white;
  background: #17130f;
  box-shadow: 0 8px 18px rgba(50, 27, 8, 0.2);
}

.viverse-link:hover {
  transform: translateY(-2px);
}

.viverse-link--primary:hover {
  box-shadow: 0 12px 24px rgba(50, 27, 8, 0.28);
}

.viverse-link:focus-visible {
  outline: 3px solid #00aef0;
  outline-offset: 4px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(50, 29, 11, 0.16);
  color: rgba(37, 23, 12, 0.58);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

footer p {
  margin: 0;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 28px, 1280px);
    padding-top: 10px;
  }

  .site-header {
    min-height: 68px;
  }

  .brand {
    width: 164px;
    height: 65px;
  }

  .brand img {
    width: 164px;
    height: 92px;
    margin-top: -14px;
  }

  .viverse-link--quiet {
    padding: 10px 12px;
    font-size: 0;
    gap: 0;
  }

  .viverse-link--quiet svg {
    width: 18px;
    height: 18px;
  }

  .hero {
    padding-top: 16px;
  }

  .intro {
    display: block;
    margin-bottom: 18px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2.65rem, 13vw, 4.5rem);
  }

  .intro-copy {
    margin-top: 14px;
    font-size: 0.96rem;
  }

  .game-frame {
    border-width: 5px;
    border-radius: 14px;
  }

  .stage-footer {
    align-items: flex-start;
    min-height: 70px;
  }

  .stage-footer p {
    max-width: 10rem;
    padding-top: 5px;
    line-height: 1.35;
  }

  .viverse-link--primary {
    flex-shrink: 0;
    padding: 12px 14px;
  }

  footer {
    padding-top: 22px;
  }

  footer p:last-child {
    display: none;
  }
}

@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;
  }
}
