:root {
  --bg: #fafafb;
  --bg-alt: #f3f2f7;
  --surface: #ffffff;
  --text: #0f0d18;
  --muted: #5f5b6e;
  --border: rgba(15, 13, 24, 0.08);
  --violet: #7c3aed;
  --pink: #ec4899;
  --amber: #f59e0b;
  --gradient: linear-gradient(120deg, var(--violet) 0%, var(--pink) 55%, var(--amber) 100%);
  --shadow-sm: 0 1px 2px rgba(15, 13, 24, 0.04), 0 2px 8px rgba(15, 13, 24, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(76, 29, 149, 0.35);
  --radius: 20px;
  --container: 1120px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0a12;
    --bg-alt: #110f1b;
    --surface: #161422;
    --text: #f4f2fa;
    --muted: #a19cb3;
    --border: rgba(255, 255, 255, 0.08);
    --violet: #a78bfa;
    --pink: #f472b6;
    --amber: #fbbf24;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px -20px rgba(167, 139, 250, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gradient);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; border-radius: 12px; }

.btn-play {
  background: #0f0d18;
  color: #fff;
  padding: 10px 22px 10px 18px;
  text-align: left;
  box-shadow: var(--shadow-lg);
}
.btn-play svg { width: 26px; height: 26px; flex-shrink: 0; }
.btn-play small { display: block; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; opacity: 0.75; text-transform: uppercase; }
.btn-play strong { display: block; font-size: 1.1rem; line-height: 1.15; }
@media (prefers-color-scheme: dark) {
  .btn-play { background: #fff; color: #0f0d18; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }

/* ---------- Hero ---------- */
.hero {
  isolation: isolate;
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  z-index: -1;
}
.hero::before { width: 520px; height: 520px; background: var(--violet); top: -180px; right: -120px; }
.hero::after  { width: 420px; height: 420px; background: var(--pink); bottom: -220px; left: -160px; opacity: 0.3; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 22px 0 20px;
}
.hero p.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* Phone mockup */
.phone-wrap { display: flex; justify-content: center; position: relative; }
.phone {
  width: 280px;
  height: 570px;
  border-radius: 46px;
  background: #0f0d18;
  padding: 12px;
  box-shadow: 0 50px 100px -30px rgba(76, 29, 149, 0.55), inset 0 0 0 2px #2a2738;
  transform: rotate(4deg);
  animation: float 6s ease-in-out infinite;
}
.phone-screen {
  height: 100%;
  border-radius: 36px;
  background: linear-gradient(165deg, #faf5ff 0%, #fdf2f8 60%, #fffbeb 100%);
  padding: 46px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.phone-screen::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%;
  width: 90px; height: 24px;
  transform: translateX(-50%);
  background: #0f0d18;
  border-radius: 999px;
}
.ps-head { display: flex; align-items: center; gap: 12px; }
.ps-head img { width: 48px; height: 48px; border-radius: 14px; }
.ps-line { height: 10px; border-radius: 6px; background: rgba(15, 13, 24, 0.1); }
.ps-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 20px -8px rgba(76, 29, 149, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-card.accent { background: var(--gradient); }
.ps-card.accent .ps-line { background: rgba(255, 255, 255, 0.55); }
.ps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ps-tile { height: 86px; border-radius: 18px; background: #fff; box-shadow: 0 6px 20px -8px rgba(76, 29, 149, 0.25); }
.ps-tile:nth-child(2) { background: #ede9fe; }

.float-badge {
  z-index: 2;
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: float 6s ease-in-out infinite;
  animation-delay: -3s;
}
.float-badge .ico {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-size: 1rem;
}
.float-badge.one { top: 70px; left: -10px; }
.float-badge.two { bottom: 80px; right: -10px; animation-delay: -1.5s; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .float-badge { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
section.block { padding: 96px 0; }
section.block.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 16px 0 14px;
}
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature .icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
  margin-bottom: 20px;
}
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 8px; font-size: 1.15rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); }

/* App showcase */
.app-showcase {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.app-showcase + .app-showcase { margin-top: 20px; }
.app-showcase .app-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.app-showcase h3 { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: -0.02em; }
.app-showcase p { margin: 0 0 12px; color: var(--muted); }
.app-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.88rem; font-weight: 600; }
.app-meta a { color: var(--muted); text-decoration: none; }
.app-meta a:hover { color: var(--text); }

/* CTA band */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 64px 48px;
  background: var(--gradient);
  color: #fff;
  text-align: center;
}
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.03em; margin: 0 0 12px; }
.cta p { margin: 0 auto 28px; max-width: 520px; opacity: 0.9; font-size: 1.1rem; }
.cta .btn { background: #fff; color: #0f0d18; }

/* ---------- Legal / doc pages ---------- */
.page-hero {
  isolation: isolate;
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: "";
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: var(--violet);
  filter: blur(110px);
  opacity: 0.25;
  top: -260px; right: -80px;
  z-index: -1;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 18px 0 12px;
}
.page-hero p { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 640px; }

.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding-top: 56px;
  padding-bottom: 96px;
}
.toc { position: sticky; top: 104px; align-self: start; }
.toc h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 12px;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.toc a:hover { color: var(--text); border-left-color: var(--violet); }

.prose { max-width: 720px; font-size: 1.04rem; }
.prose h2 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin: 48px 0 12px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.08rem; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.prose li { margin-bottom: 8px; }
.prose ul li::marker { color: var(--violet); }
.prose ol li::marker { color: var(--violet); font-weight: 700; }
.prose a { color: var(--violet); font-weight: 600; text-underline-offset: 3px; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--violet);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.callout p:last-child { margin-bottom: 0; }

.steps { display: grid; gap: 16px; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 0;
  box-shadow: var(--shadow-sm);
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}
.contact-card h3 { margin: 0 0 4px; font-size: 1.2rem; }
.contact-card p { margin: 0; color: var(--muted); }

details.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--violet); transition: transform 0.2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: 0 0 18px; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 120px 0; }
.not-found .big {
  font-size: clamp(6rem, 18vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 0;
}
.not-found p { color: var(--muted); font-size: 1.15rem; margin: 8px 0 32px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-grid p { color: var(--muted); max-width: 300px; margin: 14px 0 0; }
.footer-grid h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 6px 0 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid li a { text-decoration: none; font-weight: 500; }
.footer-grid li a:hover { color: var(--violet); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .features { grid-template-columns: 1fr; }
  .app-showcase { grid-template-columns: auto 1fr; }
  .app-showcase .btn { grid-column: 1 / -1; justify-self: start; }
  .doc-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-inner { height: auto; padding-top: 14px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; margin: 0 -6px; }
  .nav-links a { padding: 6px 10px; font-size: 0.88rem; white-space: nowrap; }
  .site-header .btn-sm { display: none; }
  section.block { padding: 64px 0; }
  .phone { width: 240px; height: 490px; }
  .float-badge { display: none; }
  .app-showcase { grid-template-columns: 1fr; padding: 24px; text-align: left; }
  .cta { padding: 48px 24px; border-radius: 24px; }
  .page-hero { padding: 48px 0 40px; }
  .doc-layout { padding-top: 40px; padding-bottom: 64px; }
}

/* ---------- Multi-platform additions ---------- */

/* Hero: browser window + phone */
.device-stack {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 580px;
  margin: 0 auto;
}
.device-stack .phone { position: absolute; right: 10px; top: 0; }
.browser {
  position: absolute;
  left: -50px;
  top: 90px;
  width: 360px;
  height: 300px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 13, 24, 0.08);
  box-shadow: 0 40px 80px -30px rgba(76, 29, 149, 0.45);
  overflow: hidden;
  transform: rotate(-4deg);
  animation: float 7s ease-in-out infinite;
  animation-delay: -2s;
}
.browser-bar {
  height: 34px;
  background: #f3f2f7;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d9d6e2; }
.browser-bar i:nth-child(1) { background: #f87171; }
.browser-bar i:nth-child(2) { background: #fbbf24; }
.browser-bar i:nth-child(3) { background: #34d399; }
.browser-bar span { flex: 1; height: 16px; margin-left: 10px; border-radius: 8px; background: #fff; }
.browser-body { padding: 22px; display: grid; gap: 12px; }
.browser-hero { height: 84px; border-radius: 12px; background: var(--gradient); }
.browser-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.browser-cols div { height: 64px; border-radius: 10px; background: #f3f2f7; }

/* Platform cards */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Platform tags */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag svg { width: 13px; height: 13px; }
.tag.android { color: #16a34a; }
.tag.ios { color: var(--text); }
.tag.web { color: #2563eb; }
@media (prefers-color-scheme: dark) {
  .tag.android { color: #4ade80; }
  .tag.web { color: #60a5fa; }
}

/* Product grid */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product .app-icon { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 18px; box-shadow: var(--shadow-lg); }
.product h3 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -0.02em; }
.product p { margin: 0 0 18px; color: var(--muted); flex: 1; }
.store-links { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.store-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #0f0d18;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.15s ease;
}
.store-link:hover { transform: translateY(-2px); }
.store-link svg { width: 16px; height: 16px; }
@media (prefers-color-scheme: dark) { .store-link { background: #fff; color: #0f0d18; } }
.product-legal {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
}
.product-legal a { color: var(--muted); text-decoration: none; }
.product-legal a:hover { color: var(--text); }

/* Product sections in legal pages */
.product-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px 6px;
  margin: 0 0 16px;
  box-shadow: var(--shadow-sm);
}
.product-block h3 { margin-top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-block .tags { margin: 0; }

@media (max-width: 900px) {
  .platforms, .products { grid-template-columns: 1fr; }
  .device-stack { height: 560px; max-width: 420px; }
  .browser { width: 300px; height: 250px; left: 0; }
}
@media (max-width: 640px) {
  .device-stack { height: 500px; }
  .device-stack .phone { right: 50%; transform: translateX(50%) rotate(4deg); }
  .browser { display: none; }
}
@media (prefers-reduced-motion: reduce) { .browser { animation: none; } }
