:root {
  --bg-1: #03050d;
  --bg-2: #061428;
  --bg-3: #0b2741;
  --ink: #eef5ff;
  --muted: #a9bccf;
  --muted-strong: #d3e3f6;
  --accent: #9ee8ff;
  --accent-2: #bdf9d7;
  --card-bg: rgba(9, 18, 34, 0.62);
  --card-border: rgba(193, 223, 255, 0.22);
  --glass-border: rgba(208, 227, 255, 0.28);
  --shadow-soft: 0 22px 60px rgba(0, 0, 0, 0.35);
  --mx: 0;
  --my: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(980px 760px at -8% -4%, rgba(105, 188, 255, 0.3) 0%, transparent 58%),
    radial-gradient(900px 620px at 108% 10%, rgba(108, 255, 220, 0.25) 0%, transparent 62%),
    radial-gradient(760px 520px at 45% 112%, rgba(126, 142, 255, 0.14) 0%, transparent 65%),
    linear-gradient(154deg, var(--bg-1) 6%, var(--bg-2) 44%, var(--bg-3) 100%);
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
}

#scroll-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7cc4ff, #88ffd6 72%, #e1fff6);
  box-shadow: 0 0 16px rgba(136, 255, 214, 0.56);
  transition: width 120ms linear;
}

.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.46;
}

.orb-a {
  width: 380px;
  height: 380px;
  top: -120px;
  left: -110px;
  background: radial-gradient(circle, rgba(132, 214, 255, 0.55), transparent 72%);
  animation: drift-a 15s ease-in-out infinite;
}

.orb-b {
  width: 330px;
  height: 330px;
  right: -86px;
  top: 14%;
  background: radial-gradient(circle, rgba(154, 255, 226, 0.44), transparent 74%);
  animation: drift-b 18s ease-in-out infinite;
}

.orb-c {
  width: 280px;
  height: 280px;
  bottom: -86px;
  left: 34%;
  background: radial-gradient(circle, rgba(116, 147, 255, 0.32), transparent 70%);
  animation: drift-c 17s ease-in-out infinite;
}

.orb-d {
  width: 240px;
  height: 240px;
  right: 26%;
  bottom: 16%;
  background: radial-gradient(circle, rgba(214, 243, 255, 0.2), transparent 75%);
  animation: drift-d 13s ease-in-out infinite;
}

.scan {
  position: absolute;
  inset: -35%;
  background: linear-gradient(
    116deg,
    transparent 14%,
    rgba(218, 237, 255, 0.08) 40%,
    rgba(117, 221, 255, 0.1) 48%,
    transparent 68%
  );
  transform: translateX(calc(var(--mx) * 22px)) translateY(calc(var(--my) * 18px));
  transition: transform 200ms ease;
  animation: scan-sweep 14s linear infinite;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1320px, 94vw);
  margin: 0 auto;
  padding: 2.2rem 0 2.2rem;
}

.reveal-block {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 640ms ease, transform 720ms cubic-bezier(0.2, 0.65, 0.2, 1);
}

.reveal-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: 1.4rem;
  align-items: center;
  border-radius: 34px;
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(124deg, rgba(10, 23, 43, 0.66), rgba(20, 44, 72, 0.36)),
    rgba(10, 24, 43, 0.45);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  padding: 1.8rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  top: -200px;
  right: -120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(188, 241, 255, 0.26), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -70% -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(129, 226, 255, 0.15), transparent 72%);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0;
  color: #9cd5ff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.73rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0.4rem 0 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(2.4rem, 5.2vw, 4.5rem);
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0.7rem 0 0;
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.62;
  font-size: clamp(0.98rem, 1.7vw, 1.08rem);
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.72rem;
}

.soundscape-btn,
.explore-btn {
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(195, 226, 255, 0.38);
  padding: 0.62rem 1rem;
  font: inherit;
  font-weight: 700;
  color: #deefff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, filter 180ms ease, background 180ms ease;
}

.soundscape-btn {
  background: linear-gradient(120deg, rgba(14, 42, 73, 0.88), rgba(26, 57, 88, 0.84));
}

.explore-btn {
  background: linear-gradient(120deg, rgba(26, 60, 92, 0.46), rgba(19, 42, 70, 0.7));
  color: #d5f5ff;
}

.soundscape-btn:hover,
.explore-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(158, 232, 255, 0.82);
  filter: brightness(1.08);
}

.soundscape-btn[data-state="on"] {
  border-color: rgba(137, 248, 216, 0.88);
  color: #ddffef;
  box-shadow: inset 0 0 0 1px rgba(137, 248, 216, 0.3), 0 0 24px rgba(131, 242, 210, 0.2);
}

.hero-metrics {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.metric-pill {
  min-width: 132px;
  padding: 0.58rem 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(180, 212, 248, 0.26);
  background: rgba(8, 20, 35, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.metric-pill span {
  display: block;
  color: #f4fbff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.metric-pill small {
  display: block;
  margin-top: 0.06rem;
  color: #9cb6d2;
  font-size: 0.73rem;
  font-weight: 600;
}

.hero-art {
  position: relative;
  z-index: 2;
  margin: 0;
  width: min(100%, 490px);
  justify-self: end;
  filter: drop-shadow(0 26px 38px rgba(0, 0, 0, 0.5));
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  transform: translate3d(calc(var(--mx) * 12px), calc(var(--my) * 10px), 0);
  transition: transform 220ms ease;
  animation: hero-float 8.6s ease-in-out infinite;
}

.grid-wrap {
  margin-top: 1.3rem;
  border-radius: 30px;
  border: 1px solid rgba(188, 219, 250, 0.16);
  background: linear-gradient(180deg, rgba(8, 17, 34, 0.34), rgba(10, 23, 40, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  padding: 1.2rem;
}

.section-head {
  margin-bottom: 0.92rem;
}

.section-head h2 {
  margin: 0.28rem 0 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-card {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  --offset-y: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
  height: 100%;
  padding: 0.94rem;
  border-radius: 23px;
  border: 1px solid var(--card-border);
  background:
    linear-gradient(165deg, rgba(14, 27, 47, 0.76), rgba(11, 23, 40, 0.52)),
    var(--card-bg);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(calc(var(--lift) + var(--offset-y)));
  transition:
    transform 360ms cubic-bezier(0.16, 0.84, 0.2, 1),
    border-color 260ms ease,
    box-shadow 260ms ease,
    opacity 420ms ease;
  opacity: 0;
}

.game-card.is-visible {
  opacity: 1;
  --offset-y: 0px;
  transition-delay: var(--card-delay, 0ms);
}

.game-card::before {
  content: "";
  position: absolute;
  inset: -38% -42% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(160, 235, 255, 0.2), transparent 70%);
  pointer-events: none;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: auto auto -72px -48px;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(170, 255, 226, 0.16), transparent 72%);
  pointer-events: none;
}

.game-card:hover {
  --lift: -9px;
  border-color: rgba(163, 235, 255, 0.65);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.4);
}

.card-art {
  display: block;
  width: 100%;
  height: auto;
  min-height: 160px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(194, 224, 255, 0.24);
  background:
    linear-gradient(160deg, rgba(13, 31, 54, 0.75), rgba(9, 20, 36, 0.74)),
    rgba(8, 20, 35, 0.56);
  padding: 0.36rem;
}

.tag {
  margin: 0;
  color: #c6f2ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game-card h2 {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.28rem, 2.1vw, 1.75rem);
  letter-spacing: -0.02em;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.game-card ul {
  margin: 0;
  padding-left: 1.08rem;
  color: var(--muted-strong);
  display: grid;
  gap: 0.28rem;
}

.play-btn {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  text-decoration: none;
  color: #0a2138;
  background: linear-gradient(120deg, #a9ecff 0%, #c8ffd6 72%);
  border-radius: 999px;
  border: 1px solid rgba(206, 244, 255, 0.55);
  padding: 0.64rem 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 160ms ease, filter 160ms ease;
}

.play-btn::before {
  content: "";
  position: absolute;
  inset: -120% -30%;
  background: linear-gradient(118deg, transparent 34%, rgba(255, 255, 255, 0.62), transparent 66%);
  transform: translateX(-72%);
  animation: btn-shimmer 5.2s ease-in-out infinite;
  pointer-events: none;
}

.play-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.powered-by {
  margin-top: 1.12rem;
  text-align: center;
}

.powered-by a {
  color: #a8c7e2;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 700;
}

.powered-by a:hover {
  text-decoration: underline;
}

@keyframes drift-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(54px, 16px, 0);
  }
}

@keyframes drift-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-42px, -18px, 0);
  }
}

@keyframes drift-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -26px, 0);
  }
}

@keyframes drift-d {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-20px, 20px, 0);
  }
}

@keyframes scan-sweep {
  from {
    transform: translateX(-20%) translateY(0);
  }
  to {
    transform: translateX(24%) translateY(0);
  }
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes btn-shimmer {
  0%,
  78%,
  100% {
    transform: translateX(-72%);
  }
  88% {
    transform: translateX(70%);
  }
}

@media (max-width: 1220px) {
  .shell {
    width: min(95vw, 100%);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    justify-self: start;
    width: min(100%, 540px);
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .shell {
    padding-top: 1.8rem;
  }

  .hero {
    padding: 1.2rem;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .grid-wrap {
    border-radius: 24px;
    padding: 0.9rem;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(96vw, 100%);
    padding-top: 1.3rem;
  }

  .hero {
    padding: 1rem 0.92rem;
    border-radius: 20px;
    gap: 0.8rem;
  }

  .subtitle {
    max-width: 100%;
    font-size: 0.94rem;
    line-height: 1.54;
  }

  .hero-actions {
    gap: 0.54rem;
  }

  .soundscape-btn,
  .explore-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-metrics {
    gap: 0.5rem;
  }

  .metric-pill {
    flex: 1 1 120px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.86rem;
  }

  .game-card {
    border-radius: 18px;
    padding: 0.82rem;
  }

  .card-art {
    min-height: 142px;
  }
}

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

  .reveal-block,
  .game-card,
  .orb,
  .scan,
  .hero-art img,
  .play-btn::before {
    animation: none !important;
    transition: none !important;
  }
}
