:root {
  --bg: #12081f;
  --surface: #1f1240;
  --surface-alt: #291752;
  --primary: #2d1b69;
  --primary-light: #4a2f9e;
  --accent: #ffd700;
  --text: #f5f3ff;
  --text-secondary: #b9aedd;
  --border: #3a2a70;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-weight: 700;
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.5;
}

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

.accent {
  color: var(--accent);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 8, 31, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:not(.nav-cta) {
  color: var(--text-secondary);
}

.nav-cta {
  background: var(--accent);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

/* Hero */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 420px;
  min-width: 280px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 18px;
}

.tagline {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 480px;
}

.store-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

.hero-art {
  flex: 1 1 280px;
  display: flex;
  justify-content: center;
  min-width: 240px;
}

.phone-mock {
  position: relative;
  width: 260px;
  border-radius: 28px;
  overflow: hidden;
  border: 6px solid var(--surface-alt);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.phone-mock img {
  width: 100%;
  display: block;
}

.phone-mock-pill {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: rgba(18, 8, 31, 0.85);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  text-align: center;
}

/* Store buttons */
.store-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.store-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.store-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
}

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

.store-btn small {
  font-size: 11px;
  color: var(--text-secondary);
}

.store-btn strong {
  font-size: 16px;
  font-weight: 700;
}

/* Sections */
main section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px;
}

main section h2 {
  font-size: 30px;
  margin-bottom: 12px;
  text-align: center;
}

.section-intro {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 16px;
}

/* How to Play examples */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  position: relative;
}

.example-card img {
  border-radius: 14px;
  margin-bottom: 16px;
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: cover;
}

.example-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.example-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

.type-pill {
  position: absolute;
  top: 34px;
  left: 34px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* Try it puzzle cards */
.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.puzzle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
}

.puzzle-card img {
  border-radius: 14px;
  margin-bottom: 14px;
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: cover;
}

.category-pill {
  display: inline-block;
  background: var(--surface-alt);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.reveal-btn {
  width: 100%;
  background: var(--accent);
  color: var(--primary);
  border: none;
  font-weight: 700;
  font-size: 15px;
  padding: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.reveal-btn:hover {
  opacity: 0.9;
}

.reveal-btn.is-revealed {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--accent);
}

/* CTA */
.cta {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin: 0 auto 64px;
  padding: 56px 24px;
}

.cta p {
  color: var(--text-secondary);
  margin: 10px 0 28px;
}

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

/* Footer */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* Toast (placeholder store-link notice) */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--surface-alt);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .hero {
    text-align: center;
    justify-content: center;
    padding-top: 40px;
  }

  .hero-text {
    order: 2;
  }

  .hero-art {
    order: 1;
  }

  .hero h1 {
    font-size: 32px;
  }

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

  .examples-grid,
  .puzzle-grid {
    grid-template-columns: 1fr;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}
