/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg:          #0b0814;
  --bg-2:        #110c1c;
  --surface:     #16102a;
  --surface-2:   #1f1640;
  --text:        #ece8f5;
  --muted:       #8e87a8;
  --border:      rgba(168, 85, 247, 0.10);
  --violet-deep: #6d28d9;
  --violet:      #a855f7;
  --magenta:     #ec4899;
  --live-red:    #ef4444;
  --grad:        linear-gradient(135deg, var(--violet-deep) 0%, var(--violet) 70%, var(--magenta) 100%);
  --tg-blue:     #229ed9;
  --tg-light:    #37aee2;
  --tg-deep:     #1e96c8;
  --tg-grad:     linear-gradient(135deg, var(--tg-light) 0%, var(--tg-deep) 100%);
  --nav-h:       64px;
  --radius:      14px;
  --maxw:        1140px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
p  { margin: 0; }

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

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 32px);
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  border-bottom-color: var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-dot {
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--violet);
  box-shadow: 0 0 18px 2px rgba(168, 85, 247, 0.55);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  font-size: 0.95rem;
}
.nav-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

.cta-sm {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--tg-grad);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.75);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 64px);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 60% 50% at center,
    rgba(168, 85, 247, 0.14) 0%,
    rgba(109, 40, 217, 0.06) 40%,
    transparent 75%
  );
}

#smoke {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#smoke canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-content {
  max-width: 880px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live-red);
  box-shadow: 0 0 12px var(--live-red);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%      { transform: scale(1.4); opacity: 0.55;}
}

.sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 640px;
}
.sub strong { color: var(--text); font-weight: 600; }

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  border-radius: 999px;
  background: var(--tg-grad);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-top: 6px;
}
.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.75);
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55);
  animation: cta-pulse 2.4s ease-out infinite;
}
.cta-arrow { transition: transform 0.25s ease; }
.cta:hover .cta-arrow { transform: translateX(4px); }
.tg-logo { flex-shrink: 0; }

@keyframes cta-pulse {
  0%   { box-shadow: 0 0 0 0  rgba(168, 85, 247, 0.55); }
  100% { box-shadow: 0 0 0 22px rgba(168, 85, 247, 0);   }
}

.tg-link {
  color: var(--tg-blue) !important;
  transition: color 0.2s ease;
}
.tg-link:hover { color: var(--tg-light) !important; }

.cta-note {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) clamp(16px, 4vw, 32px);
}
.section-head {
  text-align: center;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.section-head .muted { max-width: 520px; }

/* ---------- Store grid ---------- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.store-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(8px);
}
.store-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.store-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
}
.store-card:hover::before { opacity: 0.65; }

.store-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
}
.store-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.store-logo.fallback {
  background: var(--grad);
  color: var(--bg);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.store-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.store-host {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq details {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq details[open] {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(168, 85, 247, 0.35);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s ease;
  line-height: 1;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  color: var(--magenta);
}
.faq p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 24px clamp(16px, 4vw, 32px);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer a:hover { color: var(--text); }

/* ---------- Prose (legal / terms pages) ---------- */
.prose {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text);
}
.prose h2 {
  margin-top: 40px;
  margin-bottom: 12px;
  font-size: 1.3rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p,
.prose ul,
.prose ol {
  color: var(--muted);
  margin: 12px 0;
  font-size: 0.97rem;
}
.prose ul,
.prose ol { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a {
  color: var(--magenta);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(236, 72, 153, 0.4);
}
.prose a:hover { text-decoration-color: var(--magenta); }
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.prose .updated {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav { padding: 0 16px; }
  .nav-links a:not(.cta-sm) { display: none; }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .cta { padding: 16px 26px; font-size: 1rem; }
}

@media (max-width: 420px) {
  .store-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cta, .cta::after { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
