/* STB — страница на проекта. Без външни зависимости. Шрифт: Adys (локално). */

@font-face { font-family: "Adys"; src: url("../fonts/ADYS-Regular.woff2") format("woff2"), url("../fonts/ADYS-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Adys"; src: url("../fonts/ADYS-Medium.woff2") format("woff2"), url("../fonts/ADYS-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Adys"; src: url("../fonts/ADYS-Bold.woff2") format("woff2"), url("../fonts/ADYS-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Adys"; src: url("../fonts/ADYS-Italic.woff2") format("woff2"), url("../fonts/ADYS-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #04050a;
  --panel: #07080e;
  --card: #0c0e16;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #f3f5fb;
  --muted: #aab1c5;
  --cyan: #38bdf8;
  --blue: #6d7cff;
  --violet: #b07cff;
  --on-accent: #04121b;
  --bad: #ff9a9a;
  --good: #7de3b1;
  --grad: linear-gradient(90deg, var(--cyan), var(--blue) 55%, var(--violet));
  --radius: 28px;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Adys", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 95% 105%, rgba(104, 62, 255, 0.5), transparent 62%),
    radial-gradient(900px 600px at 0% -10%, rgba(56, 189, 248, 0.2), transparent 58%),
    var(--ink);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(56, 189, 248, 0.6); text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--cyan); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(109, 124, 255, 0.55); }

h1, h2, h3 { font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; max-width: 62ch; }
ul, ol { margin: 0; padding: 0; }
code, pre { font-family: "Cascadia Mono", Consolas, "Courier New", monospace; font-size: 0.86em; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--cyan); color: var(--on-accent); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Оформление на страницата: панели като в референцията, но с наш контур и цвят */
.page { max-width: 1320px; margin: 0 auto; padding: clamp(10px, 2vw, 24px) clamp(10px, 2vw, 24px) clamp(10px, 1.5vw, 16px); display: grid; gap: clamp(10px, 2vw, 24px); }
.panel {
  position: relative; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: clamp(32px, 6vw, 72px) var(--gutter);
  contain: paint;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--grad); border-radius: 2px; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); margin-bottom: 0.5em; }
.lead { font-size: clamp(1.15rem, 1.1vw + 0.9rem, 1.4rem); color: #dfe3f0; line-height: 1.6; }
.dot { color: var(--cyan); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Бутони */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 0.85em 1.6em; border-radius: 999px; font: inherit; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: filter 0.2s, background 0.2s, border-color 0.2s; }
.btn-primary { background: linear-gradient(90deg, var(--cyan), #7f8cff); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; }

/* Хедър */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.35rem; letter-spacing: 0.04em; }
.brand svg { width: 38px; height: 38px; }
.brand small { display: block; font-weight: 400; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a { text-decoration: none; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--cyan); }
.nav .btn { padding: 0.6em 1.3em; border-bottom: 1.5px solid transparent; font-size: 0.8rem; }
.nav .btn:hover { border-bottom-color: transparent; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.4); border-radius: 50%; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; content: ""; position: relative; }
.menu summary span::before { position: absolute; top: -6px; } .menu summary span::after { position: absolute; top: 6px; }
.menu-list { position: absolute; right: 0; top: 54px; min-width: 230px; background: #0e1018; border: 1px solid var(--line); border-radius: 18px; padding: 10px; display: grid; z-index: 20; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.menu-list a { padding: 12px 14px; text-decoration: none; border-radius: 10px; font-size: 0.95rem; }
.menu-list a:hover { background: rgba(255,255,255,.07); }
@media (max-width: 860px) { .nav { display: none; } .menu { display: block; } }

/* Hero */
.hero { min-height: min(92vh, 860px); display: flex; flex-direction: column; padding-top: clamp(24px, 3vw, 36px); }
.hero-art { position: absolute; right: -14%; top: 50%; width: min(82vw, 940px); aspect-ratio: 1; transform: translateY(-46%); pointer-events: none; opacity: 0.95; }
.hero-art img { width: 100%; height: 100%; animation: drift 180s linear infinite; will-change: transform; }
@keyframes drift { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art img { animation: none; } }
.hero-body { position: relative; z-index: 2; margin: auto 0; padding: clamp(40px, 8vw, 90px) 0 clamp(28px, 5vw, 56px); max-width: 820px; }
.hero h1 { font-size: clamp(3.1rem, 9.4vw, 7.4rem); line-height: 0.98; margin-bottom: 0.32em; }
.hero .lead { max-width: 40ch; margin-bottom: 36px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.facts { list-style: none; margin: 0; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: clamp(20px, 5vw, 64px); padding-top: 28px; border-top: 1px solid var(--line-soft); }
.facts b { display: block; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; }
.facts span { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.06em; }
@media (max-width: 700px) { .facts { grid-template-columns: repeat(2, 1fr); } .hero-art { right: -45%; opacity: 0.5; width: 130vw; } }

/* Идеята */
.idea-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 960px) { .idea-grid { grid-template-columns: 1fr; } }
.story h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); margin: 1.6em 0 0.6em; }
.traps { list-style: none; display: grid; gap: 12px; margin: 0 0 1.4em; }
.traps li { background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px 20px; }
.traps q { font-style: italic; color: #fff; quotes: "„" "“"; }
.traps span { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.timeline { list-style: none; position: relative; margin: 0; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--cyan), var(--violet)); opacity: 0.6; border-radius: 2px; }
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 0.55em; width: 16px; height: 16px; border-radius: 50%; background: var(--panel); border: 3px solid var(--cyan); }
.timeline li:last-child::before { background: var(--cyan); box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.2); }
.timeline b { display: block; font-size: 1.5rem; letter-spacing: 0.02em; }
.timeline p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.timeline-note { margin-top: 8px; padding: 18px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: 0.95rem; }

/* Как работи */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 56px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: 22px; padding: 30px; display: flex; flex-direction: column; transition: border-color 0.2s; }
.card:hover { border-color: rgba(109, 124, 255, 0.6); }
.card .num { font-size: 1rem; font-weight: 700; letter-spacing: 0.12em; }
.card h3 { font-size: 1.7rem; margin: 14px 0 12px; }
.card p { color: var(--muted); font-size: 1rem; }
.card a.more { margin-top: auto; font-weight: 700; font-size: 0.92rem; letter-spacing: 0.04em; text-decoration: none; display: inline-flex; gap: 8px; padding-top: 10px; }
.card a.more:hover { color: var(--cyan); }
.cmp-title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin-bottom: 18px; }
.cmp { list-style: none; display: grid; gap: 12px; margin-bottom: 40px; }
.cmp li { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line-soft); border-radius: 18px; overflow: hidden; }
.cmp div { padding: 18px 22px; background: var(--card); }
.cmp div + div { background: #0b1220; border-left: 1px solid var(--line-soft); }
.cmp small { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; font-weight: 700; }
.cmp .no small { color: var(--bad); } .cmp .yes small { color: var(--good); }
.cmp .no q { color: var(--muted); }
.cmp q { quotes: "„" "“"; font-style: italic; }
@media (max-width: 700px) { .cmp li { grid-template-columns: 1fr; } .cmp div + div { border-left: 0; border-top: 1px solid var(--line-soft); } }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.pills li { border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-size: 0.92rem; background: rgba(255,255,255,.03); }
.sub { color: var(--muted); font-size: 0.95rem; margin: 0 0 14px; }

/* Приложения */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
@media (max-width: 1000px) { .uses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .uses { grid-template-columns: 1fr; } }
.use { background: var(--card); border: 1px solid var(--line-soft); border-radius: 22px; padding: 28px; }
.use svg { width: 34px; height: 34px; stroke: var(--cyan); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.use h3 { font-size: 1.35rem; margin-bottom: 10px; }
.use p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.note { border-left: 3px solid var(--violet); padding: 6px 0 6px 18px; color: #d7dbea; max-width: 70ch; margin-bottom: 30px; }
pre { margin: 0; padding: 20px 24px; background: #03040a; border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; color: #cfe9ff; line-height: 1.55; }
pre .c { color: #7f88a6; }

/* Присъединяване */
.join { background: radial-gradient(900px 500px at 100% 0%, rgba(109,124,255,.28), transparent 60%), var(--panel); }
.join-art { position: absolute; left: -22%; bottom: -55%; width: 110%; max-width: 1000px; opacity: 0.4; pointer-events: none; }
.join .inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 960px) { .join .inner { grid-template-columns: 1fr; } }
.roles { list-style: none; display: grid; gap: 10px; margin: 0 0 26px; }
.roles li { padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(5,6,11,.7); }
.roles b { display: block; }
.roles span { color: var(--muted); font-size: 0.93rem; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 14px; margin-bottom: 28px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 1.5px solid var(--cyan); color: var(--cyan); }
.steps p { margin: 8px 0 0; }

/* Лиценз */
.lic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); }
@media (max-width: 900px) { .lic-grid { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.legal { list-style: none; display: grid; gap: 12px; }
.legal li { padding-left: 22px; position: relative; color: #d3d8e8; font-size: 0.98rem; }
.legal li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }

/* Футър */
.foot { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
#company { padding-block: clamp(28px, 4vw, 48px); }
@media (max-width: 960px) { .foot { grid-template-columns: 1fr; } }
.plate { display: inline-block; background: #e9edf3; border-radius: 18px; padding: 14px 22px; margin-bottom: 20px; }
.plate img { width: 210px; height: auto; }
.foot h3 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.foot p, .foot address { font-size: 0.97rem; color: #d3d8e8; font-style: normal; margin-bottom: 8px; }
.foot-links { list-style: none; display: grid; gap: 8px; }
.foot-links a { font-size: 0.97rem; }
.credit { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 0.86rem; color: var(--muted); display: grid; gap: 8px; max-width: none; }
.credit p { max-width: 90ch; margin: 0; }

/* Плаващ бутон „към началото". Без скрипт е винаги видим; със скрипт се показва след скролиране. */
.to-top {
  position: fixed; z-index: 40;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  color: var(--on-accent); text-decoration: none;
  background: linear-gradient(135deg, var(--cyan), #7f8cff 70%, var(--violet));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 0 5px rgba(56, 189, 248, 0.18);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, box-shadow 0.2s, filter 0.2s;
}
.to-top svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { filter: brightness(1.1); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(56, 189, 248, 0.28); }
.js .to-top { opacity: 0; visibility: hidden; transform: translateY(14px); }
.js .to-top.show { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .to-top { display: none; } }

/* Ред за авторски права в подвала */
.credit .copy { color: #8fd3ff; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; }
