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

:root {
  --bg: #070b12;
  --surface: #0c1422;
  --card: #101b2c;
  --border: rgba(255, 255, 255, 0.12);
  --white: #ffffff;
  --grey: #91a2bd;

  --coral: #ff6b6b;
  --pink: #e879f9;
  --sky: #6fbeff;
  --cyan: #82edff;

  --font: "Inter", system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(117, 217, 255, 0.12), transparent 55%),
    radial-gradient(900px 500px at 20% 15%, rgba(111, 190, 255, 0.15), transparent 50%),
    linear-gradient(180deg, #060a12 0%, #090f1a 30%, #070b12 100%);
}

/* Shared */
.section-inner {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--grey);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Reveal motion */
.reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity 760ms cubic-bezier(0.2, 0.65, 0.2, 1),
    transform 760ms cubic-bezier(0.2, 0.65, 0.2, 1),
    filter 760ms cubic-bezier(0.2, 0.65, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Nav */
header {
  position: sticky;
  top: 0;
  background: rgba(6, 10, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

header.scrolled {
  background: rgba(5, 9, 16, 0.86);
  border-bottom-color: rgba(130, 237, 255, 0.25);
  box-shadow: 0 12px 38px rgba(2, 7, 16, 0.45);
}

nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, #8be7ff, #f9b7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: #a2b5d4;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s ease;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-social {
  display: flex;
  align-items: center;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  min-height: clamp(560px, 90vh, 760px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(55% 50% at 50% 40%, rgba(132, 230, 255, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(8, 15, 26, 0.12), rgba(8, 14, 24, 0.55));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 65%, rgba(135, 212, 255, 0.08) 0 1px, transparent 1.6px);
  background-size: 180px 180px, 220px 220px;
  opacity: 0.24;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: starfieldDrift 22s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  top: 10%;
  left: -30%;
  width: 160%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(178, 236, 255, 0.9), transparent);
  opacity: 0.45;
  animation: scanline 8s ease-in-out infinite;
}

.hero-pals {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-pal {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--size, 92px);
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform:
    translate(-50%, -50%)
    translate3d(calc(var(--mx, 0px) * 0.35), calc(var(--my, 0px) * 0.35), 0)
    rotate(var(--rot, 0deg));
  transform-origin: center;
  pointer-events: auto;
  animation: palFloat var(--float-duration, 5.2s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  transition: transform 0.22s ease, left 0.35s ease, top 0.35s ease;
  z-index: 2;
}

.hero-pal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 14px 24px rgba(2, 8, 20, 0.34));
  transition: transform 0.22s ease, filter 0.22s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-pal:hover img {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 18px 28px rgba(2, 8, 20, 0.42));
}

.hero-pal.is-popped img {
  animation: palPop 320ms cubic-bezier(0.2, 0.7, 0.18, 1);
}

.hero-pal-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #dcf9ff;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(142, 233, 255, 0.42);
  background: rgba(8, 16, 30, 0.82);
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.hero-pal.is-popped .hero-pal-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  animation: blobPulse 7s ease-in-out infinite;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: rgba(138, 221, 255, 0.24);
  top: -80px;
  left: 50%;
  transform: translate3d(calc(-60% + var(--mx, 0px)), var(--my, 0px), 0);
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: rgba(255, 107, 107, 0.18);
  bottom: -60px;
  right: 10%;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  animation-delay: 0.8s;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 640px;
  margin: 0 auto;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
}

.hero-inner > * {
  will-change: transform, opacity;
}

.eyebrow {
  display: inline-block;
  background: rgba(130, 237, 255, 0.15);
  border: 1px solid rgba(130, 237, 255, 0.45);
  color: #d1f6ff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-inner h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 1.25rem;
  text-shadow: 0 10px 32px rgba(4, 8, 16, 0.42);
}

.brand-bside {
  background: linear-gradient(120deg, #9be9ff, #ffaad3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: #c0cde2;
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* Store buttons */
.hero-stores {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
  min-width: 160px;
  position: relative;
  overflow: hidden;
}

.btn-store::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -60%;
  width: 60%;
  height: 320%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: rotate(22deg);
  transition: left 0.5s ease;
}

.btn-store:hover {
  opacity: 0.96;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(4, 12, 24, 0.34);
}

.btn-store:hover::before {
  left: 130%;
}

.btn-store span {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.btn-store small {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  opacity: 0.8;
}

.btn-store span > :last-child {
  font-size: 1rem;
  font-weight: 700;
}

.btn-apple {
  background: var(--white);
  color: var(--bg);
}

.btn-apple svg {
  color: var(--bg);
}

.btn-apple small {
  color: #444;
}

.btn-google {
  background: rgba(11, 20, 34, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.also-on {
  font-size: 0.82rem;
  color: var(--grey);
}

.also-on a {
  color: #bdd8ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.also-on a:hover {
  color: var(--white);
}

/* Sections */
.about-game {
  background: linear-gradient(180deg, rgba(11, 20, 34, 0.86), rgba(9, 16, 28, 0.92));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6rem 1.5rem;
  position: relative;
}

.about-game::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(130, 237, 255, 0.06) 50%, transparent 100%);
  opacity: 0.45;
}

.features {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.feature-card {
  background: linear-gradient(180deg, rgba(16, 27, 44, 0.96), rgba(13, 21, 35, 0.96));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(151, 224, 255, 0.16) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}

.feature-card:hover {
  border-color: rgba(130, 237, 255, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(2, 9, 21, 0.34);
}

.feature-card:hover::before {
  transform: translateX(120%);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--grey);
  font-size: 0.88rem;
  line-height: 1.65;
}

.showcase {
  max-width: 1080px;
  margin: 0 auto;
  padding: 5rem 1.5rem 2rem;
}

.showcase-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(340px, 1.12fr);
  gap: 1.6rem;
  align-items: center;
}

.showcase-copy {
  text-align: left;
}

.showcase-copy .section-desc {
  margin: 0;
  max-width: 48ch;
}

.showcase-frame {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(138, 228, 255, 0.35);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 27, 45, 0.95), rgba(9, 18, 30, 0.95));
  box-shadow: 0 20px 44px rgba(3, 10, 23, 0.42);
}

.showcase-frame::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -55%;
  width: 40%;
  height: 170%;
  background: linear-gradient(180deg, transparent, rgba(155, 236, 255, 0.3), transparent);
  transform: rotate(16deg);
  animation: frameSweep 8s ease-in-out infinite;
  pointer-events: none;
}

.showcase-video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #02050c;
}

.platforms {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
}

.platform-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.platform-card {
  display: block;
  background: linear-gradient(180deg, rgba(16, 27, 44, 0.96), rgba(13, 21, 35, 0.96));
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
  position: relative;
}

.platform-card::before {
  content: "";
  position: absolute;
  inset: auto -40% -200% -40%;
  height: 180%;
  background: radial-gradient(circle at center, rgba(133, 225, 255, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.platform-card:hover {
  border-color: rgba(130, 237, 255, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(2, 9, 21, 0.34);
}

.platform-card:hover::before {
  opacity: 1;
}

.platform-card-art {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.platform-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(4, 8, 16, 0.35));
}

.platform-card-apple {
  background: linear-gradient(135deg, #132847, #2b5070);
  color: #b8f3ff;
}

.platform-card-android {
  background: linear-gradient(135deg, #0f2b24, #1d5b42);
  color: #6ef7b2;
}

.platform-info {
  padding: 1.1rem 1.25rem 1.4rem;
}

.platform-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.25rem;
}

.platform-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.platform-info p {
  color: var(--grey);
  font-size: 0.82rem;
}

.steam-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--grey);
  padding: 0.9rem 1.25rem;
  background: rgba(16, 27, 44, 0.82);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.steam-row:hover {
  border-color: rgba(130, 237, 255, 0.4);
  background: rgba(15, 25, 41, 0.9);
}

.steam-row a {
  color: #bdd8ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.steam-row a:hover {
  color: var(--white);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, #8be7ff, #f9b7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--grey);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

.footer-legal {
  color: #5f708d;
  font-size: 0.8rem;
}

/* Keyframes */
@keyframes starfieldDrift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 180px 180px, -210px 210px;
  }
}

@keyframes palFloat {
  0%,
  100% {
    margin-top: -3px;
  }
  50% {
    margin-top: 4px;
  }
}

@keyframes palPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes frameSweep {
  0%,
  100% {
    left: -55%;
    opacity: 0.15;
  }
  50% {
    left: 115%;
    opacity: 0.42;
  }
}

@keyframes scanline {
  0%,
  100% {
    transform: translateY(-20px);
    opacity: 0.18;
  }
  50% {
    transform: translateY(16px);
    opacity: 0.5;
  }
}

@keyframes blobPulse {
  0%,
  100% {
    opacity: 0.55;
    filter: blur(78px);
  }
  50% {
    opacity: 0.85;
    filter: blur(88px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links a:not(.nav-social) {
    display: none;
  }

  .hero {
    min-height: 520px;
    padding: 4rem 1.25rem 3.5rem;
  }

  .about-game {
    padding: 4rem 1.25rem;
  }

  .platforms {
    padding: 4rem 1.25rem 3.5rem;
  }

  .showcase {
    padding: 4rem 1.25rem 1.25rem;
  }

  .showcase-inner {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .showcase-copy {
    text-align: center;
  }

  .showcase-copy .section-desc {
    margin: 0 auto;
  }

  .hero-pal {
    width: clamp(68px, 14vw, 82px);
  }

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

  .blob-1 {
    width: 280px;
    height: 280px;
  }

  .blob-2 {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 500px;
    padding: 3rem 1rem 3rem;
  }

  .about-game {
    padding: 3rem 1rem;
  }

  .platforms {
    padding: 3rem 1rem;
  }

  .showcase {
    padding: 3rem 1rem 1rem;
  }

  .showcase-frame {
    border-radius: 14px;
  }

  .hero-pal {
    width: clamp(58px, 17vw, 72px);
  }

  .hero-inner h1 {
    font-size: 3rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-stores {
    flex-direction: column;
    align-items: center;
  }

  .btn-store {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .btn-store span {
    text-align: center;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .platform-cards {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 1.75rem;
  }

  .steam-row {
    flex-wrap: wrap;
    text-align: center;
  }
}

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

  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
