/* Game-matching design: animated gradient, glass surfaces, rounded type. */

:root {
  --deep-purple: #6648c7;
  --coral-pink: #ff6b82;
  --coral-orange: #fa8451;
  --sun-yellow: #ffcd33;
  --mint: #4fd9b5;
  --lavender: #a98cfd;
  --text-on-surface: #2b1d52;
  --text-muted: #6b6485;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  /* Almarai is the brand font everywhere. System-rounded falls back smoothly
   * while the webfont loads (display=swap). */
  font-family: "Almarai", ui-rounded, -apple-system, BlinkMacSystemFont,
               "SF Pro Rounded", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-on-surface);
  background: #6266ee;
}

/* ---------- Animated gradient + drifting blobs ---------- */

.canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg,
    #5C6BF2 0%, #9E5CEB 25%, #F066A8 50%, #FA8451 75%, #FFBC4C 100%);
  background-size: 300% 300%;
  animation: gradient-shift 24s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

.blob-yellow { width: 360px; height: 360px; top: -4rem; left: -4rem;
               background: var(--sun-yellow);
               animation: blob-a 14s ease-in-out infinite; }
.blob-mint   { width: 320px; height: 320px; top: 30%; right: -6rem;
               background: var(--mint);
               animation: blob-b 18s ease-in-out infinite; }
.blob-lavender { width: 280px; height: 280px; bottom: -3rem; left: 10%;
                 background: var(--lavender);
                 animation: blob-c 16s ease-in-out infinite; }

@keyframes blob-a {
  0%, 100% { transform: translate(-200px, -80px); }
  50%      { transform: translate(-140px, -120px); }
}
@keyframes blob-b {
  0%, 100% { transform: translate(180px, 90px); }
  50%      { transform: translate(220px, 140px); }
}
@keyframes blob-c {
  0%, 100% { transform: translate(-220px, 200px); }
  50%      { transform: translate(-180px, 160px); }
}

/* ---------- Layout ---------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

@media (min-width: 640px) {
  .container { padding: 3rem 2rem; }
}

/* ---------- Home page ---------- */

.home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.hero {
  max-width: 540px;
  width: 100%;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: 28px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow:
    0 24px 60px -20px rgba(80, 40, 120, 0.40),
    0 8px 24px -12px rgba(255, 107, 130, 0.35);
}

@media (min-width: 640px) {
  .hero { padding: 2.75rem 2.5rem; }
}

.wordmark {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--deep-purple);
  margin: 0;
}

.tagline {
  margin: 0.5rem 0 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.store-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 480px) {
  .store-buttons { grid-template-columns: 1fr 1fr; }
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 18px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.5);
}

.store-btn:hover { background: #222; transform: translateY(-1px); }
.store-btn:active { transform: translateY(0); }

.store-btn .glyph { font-size: 1.4rem; line-height: 1; }
.store-btn .pre  { display: block; font-size: 0.65rem; font-weight: 600;
                   letter-spacing: 0.12em; text-transform: uppercase;
                   color: rgba(255,255,255,0.78); margin-bottom: 0.1rem; }
.store-btn .name { display: block; font-size: 1rem; font-weight: 700;
                   line-height: 1.1; }
.store-btn .stack { text-align: left; }

.store-btn.coming-soon { opacity: 0.65; cursor: not-allowed; }
.store-btn .badge { font-size: 0.6rem; font-weight: 700; padding: 0.18rem 0.45rem;
                    border-radius: 999px; background: rgba(255,255,255,0.15);
                    margin-left: 0.4rem; vertical-align: middle; }

.about-line {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(43, 29, 82, 0.55);
}

.about-line a {
  color: var(--coral-pink);
  text-decoration: none;
  font-weight: 700;
}

.about-line a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */

.footer {
  padding: 1.5rem 1rem 2.25rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(60, 30, 90, 0.25);
}

.footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.footer a:hover { text-decoration-thickness: 2.5px; }
.footer .sep { margin: 0 0.6rem; opacity: 0.6; }

/* ---------- Privacy page ---------- */

.policy-header {
  text-align: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.policy-back {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(60, 30, 90, 0.25);
  margin-bottom: 1.5rem;
}

.policy-back:hover { background: rgba(255,255,255,0.28); }

.policy-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: 28px;
  padding: 2rem 1.5rem;
  box-shadow:
    0 24px 60px -20px rgba(80, 40, 120, 0.40),
    0 8px 24px -12px rgba(255, 107, 130, 0.35);
  line-height: 1.65;
}

@media (min-width: 640px) {
  .policy-card { padding: 2.5rem 2.5rem; }
}

.policy-card h1 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  color: var(--deep-purple);
  margin: 0 0 0.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.policy-card .effective {
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.policy-card h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--deep-purple);
  font-weight: 800;
}

.policy-card p,
.policy-card li {
  font-size: 0.96rem;
  color: #3a2f5e;
}

.policy-card ul { padding-left: 1.25rem; margin: 0.5rem 0 0.75rem; }
.policy-card li { margin-bottom: 0.35rem; }
.policy-card strong { color: var(--deep-purple); }
.policy-card a { color: var(--coral-pink); font-weight: 600; }

.policy-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(102, 72, 199, 0.12);
  font-size: 0.85rem;
  color: var(--text-muted);
}
