﻿/* Kumo landing page. Light and dark follow the system. Logical properties (inline-start/end) make
   the same rules work left-to-right (English) and right-to-left (Persian). */

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazirmatn-fa.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

:root {
  color-scheme: light dark;
  --bg: #f3faf6;
  --surface: #ffffff;
  --surface-2: #e9f5ee;
  --text: #0e1f19;
  --muted: #4a6057;
  --line: #d3e5db;
  --brand: #1c7a4c;
  --brand-strong: #14633c;
  --on-brand: #ffffff;
  --brand-soft: #dcf3e7;
  --focus: #1a5fd0;
  --shadow: 0 1px 2px rgba(14, 31, 25, .06), 0 12px 32px rgba(14, 31, 25, .10);
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1512;
    --surface: #12201b;
    --surface-2: #0f1b17;
    --text: #e6f2ec;
    --muted: #9db4a9;
    --line: #223730;
    --brand: #3ecf8e;
    --brand-strong: #6fe0ae;
    --on-brand: #04210f;
    --brand-soft: #16372a;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
html:lang(fa) body, html:lang(ar) body { line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.bar { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand img { border-radius: 10px; }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.lang { position: relative; }
.lang summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; font-weight: 600;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); opacity: .6; }
.lang[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30; min-width: 11em; padding: 6px;
  display: grid; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.lang li a {
  display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
}
.lang li a:hover { background: var(--surface-2); }
.lang li a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
/* Hero */
.hero {
  padding: 56px 0 72px;
  background:
    radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(700px 420px at -10% 10%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 5px 14px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong); font-size: 14px; font-weight: 600;
}
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
html:lang(fa) h1, html:lang(ar) h1, html:lang(zh) h1 { line-height: 1.35; letter-spacing: 0; }
.lead { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 34em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 16px; font: inherit; font-weight: 700; font-size: 17px;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 38%, transparent); }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--brand); }
.btn-sm { min-height: 40px; padding: 0 18px; border-radius: 12px; font-size: 15px; }
.cta-meta { margin-top: 12px; color: var(--muted); font-size: 14px; min-height: 1.6em; }
.cta-note {
  margin-top: 8px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-size: 15px; max-width: 34em;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chips li { padding: 5px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--brand-strong); background: var(--surface); }
.trust { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Hero devices: a faded window and a phone, drawn at 1126 design units wide and scaled with the column. */
.stage { container-type: inline-size; direction: ltr; }
@media (min-width: 901px) { .stage { margin-right: -28px; } }
.devices { --u: calc(100cqw / 1126); position: relative; width: 100%; height: calc(var(--u) * 740); }
.window-wrap {
  position: absolute; left: 0; top: calc(var(--u) * 40); width: calc(var(--u) * 900); height: calc(var(--u) * 700);
  filter: drop-shadow(0 22px 30px rgba(10, 60, 70, .20)) drop-shadow(0 6px 10px rgba(10, 60, 70, .12));
}
.window {
  position: absolute; inset: 0; overflow: hidden; border-radius: calc(var(--u) * 14) calc(var(--u) * 14) 0 0;
  background: #f4fbf8; box-shadow: 0 0 0 1.5px rgba(20, 70, 70, .16);
  -webkit-mask-image: linear-gradient(#000 90%, transparent 100%); mask-image: linear-gradient(#000 90%, transparent 100%);
}
.shot-desktop { display: block; width: 100%; height: auto; margin-top: calc(var(--u) * -34); }
.phone {
  position: absolute; left: calc(var(--u) * 787); top: 0; width: calc(var(--u) * 342); padding: calc(var(--u) * 7);
  border-radius: calc(var(--u) * 50);
  background: linear-gradient(135deg, #f4f1ea 0%, #a9a59c 18%, #e9e5dc 38%, #8d897f 58%, #d7d3ca 80%, #9b978d 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, 0 0 0 1.5px rgba(60,58,52,.55), 0 40px 70px rgba(20, 50, 60, .38), 0 14px 26px rgba(20,50,60,.22);
}
.phone::before, .phone::after { content: ''; position: absolute; width: calc(var(--u) * 5); background: linear-gradient(90deg, #8d897f, #d9d5cb 50%, #8d897f); border-radius: 3px; }
.phone::before { left: calc(var(--u) * -4); top: calc(var(--u) * 150); height: calc(var(--u) * 64); box-shadow: 0 calc(var(--u) * 86) 0 #b9b5ab; }
.phone::after { right: calc(var(--u) * -4); top: calc(var(--u) * 200); height: calc(var(--u) * 96); }
.bezel { position: relative; padding: calc(var(--u) * 6); border-radius: calc(var(--u) * 43); background: #050507; box-shadow: 0 0 0 1px rgba(0,0,0,.9); }
.screen { position: relative; overflow: hidden; border-radius: calc(var(--u) * 37); background: #000; line-height: 0; }
.shot-phone { display: block; width: 100%; height: auto; }
.screen::after {
  content: ''; position: absolute; left: 50%; top: calc(var(--u) * 7); width: calc(var(--u) * 13); height: calc(var(--u) * 13);
  margin-left: calc(var(--u) * -6); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2b2f4a 0, #0a0a10 45%, #000 100%); box-shadow: 0 0 0 calc(var(--u) * 2) #000;
}
.glare {
  position: absolute; inset: 0; border-radius: calc(var(--u) * 43); pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,0) 28%, rgba(255,255,255,0) 72%, rgba(255,255,255,.07) 100%);
}
@media (prefers-color-scheme: dark) {
  .window { background: #0e1513; box-shadow: 0 0 0 1.5px rgba(160, 230, 210, .14); }
  .window-wrap { filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .45)) drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
  .phone { background: linear-gradient(135deg, #5c6563 0%, #23292a 18%, #4a5352 38%, #1a1f20 58%, #3f4847 80%, #1e2425 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,.22) inset, 0 0 0 1.5px rgba(0,0,0,.7), 0 40px 70px rgba(0, 0, 0, .6), 0 14px 26px rgba(0,0,0,.4); }
  .phone::before, .phone::after { background: linear-gradient(90deg, #1e2425, #4f5958 50%, #1e2425); }
  .phone::before { box-shadow: 0 calc(var(--u) * 86) 0 #2f3736; }
}

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
html:lang(fa) .section-head h2, html:lang(ar) .section-head h2, html:lang(zh) .section-head h2 { line-height: 1.45; letter-spacing: 0; }
.section-head p { margin-top: 10px; color: var(--muted); font-size: 17px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.card {
  padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.ic {
  width: 48px; height: 48px; padding: 11px; border-radius: 14px; background: var(--brand-soft); margin-bottom: 16px;
  fill: none; stroke: var(--brand-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 19px; line-height: 1.35; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; counter-reset: s; }
.steps li { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-weight: 800; margin-bottom: 14px;
}
.steps h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.steps p { color: var(--muted); }

/* Download */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab {
  appearance: none; font: inherit; font-weight: 600; min-height: 44px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--line); transition: background-color .15s ease, border-color .15s ease;
}
.tab:hover { border-color: var(--brand); }
.tab[aria-selected="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.file:last-child { border-bottom: 0; }
.file.is-primary { background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }
.file .t { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file .hint { grid-column: 1; color: var(--muted); font-size: 14px; }
.file .t .name { white-space: nowrap; }
.size-chip { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.file .btn { grid-row: 1 / span 2; grid-column: 2; }
.badge { padding: 2px 10px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.fname { display: block; font-size: 12.5px; opacity: .8; overflow-wrap: anywhere; text-align: start; }
html[dir="rtl"] .fname { text-align: right; }
.dl-notes { margin-top: 22px; display: grid; gap: 8px; color: var(--muted); font-size: 15px; max-width: 46em; }
.plain-link { margin-top: 14px; }

.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.notes li { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.notes h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.notes p { color: var(--muted); font-size: 15px; }

/* Footer */
.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.foot > div { max-width: 36em; display: grid; gap: 8px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.foot-brand img { border-radius: 8px; }
.links { display: grid; gap: 8px; align-content: start; }
.links a { color: var(--text); }

@media (max-width: 900px) {
  .hero { padding: 36px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .nav { display: none; }
  .lang { margin-inline-start: auto; }
  .section { padding: 60px 0; }
  .stage { max-width: 560px; }
}
@media (max-width: 560px) {
  .wrap { width: min(1120px, 100% - 32px); }
  .btn { width: 100%; }
  .btn-sm { width: auto; }
  .file { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .card:hover, .btn-primary:hover { transform: none; }
}

/* Donate */
.coins li { display: grid; gap: 10px; align-content: start; }
.coins h3 { margin: 0; }
.coins .addr { display: block; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; text-align: left; user-select: all; }
.coins .btn { justify-self: start; }
.don-warn { margin-top: 18px; color: var(--muted); font-size: 15px; }