:root {
  --bg: #0b0a2e;
  --bg-2: #141070;
  --surface: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #b4adf0;
  --dim: #7a72c0;
  --gold: #ffd166;
  --brand: linear-gradient(90deg, #ffc21c 0%, #ff7a2e 50%, #f2577a 100%);
  --brand-btn: linear-gradient(90deg, #ffd166 0%, #ff9f2e 100%);
  --glow: linear-gradient(135deg, #2ed3b0, #b44dff 55%, #ff7a2e);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% 10%, rgba(180, 77, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(46, 211, 176, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- landing ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 1024px) { .page { height: 100vh; overflow: hidden; } }

.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
@media (min-width: 640px) { .nav { padding: 24px 40px; } }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; filter: drop-shadow(0 4px 20px rgba(180, 77, 255, 0.45)); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-links .hide-sm { display: none; }
@media (min-width: 640px) { .nav-links .hide-sm { display: inline; } }

.hero {
  flex: 1; min-height: 0; padding: 8px 20px 24px;
  display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center;
}
@media (min-width: 640px) { .hero { padding: 8px 40px 16px; } }
@media (min-width: 1024px) { .hero { grid-template-columns: 1fr 1fr; gap: 40px; } }

.copy { display: flex; flex-direction: column; max-width: 560px; }
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  backdrop-filter: blur(8px); font-size: 12px; color: var(--muted);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #2ed3b0; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

h1 {
  margin-top: 16px; font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.02em;
}
h1 .grad { display: block; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 16px; font-size: clamp(16px, 2vw, 18px); line-height: 1.55; color: var(--muted); max-width: 440px; }

.chips { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: rgba(255, 255, 255, 0.9);
}
.chip svg { width: 14px; height: 14px; color: var(--gold); flex: none; }

.cta { margin-top: 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px;
  background: var(--brand-btn); color: #3a2300; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px -8px rgba(255, 159, 46, 0.6); transition: transform 0.15s, opacity 0.15s;
}
.btn:hover { opacity: 0.95; }
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; }
.note { font-size: 12px; color: var(--dim); }

/* ---------- phone mockup ---------- */
.showcase { position: relative; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.showcase::before {
  content: ''; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: var(--glow); opacity: 0.25; filter: blur(60px);
}
.phone {
  position: relative; z-index: 1; height: min(70vh, 620px); max-height: 100%; min-height: 460px; aspect-ratio: 9 / 19;
  border-radius: 2.4rem; padding: 10px; background: #05041a;
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
@media (max-width: 1023px) { .phone { height: 560px; } }
.screen {
  height: 100%; width: 100%; border-radius: 1.9rem; overflow: hidden; position: relative;
  background: linear-gradient(180deg, #2a1e8c, #1426b0); display: flex; flex-direction: column;
  container-type: inline-size;
}
.status { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 4px; font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.status .notch { width: 64px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.3); }
.score-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 10px; background: #1e1670; }
.best { display: flex; align-items: center; gap: 4px; font-family: var(--display); font-weight: 700; font-size: 12px; }
.best svg { width: 14px; height: 14px; color: var(--gold); }
.score { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--gold); }
.pause { width: 18px; height: 18px; color: rgba(255, 255, 255, 0.8); }

.board-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px; position: relative; }
.board {
  width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 1px;
  background: rgba(47, 180, 255, 0.45); border: 2px solid #2fb4ff; border-radius: 4px;
  box-shadow: 0 0 18px 2px rgba(47, 180, 255, 0.5); position: relative;
}
.cell { background: #100e52; position: relative; }
.b {
  position: absolute; inset: 5%; border-radius: 8%;
  border-style: solid; border-width: max(2px, 0.6cqi);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.b::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.12); border-radius: 4%; }
.l1 { background: #2ed3b0; border-color: #8ff5de #13917a #13917a #8ff5de; }
.l2 { background: #86d42a; border-color: #c9f58a #4e9410 #4e9410 #c9f58a; }
.l3 { background: #ffc21c; border-color: #ffe68a #c98a00 #c98a00 #ffe68a; }
.l4 { background: #ff7a2e; border-color: #ffb98a #c24a0c #c24a0c #ffb98a; }
.l5 { background: #f2577a; border-color: #ffa6bb #b32549 #b32549 #ffa6bb; }
.l6 { background: #b44dff; border-color: #dda8ff #7419c2 #7419c2 #dda8ff; }
.ghost { position: absolute; inset: 8%; border: 2px solid #ffe68a; border-radius: 3px; background: rgba(255, 194, 28, 0.35); }
.clear-row {
  position: absolute; left: 0; right: 0; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 3px;
  background: rgba(255, 255, 255, 0.12); box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.45);
  animation: flash 1.4s ease-in-out infinite;
}
@keyframes flash { 50% { opacity: 0.45; } }

.toast {
  position: absolute; left: 36%; top: 2%; transform: translateX(-50%) rotate(-4deg);
  font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--gold); white-space: nowrap;
  text-shadow: 0 0 18px rgba(255, 209, 102, 0.8); animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateX(-50%) rotate(-4deg) translateY(-6px); } }

.tray { display: flex; justify-content: space-around; align-items: center; margin: 0 10px 14px; padding: 12px 6px; border-radius: 14px; background: rgba(14, 18, 90, 0.55); }
.piece { display: grid; gap: 1px; }
.piece .pc { width: 16px; height: 16px; position: relative; }
.piece .pc .b { inset: 0; }
.drag { position: absolute; z-index: 3; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }
.drag .pc { width: 22px; height: 22px; }
.hand { position: absolute; z-index: 4; font-size: 26px; transform: rotate(-10deg); }

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 12px; color: var(--dim);
}
@media (min-width: 640px) { .foot { padding: 16px 40px; } }
.foot a:hover { color: var(--text); }

/* ---------- privacy ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.back:hover { color: var(--text); }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.updated { margin-top: 8px; font-size: 13px; color: var(--dim); }
.doc section { margin-top: 20px; padding: 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.doc h2 { font-family: var(--display); font-size: 18px; color: var(--gold); margin-bottom: 8px; }
.doc p { font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, 0.85); }
.doc p + p { margin-top: 10px; }
.doc a.link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
