/* Landing page at / (panel served under /panel/). Same design language as the admin panel: tokens copied from
   panel/src/styles/tokens.css (violet accent, mesh + dot grid, glass, capsule buttons, IRANSans). No inline styles
   or scripts: the edge CSP allows 'self' only. */
@font-face { font-family: 'IRANSans'; font-weight: 400; font-display: swap; src: url(IRANSansWeb_Regular.woff2) format('woff2'); }
@font-face { font-family: 'IRANSans'; font-weight: 500; font-display: swap; src: url(IRANSansWeb_Medium.woff2) format('woff2'); }
@font-face { font-family: 'IRANSans'; font-weight: 700; font-display: swap; src: url(IRANSansWeb_Bold.woff2) format('woff2'); }

:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f5f8, #0b0f17);
  --surface: light-dark(#ffffff, #151b26);
  --text: light-dark(#0b1120, #f5f7fb);
  --text-2: light-dark(#2b3445, #d3d9e3);
  --muted: light-dark(#4a5466, #a9b2c1);
  --border: light-dark(rgba(15, 23, 42, 0.08), rgba(255, 255, 255, 0.07));
  --border-strong: light-dark(rgba(15, 23, 42, 0.14), rgba(255, 255, 255, 0.12));
  --accent: light-dark(#5b47f5, #8f86ff);
  --accent-solid: light-dark(#5b47f5, #6c5cff);
  --accent-solid-hover: light-dark(#4834e0, #7d6fff);
  --accent-text: light-dark(#4330d9, #c3bcff);
  --accent-soft: light-dark(rgba(91, 71, 245, 0.13), rgba(143, 134, 255, 0.22));
  --accent2: light-dark(#0ea5a0, #2dd4bf);
  --accent2-soft: light-dark(rgba(14, 165, 160, 0.15), rgba(45, 212, 191, 0.20));
  --accent3: light-dark(#e0621f, #ff9a5c);
  --accent3-soft: light-dark(rgba(240, 106, 40, 0.14), rgba(255, 154, 92, 0.20));
  --success-text: light-dark(#0f7a4f, #4ade9a);
  --success-soft: light-dark(rgba(59, 175, 138, 0.14), rgba(59, 175, 138, 0.20));
  --mesh1: light-dark(rgba(91, 71, 245, 0.26), rgba(108, 92, 255, 0.32));
  --mesh2: light-dark(rgba(14, 165, 160, 0.20), rgba(45, 212, 191, 0.18));
  --mesh3: light-dark(rgba(240, 106, 40, 0.16), rgba(255, 154, 92, 0.14));
  --dot: light-dark(rgba(15, 23, 42, 0.09), rgba(255, 255, 255, 0.06));
  --glass-bg: light-dark(rgba(255, 255, 255, 0.58), rgba(21, 27, 38, 0.62));
  --glass-filter: blur(28px) saturate(170%);
  --glass-border: 1px solid light-dark(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.09));
  --glass-highlight: inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.08));
  --glass-shadow: 0 1px 2px light-dark(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.3)), 0 6px 20px light-dark(rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.35));
  --glass-solid: light-dark(#f7f8fb, #181f2b);
  --shadow-1: 0 1px 2px light-dark(rgba(15, 23, 42, 0.04), rgba(0, 0, 0, 0.35)), 0 4px 14px light-dark(rgba(15, 23, 42, 0.03), rgba(0, 0, 0, 0.25));
  --shadow-3: 0 16px 48px light-dark(rgba(15, 23, 42, 0.16), rgba(0, 0, 0, 0.6));
  --shadow-btn: 0 1px 2px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --btn-primary-bg: linear-gradient(180deg, color-mix(in srgb, var(--accent-solid) 86%, #fff), var(--accent-solid));
  --radius-md: 14px; --radius-lg: 20px; --radius-xl: 28px; --radius-pill: 999px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: 'IRANSans', system-ui, sans-serif; font-size: 15px; line-height: 1.75;
  background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }

/* ambient mesh and dot grid, as behind the panel */
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle 420px at calc(100% - 180px) 160px, var(--mesh1), transparent 72%),
    radial-gradient(circle 340px at 30% 420px, var(--mesh2), transparent 72%),
    radial-gradient(circle 420px at 160px calc(100% - 80px), var(--mesh3), transparent 72%); }
body::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25) 60%, transparent);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.25) 60%, transparent); }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 10; padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--accent-solid); color: #fff; }
.skip:focus { top: 12px; }

.glass { background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: var(--glass-border); box-shadow: var(--glass-highlight), var(--glass-shadow); }

/* header */
.top { position: sticky; top: 0; z-index: 5; padding: 12px 0; }
.top-row { display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 10px 0 10px; border-radius: var(--radius-pill);
  background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border: var(--glass-border); box-shadow: var(--glass-highlight), var(--glass-shadow); max-width: 1120px; }
.brand { display: flex; align-items: center; gap: 10px; padding-inline-start: 6px; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-solid); color: #fff;
  box-shadow: var(--shadow-btn); }
.logo svg { width: 19px; height: 19px; }
.brand-text { font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-text.small { font-size: 15px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 8px 14px; border-radius: var(--radius-pill); color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--accent-soft); color: var(--accent-text); }

/* buttons: capsules, as in the panel */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius-pill); font-weight: 500; white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s, border-color .18s, box-shadow .18s; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .nav a:focus-visible, .brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--btn-primary-bg); color: #fff; box-shadow: var(--shadow-btn), 0 8px 24px color-mix(in srgb, var(--accent-solid) 30%, transparent); }
.btn-primary:hover { background: var(--accent-solid-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.btn-glass { min-height: 40px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.btn-glass:hover { background: var(--accent-solid); color: #fff; }
.btn-light { background: #fff; color: #3a22c9; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.btn-light:hover { transform: translateY(-1px); }

/* hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent-text); font-weight: 500; font-size: 13px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 0 4px var(--accent2-soft); }
.hero h1 { margin-top: 18px; text-wrap: balance; font-size: clamp(28px, 4vw, 44px); line-height: 1.4; font-weight: 700; letter-spacing: -0.01em; }
.grad { background: linear-gradient(90deg, var(--accent) 10%, #a855f7 50%, var(--accent2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 18px; max-width: 560px; font-size: 17px; color: var(--text-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* hero illustration: two glass cards in the panel's style */
.hero-art { position: relative; min-height: 430px; }
.card-balance, .card-list { position: absolute; border-radius: var(--radius-xl); padding: 22px 24px; }
.card-balance { inset-inline-end: 0; top: 0; width: min(360px, 92%); transform: rotate(-2deg); }
.card-list { inset-inline-start: 0; top: 214px; width: min(380px, 96%); transform: rotate(1.5deg); padding: 10px 12px; }
.row { display: flex; align-items: center; justify-content: space-between; }
.amount { margin-top: 10px; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.amount small { font-size: 14px; font-weight: 500; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 64px; margin-top: 18px; }
.bars span { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent)); }
.bars span:nth-child(1) { height: 38%; } .bars span:nth-child(2) { height: 55%; } .bars span:nth-child(3) { height: 44%; }
.bars span:nth-child(4) { height: 70%; } .bars span:nth-child(5) { height: 58%; } .bars span:nth-child(6) { height: 86%; }
.bars span:nth-child(7) { height: 100%; background: linear-gradient(180deg, var(--accent2), color-mix(in srgb, var(--accent2) 45%, transparent)); }
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 500; }
.chip-ok { background: var(--success-soft); color: var(--success-text); }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--radius-md); }
.li + .li { border-top: 1px solid var(--border); }
.ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; }
.ico svg { width: 18px; height: 18px; }
.ico-in { background: var(--success-soft); color: var(--success-text); }
.ico-tr { background: var(--accent-soft); color: var(--accent-text); }
.ico-ok { background: var(--accent2-soft); color: var(--accent2); }
.li-text { display: flex; flex-direction: column; flex: 1; line-height: 1.5; }
.li-text b { font-weight: 500; }
.li-text .muted { font-size: 12px; }
.li-amt { font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.li-amt.plus { color: var(--success-text); }

/* sections */
.section { padding: 56px 0; }
.title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.45; }
.subtitle { margin-top: 8px; color: var(--muted); font-size: 16px; }
#features .title, #features .subtitle { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.feature { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.feature h3 { margin-top: 14px; font-size: 17px; font-weight: 700; }
.feature p { margin-top: 6px; color: var(--muted); }
.ficon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; }
.ficon svg { width: 22px; height: 22px; }
.f1 { background: var(--accent-soft); color: var(--accent-text); }
.f2 { background: var(--accent2-soft); color: var(--accent2); }
.f3 { background: var(--accent3-soft); color: var(--accent3); }

.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 36px 40px; border-radius: var(--radius-xl); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.checks svg { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--success-soft); color: var(--success-text); stroke-width: 2.6; }

.final { padding: 48px 32px; border-radius: var(--radius-xl); text-align: center; color: #fff;
  background: radial-gradient(600px 260px at 85% 0%, rgba(45, 212, 191, .55), transparent 70%),
              radial-gradient(500px 240px at 0% 100%, rgba(168, 85, 247, .55), transparent 70%),
              linear-gradient(135deg, #3a22c9, #5b47f5 55%, #6c5cff); box-shadow: var(--shadow-3); }
.final h2 { font-size: clamp(22px, 2.8vw, 30px); }
.final p { margin: 8px 0 24px; opacity: .9; }

.foot { position: relative; z-index: 1; padding: 28px 0 36px; color: var(--muted); font-size: 13px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 20px; }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { min-height: 430px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .top-row { justify-content: space-between; }
  .grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 440px; }
  .card-list { top: 206px; }
  .card-balance, .card-list { transform: none; }
  .btn { width: 100%; }
  .top .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feature { transition: none; }
  .feature:hover, .btn-light:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .top-row { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .top-row { background: var(--glass-solid); }
}
@media (forced-colors: active) { body::before, body::after { display: none; } }
