:root {
  --bg: #0b101b;
  --bg-2: #121a2c;
  --panel: rgba(18, 26, 44, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f0e5;
  --muted: #b3b9c8;
  --gold: #f0c650;
  --gold-2: #c97a22;
  --sky: #5aa9e6;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 70% 0%, rgba(64, 118, 214, 0.28), transparent 70%),
    radial-gradient(ellipse 70% 40% at 0% 60%, rgba(240, 150, 60, 0.08), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, #0d0f14 100%);
  background-attachment: fixed;
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--sky);
}

img {
  max-width: 100%;
}

.wrap {
  position: relative;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Rising embers, as on the game's start screen */
.embers {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.embers span {
  position: absolute;
  left: var(--x);
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffb347;
  box-shadow: 0 0 8px 2px rgba(255, 170, 60, 0.6);
  opacity: 0;
  animation: rise var(--t) linear var(--d) infinite;
}

@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.8; }
  70% { opacity: 0.5; }
  100% { transform: translate(30px, -105vh); opacity: 0; }
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 27, 0.6);
  backdrop-filter: blur(10px);
}

.home .site-header {
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
}

.hero h1 span {
  display: block;
  background: linear-gradient(180deg, #ffe58a 10%, #f0a93a 60%, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 18px rgba(240, 150, 60, 0.25));
}

.tagline {
  max-width: 32rem;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 180px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #000;
  color: var(--text);
  text-decoration: none;
}

.store-button small {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-button strong {
  font-size: 1.15rem;
}

.store-button[aria-disabled="true"] {
  opacity: 0.7;
  pointer-events: none;
}

/* Phone frames around game screenshots */
.phone {
  position: relative;
  margin: 0;
  width: 260px;
  aspect-ratio: 604 / 1306;
  padding: 9px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2a3348, #0c111c);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(80, 140, 255, 0.12);
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 34px;
}

.hero-phones {
  position: relative;
  height: 600px;
}

.hero-phones .phone {
  position: absolute;
}

.phone-front {
  right: 4%;
  top: 0;
  transform: rotate(4deg);
}

.phone-back {
  right: 42%;
  top: 60px;
  width: 230px;
  transform: rotate(-7deg);
  opacity: 0.9;
}

/* Showcase */
.showcase {
  padding: 24px 0 40px;
}

.show {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 56px;
  padding: 40px 0;
}

.show.reverse {
  grid-template-columns: 1fr auto;
}

.show.reverse .phone {
  order: 2;
}

.show-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.15;
}

.show-copy p {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
}

.zones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.zones li {
  padding: 4px 12px;
  border: 1px solid color-mix(in srgb, var(--zone) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--zone) 22%, transparent);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Fair play */
.fair {
  padding: 56px 0;
}

.fair h2,
.studio h2 {
  margin: 0 0 20px;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.fair-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.fair-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.fair-item h3 {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 1.05rem;
}

.fair-item p {
  margin: 0;
  color: var(--muted);
}

/* Studio */
.studio {
  padding: 40px 0 72px;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 32px;
}

.studio p {
  max-width: 34rem;
  color: var(--muted);
}

.follow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.social:hover {
  border-color: rgba(240, 198, 80, 0.6);
}

.social svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
}

.next-game {
  display: grid;
  gap: 4px;
  padding: 24px;
  border: 1px dashed rgba(240, 198, 80, 0.45);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(240, 198, 80, 0.1), rgba(18, 26, 44, 0.6));
}

.next-game small {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.next-game strong {
  font-size: 1.35rem;
}

.next-game span {
  color: var(--muted);
}

/* Text pages (privacy, support) */
.page {
  padding-top: 40px;
  padding-bottom: 64px;
}

.page h1 {
  margin-bottom: 4px;
  color: var(--gold);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
}

.page h2 {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
}

.page h3 {
  margin: 22px 0 4px;
  font-size: 1.02rem;
}

.page p,
.page li {
  max-width: 44rem;
}

.meta {
  color: var(--muted);
}

/* Fill in before publishing; see website/README.md */
.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: #6b2b2b;
  color: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 28px;
}

.site-footer a {
  color: var(--muted);
}

/* Tablet */
@media (max-width: 860px) {
  .hero {
    padding-top: 36px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .tagline {
    margin-inline: auto;
  }

  .store-buttons {
    justify-content: center;
  }

  .hero-phones {
    height: 470px;
  }

  .phone-front {
    right: calc(50% - 175px);
    width: 220px;
  }

  .phone-back {
    right: calc(50% - 30px);
    width: 195px;
    top: 50px;
  }

  .show,
  .show.reverse {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
    text-align: center;
  }

  .show.reverse .phone {
    order: 0;
  }

  .show-copy p {
    margin-inline: auto;
  }

  .zones {
    justify-content: center;
  }

  .fair-grid,
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

/* Phone */
@media (max-width: 520px) {
  .site-nav {
    gap: 14px;
    font-size: 0.88rem;
  }

  .brand span {
    display: none;
  }

  .hero-phones {
    height: 400px;
  }

  .phone {
    width: 210px;
    border-radius: 36px;
  }

  .phone img {
    border-radius: 29px;
  }

  .phone-front {
    right: calc(50% - 140px);
    width: 185px;
  }

  .phone-back {
    right: calc(50% - 20px);
    width: 165px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .embers span {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
