@import url('https://fonts.googleapis.com/css2?family=Aldrich&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --bg: #08131b;
  --panel: rgba(8, 24, 34, 0.88);
  --panel-strong: rgba(10, 30, 43, 0.96);
  --line: rgba(136, 214, 255, 0.24);
  --ink: #f5f0de;
  --muted: #a9bfd0;
  --signal: #ff8352;
  --signal-strong: #ffb15f;
  --accent: #6fe1d6;
  --accent-strong: #9ffbf1;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 131, 82, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(111, 225, 214, 0.18), transparent 32%),
    linear-gradient(180deg, #0b1720 0%, #071118 55%, #050c12 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: linear-gradient(to bottom, transparent 0, transparent 6px, rgba(255, 255, 255, 0.2) 7px);
  background-size: 100% 8px;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar,
.hero,
.games,
.footer {
  animation: rise-in 600ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 20, 29, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Aldrich", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent-strong);
}

/* ── Hero ── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.hero-copy {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(10, 30, 43, 0.92), rgba(6, 16, 23, 0.94));
  box-shadow: var(--shadow);
  padding: 34px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--signal-strong);
  font-family: "Aldrich", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Aldrich", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: 0.02em;
}

.hero-body {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #041018;
  background: linear-gradient(135deg, var(--signal), #ffd27a);
  box-shadow: 0 12px 30px rgba(255, 131, 82, 0.28);
}

.button-secondary {
  color: var(--ink);
  border: 1px solid rgba(159, 251, 241, 0.45);
  background: rgba(8, 22, 31, 0.7);
}

/* ── Game sprite stage ── */

.hero-stage {
  position: relative;
  min-height: 520px;
}

.frame-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(136, 214, 255, 0.25);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 177, 95, 0.16), transparent 22%),
    radial-gradient(circle at 80% 20%, rgba(111, 225, 214, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(4, 14, 21, 0.88), rgba(5, 12, 19, 0.95));
  box-shadow: var(--shadow);
}

.hud-frame {
  position: absolute;
  inset: 48px 36px 70px;
  width: calc(100% - 72px);
  height: auto;
  opacity: 0.7;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.3));
}

.ship,
.heart,
.barrier,
.button-strip {
  position: absolute;
  will-change: transform;
}

.ship {
  animation: drift 4.8s ease-in-out infinite;
}

.ship-idle {
  left: 12%;
  bottom: 32%;
  width: 38%;
}

.ship-firing {
  right: 7%;
  bottom: 16%;
  width: 44%;
  animation-delay: -1.2s;
}

.enemy-ship {
  top: 18%;
  right: 16%;
  width: 16%;
  opacity: 0.8;
}

.heart {
  width: 10%;
  filter: drop-shadow(0 0 18px rgba(255, 131, 82, 0.45));
  animation: pulse 2.1s ease-in-out infinite;
}

.heart-one {
  top: 15%;
  left: 12%;
}

.heart-two {
  top: 15%;
  left: 22%;
  animation-delay: 0.5s;
}

.barrier {
  width: 17%;
  opacity: 0.88;
}

.barrier-top {
  top: 7%;
  left: 46%;
}

.barrier-bottom {
  bottom: 7%;
  left: 22%;
}

.button-strip {
  width: 35%;
  opacity: 0.82;
}

.button-strip img {
  width: 100%;
  display: block;
}

.button-strip.left {
  left: -4%;
  bottom: -2%;
  transform: rotate(-8deg);
}

.button-strip.right {
  right: -2%;
  top: -1%;
  transform: rotate(7deg);
}

/* ── Games section ── */

.games {
  margin-bottom: 28px;
}

.games > .eyebrow {
  margin-bottom: 18px;
}

.game-card {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(10, 30, 43, 0.92), rgba(6, 16, 23, 0.94));
  box-shadow: var(--shadow);
}

.game-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  flex-shrink: 0;
  box-shadow: 0 0 36px rgba(255, 131, 82, 0.35);
}

.game-card-body h2 {
  margin: 0 0 12px;
  font-size: 1.7rem;
}

.game-card-body p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 60ch;
}

/* ── Footer ── */

.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(10, 30, 43, 0.92), rgba(6, 16, 23, 0.94));
  box-shadow: var(--shadow);
}

.footer h2 {
  margin: 0;
  font-size: 1.35rem;
}

.footer-copy {
  max-width: 44ch;
}

.footer-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.footer-copy p + p {
  margin-top: 10px;
}

/* ── Animations ── */

@keyframes drift {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%       { transform: translateY(-10px) translateX(6px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.07); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 420px;
  }

  .frame-card {
    min-height: 420px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    gap: 12px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .hero-copy,
  .game-card,
  .footer {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-stage,
  .frame-card {
    min-height: 340px;
  }

  .hud-frame {
    inset: 42px 16px 56px;
    width: calc(100% - 32px);
  }

  .ship-idle {
    width: 44%;
    left: 8%;
  }

  .ship-firing {
    width: 50%;
    right: 4%;
  }

  .enemy-ship {
    width: 18%;
  }

  .game-card {
    flex-direction: column;
  }

  .game-icon {
    width: 72px;
    height: 72px;
  }
}
