:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #5b6577;
  --line: #e4e8f0;
  --accent: #f7931a;
  --accent-strong: #d97706;
  --accent-ink: #1f1300;
  --hero-bg: #0d1424;
  --hero-text: #f6f8fc;
  --hero-muted: #a9b3c6;
  --hero-line: rgba(255, 255, 255, 0.14);
  --up: #0f9d58;
  --down: #d63a3a;
  --up-bg: rgba(15, 157, 88, 0.1);
  --down-bg: rgba(214, 58, 58, 0.1);
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(13, 20, 36, 0.35), 0 2px 6px rgba(13, 20, 36, 0.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Armenian", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1a;
    --surface: #121a2a;
    --text: #e8edf6;
    --muted: #98a3b8;
    --line: #22304a;
    --hero-bg: #060a13;
    --up: #34c37a;
    --down: #f26b6b;
    --up-bg: rgba(52, 195, 122, 0.14);
    --down-bg: rgba(242, 107, 107, 0.14);
    --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img, svg { display: block; }

svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 20, 36, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--hero-line);
  color: var(--hero-text);
}

.top-in { display: flex; align-items: center; gap: 12px; min-height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
  font-weight: 750;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.brand b { color: var(--accent); font-weight: 750; }

.langs { display: flex; padding: 3px; border: 1px solid var(--hero-line); border-radius: 999px; }

.langs a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--hero-muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.langs a:hover { color: var(--hero-text); }

.langs a[aria-current] { background: var(--accent); color: var(--accent-ink); }

.top-call {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}

.top-call:hover { background: rgba(255, 255, 255, 0.14); }

.top-call svg { color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 56px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(247, 147, 26, 0.22), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(98, 126, 234, 0.18), transparent 60%),
    var(--hero-bg);
  color: var(--hero-text);
}

.hero-in { display: grid; gap: 32px; align-items: center; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 6.4vw, 3.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead { max-width: 34rem; margin: 16px 0 0; color: var(--hero-muted); font-size: 1.05rem; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }

.pill {
  padding: 7px 14px;
  border: 1px solid var(--hero-line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 650;
}

.pill-accent { background: rgba(247, 147, 26, 0.14); border-color: rgba(247, 147, 26, 0.5); color: #ffc27a; }

.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }

.btn-primary:hover { background: #ffa53d; }

.btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: var(--hero-line); color: var(--hero-text); }

.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn-outline { background: transparent; border-color: var(--line); color: var(--text); }

.btn-outline:hover { border-color: var(--accent); }

.btn-outline svg { color: var(--accent); }

/* Cards */
.card {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Rates */
.rates { padding: 18px 16px 14px; }

.rates-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 0 4px 10px;
}

.rates h2 { margin: 0; font-size: 1.08rem; letter-spacing: -0.01em; }

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: pulse 2s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 157, 88, 0.5); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(15, 157, 88, 0); }
}

.empty { margin: 4px 4px 10px; color: var(--down); font-weight: 600; }

.coins { margin: 0; padding: 0; list-style: none; }

.coin {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  grid-template-areas: "badge name price" "badge name chg";
  align-items: center;
  column-gap: 12px;
  padding: 12px 4px;
  border-top: 1px solid var(--line);
  border-radius: 10px;
}

.coin.flash { animation: flash 1.2s ease-out; }

@keyframes flash { from { background: rgba(247, 147, 26, 0.16); } to { background: transparent; } }

.badge {
  grid-area: badge;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
}

.badge-btc { background: #f7931a; }
.badge-eth { background: #627eea; }
.badge-usdt { background: #26a17b; }
.badge-xrp { background: #23292f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.badge-ltc { background: #345d9d; }

.cname { grid-area: name; display: flex; flex-direction: column; min-width: 0; font-weight: 700; }

.cname small { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }

.cprice { grid-area: price; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }

.cprice b { font-size: 1.02rem; font-weight: 750; white-space: nowrap; }

.cprice small { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

.chg {
  grid-area: chg;
  justify-self: end;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.1);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chg.up { background: var(--up-bg); color: var(--up); }
.chg.down { background: var(--down-bg); color: var(--down); }

.note { margin: 10px 4px 2px; color: var(--muted); font-size: 0.82rem; }

/* Office + abroad */
.info { padding: 36px 0 48px; }

.info-in { display: grid; gap: 16px; }

.office, .abroad { padding: 22px 20px; }

.info h2 { margin: 0 0 14px; font-size: 1.2rem; letter-spacing: -0.01em; }

.office dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; }

.office dt { color: var(--muted); font-size: 0.9rem; }

.office dd { margin: 0; font-weight: 650; }

.office dd a { text-decoration: none; }

.office dd a:hover { color: var(--accent-strong); }

.abroad p { margin: 0 0 14px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.chips li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.94rem; font-weight: 650; }

/* Footer */
.foot { padding: 22px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }

.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }

.foot p { margin: 0; }

.tagline { color: var(--text); font-weight: 650; }

/* 404 */
.nf { background: var(--hero-bg); color: var(--hero-text); }

.nf-in { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; min-height: 100vh; }

.nf-in h1 { margin: 18px 0 0; font-size: 2rem; }

.nf-in p { margin: 0 0 8px; color: var(--hero-muted); }

a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (min-width: 600px) {
  .top-call { display: inline-flex; }
  .info-in { grid-template-columns: 1fr 1fr; }
  .rates { padding: 22px 22px 16px; }
}

@media (min-width: 920px) {
  .hero { padding: 72px 0 84px; }
  .hero-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; }
  .lead { font-size: 1.12rem; }
}

@media (max-width: 380px) {
  .top-in { gap: 8px; }
  .brand { gap: 8px; font-size: 0.95rem; }
  .brand img { width: 28px; height: 28px; }
  .langs a { padding: 4px 6px; font-size: 0.7rem; letter-spacing: 0.02em; }
  .ctas .btn { flex: 1 1 auto; }
}

@media (max-width: 340px) {
  .brand b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dot, .coin.flash { animation: none; }
  .btn { transition: none; }
}
