:root {
  --bg-color: #090a0f;
  --bg-soft: #10131b;
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #a4adbb;
  --accent-color: #66d9ff;
  --accent-warm: #ffcf6b;
  --accent-green: #82d17d;
  --accent-glow: rgba(102, 217, 255, 0.32);
  --font-family: 'Space Grotesk', 'Inter', sans-serif;
  --body-font: 'Outfit', 'Inter', sans-serif;
  --max-width: 1180px;
}

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

img {
  -webkit-user-drag: none;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42rem),
    radial-gradient(circle at 20% 10%, rgba(102, 217, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 82% 28%, rgba(255, 207, 107, 0.1), transparent 24rem),
    var(--bg-color);
  color: var(--text-main);
  font-family: var(--body-font);
  overflow-x: hidden;
  position: relative;
}

/* Star Background Animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(white, rgba(255, 255, 255, 0.2) 1px, transparent 2px);
  background-size: 72px 72px, 72px 72px, 460px 460px;
  background-position: center top, center top, 20px 40px;
  animation: starTwinkle 150s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes starTwinkle {
  from { background-position: center top, center top, 20px 40px; }
  to { background-position: center -72px, center -72px, -440px -420px; }
}

a {
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

/* Header / Navbar */
header {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 10, 15, 0.72);
}

header .logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

header .logo img {
  display: block;
  width: clamp(210px, 24vw, 270px);
  height: auto;
}

nav a {
  margin-left: clamp(1rem, 2.5vw, 2rem);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

nav a:hover {
  color: var(--text-main);
}

.home-hero {
  width: min(var(--max-width), calc(100% - 2rem));
  min-height: min(640px, calc(72vh - 78px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 4vw, 3.5rem);
}

.hero-copy {
  max-width: none;
}

.hero-copy h1 {
  font-family: var(--font-family);
  font-size: clamp(4.5rem, 9vw, 8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
  max-width: none;
  margin-bottom: 1.35rem;
  color: #fff;
  white-space: nowrap;
}

.hero-copy p {
  max-width: 58rem;
  color: var(--text-muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
  margin-bottom: 2.2rem;
}

.hero-actions,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

.button.primary {
  background: #f8fafc;
  color: #080a0f;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.button.primary:hover {
  background: #fff;
  transform: translateY(-1px);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.game-feature {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.game-copy h3 span {
  display: block;
  color: var(--accent-color);
}

.games-section {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-heading h2 {
  font-family: var(--font-family);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
  margin-bottom: 1rem;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.6;
}

.game-feature {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  margin-bottom: 1.25rem;
}

.market-feature {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.market-feature .game-media {
  order: 2;
}

.market-feature .game-copy {
  order: 1;
}

.orbital-feature {
  background:
    linear-gradient(135deg, rgba(20, 42, 80, 0.42), rgba(255, 255, 255, 0.035) 42%),
    rgba(255, 255, 255, 0.04);
}

.market-feature {
  background:
    linear-gradient(135deg, rgba(255, 207, 107, 0.13), rgba(130, 209, 125, 0.12) 48%, rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
}

.game-media {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.device-shell {
  width: min(76%, 390px);
  display: block;
  transform: rotate(-3deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.42));
}

.device-screen {
  position: absolute;
  width: min(57%, 294px);
  aspect-ratio: 619 / 826;
  object-fit: cover;
  border-radius: 18px;
  transform: rotate(-3deg);
}

.orbital-media {
  min-height: 420px;
  height: min(42vw, 520px);
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  background: #07101e;
}

.orbital-action {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.1) contrast(1.05);
}

.grocery-media {
  overflow: hidden;
  border-radius: 8px;
  background: #151913;
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.grocery-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.cart-hero {
  position: relative;
  width: min(70%, 380px);
  filter: drop-shadow(0 30px 32px rgba(0, 0, 0, 0.36));
}

.floating-item {
  position: absolute;
  width: clamp(54px, 9vw, 92px);
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.22));
}

.item-apple {
  left: 12%;
  top: 18%;
  transform: rotate(-14deg);
}

.item-banana {
  right: 10%;
  top: 20%;
  transform: rotate(18deg);
}

.item-watermelon {
  right: 13%;
  bottom: 12%;
  transform: rotate(-10deg);
}

.game-copy h3 {
  font-family: var(--font-family);
  font-size: clamp(2.05rem, 4vw, 4rem);
  line-height: 1;
  margin-bottom: 1rem;
}

.game-copy p {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 38rem;
}

.game-copy ul {
  list-style: none;
  margin-bottom: 2rem;
}

.game-copy li {
  position: relative;
  padding-left: 1.25rem;
  color: rgba(248, 250, 252, 0.86);
  line-height: 1.7;
}

.game-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
}

.market-feature .game-copy li::before {
  background: var(--accent-warm);
}

/* Footer */
footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--text-main);
  margin: 0 0.5rem;
}

/* Policy Content Layout */
.policy-container {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 2rem;
  background: var(--card-bg);
  border-radius: 24px;
  border: 1px solid var(--card-border);
}

.policy-content {
  padding: 3rem;
}

.policy-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.policy-content .date {
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: block;
}

.policy-content h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: var(--accent-color);
}

.policy-content p, .policy-content ul {
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.policy-content ul {
  padding-left: 1.5rem;
}

/* Media Queries */
@media (max-width: 900px) {
  .game-feature,
  .market-feature {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-copy h1 {
    font-size: clamp(3.8rem, 12vw, 6.4rem);
  }

  .market-feature .game-media,
  .market-feature .game-copy {
    order: initial;
  }

  .game-feature {
    min-height: auto;
  }

  header {
    padding: 0 1rem;
  }
}

@media (max-width: 640px) {
  header {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 0.65rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  header .logo img {
    width: 210px;
  }

  .home-hero {
    padding-top: 3.25rem;
  }

  .hero-copy h1 {
    font-size: clamp(3.4rem, 15vw, 4.8rem);
    white-space: normal;
    max-width: 7.5ch;
  }

  .hero-copy p {
    max-width: none;
  }

  .game-media {
    min-height: 320px;
  }

  .device-screen {
    border-radius: 12px;
  }

  .policy-container {
    width: calc(100% - 1rem);
    padding: 0;
  }

  .policy-content {
    padding: 2rem 1.25rem;
  }
}
