/* Общий вид всех страниц сайта: цвета, шрифты, тексты, списки, подвал.
   Заголовки и кнопки — Exo 2, текст — Inter (как в графе): в обоих есть
   кириллица. Saira — только слово NOOSPHERE в знаке.
   Цвет — из самого затмения: голубой → серебро → светлое золото. */
:root {
  --bg: #03050a;
  --text: #eef2f8;
  --body: #b9c4d3;
  --muted: #8592a5;
  --blue: #78acff;
  --eclipse: linear-gradient(90deg, #78acff 0%, #b7c5d4 24%, #f6deaa 50%, #b7c5d4 76%, #78acff 100%);
  --display: 'Exo 2', 'Segoe UI', sans-serif;
  --sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --maxw: 720px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; background: var(--bg); }
body {
  min-height: 100vh;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(20,32,58,.55), transparent 70%) no-repeat, var(--bg);
  background-size: 100% 100vh;
  color: var(--body);
  font-family: var(--sans); font-size: 17px; line-height: 1.7; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
::selection { background: rgba(120,172,255,.3); color: #fff; }

/* ---------- тексты ---------- */
h1, h2, h3 { font-family: var(--display); color: var(--text); text-wrap: balance; }
h1 { font-weight: 300; font-size: clamp(36px, 6vw, 60px); line-height: 1.12; letter-spacing: -.01em; }
h2 { font-weight: 400; font-size: clamp(27px, 3.8vw, 38px); line-height: 1.2; margin-bottom: 28px; }
h3 { font-weight: 500; font-size: 20px; line-height: 1.35; margin: 44px 0 16px; }
h2 + h3 { margin-top: 0; }
h1 em, h2 em, .hero-line em { font-style: normal; background: linear-gradient(90deg, #78acff, #b7c5d4 55%, #f6deaa); -webkit-background-clip: text; background-clip: text; color: transparent; }
p { margin-bottom: 18px; text-wrap: pretty; }
strong { color: var(--text); font-weight: 600; }
.lead { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.62; color: #d3dbe6; margin-bottom: 22px; }
.statement { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.35; color: var(--text); margin: 40px 0 0; text-wrap: balance; }
.meta-line { color: var(--muted); font-size: 15px; margin: 18px 0 0; }

.list { list-style: none; }
.list li { position: relative; padding-left: 24px; margin-bottom: 14px; }
.list li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
ol.list { counter-reset: n; }
ol.list li { counter-increment: n; padding-left: 34px; }
ol.list li::before { content: counter(n); width: auto; height: auto; background: none; left: 0; top: 0; font-family: var(--display); color: var(--blue); }
.list.big li { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--text); margin-bottom: 20px; }
.list.big li::before { top: .62em; }

/* ---------- раскладка ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 150px 22px 0; }
.page-head { margin-bottom: 72px; }
.page-head .lead { margin: 22px 0 0; }
.section { margin-bottom: 88px; }
.with-toc { max-width: 1040px; display: grid; grid-template-columns: 220px minmax(0, var(--maxw)); gap: 0 80px; }
.with-toc .page-head, .with-toc main { grid-column: 2; }
.toc { grid-column: 1; grid-row: 2; position: sticky; top: 110px; align-self: start; }
.toc ul { list-style: none; }
.toc a { display: block; padding: 7px 0; font-family: var(--display); font-size: 16px; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color .25s; }
.toc a:hover, .toc a.active { color: var(--text); }
.page.home { padding-top: 40px; }
@media (min-width: 760px) { #how .lead { font-size: 19px; } #how .lead:first-of-type { white-space: nowrap; } } /* первая фраза — в одну строку */
.contact { max-width: var(--maxw); margin: 0 auto; padding: 30px 22px 0; text-align: center; }
.contact h2 { margin-bottom: 14px; }
.contact p { margin-bottom: 30px; }
.contact .mail { margin: 20px 0 0; }
.role { margin-bottom: 52px; }
.role h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 14px; }

footer.footer { max-width: 1040px; margin: 0 auto; padding: 110px 22px 56px; text-align: center; }
footer.footer .fword { display: inline-block; padding-left: .3em; font-family: 'Saira', sans-serif; font-size: 18px; letter-spacing: .3em; text-transform: uppercase; background: var(--eclipse); -webkit-background-clip: text; background-clip: text; color: transparent; }
footer.footer nav { margin-top: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 28px; }
footer.footer nav a { padding: 8px 0; font-family: var(--display); font-size: 15px; color: var(--muted); text-decoration: none; transition: color .25s; }
footer.footer nav a:hover { color: var(--text); }

@media (max-width: 960px) {
  .with-toc { display: block; max-width: var(--maxw); }
  .toc { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .page { padding-top: 112px; }
  .page-head { margin-bottom: 52px; }
  .section { margin-bottom: 64px; }
  footer.footer { padding-top: 84px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.legal h1 { margin-bottom: 22px; }
.legal .lead { margin-bottom: 56px; }
.legal h2 { font-size: 26px; margin: 56px 0 20px; }
.legal h3 { font-size: 18px; margin: 26px 0 6px; }
.legal blockquote { padding: 22px 26px; border-radius: 14px; background: rgba(120,172,255,.07); color: var(--text); font-size: 16px; }
.legal .meta-line { margin: 48px 0 14px; }

/* ---------- кнопка: тёмная внутри, ободок затмения ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 44px; border-radius: 999px; border: 1.5px solid transparent;
  background: linear-gradient(#0a1020, #0a1020) padding-box, var(--eclipse) border-box;
  font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .04em;
  color: var(--text); text-decoration: none; white-space: nowrap;
  box-shadow: 0 0 30px rgba(150,185,240,.2); transition: box-shadow .3s, color .3s;
}
.btn:hover { color: #fff; box-shadow: 0 0 46px rgba(150,185,240,.42); }
.btn.small { min-height: 40px; padding: 0 22px; font-size: 15px; box-shadow: none; }
.btn.small:hover { box-shadow: 0 0 22px rgba(150,185,240,.34); }

/* ---------- ссылка: тонкий ободок затмения снизу ---------- */
main p a, .list a, .contact .mail a, .cta-alt a {
  color: var(--text); text-decoration: none; padding-bottom: 2px;
  background: var(--eclipse) 0 100% / 100% 1px no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: color .25s, background-size .25s;
}
main p a:hover, .list a:hover, .contact .mail a:hover, .cta-alt a:hover { color: #fff; background-size: 100% 2px; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 3px; }
.btn:focus-visible { border-radius: 999px; }

/* ---------- окно входа (auth.js; такое же в графе — static/auth.css) ---------- */
dialog.auth {
  width: calc(100% - 32px); max-width: 420px; max-height: calc(100dvh - 32px); margin: auto; padding: 32px; overflow: auto;
  border: 1px solid rgba(150,185,240,.18); border-radius: 20px; background: #080d18; color: var(--body);
  font-size: 15px; line-height: 1.55; box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
dialog.auth::backdrop { background: rgba(3,5,10,.74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html:has(dialog.auth[open]) { overflow: hidden; }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth h2 { margin: 0 40px 4px 0; font-size: 28px; }
.auth p { margin: 0; }
.auth .f span { display: block; margin-bottom: 6px; font-size: 14px; }
.auth .f input { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(150,185,240,.18); background: rgba(120,172,255,.06); color: var(--text); font: 16px var(--sans); transition: border-color .2s, background .2s; }
.auth .f input:focus { outline: none; border-color: var(--blue); background: rgba(120,172,255,.1); }
.auth-note { padding: 14px 16px; border-radius: 12px; background: rgba(120,172,255,.07); font-size: 14px; line-height: 1.5; }
.auth-note strong { font-weight: 500; }
.auth-note p { margin-top: 6px; }
.auth a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(120,172,255,.55); }
.auth-terms { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.auth-terms input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.auth-captcha:empty, .auth-msg:empty { display: none; }
.auth-msg { color: #ffc2bd; }
.auth-msg.ok { color: var(--text); }
.auth .btn { width: 100%; min-height: 50px; padding: 0 24px; font-size: 17px; cursor: pointer; }
.auth .btn:disabled { opacity: .5; cursor: default; }
.auth-more { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.auth .lnk { padding: 8px; border: 0; background: none; color: var(--body); font: 15px var(--sans); cursor: pointer; transition: color .25s; }
.auth .lnk:hover { color: var(--text); }
.auth-x { position: absolute; top: 22px; right: 20px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.auth-x::before, .auth-x::after { content: ''; position: absolute; left: 13px; top: 21px; width: 18px; height: 1.5px; background: var(--body); transform: rotate(45deg); }
.auth-x::after { transform: rotate(-45deg); }
@media (max-width: 480px) { dialog.auth { padding: 26px 20px; } .auth-x { top: 16px; right: 10px; } }

/* ---------- шапка внутренних страниц (порядок как на главной) ---------- */
header.top-bar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-canvas { width: 40px; height: 40px; display: block; }
.logo-word { font-family: 'Saira', sans-serif; font-weight: 400; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; background: var(--eclipse); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-right { display: flex; }
.lang-select { appearance: none; -webkit-appearance: none; }
.lang-select option { background: #070b14; color: var(--text); }
.lang-select-wrap::after { content: '\25BE'; position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
header.top-bar { padding: 0 22px; height: 72px; border-bottom: 0; background: rgba(3,5,10,.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
header.top-bar .top-right { flex: 1; flex-direction: row; align-items: center; gap: 26px; margin-left: 36px; position: static; }
header.top-bar .nav-menu { display: flex; flex-direction: row; gap: 24px; margin: 0 auto 0 0; padding: 0; border: 0; background: none; box-shadow: none; min-width: 0; position: static; }
header.top-bar .nav-menu a, header.top-bar .enter-link.ghost, header.top-bar .lang-select {
  font-family: var(--display); font-size: 15px; letter-spacing: .04em; text-transform: none;
  color: #b7c5d4; background: none; border: 0; border-radius: 0; padding: 10px 0; opacity: 1;
  -webkit-backdrop-filter: none; backdrop-filter: none; text-decoration: none; white-space: nowrap; transition: color .25s;
}
header.top-bar .nav-menu a:hover, header.top-bar .nav-menu a.active,
header.top-bar .enter-link.ghost:hover, header.top-bar .lang-select:hover { color: #fff; background: none; border: 0; }
header.top-bar .enter-link.ghost { display: inline; color: var(--text); }
header.top-bar .nav-menu a.menu-only { display: none; }
header.top-bar .lang-select-wrap { position: relative; display: block; }
header.top-bar .lang-select { width: auto; padding-right: 18px; cursor: pointer; }
header.top-bar .lang-select-wrap::after { right: 2px; color: #b7c5d4; font-size: 11px; }
header.top-bar .lang-select-wrap { order: 1; }
header.top-bar .enter-link.ghost { order: 2; }
header.top-bar .enter-link:not(.ghost) { order: 3; }
header.top-bar .nav-toggle { display: none; order: 4; }

header.top-bar .enter-link:not(.ghost) {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  border: 1.5px solid transparent;
  background: linear-gradient(#0a1020, #0a1020) padding-box,
    linear-gradient(90deg, #78acff 0%, #b7c5d4 24%, #f6deaa 50%, #b7c5d4 76%, #78acff 100%) border-box;
  font-family: var(--display); font-weight: 400; text-transform: none;
  color: var(--text); text-decoration: none; white-space: nowrap; transition: box-shadow .3s, color .3s;
}
header.top-bar .enter-link:not(.ghost) { min-height: 40px; padding: 0 22px; font-size: 15px; letter-spacing: .04em; }
header.top-bar .enter-link:not(.ghost):hover { color: #fff; box-shadow: 0 0 22px rgba(150,185,240,.34); }
header.top-bar :focus-visible { outline: 2px solid #78acff; outline-offset: 4px; }

@media (max-width: 1020px) {
  header.top-bar { height: 64px; padding: 0 8px 0 16px; }
  header.top-bar .top-right { justify-content: flex-end; gap: 12px; margin-left: 12px; }
  header.top-bar .enter-link.ghost { padding: 12px 6px; font-size: 16px; }
  header.top-bar .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0 11px; border: 0; background: none; cursor: pointer; }
  header.top-bar .nav-toggle span { display: block; height: 1.5px; width: 100%; background: var(--text); transition: transform .28s ease, opacity .2s ease; }
  header.top-bar .nav-menu { display: none; position: absolute; top: 66px; right: 14px; flex-direction: column; gap: 0; min-width: 210px; padding: 8px 0; margin: 0; background: rgba(6,10,20,.98); border: 1px solid rgba(232,226,214,.14); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
  header.top-bar .top-right.open .nav-menu { display: flex; }
  header.top-bar .nav-menu a { font-size: 16px; padding: 12px 20px; text-align: left; color: var(--text); }
  header.top-bar .top-right.open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  header.top-bar .top-right.open .nav-toggle span:nth-child(2) { opacity: 0; }
  header.top-bar .top-right.open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}
@media (max-width: 620px) {
  header.top-bar .enter-link:not(.ghost) { display: none; }
  header.top-bar .nav-menu a.menu-only { display: block; }
}
@media (max-width: 520px) { header.top-bar .logo-word { display: none; } }

