:root {
  color-scheme: dark;
  --bg: #07060f;
  --panel: rgb(18 14 36 / 0.88);
  --line: rgb(255 255 255 / 0.1);
  --text: #f4f0ff;
  --muted: #a78bfa;
  --accent: #f97316;
  --accent-2: #c084fc;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at top right, rgb(167 139 250 / 0.16), transparent 30%),
    radial-gradient(ellipse at bottom left, rgb(249 115 22 / 0.13), transparent 32%),
    linear-gradient(180deg, #0e0b1a 0%, #07060f 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.topbar, main { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.brand img { width: 32px; height: auto; }

.nav-links { display: flex; gap: 22px; color: var(--muted); font-size: 14px; }

/* ─── Hero ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 44px;
  align-items: center;
  padding: 38px 0 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-size: clamp(50px, 9vw, 96px);
  line-height: 0.9;
}

.hero-copy > p {
  color: #d8b4fe;
  font-size: 18px;
  line-height: 1.75;
}

.actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.primary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  background: linear-gradient(135deg, #f5f0ff 0%, #c084fc 100%);
  color: #1a0d2e;
  font-weight: 700;
}

.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.06);
  color: var(--text);
  font-weight: 700;
}

/* ─── Hero Card (maze visual) ─── */
.hero-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 36px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #120d28 0%, #0e0a1e 100%);
}

.maze-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(11, 1fr);
  gap: 0;
}

.maze-cell {
  border-right: 1px solid rgb(167 139 250 / 0.18);
  border-bottom: 1px solid rgb(167 139 250 / 0.18);
}

.maze-cell.wall-r { border-right-color: rgb(167 139 250 / 0.55); }
.maze-cell.wall-b { border-bottom-color: rgb(167 139 250 / 0.55); }

.danger-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38%;
  background: linear-gradient(0deg, rgb(239 68 68 / 0.55) 0%, rgb(249 115 22 / 0.22) 60%, transparent 100%);
  animation: flood 4s ease-in-out infinite alternate;
}

@keyframes flood {
  from { height: 28%; }
  to   { height: 42%; }
}

.player-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #f5f0ff;
  box-shadow: 0 0 16px 4px rgb(196 132 252 / 0.6);
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: drift 4s ease-in-out infinite alternate;
}

@keyframes drift {
  from { top: 42%; }
  to   { top: 36%; }
}

.exit-marker {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 10px;
  border-radius: 999px;
  background: rgb(134 239 172 / 0.7);
  box-shadow: 0 0 18px 4px rgb(134 239 172 / 0.35);
}

.app-icon-badge {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #1a0d2e;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* ─── Sections ─── */
.grid-section, .loop-section, .themes-section, .cta {
  padding: 44px 0 82px;
}

.section-heading { margin-bottom: 28px; }

.section-heading h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.95;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.feature-card h3 {
  display: block;
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
}

.feature-card p { color: #d8b4fe; font-size: 17px; line-height: 1.7; margin: 0; }

.feature-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* ─── Core Loop steps ─── */
.loop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.loop-step {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.loop-step > span {
  display: block;
  margin-bottom: 14px;
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-2);
  opacity: 0.5;
  line-height: 1;
}

.loop-step h3 { margin: 0 0 10px; font-size: 20px; font-weight: 700; }
.loop-step p  { margin: 0; color: #d8b4fe; font-size: 16px; line-height: 1.65; }

/* ─── Danger zone banner ─── */
.danger-banner {
  margin-bottom: 82px;
  padding: 40px 48px;
  border-radius: 28px;
  border: 1px solid rgb(239 68 68 / 0.3);
  background: linear-gradient(135deg, rgb(239 68 68 / 0.12) 0%, rgb(249 115 22 / 0.08) 100%);
  display: flex;
  align-items: center;
  gap: 40px;
}

.danger-banner-copy { flex: 1; }

.danger-banner-copy h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.danger-banner-copy p {
  margin: 0;
  color: #d8b4fe;
  font-size: 17px;
  line-height: 1.65;
}

.danger-pill {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgb(249 115 22 / 0.6) 0%, rgb(239 68 68 / 0.8) 100%);
  box-shadow: 0 0 32px 8px rgb(239 68 68 / 0.25);
}

/* ─── Themes grid ─── */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.theme-chip {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.theme-chip span:first-child { font-size: 15px; font-weight: 600; }

.theme-chip .theme-price {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.theme-chip.theme-free .theme-price { color: rgb(134 239 172 / 0.9); }

/* ─── CTA ─── */
.cta {
  padding: 40px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  text-align: center;
}

.cta h2 {
  margin: 0 0 22px;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 0.95;
}

.cta .eyebrow { justify-content: center; }

.cta .actions { justify-content: center; }

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .hero, .loop-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 420px; }
  .themes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .danger-banner { flex-direction: column; align-items: flex-start; gap: 24px; }
}

@media (max-width: 720px) {
  .topbar, main { width: min(100%, calc(100% - 32px)); }
  .topbar { flex-direction: column; align-items: flex-start; }
  .nav-links { flex-wrap: wrap; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card, .loop-step, .cta { padding: 24px; border-radius: 24px; }
  .themes-grid { grid-template-columns: 1fr; }
  .danger-banner { padding: 28px 24px; }
}
