:root {
  color-scheme: dark;
  --cream: #fff1d3;
  --amber: #e5a348;
  --ember: #ff4b23;
  --deep: #1a0d08;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--deep);
}

body {
  color: var(--cream);
}

.scene {
  --pointer-x: 0;
  --pointer-y: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100svh;
  min-height: 34rem;
  padding: clamp(1.2rem, 3vw, 2.8rem) clamp(1.2rem, 4vw, 4rem);
  isolation: isolate;
  overflow: hidden;
}

.scene-image,
.scene-grade,
.light-haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-image {
  z-index: -4;
  inset: -2.5%;
  background: url("/assets/abyss-tech-background.png") center center / cover no-repeat;
  transform: translate(calc(var(--pointer-x) * -7px), calc(var(--pointer-y) * -5px)) scale(1.04);
  transition: transform 200ms ease-out;
}

.scene-grade {
  z-index: -3;
  background:
    radial-gradient(circle at 50% 47%, rgba(17, 8, 5, 0.04) 0 12%, rgba(15, 7, 4, 0.28) 48%, rgba(8, 4, 3, 0.62) 100%),
    linear-gradient(180deg, rgba(12, 6, 3, 0.12), rgba(12, 6, 3, 0.18) 57%, rgba(12, 6, 3, 0.58));
}

.light-haze {
  z-index: -2;
  background:
    radial-gradient(circle at 17% 48%, rgba(255, 179, 61, 0.17), transparent 16%),
    radial-gradient(circle at 85% 49%, rgba(255, 177, 54, 0.16), transparent 16%),
    radial-gradient(circle at 50% 16%, rgba(255, 137, 38, 0.1), transparent 31%);
  mix-blend-mode: screen;
  animation: breathe 6s ease-in-out infinite alternate;
}

.site-header,
footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}

.studio-name {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--cream);
  text-decoration: none;
}

.studio-mark {
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--cream);
  rotate: 45deg;
}

.status {
  opacity: 0.72;
}

.hero {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 55rem);
  padding: clamp(2rem, 5vw, 5rem);
  text-align: center;
  transform: translate(calc(var(--pointer-x) * 5px), calc(var(--pointer-y) * 4px));
  transition: transform 180ms ease-out;
}

.hero-copy::before {
  position: absolute;
  z-index: -1;
  width: min(60rem, 82vw);
  height: min(30rem, 56vh);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(13, 6, 3, 0.75) 0%, rgba(13, 6, 3, 0.35) 43%, transparent 72%);
  content: "";
  filter: blur(8px);
}

.eyebrow {
  margin: 0 0 1rem;
  color: #ffd79a;
  font-size: clamp(0.6rem, 0.8vw, 0.75rem);
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px black;
}

h1 {
  margin: 0;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.4rem, 10vw, 10rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.82;
  text-shadow:
    0 3px 0 rgba(67, 30, 12, 0.7),
    0 12px 44px rgba(0, 0, 0, 0.85),
    0 0 65px rgba(237, 151, 54, 0.12);
}

.rule {
  width: min(17rem, 55vw);
  height: 1px;
  margin: clamp(1.6rem, 3vh, 2.4rem) 0;
  background: linear-gradient(90deg, transparent, rgba(255, 225, 177, 0.9), transparent);
}

.rule span {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  margin: -0.2rem auto 0;
  border: 1px solid #ffe2b2;
  background: #7b3e1c;
  rotate: 45deg;
}

.steam-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(22rem, 88vw);
  min-height: 3.7rem;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 173, 0.82);
  border-radius: 2px;
  background: rgba(35, 15, 8, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 12px 35px rgba(0, 0, 0, 0.36),
    0 0 36px rgba(255, 83, 31, 0.08);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, translate 180ms ease;
}

.steam-button span {
  flex: 1;
  padding: 0 1.3rem;
}

.steam-button b {
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 3.7rem;
  border-left: 1px solid rgba(255, 224, 173, 0.55);
  color: #ffd295;
  font-size: 1.25rem;
  transition: background 180ms ease, color 180ms ease;
}

.steam-button:hover {
  border-color: #ffe2af;
  background: rgba(108, 42, 18, 0.88);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.4), 0 0 42px rgba(255, 75, 35, 0.24);
  translate: 0 -3px;
}

.steam-button:hover b {
  background: var(--ember);
  color: white;
}

.steam-button:focus-visible,
.studio-name:focus-visible {
  outline: 3px solid white;
  outline-offset: 4px;
}

footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 230, 194, 0.26);
  opacity: 0.75;
}

.particles {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particles-front {
  z-index: 5;
  filter: blur(0.2px);
}

.particles i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: block;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #ffe0a1;
  box-shadow: 0 0 calc(var(--size) * 2.2) rgba(255, 193, 91, 0.95);
  opacity: 0;
  animation: drift var(--duration) var(--delay) ease-in-out infinite;
}

.particles-front i {
  background: #ffd28b;
  box-shadow: 0 0 calc(var(--size) * 2.6) rgba(255, 170, 55, 0.88);
}

@keyframes drift {
  0% {
    opacity: 0;
    transform: translate3d(-6px, 40px, 0) scale(0.7);
  }
  15% {
    opacity: 0.75;
  }
  55% {
    opacity: 0.42;
    transform: translate3d(18px, -30px, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-12px, -105px, 0) scale(0.55);
  }
}

@keyframes breathe {
  from {
    opacity: 0.62;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .scene {
    min-height: 36rem;
    padding: 1rem;
  }

  .scene-image {
    inset: -3.5%;
    background-position: 51% center;
  }

  .status,
  footer span:last-child {
    display: none;
  }

  .hero-copy {
    padding: 2rem 0.5rem;
  }

  .hero-copy::before {
    width: 105vw;
    height: 25rem;
  }

  h1 {
    font-size: clamp(4rem, 20vw, 6.8rem);
    line-height: 0.86;
  }
}

@media (max-height: 650px) and (min-width: 701px) {
  h1 {
    font-size: clamp(4rem, 14vh, 6.5rem);
  }

  .rule {
    margin: 1.2rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-image,
  .hero-copy,
  .steam-button {
    transition: none;
  }

  .light-haze,
  .particles i {
    animation: none;
  }

  .particles i {
    opacity: 0.4;
  }
}
