/* xoliddev — shared tokens, layout and components */
:root {
  --bg: #0b1322;
  --bg-2: #0f1a2d;
  --surface: #14213a;
  --surface-2: #1a2a47;
  --line: #24355a;
  --line-soft: #1b2a45;
  --text: #e9edf5;
  --muted: #95a3bf;
  --faint: #6d7c9a;
  --accent: #36c5b2;
  --accent-strong: #5fe0cd;
  --accent-ink: #04241f;
  --gold: #f2b441;
  --danger: #ff7a7a;
  --ok: #57d68d;
  --focus: #f2b441;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --gutter: 16px;
  --maxw: 1180px;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Onest", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%2336c5b2' stroke-width='1'%3E%3Cpath d='M36 6l9 21 21 9-21 9-9 21-9-21-21-9 21-9z'/%3E%3Cpath d='M36 22l5 9 9 5-9 5-5 9-5-9-9-5 9-5z'/%3E%3Cpath d='M0 0l6 6M72 0l-6 6M0 72l6-6M72 72l-6-6'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef2f7;
  --bg-2: #e5ebf3;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --line: #c9d3e2;
  --line-soft: #dce3ee;
  --text: #0c1526;
  --muted: #4b5a76;
  --faint: #6b7892;
  --accent: #0b8576;
  --accent-strong: #0a6e62;
  --accent-ink: #ffffff;
  --gold: #a86900;
  --danger: #c53b3b;
  --ok: #1f8a4c;
  --focus: #a86900;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* language switching: both languages live in the markup */
:root[data-lang="en"] .l-uz, :root[data-lang="uz"] .l-en { display: none !important; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 700px) { :root { --gutter: 28px; } }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px/1 var(--display); letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav { display: none; gap: 4px; margin-left: 18px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--surface); }
@media (min-width: 820px) { .nav { display: flex; } }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg-2); }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); cursor: pointer; color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--accent); }
:root[data-theme="light"] .i-sun, :root:not([data-theme="light"]) .i-moon { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 7.4vw, 66px); }
h2 { font-size: clamp(26px, 4.4vw, 40px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }

/* ---------- sections ---------- */
.section { padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--line-soft); }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line-soft); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.site-foot a { color: var(--text); }

/* ---------- demo pages ---------- */
.demo-hero { padding-top: 40px; padding-bottom: 24px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 15px; margin-bottom: 18px; }
.crumb:hover { color: var(--text); }
.crumb svg { width: 16px; height: 16px; }
.demo-hero h1 { font-size: clamp(30px, 5.6vw, 52px); margin-bottom: 14px; }
.demo-notice {
  display: grid; gap: 14px; margin: 26px 0 0; padding: 18px 20px;
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius-m); background: var(--bg-2); max-width: 860px;
}
.demo-notice p { margin: 0; }
@media (min-width: 760px) { .demo-notice { grid-template-columns: 1fr auto; align-items: center; } }
.demo-grid { display: grid; gap: 28px; padding-top: 28px; padding-bottom: 72px; align-items: start; }
@media (min-width: 980px) { .demo-grid { grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 48px; } }
.side h2 { font-size: 22px; margin: 0 0 12px; }
.side section + section { margin-top: 34px; }
.side ul { padding-left: 20px; margin: 0; }
.side li { margin: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 7px 13px; font-size: 14px; cursor: pointer; text-align: left; text-decoration: none;
}
.chip:hover { border-color: var(--accent); }
.real-list { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.real-list li { display: grid; grid-template-columns: 82px 1fr; gap: 12px; margin: 0 !important; align-items: baseline; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; text-align: center; }
.tag-real { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tag-sim { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.panel { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--bg-2); padding: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
