:root {
  --bg: #0c0c10;
  --bg-2: #121218;
  --panel: #17171f;
  --panel-2: #1d1d27;
  --stroke: #2a2a36;
  --text: #ece9e6;
  --dim: #9b94a6;
  --amber: #f6be39;
  --amber-dark: #d4a017;
  --premium: #b98bff;
  --ok: #4ad07d;
  --radius: 16px;
  --maxw: 1080px;
  --font: 'Hanken Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% -10%, #1a1726 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[dir='rtl'] { direction: rtl; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--dim); }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--amber); color: #1a1405; }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; border-color: var(--stroke); color: var(--text); }
.btn--ghost:hover { background: var(--panel-2); }
.btn--block { width: 100%; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(12, 12, 16, 0.72);
  border-bottom: 1px solid var(--stroke);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--dim); font-weight: 600; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

/* Hero */
.hero { padding: 90px 0 60px; text-align: center; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(246, 190, 57, 0.12);
  color: var(--amber);
  border: 1px solid rgba(246, 190, 57, 0.3);
  font-weight: 700;
  font-size: 13px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.05;
  margin: 22px auto 14px;
  max-width: 14ch;
  letter-spacing: -0.02em;
}
.hero p.sub { font-size: clamp(16px, 2.4vw, 21px); color: var(--dim); max-width: 56ch; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 16px; font-size: 13px; color: var(--dim); }

.trust { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 40px; color: var(--dim); font-size: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust b { color: var(--ok); }

/* Sections */
section.block { padding: 64px 0; }
section.block h2 { font-size: clamp(26px, 4vw, 38px); text-align: center; margin: 0 0 8px; letter-spacing: -0.01em; }
section.block .sub { text-align: center; color: var(--dim); margin: 0 auto 40px; max-width: 52ch; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
}
.card .tag { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.tag--free { color: var(--ok); }
.tag--premium { color: var(--premium); }
.card h3 { margin: 10px 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--dim); font-size: 15px; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: step; }
.step { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 24px; }
.step .n {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--amber); color: #1a1405; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--dim); font-size: 14px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; align-items: stretch; }
.plan {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.plan--featured { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset, 0 20px 50px -30px var(--amber); }
.plan .pop {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--amber); color: #1a1405; font-weight: 800; font-size: 12px;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { margin: 0 0 4px; font-size: 20px; }
.plan .price { font-size: 34px; font-weight: 800; margin: 10px 0 2px; }
.plan .price small { font-size: 14px; font-weight: 600; color: var(--dim); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--dim); }
.plan li::before { content: '✓'; color: var(--ok); font-weight: 800; }
.plan .btn { margin-top: auto; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--stroke); border-radius: 12px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--amber); }
.faq p { margin: 0 0 16px; color: var(--dim); font-size: 15px; }

/* Footer */
.site-footer { border-top: 1px solid var(--stroke); padding: 40px 0; color: var(--dim); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--text); }
.foot-links { display: flex; gap: 20px; }

/* Auth modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 6, 9, 0.7); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 28px;
}
.modal h2 { margin: 0 0 4px; font-size: 22px; text-align: start; }
.modal .sub { text-align: start; margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--stroke);
  border-radius: 10px; color: var(--text); font: inherit;
}
.field input:focus { outline: none; border-color: var(--amber); }
.auth-error { color: #ff6b6b; font-size: 14px; min-height: 20px; margin: 4px 0 12px; }
.auth-toggle { text-align: center; margin-top: 16px; font-size: 14px; color: var(--dim); }
.auth-toggle button { background: none; border: none; color: var(--amber); font: inherit; font-weight: 700; cursor: pointer; }
.modal .close { float: inline-end; background: none; border: none; color: var(--dim); font-size: 22px; cursor: pointer; line-height: 1; }
.signed-in-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }

@media (max-width: 720px) {
  .nav { display: none; }
}

/* Interactive demo (popup preview) */
.demo { max-width: 430px; margin: 0 auto; }
.demo-popup {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 30px 70px -40px #000;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dp-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.dp-brand img { width: 24px; height: 24px; border-radius: 6px; }
.dp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.dp-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.dp-track { background: var(--bg-2); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.dp-trackmeta { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 10px; }
.dp-trackname { color: var(--text); font-weight: 600; }
.dp-time { font-variant-numeric: tabular-nums; }
.dp-viz { display: flex; align-items: flex-end; gap: 3px; height: 58px; }
.dp-viz i {
  flex: 1 1 0; min-width: 2px; height: 40%;
  background: linear-gradient(180deg, var(--amber), var(--amber-dark));
  border-radius: 2px 2px 0 0; transform-origin: bottom;
  animation: dpviz var(--vd, 0.9s) ease-in-out infinite;
}
@keyframes dpviz { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

.dp-tabs { display: flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--stroke); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.dp-tab { flex: 1; background: none; border: none; color: var(--dim); font: inherit; font-weight: 700; font-size: 13px; padding: 8px; border-radius: 7px; cursor: pointer; }
.dp-tab.is-active { background: var(--panel-2); color: var(--text); }

.dp-panel { display: none; }
.dp-panel.is-active { display: block; }
.dp-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dp-row label { width: 78px; font-size: 13px; color: var(--dim); flex: none; }
.dp-row input[type='range'] { flex: 1; accent-color: var(--amber); cursor: pointer; }
.dp-row output { width: 54px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; }

.dp-loop { display: flex; gap: 6px; flex: 1; }
.dp-chip { background: var(--bg-2); border: 1px solid var(--stroke); color: var(--text); font: inherit; font-weight: 700; font-size: 12px; padding: 7px 0; border-radius: 8px; cursor: pointer; flex: 1; }
.dp-chip.is-set { border-color: var(--amber); color: var(--amber); }
.dp-chip--clear { color: var(--dim); font-weight: 600; }
.dp-loopbar { height: 6px; background: var(--bg-2); border-radius: 999px; position: relative; overflow: hidden; }
.dp-loopbar span { position: absolute; top: 0; bottom: 0; left: 22%; right: 38%; background: var(--amber); opacity: 0.45; display: none; }
.dp-loopbar.is-on span { display: block; }

.dp-fxbadge { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); margin-bottom: 16px; }

.dp-panel[data-panel='ai'] { position: relative; min-height: 168px; }
.dp-ailocked { filter: blur(4px); opacity: 0.5; pointer-events: none; user-select: none; }
.dp-modes { display: flex; gap: 6px; margin-bottom: 14px; }
.dp-mode { flex: 1; background: var(--bg-2); border: 1px solid var(--stroke); color: var(--text); font: inherit; font-weight: 700; font-size: 13px; padding: 9px 0; border-radius: 8px; }
.dp-mode.is-active { border-color: var(--amber); color: var(--amber); }
.dp-premium {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px;
  background: rgba(12, 12, 16, 0.35); border-radius: 12px;
}
.dp-premium .dp-lock { font-size: 26px; }
.dp-premium p { margin: 0; font-size: 13px; color: var(--text); max-width: 32ch; }

.demo-foot { text-align: center; color: var(--dim); font-size: 13px; margin: 18px 0 16px; }

@media (max-width: 480px) {
  .dp-row label { width: 62px; }
}
