/* Amaze Puzzle — marketing site. Matches the game's dark theme. */
:root {
  --bg: #171b24;
  --panel: #20262f;
  --panel-2: #2a313c;
  --text: #eef1f6;
  --muted: #93a0b4;
  --accent: #7a86ff;
  --teal: #2fbfa8;
  --line: #0f1218;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

.wrap.wide {
  max-width: 1060px;
}

/* Small inline SVG icons that sit in text and buttons. */
.ico-inline {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 6px;
}
.ico-inline.big {
  width: 17px;
  height: 17px;
  vertical-align: -2.5px;
  margin-right: 9px;
}
.ico-inline.logo-ico { width: 15px; height: 15px; vertical-align: -2.5px; margin-right: 0; }

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ---------- Drifting-pieces backdrop ---------- */
#drift {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

/* ---------- Sticky nav ---------- */
.sitenav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #ffffff0d;
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 15px;
}
.nav-ico { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-play {
  color: #ffffff; background: linear-gradient(120deg, #5566e0, var(--teal));
  padding: 6px 12px; border-radius: 9px; font-weight: 800;
}
@media (max-width: 640px) { .nav-links a:not(.nav-play) { display: none; } }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 48px 0 40px;
  background:
    radial-gradient(ellipse 90% 60% at 30% -10%, #7a86ff16, transparent),
    radial-gradient(ellipse 60% 40% at 80% 0%, #2fbfa812, transparent);
}
.hero-logo {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 8px 22px #5566e055);
  animation: bob 3.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

/* Two columns on wide screens: copy left, playable demo right (above the fold). */
.hero-grid {
  display: grid;
  gap: 34px;
  justify-items: center;
}
@media (min-width: 940px) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    text-align: left;
    justify-items: stretch;
  }
  .hero-grid .tagline { margin-left: 0; }
  .hero-grid .hero-badges,
  .hero-grid .trust-strip { justify-content: flex-start; }
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #7a86ff18;
  border: 1px solid #7a86ff40;
  color: #dfe3ff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 700;
}
.trust-ico {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--accent);
}
.hero h1 {
  margin: 10px 0 6px;
  font-size: clamp(38px, 8vw, 58px);
  font-weight: 800;
  letter-spacing: 0.5px;
}
.hero h1 .amaze {
  background: linear-gradient(120deg, #8f9aff, var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline {
  color: var(--muted);
  font-size: clamp(16px, 3.5vw, 19px);
  max-width: 480px;
  margin: 0 auto 26px;
}
.hero-cta {
  margin-bottom: 16px;
}
.btn-play-now {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 14px;
  background: linear-gradient(130deg, #8f9aff 0%, #5566e0 45%, #2fbfa8 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(85, 102, 224, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-play-now:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(47, 191, 168, 0.4);
}
.stat-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 4px; }
.stat {
  background: var(--panel); border: 1px solid #ffffff0f; border-radius: 999px;
  padding: 7px 14px; font-size: 13.5px; color: var(--muted);
}
.stat b { color: var(--text); }
.hero .wrap > .stat-strip { margin-top: 34px; }
.stat-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.badge-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border: 1px solid #ffffff2b;
  border-radius: 12px;
  padding: 10px 20px 10px 14px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  cursor: default;
}
.badge-play svg {
  width: 26px;
  height: 28px;
  flex: none;
}
.badge-play .b-top {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.badge-play .b-bottom {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
}

/* ---------- Sections ---------- */
section {
  padding: 44px 0;
}
section h2 {
  text-align: center;
  font-size: clamp(26px, 5.5vw, 34px);
  margin: 0 0 6px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 30px;
  max-width: 540px;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Playable demo ---------- */
.demo-panel {
  background: var(--panel);
  border: 1px solid #ffffff10;
  border-radius: 20px;
  padding: 22px 18px 20px;
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}
.demo-panel.hero-demo {
  width: 100%;
  margin: 0;
}
.demo-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.demo-help {
  margin: 12px auto 0;
  max-width: 340px;
  color: var(--muted);
  font-size: 13px;
}
.demo-status {
  min-height: 22px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.demo-status.win {
  color: var(--teal);
}
.puzzle-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  width: min(84vw, 340px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 3px;
  background: var(--line);
  border-radius: 12px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.piece {
  position: relative;
  border: none;
  padding: 0;
  min-width: 0;
  min-height: 0;
  border-radius: 5px;
  background-size: 400% 400%;
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.piece.sel {
  box-shadow: 0 0 0 3px var(--accent), 0 6px 16px #0009;
  transform: scale(1.05);
  z-index: 2;
}
.piece.locked {
  cursor: default;
}
.piece.locked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 5px;
  animation: lockflash 0.5s ease;
  pointer-events: none;
}
@keyframes lockflash {
  0% { background: #ffffff66; }
  100% { background: transparent; }
}
.piece.drop-target {
  box-shadow: 0 0 0 3px var(--teal);
  z-index: 1;
}
.piece.dragging { opacity: 0.35; }
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  border-radius: 6px;
  background-size: 400% 400%;
  box-shadow: 0 10px 26px #000a, 0 0 0 2px #ffffff44;
  opacity: 0.95;
}
.peek-overlay {
  position: absolute;
  inset: 3px;
  border-radius: 9px;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  background-size: cover;
}
.peek-overlay.show { opacity: 1; }
.puzzle-board.solved { gap: 0; }
.puzzle-board.solved .piece { border-radius: 0; cursor: default; }
.demo-controls {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.btn {
  background: var(--accent);
  color: #0d1024;
  border: none;
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn.ghost {
  background: var(--panel-2);
  color: var(--text);
}

/* ---------- Confetti ---------- */
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}
.confetti i {
  position: absolute;
  top: -4vh;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confall linear forwards;
}
@keyframes confall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0.7;
  }
}

/* ---------- How to play ---------- */
.rules-grid.four { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .rules-grid.four { grid-template-columns: 1fr; } }
.rule-card {
  background: var(--panel);
  border: 1px solid #ffffff10;
  border-radius: 16px;
  padding: 20px 18px;
}
.rule-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(130deg, #8f9aff, var(--teal));
  color: #0d1024;
  font-weight: 800;
  font-size: 15px;
  margin-right: 4px;
}
.rule-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.rule-viz {
  display: flex; align-items: center; margin-bottom: 12px; height: 44px;
}
.rule-viz svg { height: 44px; display: block; }

/* ---------- Worlds (theme showcase) ---------- */
.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.world-card {
  background: var(--panel);
  border: 1px solid #ffffff10;
  border-radius: 16px;
  padding: 10px 10px 12px;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.world-card:hover {
  transform: translateY(-3px);
  border-color: #7a86ff55;
}
.world-card canvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border-radius: 10px;
  background: var(--panel-2);
}
.world-name {
  font-weight: 700;
  margin-top: 8px;
}
.world-meta {
  color: var(--muted);
  font-size: 13px;
}
.world-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 2px 8px;
}
.world-tag.free {
  background: #5ec16822;
  color: #5ec168;
}
.world-tag.premium {
  background: #2fbfa81e;
  color: var(--teal);
}
.premium-note {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  max-width: 500px;
  margin: 26px auto 0;
}
.premium-note strong { color: var(--accent); }

/* ---------- Pricing ---------- */
.price-compare { overflow-x: auto; }
.price-table {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border: 1px solid #ffffff10;
  border-radius: 16px;
  overflow: hidden;
  font-size: 14.5px;
}
.price-table th, .price-table td {
  padding: 12px 16px;
  text-align: left;
  border-top: 1px solid #ffffff0a;
}
.price-table thead th {
  border-top: none;
  font-size: 15px;
  padding-top: 16px;
}
.price-table tbody th {
  color: var(--muted);
  font-weight: 600;
  width: 30%;
}
.price-table td { color: var(--text); }
.price-table .col-hi { background: #7a86ff0e; }
.price-table thead .col-hi { color: var(--accent); }
.price-amount {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.price-amount i { font-style: normal; color: var(--muted); font-weight: 600; }
.price-table .tick { width: 13px; height: 13px; color: #5ec168; margin-right: 4px; vertical-align: -1px; }
.price-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 18px auto 0;
}

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.feature {
  background: var(--panel); border: 1px solid #ffffff0d; border-radius: 14px; padding: 18px;
}
.f-ico { width: 28px; height: 28px; color: var(--accent); }
.feature h3 { margin: 8px 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-list details {
  background: var(--panel); border: 1px solid #ffffff0d; border-radius: 12px;
  padding: 4px 18px; margin-bottom: 10px;
}
.faq-list summary {
  cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+'; position: absolute; right: 2px; color: var(--accent); font-weight: 800;
  transition: transform 0.18s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 14px; color: var(--muted); }

/* ---------- Family cross-promo ---------- */
#family .wrap { padding-top: 0; display: grid; gap: 12px; }
.family-card {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  background: linear-gradient(120deg, #2a2410, #20262f 60%);
  border: 1px solid #ffce5c33; border-radius: 16px; padding: 18px 20px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.family-card:hover { transform: translateY(-2px); border-color: #ffce5c66; }
.family-card .family-arrow { color: #ffce5c; }
.family-card.moons {
  background: linear-gradient(120deg, #1d2140, #20262f 60%);
  border-color: #8f9dff33;
}
.family-card.moons:hover { border-color: #8f9dff66; }
.family-card.moons .family-arrow { color: #8f9dff; }
.family-ico { width: 34px; height: 34px; flex: none; color: #ffce5c; }
.family-card.moons .family-ico { color: #8f9dff; }
.family-text { display: flex; flex-direction: column; gap: 3px; }
.family-text b { color: var(--text); font-size: 16px; }
.family-text i { color: var(--muted); font-style: normal; font-size: 14px; }
.family-arrow { margin-left: auto; font-size: 30px; font-weight: 700; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--panel-2);
  margin-top: 30px;
  padding: 28px 0 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
footer .foot-links {
  margin-top: 6px;
}

/* ---------- Privacy page prose ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0 20px;
}
.prose h1 {
  font-size: clamp(30px, 6vw, 40px);
  margin: 0 0 4px;
}
.prose .effective {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 14px;
}
.prose h2 {
  font-size: 21px;
  margin: 34px 0 10px;
  text-align: left;
}
.prose p, .prose li {
  color: #c6cedb;
  font-size: 15.5px;
}
.prose ul { padding-left: 22px; }
.prose .tl-dr {
  background: var(--panel);
  border: 1px solid #7a86ff33;
  border-radius: 16px;
  padding: 16px 20px;
  margin: 0 0 10px;
}
.prose .tl-dr p { margin: 6px 0; }
.topnav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 0;
  font-weight: 700;
}
.topnav a {
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}
.topnav a:hover { color: var(--accent); }
.topnav .logo-mini {
  width: 22px;
  height: 22px;
  margin-right: 8px;
}

@media (max-width: 480px) {
  section { padding: 34px 0; }
  .hero { padding: 44px 0 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
