/* ============================================================
   ZDM landing page
   Design tokens copied verbatim from the app's src/styles/theme.css
   ============================================================ */

:root{
  --bg:#15120f; --surface:rgba(29,25,19,.55); --surface-2:rgba(38,32,25,.48); --surface-3:rgba(48,41,33,.55);
  --border:rgba(255,241,214,.10); --border-soft:rgba(255,241,214,.06); --glass-highlight:rgba(255,255,255,.06);
  --text:#f2ece1; --text-dim:#ab9f8c; --text-faint:#6f6455;
  --accent:#e8a33d; --accent-strong:#f7bd63; --accent-ink:#2b1c05; --accent-soft:rgba(232,163,61,.14);
  --progress:#4fb477; --progress-strong:#72cf95; --progress-ink:#062712; --progress-soft:rgba(79,180,119,.16);
  --teal:#4fa89c; --teal-soft:rgba(79,168,156,.16);
  --blue:#5b9bd8; --blue-soft:rgba(91,155,216,.16);
  --plum:#a586d1; --plum-soft:rgba(165,134,209,.16);
  --rose:#d1789a; --rose-soft:rgba(209,120,154,.16);
  --success:#7cb35a; --success-soft:rgba(124,179,90,.15);
  --warning:#d97b3f; --warning-soft:rgba(217,123,63,.15);
  --error:#d1543f; --error-soft:rgba(209,84,63,.15);
  --shadow:0 20px 48px -20px rgba(0,0,0,.6);
  --glass-blur:blur(22px) saturate(165%);
  --font-ui:'IBM Plex Sans',system-ui,sans-serif;
  --font-display:'IBM Plex Sans Condensed','IBM Plex Sans',system-ui,sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,monospace;
  --radius:10px; --radius-sm:6px; --radius-lg:18px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light){
  :root{
    --bg:#f5efe3; --surface:rgba(255,253,249,.55); --surface-2:rgba(251,245,233,.55); --surface-3:rgba(243,234,216,.62);
    --border:rgba(37,31,22,.10); --border-soft:rgba(37,31,22,.06); --glass-highlight:rgba(255,255,255,.5);
    --text:#251f16; --text-dim:#726751; --text-faint:#9c9179;
    --accent:#b06a17; --accent-strong:#8f5510; --accent-ink:#fffaf0; --accent-soft:rgba(176,106,23,.10);
    --progress:#2f8f52; --progress-strong:#23713f; --progress-ink:#f2fbf5; --progress-soft:rgba(47,143,82,.10);
    --teal:#2c7a70; --teal-soft:rgba(44,122,112,.10);
    --blue:#2f6fae; --blue-soft:rgba(47,111,174,.10);
    --plum:#7a58a8; --plum-soft:rgba(122,88,168,.10);
    --rose:#a8496b; --rose-soft:rgba(168,73,107,.10);
    --success:#4c7a30; --success-soft:rgba(76,122,48,.10);
    --warning:#a8531f; --warning-soft:rgba(168,83,31,.10);
    --error:#a5392a; --error-soft:rgba(165,57,42,.10);
    --shadow:0 20px 40px -24px rgba(80,60,20,.25);
    color-scheme: light;
  }
}
:root[data-theme="dark"]{
  --bg:#15120f; --surface:rgba(29,25,19,.55); --surface-2:rgba(38,32,25,.48); --surface-3:rgba(48,41,33,.55);
  --border:rgba(255,241,214,.10); --border-soft:rgba(255,241,214,.06); --glass-highlight:rgba(255,255,255,.06);
  --text:#f2ece1; --text-dim:#ab9f8c; --text-faint:#6f6455;
  --accent:#e8a33d; --accent-strong:#f7bd63; --accent-ink:#2b1c05; --accent-soft:rgba(232,163,61,.14);
  --progress:#4fb477; --progress-strong:#72cf95; --progress-ink:#062712; --progress-soft:rgba(79,180,119,.16);
  --shadow:0 20px 48px -20px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-theme="light"]{
  --bg:#f5efe3; --surface:rgba(255,253,249,.55); --surface-2:rgba(251,245,233,.55); --surface-3:rgba(243,234,216,.62);
  --border:rgba(37,31,22,.10); --border-soft:rgba(37,31,22,.06); --glass-highlight:rgba(255,255,255,.5);
  --text:#251f16; --text-dim:#726751; --text-faint:#9c9179;
  --accent:#b06a17; --accent-strong:#8f5510; --accent-ink:#fffaf0; --accent-soft:rgba(176,106,23,.10);
  --progress:#2f8f52; --progress-strong:#23713f; --progress-ink:#f2fbf5; --progress-soft:rgba(47,143,82,.10);
  --shadow:0 20px 40px -24px rgba(80,60,20,.25);
  color-scheme: light;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg); color:var(--text); font-family:var(--font-ui);
  -webkit-font-smoothing:antialiased; line-height:1.5; overflow-x:hidden;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ list-style:none; }
code{ font-family:var(--font-mono); }
::selection{ background:var(--accent-soft); color:var(--text); }

.ltr{ direction:ltr; unicode-bidi:isolate; }

.wrap{ max-width:1180px; margin:0 auto; padding:0 24px; }

.skip-link{ position:absolute; inset-inline-start:-999px; top:0; background:var(--accent); color:var(--accent-ink); padding:10px 16px; z-index:200; border-radius:0 0 8px 0; }
.skip-link:focus{ inset-inline-start:0; }

/* ---------------- scroll progress ---------------- */
.scroll-progress{
  position:fixed; top:0; left:0; height:3px; width:0%; z-index:210;
  background:linear-gradient(90deg, var(--accent), var(--progress-strong));
  transition:width .12s linear; pointer-events:none;
}

/* ---------------- background wash ---------------- */
.bg-wash{
  position:fixed; inset:-15%; z-index:-1; pointer-events:none;
  background:
    radial-gradient(640px 640px at 10% 8%, var(--accent-soft), transparent 60%),
    radial-gradient(720px 720px at 92% 15%, var(--progress-soft), transparent 60%),
    radial-gradient(680px 680px at 20% 70%, var(--plum-soft), transparent 60%),
    radial-gradient(640px 640px at 96% 85%, var(--blue-soft), transparent 60%);
  filter:blur(40px);
}

/* ---------------- navbar ---------------- */
.navbar{
  position:sticky; top:0; z-index:100; border-bottom:1px solid transparent;
  transition:background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.navbar.scrolled{
  background:var(--surface); border-bottom-color:var(--border-soft);
  backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
}
.navbar-inner{ height:64px; display:flex; align-items:center; gap:28px; }
.brand{ display:flex; align-items:center; gap:9px; margin-right:auto; }
.brand-mark{ border-radius:8px; display:block; }
.brand-name{ font-family:var(--font-display); font-weight:700; font-size:19px; letter-spacing:.02em; }
.nav-links{ display:flex; gap:26px; }
.nav-links a{ font-size:14px; color:var(--text-dim); transition:color .15s ease; position:relative; }
.nav-links a:hover{ color:var(--text); }
.nav-links a::after{ content:''; position:absolute; left:0; right:0; bottom:-20px; height:2px; background:var(--accent); transform:scaleX(0); transition:transform .2s ease; }
.nav-links a:hover::after, .nav-links a.active::after{ transform:scaleX(1); }
.nav-links a.active{ color:var(--text); }
.navbar-actions{ display:flex; align-items:center; gap:10px; }

.lang-toggle{
  /* Persian is translated but not yet shipped — hide the toggle without ripping out the feature. */
  display:none;
  height:36px; padding:0 13px; border-radius:999px; border:1px solid var(--border); background:var(--surface-2);
  color:var(--text-dim); font-family:var(--font-ui); font-size:12.5px; font-weight:600; cursor:pointer;
  align-items:center; justify-content:center;
}
.lang-toggle:hover{ color:var(--text); border-color:var(--accent); }
.lang-toggle-mobile{ margin-top:10px; align-self:flex-start; }

.theme-toggle{
  width:36px; height:36px; border-radius:999px; border:1px solid var(--border); background:var(--surface-2);
  color:var(--text-dim); display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.theme-toggle:hover{ color:var(--text); border-color:var(--accent); }
.theme-toggle svg{ width:16px; height:16px; }
.theme-toggle .icon-moon{ display:none; }
:root[data-theme="light"] .theme-toggle .icon-sun{ display:none; }
:root[data-theme="light"] .theme-toggle .icon-moon{ display:block; }

.menu-toggle{ display:none; flex-direction:column; gap:4px; width:36px; height:36px; align-items:center; justify-content:center; background:none; border:0; cursor:pointer; }
.menu-toggle span{ width:20px; height:2px; background:var(--text); display:block; transition:transform .2s ease, opacity .2s ease; }
.nav-links-mobile{ display:none; flex-direction:column; gap:2px; padding:8px 24px 16px; background:var(--surface); backdrop-filter:var(--glass-blur); }
.nav-links-mobile a{ padding:10px 0; font-size:15px; color:var(--text-dim); border-bottom:1px solid var(--border-soft); }
.nav-links-mobile.open{ display:flex; }

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center; border-radius:999px; border:1px solid var(--border);
  background:var(--surface-2); color:var(--text); font-size:14px; font-weight:500; padding:10px 18px;
  cursor:pointer; transition:background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .2s ease;
  backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); white-space:nowrap;
}
.btn:hover{ background:var(--surface-3); border-color:var(--border); transform:translateY(-1px); }
.btn:active{ transform:scale(.97) translateY(0); }
.btn svg{ flex:none; }
.btn-primary{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600; }
.btn-primary:hover{ background:var(--accent-strong); border-color:var(--accent-strong); box-shadow:0 8px 24px -8px var(--accent-soft); }
.btn-ghost{ background:transparent; }
.btn-lg{ padding:14px 26px; font-size:15.5px; }
.btn-block{ width:100%; justify-content:space-between; }
.btn.disabled, .btn:disabled{ opacity:.4; pointer-events:none; }

@keyframes ctaPulse{
  0%{ box-shadow:0 0 0 0 var(--accent-soft); }
  70%{ box-shadow:0 0 0 14px rgba(232,163,61,0); }
  100%{ box-shadow:0 0 0 0 rgba(232,163,61,0); }
}
.btn-primary.pulse-once{ animation:ctaPulse 1.4s ease-out 1; }

.github-star{ position:relative; }
.star-count{ font-family:var(--font-mono); font-size:12px; color:var(--text-faint); }

/* ---------------- reveal-on-scroll ---------------- */
.reveal{
  opacity:0; transform:translateY(28px) scale(.98);
  transition:opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(var(--stagger, 0) * 70ms);
}
.reveal.in-view{ opacity:1; transform:translateY(0) scale(1); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  .glow, .grad-text, .app-mock{ animation:none !important; }
  html{ scroll-behavior:auto; }
}

/* ---------------- hero ---------------- */
.hero{ padding:64px 0 90px; }
.hero-inner{ display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
.eyebrow{ display:inline-block; font-size:12.5px; text-transform:uppercase; letter-spacing:.09em; color:var(--accent-strong); font-weight:600; margin-bottom:14px; }
.hero h1{ font-family:var(--font-display); font-weight:700; font-size:clamp(32px,4.6vw,54px); line-height:1.08; letter-spacing:-.01em; margin-bottom:20px; }
.grad-text{
  background:linear-gradient(100deg, var(--accent-strong), var(--progress-strong) 45%, var(--accent-strong) 90%);
  background-size:220% auto; -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:gradientShift 7s ease-in-out infinite;
}
@keyframes gradientShift{ 0%,100%{ background-position:0% 50%; } 50%{ background-position:100% 50%; } }
.hero-sub{ font-size:17px; color:var(--text-dim); max-width:52ch; margin-bottom:30px; }
.hero-ctas{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:18px; }
.hero-meta{ font-size:13px; color:var(--text-faint); margin-bottom:22px; }
.version-badge{ font-family:var(--font-mono); background:var(--surface-2); border:1px solid var(--border); padding:4px 11px; border-radius:999px; }
.platform-row{ display:flex; flex-wrap:wrap; gap:10px; }
.platform-chip{ display:inline-flex; align-items:center; gap:7px; font-size:12.5px; color:var(--text-dim); background:var(--surface-2); border:1px solid var(--border-soft); padding:6px 12px; border-radius:999px; }

/* hero visual: app mock */
.hero-visual{ position:relative; perspective:1200px; }
.glow{ position:absolute; border-radius:50%; filter:blur(60px); z-index:-1; animation:drift 9s ease-in-out infinite; }
.glow-accent{ width:260px; height:260px; background:var(--accent-soft); top:-40px; right:-30px; }
.glow-progress{ width:220px; height:220px; background:var(--progress-soft); bottom:-30px; left:-30px; animation-delay:-4s; }
@keyframes drift{ 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(14px,-12px); } }

.app-mock{
  border-radius:var(--radius-lg); border:1px solid var(--border); background:var(--surface);
  box-shadow:var(--shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  overflow:hidden; transform:perspective(1200px) rotateY(-6deg) rotateX(2deg);
  transition:transform .3s cubic-bezier(.16,1,.3,1);
  will-change:transform;
}
html[dir="rtl"] .app-mock{ transform:perspective(1200px) rotateY(6deg) rotateX(2deg); }
.app-mock-titlebar{ display:flex; align-items:center; gap:8px; padding:10px 14px; border-bottom:1px solid var(--border-soft); font-size:12.5px; color:var(--text-dim); }
.app-mock-icon{ width:16px; height:16px; border-radius:4px; }
.app-mock-dots{ margin-left:auto; display:flex; gap:6px; }
.app-mock-dots i{ width:8px; height:8px; border-radius:50%; background:var(--surface-3); display:block; }
.app-mock-topbar{ display:flex; align-items:baseline; gap:22px; padding:14px; border-bottom:1px solid var(--border-soft); }
.hero-speed{ display:flex; align-items:baseline; gap:8px; }
.hero-speed .figure{ font-family:var(--font-display); font-weight:700; font-size:26px; color:var(--progress-strong); }
.hero-speed .unit{ font-family:var(--font-mono); font-size:12px; color:var(--text-dim); }
.hero-meta-mini{ display:flex; flex-direction:column; gap:2px; border-left:1px solid var(--border); padding-left:14px; }
.hero-meta-mini .label{ font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-faint); }
.hero-meta-mini .value{ font-size:11.5px; color:var(--text-dim); font-family:var(--font-mono); }
.app-mock-body{ padding:14px; display:flex; flex-direction:column; gap:10px; }
.mock-row{ background:var(--surface-2); border:1px solid var(--border-soft); border-radius:var(--radius); padding:11px 13px; display:flex; flex-direction:column; gap:9px; }
.mock-row-dim{ opacity:.6; }
.mock-row-top{ display:flex; align-items:center; gap:10px; }
.mock-filetype{ width:30px; height:30px; border-radius:7px; background:var(--accent-soft); color:var(--accent-strong); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:9px; flex:none; }
.mock-row-name{ flex:1; min-width:0; }
.mock-row-name .fname{ font-size:12.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mock-row-name .fmeta{ font-size:10.5px; color:var(--text-faint); font-family:var(--font-mono); margin-top:2px; }
.status-pill{ font-size:9.5px; text-transform:uppercase; letter-spacing:.06em; font-weight:600; padding:3px 8px; border-radius:999px; flex:none; }
.status-pill.downloading{ background:var(--progress-soft); color:var(--progress-strong); }
.status-pill.completed{ background:var(--success-soft); color:var(--success); }
.segbar{ display:flex; gap:2px; height:6px; border-radius:4px; overflow:hidden; background:var(--surface-3); }
.segbar i{ display:block; height:100%; background:var(--border); position:relative; flex:1 1 0; overflow:hidden; }
.segbar i .fill{ position:absolute; inset:0 auto 0 0; background:var(--seg-color, var(--progress)); width:var(--p,0%); transition:width .5s ease; }

/* ---------------- stats strip ---------------- */
.stats-strip{ border-top:1px solid var(--border-soft); border-bottom:1px solid var(--border-soft); background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); }
.stats-inner{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:24px; padding:26px 24px; }
.stat{ display:flex; flex-direction:column; gap:2px; }
.stat-value{ font-family:var(--font-display); font-weight:700; font-size:24px; color:var(--accent-strong); }
.stat-label{ font-size:12px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; }
.badge-link img{ height:20px; }

/* ---------------- sections ---------------- */
.section{ padding:100px 0; }
.section-alt{ background:var(--surface-2); }
.section-head{ max-width:640px; margin-bottom:52px; }
.section-head h2{ font-family:var(--font-display); font-weight:700; font-size:clamp(26px,3vw,36px); line-height:1.2; margin-top:6px; }
.section-sub{ color:var(--text-dim); margin-top:12px; font-size:15px; }

/* features */
.feature-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.feature-card{
  background:var(--surface); border:1px solid var(--border-soft); border-radius:var(--radius-lg); padding:26px;
  backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:inset 0 1px 0 var(--glass-highlight);
  transition:transform .25s ease, border-color .25s ease;
}
.feature-card:hover{ transform:translateY(-4px); border-color:var(--accent); }
.feature-card:hover .feature-icon{ transform:rotate(-6deg) scale(1.08); background:var(--accent); color:var(--accent-ink); }
.feature-icon{
  width:44px; height:44px; border-radius:12px; background:var(--accent-soft); color:var(--accent-strong);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
  transition:transform .3s cubic-bezier(.34,1.56,.64,1), background .25s ease, color .25s ease;
}
.feature-card h3{ font-size:16.5px; font-weight:600; margin-bottom:8px; }
.feature-card p{ font-size:14px; color:var(--text-dim); }
.feature-footnote{ text-align:center; margin-top:40px; color:var(--text-faint); font-size:13.5px; }

/* download */
.download-stage{ margin-bottom:32px; }
.download-primary:empty{ display:none; }
.download-primary{ margin-bottom:22px; }
.download-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.download-secondary{ padding-top:18px; }
.download-card{
  background:var(--surface); border:1px solid var(--border-soft); border-radius:var(--radius-lg); padding:26px;
  backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:inset 0 1px 0 var(--glass-highlight);
  display:flex; flex-direction:column; transition:border-color .25s ease, transform .25s ease;
  position:relative;
}
.download-card:hover{ border-color:var(--accent); transform:translateY(-4px); }
.download-card:hover .download-card-head svg{ transform:scale(1.12); }
.download-card-head{ display:flex; align-items:center; gap:12px; margin-bottom:6px; color:var(--accent-strong); }
.download-card-head svg{ transition:transform .3s cubic-bezier(.34,1.56,.64,1); }
.download-card-head h3{ font-size:18px; font-weight:600; color:var(--text); }
.download-card > p{ color:var(--text-dim); font-size:13.5px; margin-bottom:18px; }
.download-actions{ display:flex; flex-direction:column; gap:9px; margin-top:auto; }
.dl-size{ font-family:var(--font-mono); font-size:11px; color:inherit; opacity:.75; }
.download-card[data-platform="windows"] .download-card-head svg{ color:var(--blue); }
.download-card[data-platform="mac"] .download-card-head svg{ color:var(--text); }
.download-card[data-platform="linux"] .download-card-head svg{ color:var(--progress-strong); }

/* the single card matched to the visitor's detected OS */
.download-primary .download-card{
  border-color:var(--accent); padding:32px;
  background:linear-gradient(160deg, var(--surface-3), var(--surface));
  box-shadow:0 0 0 1px var(--accent-soft), var(--shadow);
}
.download-primary .download-card-head svg{ width:32px; height:32px; }
.download-primary .download-card-head h3{ font-size:22px; }
.download-primary .download-card > p{ font-size:14.5px; }
.recommended-badge{
  display:inline-flex; align-items:center; gap:6px; align-self:flex-start; margin-bottom:14px;
  background:var(--accent-soft); color:var(--accent-strong); font-size:11.5px; font-weight:600;
  text-transform:uppercase; letter-spacing:.05em; padding:5px 12px; border-radius:999px;
}
.recommended-badge::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--accent-strong); animation:badgeBlink 1.8s ease-in-out infinite; }
@keyframes badgeBlink{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }

/* generic collapsible (other-platforms + prereqs) */
.collapsible-trigger{
  display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
  background:var(--surface-2); border:1px solid var(--border); color:var(--text-dim);
  font-family:var(--font-ui); font-size:13.5px; font-weight:500; padding:12px; border-radius:999px; cursor:pointer;
  transition:color .15s ease, border-color .15s ease;
}
.collapsible-trigger:hover{ color:var(--text); border-color:var(--accent); }
.collapsible-trigger .chev{ transition:transform .3s ease; flex:none; }
.collapsible.open .collapsible-trigger .chev{ transform:rotate(180deg); }
.collapsible-panel{ display:grid; grid-template-rows:0fr; transition:grid-template-rows .4s cubic-bezier(.16,1,.3,1); }
.collapsible.open .collapsible-panel{ grid-template-rows:1fr; }
.collapsible-inner{ overflow:hidden; }
.other-platforms-toggle{ justify-content:space-between; padding:12px 20px; }

.callout{
  display:flex; gap:12px; align-items:flex-start; background:var(--warning-soft); color:var(--warning);
  border:1px solid var(--warning-soft); border-radius:var(--radius); padding:16px 18px; font-size:13.5px; margin-bottom:20px;
}
.callout svg{ flex:none; margin-top:1px; }
.callout p{ color:var(--text-dim); }
.callout strong{ color:var(--text); }
.all-releases-link{ text-align:center; font-size:13.5px; color:var(--text-faint); }
.all-releases-link a{ color:var(--accent-strong); text-decoration:underline; }

/* architecture */
.arch-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.arch-card{ background:var(--surface); border:1px solid var(--border-soft); border-radius:var(--radius-lg); padding:24px; backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); }
.arch-path{ display:inline-block; background:var(--accent-soft); color:var(--accent-strong); padding:5px 11px; border-radius:6px; font-size:13px; margin-bottom:14px; }
.arch-card p{ font-size:13.5px; color:var(--text-dim); line-height:1.65; }
.arch-card code{ background:var(--surface-3); padding:1px 6px; border-radius:4px; font-size:12px; color:var(--text); }

/* code block */
.code-block{ background:#0d0b09; border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; margin-bottom:36px; }
:root[data-theme="light"] .code-block{ background:#1c1810; }
.code-block-head{ display:flex; align-items:center; justify-content:space-between; padding:10px 16px; background:var(--surface-3); font-size:12px; color:var(--text-faint); }
.copy-btn{ background:var(--surface-2); border:1px solid var(--border); color:var(--text-dim); border-radius:6px; padding:4px 11px; font-size:11.5px; cursor:pointer; }
.copy-btn:hover{ color:var(--text); border-color:var(--accent); }
.code-block pre{ padding:20px; overflow-x:auto; }
.code-block code{ font-family:var(--font-mono); font-size:13.5px; color:#f2ece1; line-height:1.8; }
.tok-c{ color:#7a6d59; }

.prereqs{ display:flex; flex-direction:column; gap:12px; margin-bottom:36px; }
.prereq{ background:var(--surface); border:1px solid var(--border-soft); border-radius:var(--radius); overflow:hidden; }
.prereq .collapsible-trigger{
  background:none; border:0; border-radius:0; justify-content:space-between; padding:16px 20px;
  font-weight:600; font-size:14.5px; color:var(--text);
}
.prereq .collapsible-trigger:hover{ color:var(--accent-strong); }
.prereq .collapsible-inner{ padding:0 20px 16px; }
.prereq ul{ display:flex; flex-direction:column; gap:6px; font-size:13.5px; color:var(--text-dim); }
.prereq ul a{ color:var(--accent-strong); text-decoration:underline; }
.prereq-code{ margin-top:0; background:#0d0b09; border-radius:8px; padding:14px; overflow-x:auto; }
:root[data-theme="light"] .prereq-code{ background:#1c1810; }
.prereq-code code{ font-size:12.5px; color:#f2ece1; }

.testing-row{ display:flex; gap:40px; flex-wrap:wrap; margin-bottom:28px; }
.testing-row h4{ font-size:13px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint); margin-bottom:8px; }
.testing-row code{ display:block; background:var(--surface-3); padding:8px 12px; border-radius:6px; font-size:13px; margin-top:6px; width:fit-content; }
.contrib-note{ font-size:13.5px; color:var(--text-dim); }
.contrib-note a{ color:var(--accent-strong); text-decoration:underline; }

/* support */
.support-section{ text-align:center; }
.support-inner{ max-width:600px; margin:0 auto; display:flex; flex-direction:column; align-items:center; gap:14px; }
.support-logo{ border-radius:16px; margin-bottom:6px; }
.support-inner h2{ font-family:var(--font-display); font-weight:700; font-size:clamp(24px,3vw,32px); }
.support-inner > p{ color:var(--text-dim); }
.support-actions{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; justify-content:center; margin-top:14px; }
.gh-btn-wrap iframe{ display:block; }

/* contact */
.contact-wrap{ max-width:720px; }
.contact-form{ display:flex; flex-direction:column; gap:18px; }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.contact-form label{ display:flex; flex-direction:column; gap:7px; font-size:13px; color:var(--text-dim); font-weight:500; }
.contact-form input, .contact-form textarea{
  background:var(--surface-2); border:1px solid var(--border); border-radius:8px; color:var(--text);
  padding:11px 13px; font-size:14px; font-family:var(--font-ui); outline:0; resize:vertical;
}
.contact-form input:focus, .contact-form textarea:focus{ border-color:var(--accent); }
.contact-form-foot{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.contact-direct{ font-size:13px; color:var(--text-faint); }
.contact-direct a{ color:var(--accent-strong); text-decoration:underline; }

/* footer */
.site-footer{ border-top:1px solid var(--border-soft); padding:48px 0 32px; }
.footer-inner{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; }
.footer-brand{ display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-weight:700; font-size:16px; }
.footer-brand img{ border-radius:6px; }
.footer-tagline{ color:var(--text-dim); font-size:13.5px; }
.footer-links{ display:flex; gap:20px; margin:8px 0; flex-wrap:wrap; justify-content:center; }
.footer-links a{ font-size:13px; color:var(--text-dim); }
.footer-links a:hover{ color:var(--accent-strong); }
.footer-fine{ font-size:11.5px; color:var(--text-faint); margin-top:10px; }

/* toast */
.toast{
  position:fixed; bottom:26px; left:50%; transform:translateX(-50%) translateY(20px); z-index:300;
  background:var(--surface-3); border:1px solid var(--border); color:var(--text); padding:12px 20px;
  border-radius:999px; font-size:13.5px; opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease;
  backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow);
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* ---------------- responsive ---------------- */
@media (max-width:900px){
  .hero-inner{ grid-template-columns:1fr; }
  .hero-visual{ order:-1; max-width:480px; margin:0 auto; }
  .feature-grid, .download-grid, .arch-grid{ grid-template-columns:1fr 1fr; }
  .nav-links, .navbar-actions .nav-download, .navbar-actions .github-star span:not(.star-count){ display:none; }
  .menu-toggle{ display:flex; }
}
@media (max-width:640px){
  .feature-grid, .download-grid, .arch-grid{ grid-template-columns:1fr; }
  .field-row{ grid-template-columns:1fr; }
  .stats-inner{ justify-content:center; text-align:center; }
  .section{ padding:70px 0; }
  .app-mock{ transform:none; }
  .navbar-actions .github-star{ display:none; }
}

/* ============================================================
   Language / RTL support (Persian)
   ============================================================ */
html[lang="fa"]{
  --font-ui:'Vazirmatn','IBM Plex Sans',system-ui,sans-serif;
  --font-display:'Vazirmatn','IBM Plex Sans Condensed',system-ui,sans-serif;
}
html[lang="fa"] :is(.eyebrow,.brand-name,.hero h1,.grad-text,.stat-label,.section-head h2,
  .support-inner h2,.platform-chip,.status-pill,.arch-path,.download-card-head h3,
  .lang-toggle,.recommended-badge,.other-platforms-toggle,.collapsible-trigger){
  letter-spacing:normal;
}
html[lang="fa"] body{ line-height:1.85; }

/* keep filenames, versions, code and figures left-to-right even inside an RTL page */
html[dir="rtl"] .version-badge, html[dir="rtl"] .dl-size, html[dir="rtl"] .stat-value,
html[dir="rtl"] code, html[dir="rtl"] pre, html[dir="rtl"] .arch-path,
html[dir="rtl"] .brand, html[dir="rtl"] .footer-brand{
  direction:ltr;
}
html[dir="rtl"] .footer-brand, html[dir="rtl"] .brand{ unicode-bidi:isolate; }

/* mirror the few hand-authored transform/skew touches that don't flip on their own */
html[dir="rtl"] .glow-accent{ right:auto; left:-30px; }
html[dir="rtl"] .glow-progress{ left:auto; right:-30px; }

html[dir="rtl"] .nav-links a::after{ transform-origin:center; }
html[dir="rtl"] .skip-link{ border-radius:0 0 0 8px; }
