/* Orbito Exchange: общие стили всех страниц (токены, шрифты, кнопки, шапка, подвал, список валют, cookie).

   Все цвета, шрифты, размеры и радиусы лежат в переменных :root. Чтобы поменять вид сайта, меняй их. */

@font-face { font-family: "Onest"; font-weight: 400 700; font-display: swap; src: url("fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400 700; font-display: swap; src: url("fonts/onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 600; font-display: swap; src: url("fonts/jetbrains-mono-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 600; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Цвета (роли) */
  --ink: #0e1a2b;        /* основной текст, табло */
  --ink-2: #445268;      /* второстепенный текст */
  --paper: #f3f5f8;      /* фон страницы */
  --surface: #ffffff;    /* карточки и полосы */
  --line: #d8dfe9;       /* границы */
  --brand: #0a4fd6;      /* синий из логотипа, но глубже */
  --brand-rgb: 10, 79, 214;
  --brand-dark: #083fae;
  --amber: #8a3f04;      /* только итоговая сумма и выгода */
  --amber-soft: #fff3d6;
  --amber-line: #efd7a1;
  --up: #12793f;         /* зелёный и красный: только изменение курса */
  --down: #b42318;
  --up-on-dark: #4ade80;
  --down-on-dark: #ff8a80;
  --muted-on-dark: #a9b6c9;

  /* Роли, которые в тёмной теме меняются (см. dark.css) */
  --line-strong: #0e1a2b; /* акцентная рамка карточек */
  --solid: #0e1a2b;       /* тёмные плашки с белым текстом: подсказки, активные кнопки, cookie */
  --solid-hover: #22324a;
  --band: #0e1a2b;        /* полоса с курсами */
  --brand-hover: #083fae;
  --brand-soft: #eaf1fd;
  --brand-line: #c9dafa;
  --up-soft: #e3f4ea;
  --row-hover: #fafbfd;
  --star-off: #b8c2d0;
  --placeholder: #7a8799;
  color-scheme: light;

  /* Тени: один рецепт, три силы. Цвет теней —rgb-триплет, чтобы менялся вместе с темой (см. dark.css) */
  --shadow-rgb: 8, 15, 28;
  --shadow-sm: 0 2px 10px -2px rgba(var(--shadow-rgb), 0.10);
  --shadow-md: 0 14px 32px -10px rgba(var(--shadow-rgb), 0.22);
  --shadow-lg: 0 28px 56px -18px rgba(var(--shadow-rgb), 0.32);
  --focus-ring: 0 0 0 3px rgba(var(--brand-rgb), 0.25);

  /* Шрифты */
  --font: "Onest", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* Шкала размеров */
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-56: 3.5rem;

  /* Радиусы: два значения */
  --r-sm: 10px;  /* кнопки и поля */
  --r-lg: 20px;  /* карточки */

  --wrap: 1600px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-16);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono, .num, dd, td, .updated { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: var(--fs-14); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--solid); color: #fff; padding: 10px 14px; border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-weight: 600; font-size: var(--fs-16); line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary img { filter: brightness(0) invert(1); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: var(--fs-14); }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }

.link-arrow { display: inline-block; margin-top: 24px; font-weight: 600; text-decoration: none; color: var(--brand); border-bottom: 1px solid currentColor; }
.link-arrow:hover { color: var(--brand-dark); }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: 64px; display: flex; align-items: center; gap: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo img { display: block; width: 40px; height: 40px; object-fit: contain; }
.logo-text { font-weight: 700; font-size: var(--fs-20); color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.logo-text span { color: var(--brand); }

.site-header nav { display: flex; gap: 2px; margin-right: auto; }
.site-header nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--ink); text-decoration: none; font-weight: 500; border-radius: var(--r-sm); white-space: nowrap;
}
.site-header nav a:hover { background: var(--paper); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.hdr-link, .tg-menu summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--fs-14);
  border-radius: var(--r-sm); cursor: pointer; white-space: nowrap; list-style: none;
}
.hdr-link:hover, .tg-menu summary:hover { background: var(--paper); }
.hdr-link svg, .tg-menu summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tg-menu summary svg { fill: currentColor; stroke: none; color: var(--brand); }
.tg-menu summary::-webkit-details-marker { display: none; }
.cab-btn.logged { color: var(--brand); }
.tg-menu { position: relative; margin-right: 4px; }
.tg-pop {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.tg-pop a { display: block; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.tg-pop a:hover { background: var(--paper); }

.burger { display: none; width: 44px; height: 44px; margin-left: 4px; position: relative; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; flex: none; }
.burger span { position: absolute; left: 12px; width: 18px; height: 2px; background: var(--solid); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 26px; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--surface); padding: 8px var(--gutter) 16px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mobile-menu a.nav-cta { margin-top: 12px; justify-content: center; border: 0; border-radius: var(--r-sm); background: var(--brand); color: #fff; font-weight: 600; }


/* Список валют с флагами */
.cselect { position: relative; }
.cselect-btn, .cselect-item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; text-align: left;
}
.cselect-btn:hover { border-color: var(--ink-2); }
.cselect.open .cselect-btn { border-color: var(--brand); }
.cselect-btn:disabled { background: var(--paper); cursor: default; }
.cselect-btn::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-2px) rotate(45deg); }
.cselect img { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.cselect-code { font-family: var(--mono); font-weight: 600; }
.cselect-name { font-size: var(--fs-14); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cselect-btn .cselect-name { display: none; }
.cselect-list {
  position: absolute; z-index: 20; left: 0; top: calc(100% + 4px); width: max(100%, 300px); max-height: 320px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px;
  box-shadow: var(--shadow-md);
}
.cselect-item { border: 0; min-height: 44px; border-radius: var(--r-sm); }
.cselect-item:hover, .cselect-item.active { background: var(--paper); }
.native-hidden { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }


/* Подвал */
.site-footer { padding: 56px 0 24px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.3fr 1fr 1.3fr; gap: 32px; }
.footer-brand p { margin-top: 12px; font-size: var(--fs-14); color: var(--ink-2); }
.site-footer h3 { font-size: var(--fs-14); font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.site-footer li { padding: 4px 0; font-size: var(--fs-14); }
.site-footer a { color: var(--ink); }
.site-footer p { font-size: var(--fs-14); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: var(--fs-14); color: var(--ink-2); }


/* Cookie */
.cookie-banner {
  position: fixed; z-index: 60; left: 16px; bottom: 16px; max-width: 520px; padding: 16px;
  display: flex; align-items: center; gap: 16px; background: var(--solid); color: #fff; border-radius: var(--r-lg);
  font-size: var(--fs-14); box-shadow: var(--shadow-lg);
}
.cookie-banner a { color: #fff; }
.cookie-banner button { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-sm); background: #fff; color: #0e1a2b; font-weight: 600; cursor: pointer; }



/* ---------- Общая адаптивность ---------- */
@media (max-width: 1100px) {
  .site-header nav, .hdr-link, .tg-menu { display: none; }
  .burger { display: block; }
  .header-actions { margin-left: auto; }
  .header-inner { gap: 16px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --fs-56: 2.5rem; --fs-40: 1.75rem; --fs-28: 1.5rem; }
  .header-actions .nav-cta { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; max-width: none; flex-direction: column; align-items: stretch; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.company-lines { line-height: 1.6; }

/* Предупреждение про поддельных менеджеров */
.scam-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--r-sm); color: var(--ink); font-size: var(--fs-14); line-height: 1.5; }
.scam-note::before { content: "⚠"; color: var(--amber); font-size: 1.1em; line-height: 1.3; }
.scam-note a { color: var(--brand); text-decoration: underline; }

/* Кнопка темы в шапке */
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 44px; margin-right: 0; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); cursor: pointer; flex: none; }
.theme-btn:hover { background: var(--paper); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (max-width: 1100px) { .theme-btn { order: 1; margin-right: 0; } .burger { order: 2; } }
/* Плавная смена темы: растворение снимка страницы */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; animation-timing-function: ease-in-out; mix-blend-mode: normal; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* Плавающая кнопка «Написать менеджеру» со статусом приёма заявок */
.float-help { position: fixed; z-index: 45; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; max-width: min(340px, calc(100vw - 32px)); padding: 10px 16px 10px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-md); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.float-help:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.float-help:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.float-ico { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; }
.float-ico svg { width: 20px; height: 20px; fill: currentColor; margin-right: 2px; }
.float-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #22a35a; border: 2px solid var(--surface); }
.float-help.paused .float-dot { background: #d98a00; }
.float-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.float-text b { font-size: var(--fs-14); font-weight: 600; }
.float-text small { font-size: 0.75rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .float-help { right: 12px; bottom: 84px; padding: 6px; }
  .float-text { display: none; }
}
@media (prefers-reduced-motion: reduce) { .float-help { transition: none; } }

/* Иллюстрация «Орбита»: планета, орбиты и монеты. Монеты летят по кругу и остаются «на ногах» (контр-вращение). */
.orbit-art { display: block; width: 100%; height: auto; overflow: visible; }
.orbit-art .orb { transform-origin: 240px 240px; }
.orbit-art .coin-in { transform-box: fill-box; transform-origin: center; }
.orbit-art.is-animated .orb-a { animation: orb-spin 70s linear infinite; }
.orbit-art.is-animated .orb-b { animation: orb-spin 52s linear infinite reverse; }
.orbit-art.is-animated .orb-c { animation: orb-spin 36s linear infinite; }
.orbit-art.is-animated .orb-a .coin-in { animation: orb-spin 70s linear infinite reverse; }
.orbit-art.is-animated .orb-b .coin-in { animation: orb-spin 52s linear infinite; }
.orbit-art.is-animated .orb-c .coin-in { animation: orb-spin 36s linear infinite reverse; }
@keyframes orb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orbit-art.is-animated .orb, .orbit-art.is-animated .coin-in { animation: none; } }
