@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;400;500;600;700&display=swap');

/* ── Base tokens (theme-independent) ─────────────────── */
:root {
  --accent:    #7c5cfc;
  --accent-2:  #a78bfa;
  --teal:      #2dd4bf;
  --r-xs: 8px;
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --transition: 0.22s ease;
}

/* ── Dark theme ───────────────────────────────────────── */
.dark-theme {
  --bg:          #08080e;
  --bg-grad:     radial-gradient(ellipse 90% 55% at 50% -5%, rgba(124,92,252,.2) 0%, transparent 62%);
  --surface:     #101018;
  --surface-2:   #17171f;
  --surface-3:   #1d1d27;
  --surface-4:   #232330;
  --border:      rgba(255,255,255,.065);
  --border-mid:  rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.15);
  --text:        #edeaff;
  --text-2:      #9e99bb;
  --text-3:      #5e5878;
  --topbar-bg:   rgba(10,10,16,.85);
  --shadow-card: 0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:   0 24px 60px rgba(0,0,0,.7);
  --warn-bg:     rgba(251,146,60,.09); --warn-border: rgba(251,146,60,.22); --warn-text: #fb923c;
  --ok-bg:       rgba(45,212,191,.08); --ok-border:   rgba(45,212,191,.2);  --ok-text:   #2dd4bf;
  --store-bg:    #17171f;
  --store-hover: #1d1d27;
  --qr-fill:     #edeaff;
  --qr-bg:       #17171f;
}

/* ── Light theme ──────────────────────────────────────── */
.light-theme {
  --bg:          #f5f4fe;
  --bg-grad:     radial-gradient(ellipse 90% 55% at 50% -5%, rgba(124,92,252,.09) 0%, transparent 62%);
  --surface:     #ffffff;
  --surface-2:   #f0eefb;
  --surface-3:   #e8e5f7;
  --surface-4:   #ddd9f0;
  --border:      rgba(0,0,0,.07);
  --border-mid:  rgba(0,0,0,.10);
  --border-strong: rgba(0,0,0,.14);
  --text:        #0d0b1a;
  --text-2:      #3f3b58;
  --text-3:      #8a85a4;
  --topbar-bg:   rgba(255,255,255,.88);
  --shadow-card: 0 1px 4px rgba(0,0,0,.07);
  --shadow-lg:   0 24px 60px rgba(0,0,0,.18);
  --warn-bg:     rgba(251,146,60,.07); --warn-border: rgba(251,146,60,.25); --warn-text: #92400e;
  --ok-bg:       rgba(45,212,191,.07); --ok-border:   rgba(45,212,191,.28); --ok-text:   #0f766e;
  --store-bg:    #f0eefb;
  --store-hover: #e8e5f7;
  --qr-fill:     #0d0b1a;
  --qr-bg:       #ffffff;
}

/* ── Reset ────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }

body {
  background-color: var(--bg);
  background-image: var(--bg-grad);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
}
a { color:inherit; text-decoration:none; }
strong { font-weight:700; }

/* ── Shell ────────────────────────────────────────────── */
.shell {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0 80px;
}

/* ── Topbar ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xl);
  background: var(--topbar-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  margin-bottom: 20px;
  position: sticky;
  top: 12px;
  z-index: 200;
  transition: background var(--transition), border-color var(--transition);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(145deg, var(--accent), #5036d4);
  box-shadow: 0 5px 18px rgba(124,92,252,.42);
}
.brand-mark span { font-size:20px; font-weight:900; color:#fff; line-height:1; }
.brand-title   { font-size:15px; font-weight:700; letter-spacing:-.04em; color:var(--text); line-height:1; }
.brand-subtitle{ font-size:10.5px; color:var(--text-3); margin-top:3px; font-weight:500; }

.topbar-tools { display:flex; align-items:center; gap:7px; flex:1; min-width:0; }

.nav { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:2px; flex:1; min-width:0; }
.nav a {
  display:inline-flex; align-items:center; justify-content:center;
  height:30px; padding:0 10px; border-radius:999px;
  border:1px solid transparent; font-size:11.5px; font-weight:600;
  color:var(--text-2); white-space:nowrap;
  transition:color .15s, background .15s, border-color .15s;
}
.nav a:hover  { color:var(--text); background:var(--surface-2); border-color:var(--border-mid); }
.nav a.active { background:var(--accent); color:#fff; box-shadow:0 3px 12px rgba(124,92,252,.32); }

/* Theme toggle */
.theme-toggle {
  width:30px; height:30px; border-radius:50%;
  border:1px solid var(--border-mid); background:var(--surface-2);
  color:var(--text-2); font-size:13px; cursor:pointer; font-family:inherit;
  display:grid; place-items:center; flex-shrink:0;
  transition:background .15s, color .15s;
}
.theme-toggle:hover { background:var(--surface-3); color:var(--text); }

/* Lang switcher */
.lang-switcher {
  display:inline-flex; align-items:center; gap:2px;
  padding:3px; border-radius:999px;
  border:1px solid var(--border); background:var(--surface-2); flex-shrink:0;
}
.lang-switcher button {
  min-width:32px; height:24px; padding:0 6px; border:0;
  border-radius:999px; background:transparent; color:var(--text-3);
  font-size:9.5px; font-weight:800; letter-spacing:.06em; cursor:pointer;
  font-family:inherit; transition:background .15s, color .15s;
}
.lang-switcher button:hover  { color:var(--text-2); }
.lang-switcher button.active { background:var(--accent); color:#fff; }

/* ── Eyebrow ──────────────────────────────────────────── */
.eyebrow {
  display:inline-flex; align-items:center; gap:7px;
  padding:5px 12px; border-radius:999px; margin-bottom:20px;
  background:rgba(124,92,252,.1); border:1px solid rgba(124,92,252,.22);
  color:var(--accent-2); font-size:10.5px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase;
}
.eyebrow::before {
  content:''; width:5px; height:5px; border-radius:50%;
  background:var(--accent-2); flex-shrink:0;
  animation:pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position:relative; overflow:hidden;
  padding:56px 52px 48px;
  border-radius:var(--r-xl);
  border:1px solid var(--border-mid);
  background:var(--surface);
  margin-bottom:14px;
  box-shadow:var(--shadow-card);
  transition:background var(--transition), border-color var(--transition);
}
.hero::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg, transparent, var(--accent) 40%, var(--teal) 60%, transparent);
  opacity:.65;
}
.hero-glow {
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(ellipse 55% 65% at 82% 46%, rgba(124,92,252,.07) 0%, transparent 58%),
    radial-gradient(ellipse 38% 48% at 12% 80%, rgba(45,212,191,.05) 0%, transparent 52%);
}
.hero h1 {
  font-family:'DM Serif Display', Georgia, serif;
  font-size:clamp(32px, 4.5vw, 58px);
  line-height:1.07; letter-spacing:-.03em;
  color:var(--text); max-width:760px; font-weight:400;
  position:relative;
}
.hero h1 em { font-style:italic; color:var(--accent-2); }
.hero > p {
  margin-top:16px; max-width:600px; font-size:15px;
  line-height:1.78; color:var(--text-2); position:relative;
}

.meta-row { display:flex; flex-wrap:wrap; gap:7px; margin-top:22px; position:relative; }
.meta-chip {
  display:inline-flex; align-items:center; gap:6px;
  height:30px; padding:0 12px; border-radius:999px;
  border:1px solid var(--border-mid); background:var(--surface-2);
  font-size:11.5px; font-weight:600; color:var(--text-2);
}
.meta-chip::before {
  content:''; width:4px; height:4px; border-radius:50%;
  background:var(--teal); flex-shrink:0;
}

.cta-row { display:flex; flex-wrap:wrap; gap:9px; margin-top:20px; position:relative; }

.metric-grid {
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr));
  gap:10px; margin-top:28px; padding-top:28px; border-top:1px solid var(--border);
  position:relative;
}
.metric-card {
  padding:16px 18px; border-radius:var(--r);
  border:1px solid var(--border); background:var(--surface-2);
  transition:background var(--transition);
}
.metric-card strong {
  display:block; font-size:28px; line-height:1; font-weight:800;
  letter-spacing:-.05em;
  background:linear-gradient(135deg, var(--text), var(--accent-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
  margin-bottom:7px;
}
.metric-card span { font-size:12px; line-height:1.55; color:var(--text-3); font-weight:500; }

/* ── Download / Store ─────────────────────────────────── */
.dl-section {
  display:flex; align-items:center; justify-content:space-between; gap:28px;
  padding:36px 40px;
  border-radius:var(--r-xl);
  border:1px solid var(--border-mid);
  background:var(--surface);
  position:relative; overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:background var(--transition), border-color var(--transition);
}
.dl-section::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg, transparent, var(--teal) 38%, var(--accent) 62%, transparent);
  opacity:.55;
}
.dl-section::after {
  content:''; position:absolute; right:-40px; top:-40px;
  width:200px; height:200px; border-radius:50%;
  background:radial-gradient(circle, rgba(45,212,191,.06), transparent 70%);
  pointer-events:none;
}

.dl-label {
  display:inline-flex; align-items:center; gap:6px; margin-bottom:12px;
  padding:4px 11px; border-radius:999px;
  background:rgba(45,212,191,.1); border:1px solid rgba(45,212,191,.2);
  color:var(--teal); font-size:10px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase;
}
.dl-label::before {
  content:''; width:4px; height:4px; border-radius:50%;
  background:var(--teal); animation:pulse 2s infinite;
}
.dl-title {
  font-family:'DM Serif Display', Georgia, serif;
  font-size:clamp(22px, 2.5vw, 30px); font-weight:400;
  letter-spacing:-.025em; line-height:1.12; color:var(--text);
  margin-bottom:8px;
}
.dl-body { font-size:13.5px; color:var(--text-2); line-height:1.65; max-width:380px; }

.dl-btns { display:flex; gap:10px; flex-shrink:0; position:relative; z-index:1; }

/* Store buttons — premium badge style */
.store-btn {
  display:flex; align-items:center; gap:13px;
  padding:13px 20px 13px 16px; border-radius:var(--r);
  border:1px solid var(--border-strong);
  background:var(--store-bg);
  color:var(--text); cursor:pointer; font-family:inherit; text-align:left;
  min-width:168px; position:relative; overflow:hidden;
  transition:background .18s, border-color .18s, transform .18s, box-shadow .18s;
  box-shadow:var(--shadow-card);
}
.store-btn::before {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg, rgba(124,92,252,.08) 0%, transparent 60%);
  opacity:0; transition:opacity .18s;
}
.store-btn:hover {
  background:var(--store-hover);
  border-color:rgba(124,92,252,.35);
  transform:translateY(-3px);
  box-shadow:0 12px 32px rgba(0,0,0,.18), 0 0 0 1px rgba(124,92,252,.15);
}
.store-btn:hover::before { opacity:1; }

.store-btn-icon {
  width:32px; height:32px; flex-shrink:0;
  display:grid; place-items:center;
}
.store-btn-icon svg { fill:var(--text); display:block; }

.store-btn-text { display:flex; flex-direction:column; gap:2px; }
.store-btn-sub  {
  font-size:9.5px; font-weight:600; color:var(--text-3);
  letter-spacing:.05em; text-transform:uppercase; line-height:1;
}
.store-btn-name {
  font-size:16px; font-weight:700; letter-spacing:-.025em;
  line-height:1.1; color:var(--text);
}
.store-btn-badge {
  position:absolute; top:8px; right:8px;
  font-size:9px; font-weight:700; letter-spacing:.04em;
  padding:2px 7px; border-radius:999px;
  background:rgba(124,92,252,.15); color:var(--accent-2);
  border:1px solid rgba(124,92,252,.2);
}

/* ── QR Modal ─────────────────────────────────────────── */
#qrOverlay {
  position:fixed; inset:0; z-index:9999;
  display:flex; align-items:center; justify-content:center; padding:20px;
  background:rgba(0,0,0,0); backdrop-filter:blur(0px);
  transition:background .28s, backdrop-filter .28s;
}
#qrOverlay[hidden] { display:none !important; }

#qrModal {
  position:relative; border-radius:28px;
  padding:36px 34px 30px; width:100%; max-width:320px; text-align:center;
  transform:scale(.92) translateY(14px); opacity:0;
  transition:transform .28s cubic-bezier(.34,1.5,.64,1), opacity .24s;
  box-shadow:var(--shadow-lg);
  background:var(--surface);
  border:1px solid var(--border-strong);
}
#qrModal::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  border-radius:28px 28px 0 0;
  background:linear-gradient(90deg,transparent,var(--accent) 38%,var(--teal) 62%,transparent);
  opacity:.7;
}
#qrCloseBtn {
  position:absolute; top:13px; right:13px;
  width:30px; height:30px; border-radius:50%;
  border:1px solid var(--border-mid); background:var(--surface-2);
  color:var(--text-3); font-size:14px; cursor:pointer; font-family:inherit;
  display:grid; place-items:center; transition:background .15s, color .15s;
  line-height:1;
}
#qrCloseBtn:hover { background:var(--surface-3); color:var(--text); }
#qrBadge {
  display:inline-flex; height:22px; padding:0 11px; border-radius:999px;
  font-size:9.5px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  align-items:center; margin-bottom:14px;
}
#qrTitle {
  font-family:'DM Serif Display',Georgia,serif;
  font-size:21px; font-weight:400; color:var(--text);
  letter-spacing:-.02em; margin-bottom:5px; line-height:1.2;
}
#qrSub  { font-size:13px; color:var(--text-2); margin-bottom:22px; }
#qrBox  {
  width:188px; height:188px; margin:0 auto 18px; border-radius:14px;
  overflow:hidden; background:var(--qr-bg);
  border:1px solid var(--border-mid);
  display:flex; align-items:center; justify-content:center; padding:8px;
}
#qrBox img, #qrBox canvas, #qrBox table { display:block !important; border:0 !important; }
#qrHint { font-size:12px; color:var(--text-3); line-height:1.55; }

/* ── Sections & Grid ──────────────────────────────────── */
.section { margin-top:14px; }
.grid   { display:grid; gap:12px; }
.grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.split  { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr); gap:12px; }

/* ── Card ─────────────────────────────────────────────── */
.card {
  padding:26px; border-radius:var(--r-lg);
  border:1px solid var(--border); background:var(--surface);
  box-shadow:var(--shadow-card);
  transition:border-color .18s, background var(--transition);
}
.card:hover { border-color:var(--border-mid); }

.card h2 {
  font-family:'DM Serif Display',Georgia,serif;
  font-size:21px; font-weight:400; line-height:1.2;
  letter-spacing:-.02em; color:var(--text); margin-bottom:10px;
}
.card h3 {
  font-size:11.5px; font-weight:700; letter-spacing:.07em;
  text-transform:uppercase; color:var(--accent-2); margin-bottom:9px;
}
.card p, .card li { color:var(--text-2); font-size:14px; line-height:1.8; }
.card ul, .card ol { padding-left:18px; color:var(--text-2); font-size:14px; line-height:1.8; }
.card li+li { margin-top:5px; }
.card p+p, .card ul, .card ol { margin-top:10px; }

.stack>*+* { margin-top:14px; }
.mini-stack { display:grid; gap:10px; }

.callout {
  padding:15px 17px; border-radius:var(--r-sm);
  border:1px solid var(--border-mid); background:var(--surface-2);
  transition:background var(--transition);
}
.callout strong { display:block; font-size:12.5px; font-weight:700; color:var(--text); margin-bottom:5px; }
.callout span, .callout a { font-size:13px; color:var(--text-2); line-height:1.6; }
.callout a { color:var(--accent-2); font-weight:600; }

.chip-row { display:flex; flex-wrap:wrap; gap:7px; }
.chip {
  display:inline-flex; align-items:center; height:30px; padding:0 12px;
  border-radius:999px; border:1px solid rgba(124,92,252,.2);
  background:rgba(124,92,252,.08); font-size:11.5px; font-weight:600; color:var(--accent-2);
}

/* ── Buttons ──────────────────────────────────────────── */
.button {
  display:inline-flex; align-items:center; justify-content:center;
  height:40px; padding:0 20px; border-radius:var(--r-sm);
  border:1px solid transparent; background:var(--accent); color:#fff;
  font-size:13px; font-weight:700; font-family:inherit; cursor:pointer;
  letter-spacing:.01em; white-space:nowrap;
  box-shadow:0 3px 14px rgba(124,92,252,.28);
  transition:opacity .15s, transform .15s, box-shadow .15s;
}
.button:hover { opacity:.88; transform:translateY(-1px); box-shadow:0 6px 22px rgba(124,92,252,.36); }
.button.secondary {
  background:var(--surface-2); color:var(--text-2);
  border-color:var(--border-mid); box-shadow:none;
}
.button.secondary:hover { background:var(--surface-3); color:var(--text); transform:translateY(-1px); }
.button.danger {
  background:rgba(248,113,113,.1); color:#f87171;
  border-color:rgba(248,113,113,.25); box-shadow:none;
}

/* ── Banners ──────────────────────────────────────────── */
.info-banner {
  padding:14px 18px; border-radius:var(--r);
  border:1px solid var(--ok-border); background:var(--ok-bg);
  font-size:13px; line-height:1.65; color:var(--ok-text); font-weight:500;
}
.warn-banner {
  padding:14px 18px; border-radius:var(--r);
  border:1px solid var(--warn-border); background:var(--warn-bg);
  font-size:13px; line-height:1.65; color:var(--warn-text); font-weight:500;
}

/* ── Page header ──────────────────────────────────────── */
.page-header {
  padding:44px 44px 36px; border-radius:var(--r-xl);
  border:1px solid var(--border-mid); background:var(--surface);
  margin-bottom:14px; position:relative; overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:background var(--transition);
}
.page-header::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,var(--accent) 38%,var(--teal) 62%,transparent);
  opacity:.55;
}
.page-header h1 {
  font-family:'DM Serif Display',Georgia,serif;
  font-size:clamp(24px,3.8vw,44px); font-weight:400;
  letter-spacing:-.03em; line-height:1.1; max-width:720px; margin-top:14px;
}
.page-header h1 em { font-style:italic; color:var(--accent-2); }
.page-header p {
  margin-top:12px; font-size:14px; color:var(--text-2);
  line-height:1.75; max-width:600px;
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
  margin-top:14px; padding:18px 24px;
  border-radius:var(--r-lg); border:1px solid var(--border);
  background:var(--surface); font-size:12.5px; line-height:1.75;
  color:var(--text-3); display:flex; align-items:center;
  justify-content:space-between; gap:14px; flex-wrap:wrap;
  transition:background var(--transition);
}
.footer-brand { font-weight:700; color:var(--text-2); font-size:13px; letter-spacing:-.025em; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width:920px) {
  .topbar { align-items:flex-start; flex-direction:column; position:relative; top:0; gap:8px; }
  .topbar-tools { width:100%; flex-wrap:wrap; }
  .nav { flex:none; width:100%; justify-content:flex-start; }
  .grid-3,.grid-2,.metric-grid,.split { grid-template-columns:1fr; }
  .hero { padding:36px 30px; }
  .page-header { padding:34px 28px 28px; }
  .dl-section { flex-direction:column; align-items:flex-start; padding:28px; gap:22px; }
  .dl-btns { width:100%; }
  .store-btn { flex:1; }
}

@media (max-width:640px) {
  .shell { width:calc(100% - 20px); padding:12px 0 60px; }
  .topbar { border-radius:var(--r-lg); padding:8px 10px; }
  .hero { padding:26px 20px; border-radius:var(--r-lg); }
  .page-header { padding:26px 20px; border-radius:var(--r-lg); }
  .card { padding:20px 18px; border-radius:var(--r); }
  .footer { border-radius:var(--r); padding:14px 16px; }
  .dl-section { padding:22px 20px; border-radius:var(--r-lg); }
  .dl-btns { flex-direction:column; }
  .store-btn { min-width:unset; width:100%; }
  .dl-title { font-size:22px; }
  .nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .nav a { height:34px; font-size:10.5px; padding:0 5px; text-align:center; }
  .metric-grid { grid-template-columns:1fr; }
  .hero h1 { font-size:clamp(26px,7.5vw,38px); }
}

@media (max-width:380px) {
  .nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
