:root {
    --bg: #0a0d12;
    --text: #f4f7fb;
    --muted: rgba(255, 255, 255, 0.76);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.22);
    --accent-rgb: 124, 199, 255;
    --accent: rgb(var(--accent-rgb));
    --accent-glow: rgba(var(--accent-rgb), 0.4);
    --secondary-rgb: 255, 166, 107;
    --secondary-glow: rgba(var(--secondary-rgb), 0.26);
    --warn-rgb: 255, 196, 107;
    --error-rgb: 255, 122, 122;
    --gradient-hot: linear-gradient(100deg, var(--accent) 0%, #c6b8ff 45%, rgb(var(--secondary-rgb)) 100%);
    --font-mono: ui-monospace, 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, monospace;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 36px;
    /* clip вместо hidden: не ломает position: sticky у шапки */
    overflow-x: hidden;
    overflow-x: clip;
    background: radial-gradient(circle at top, #111827 0%, var(--bg) 40%, #06080b 100%);
}

main {
    width: min(1200px, 100%);
}

::selection {
    background: var(--accent);
    color: #000;
}

/* Единый видимый фокус для клавиатуры */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.logo {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover,
.logo:focus-visible {
    color: var(--accent);
    text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

.logo-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 10px;
    border-radius: 50%;
    vertical-align: 0.12em;
    background: var(--accent);
    animation: pulseDot 2s infinite;
}

/* ---------- Skip link & scroll progress ---------- */

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 2px;
    background: var(--gradient-hot);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
    transform: scaleX(0);
    transform-origin: 0 50%;
    pointer-events: none;
}

.no-js .scroll-progress {
    display: none;
}

/* ---------- Gradient text ---------- */

.text-gradient {
    background: var(--gradient-hot);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent);
    animation: gradientPan 6s ease-in-out infinite alternate;
}

@keyframes gradientPan {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

/* ---------- Site header ---------- */

.site-header {
    position: sticky;
    top: 12px;
    z-index: 50;
    width: min(1200px, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 20px;
    margin-bottom: 28px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(10, 13, 18, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav a,
.header-actions .login-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.3s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.header-actions .login-link:hover,
.header-actions .login-link:focus-visible {
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ---------- Entrance animations ---------- */

.reveal-header {
    animation: slideDownFade 0.8s var(--ease-out) forwards;
}

.reveal-carousel {
    opacity: 0;
    animation: slideUpFade 1s var(--ease-out) 0.2s forwards;
}

.reveal-cta {
    opacity: 0;
    animation: slideUpFade 1s var(--ease-out) 0.4s forwards;
}

.reveal-cta-note {
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero wrapper: orbs, shadow, parallax vars ---------- */

.hero-layout-wrapper {
    position: relative;
    isolation: isolate; /* орбы с z-index:-1 остаются внутри и не уходят под фон страницы */
    width: min(1200px, 100%);
    margin: 0 auto;
}

/* Тень вынесена сюда: внутри .carousel (overflow:hidden) она обрезалась */
.hero-layout-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    transition: box-shadow 0.6s ease;
    pointer-events: none;
}

.hero-layout-wrapper:hover::before {
    box-shadow: 0 24px 100px rgba(var(--accent-rgb), 0.18), 0 24px 80px rgba(0, 0, 0, 0.45);
}

.ambient-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
    will-change: transform;
    animation: floatOrb 12s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.orb-1 {
    top: -50px;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-glow);
    translate: calc(var(--px, 0) * -40px) calc(var(--py, 0) * -30px);
}

/* right: 0 и дрейф влево: при right: -5% орб вылезал за окно и давал горизонтальный скролл на ~1024px */
.orb-2 {
    bottom: -100px;
    right: 0;
    width: 500px;
    height: 500px;
    background: var(--secondary-glow);
    animation-name: floatOrbLeft;
    animation-delay: -6s;
    animation-duration: 15s;
    translate: calc(var(--px, 0) * 50px) calc(var(--py, 0) * 36px);
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -40px) scale(1.1); }
}

@keyframes floatOrbLeft {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, -40px) scale(1.05); }
}

/* ---------- Carousel ---------- */

.carousel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 62vh;
    height: clamp(420px, 62svh, 680px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: #0d1118;
    touch-action: pan-y; /* вертикальный скролл работает, горизонтальный свайп ловим сами */
}

.carousel-slides {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero--slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 32px 40px 72px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.hero--slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    user-select: none;
}

/* При работающем JS картинку рисует мозаика; <img> остаётся как загрузчик и запасной вариант */
.js:not(.no-mosaic) .hero--slide:not(.mosaic-failed) .hero-bg {
    opacity: 0;
}

/* ---------- Mosaic ---------- */

.hero-mosaic {
    position: absolute;
    inset: -24px; /* запас под параллакс, чтобы не светились края */
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    transform: scale(1.015);
    translate: calc(var(--px, 0) * 14px) calc(var(--py, 0) * 9px);
    contain: layout paint;
}

.mosaic-tile {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background-color: #111923;
    box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.2);
    transform: translate3d(var(--scatter-x), var(--scatter-y), 0) rotate(var(--scatter-r)) scale(0.86);
    opacity: 0;
    clip-path: polygon(0 4%, 94% 0, 100% 93%, 6% 100%);
    transition: transform 900ms var(--ease-out), opacity 500ms ease;
}

/*
 * Фикс растяжения: слой размером со всю мозаику (500% x 400% плитки)
 * сдвинут на свою клетку и использует background-size: cover,
 * поэтому пропорции баннера сохраняются.
 */
.mosaic-tile::before {
    content: "";
    position: absolute;
    left: calc(var(--tile-x) * -100%);
    top: calc(var(--tile-y) * -100%);
    width: 500%;
    height: 400%;
    background-image: var(--tile-image);
    background-size: cover;
    background-position: center;
}

.mosaic-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%, rgba(0, 0, 0, 0.28));
    mix-blend-mode: screen;
}

.hero--slide.mosaic-in .mosaic-tile {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    opacity: 1;
    transition-delay: calc(var(--tile-index) * 24ms);
    will-change: transform, opacity;
}

.hero--slide.mosaic-in .hero-mosaic {
    animation: mosaicBreath 7s ease-in-out 900ms infinite alternate;
}

@keyframes mosaicBreath {
    from { transform: scale(1.015) translate3d(0, 0, 0); }
    to { transform: scale(1.045) translate3d(-0.5%, -0.5%, 0); }
}

/* ---------- Fallback slide (нет баннеров) ---------- */

.fallback-pattern {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(var(--accent-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    transform: perspective(500px) rotateX(20deg) scale(1.5);
    animation: panGrid 20s linear infinite;
}

@keyframes panGrid {
    from { transform: perspective(500px) rotateX(20deg) translateY(0) scale(1.5); }
    to { transform: perspective(500px) rotateX(20deg) translateY(40px) scale(1.5); }
}

.scanner-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1;
    height: 4px;
    background: var(--accent);
    box-shadow: 0 0 20px 5px rgba(var(--accent-rgb), 0.4);
    opacity: 0;
    animation: scanLine 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scanLine {
    0% { top: -2%; opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { top: 102%; opacity: 0; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse at center, rgba(6, 8, 11, 0.35), transparent 65%),
        linear-gradient(135deg, rgba(13, 17, 24, 0.78), rgba(10, 13, 18, 0.48));
}

/* ---------- Hero text ---------- */

.content {
    position: relative;
    z-index: 3;
    max-width: 760px;
    translate: calc(var(--px, 0) * -16px) calc(var(--py, 0) * -10px);
}

.hero-title {
    margin: 0 0 18px;
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    opacity: 0;
}

.content p {
    margin: 0;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 1.7;
    color: var(--muted);
    opacity: 0;
}

.hero--slide.active .hero-title {
    animation: fadeIn 0.9s ease both 0.1s;
}

.hero--slide.active .content p {
    animation: fadeIn 1.1s ease both 0.25s;
}

.mono-title {
    font-family: var(--font-mono);
    letter-spacing: -0.04em;
}

.mono-title::after {
    content: "_";
    margin-left: 0.08em;
    color: var(--accent);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.08);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0;
}

.hero--slide.active .hero-badge {
    animation: fadeIn 0.8s ease both;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6bffb0;
    box-shadow: 0 0 10px #6bffb0;
    animation: blink 1.4s steps(1) infinite;
}

/* Глитч: копия заголовка из data-text, которая изредка "рвётся" полосами.
   ::after уже занят мигающим курсором у .mono-title, поэтому только ::before */
.glitch {
    position: relative;
}

.glitch::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: rgb(var(--error-rgb));
    text-shadow: -2px 0 var(--accent);
    clip-path: inset(100% 0 0 0);
    pointer-events: none;
    animation: glitchSlice 5s steps(1) 2s infinite;
}

@keyframes glitchSlice {
    0%, 86%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
    87% { clip-path: inset(12% 0 70% 0); transform: translateX(-6px); }
    89% { clip-path: inset(55% 0 22% 0); transform: translateX(5px); }
    91% { clip-path: inset(30% 0 48% 0); transform: translateX(-3px); }
    93% { clip-path: inset(78% 0 4% 0); transform: translateX(4px); }
    95% { clip-path: inset(100% 0 0 0); transform: none; }
}

/* ---------- Cursor FX: hero spotlight + log trail ---------- */

.hero-spot {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(380px circle at var(--sx, 50%) var(--sy, 50%), rgba(var(--accent-rgb), 0.15), transparent 65%);
}

/* Терминальная сетка, которая проявляется только вокруг курсора */
.hero-spot::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--accent-rgb), 0.38) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.38) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(210px circle at var(--sx, 50%) var(--sy, 50%), #000, transparent 70%);
    mask-image: radial-gradient(210px circle at var(--sx, 50%) var(--sy, 50%), #000, transparent 70%);
}

.carousel.is-hot .hero-spot {
    opacity: 1;
}

.trail {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
}

.trail-tag {
    position: absolute;
    left: 0;
    top: 0;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid currentColor;
    background: rgba(6, 8, 11, 0.6);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.06em;
    white-space: nowrap;
    opacity: 0;
    will-change: transform, opacity;
    animation: trailFloat 1.3s cubic-bezier(0.2, 0.7, 0.3, 1) both;
    animation-delay: var(--delay, 0ms);
}

.trail-tag[data-lvl="info"] { color: var(--accent); }
.trail-tag[data-lvl="debug"] { color: rgba(255, 255, 255, 0.72); }
.trail-tag[data-lvl="warn"] { color: rgb(var(--warn-rgb)); }
.trail-tag[data-lvl="error"] { color: rgb(var(--error-rgb)); }

@keyframes trailFloat {
    0% {
        opacity: 0;
        transform: translate3d(var(--x), var(--y), 0) scale(0.7);
    }
    15% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(calc(var(--x) + var(--dx, 0px)), calc(var(--y) - 48px), 0) scale(1);
    }
}

/* ---------- Cursor FX: page glow ---------- */

.cursor-glow {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 560px;
    height: 560px;
    margin: -280px 0 0 -280px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.035) 40%, transparent 70%);
    will-change: transform;
}

.fx-cursor .cursor-glow {
    display: block;
}

.fx-cursor .cursor-glow.is-on {
    opacity: 1;
}

/* ---------- Carousel controls ---------- */

.carousel-controls {
    position: absolute;
    z-index: 10;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
    background: var(--accent);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5);
}

.carousel-btn:active {
    transform: scale(0.94);
}

.pause-btn .icon-play { display: none; }
.pause-btn.is-paused .icon-play { display: block; }
.pause-btn.is-paused .icon-pause { display: none; }
.pause-btn svg { stroke-width: 2.2; }

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
}

.carousel-dot {
    position: relative;
    width: 22px;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.carousel-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out), background 0.3s ease;
}

.carousel-dot:hover::before {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-dot[aria-current="true"]::before {
    width: 20px;
    background: var(--accent);
}

/* ---------- CTA strip ---------- */

.cta-strip {
    position: relative;
    width: min(1200px, 100%);
    margin-top: 40px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.07), rgba(255, 255, 255, 0.02));
    overflow: hidden;
}

.cta-strip::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transform: skewX(-20deg);
    animation: shine 8s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.cta-copy {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.cta-copy .features-eyebrow {
    margin-bottom: 10px;
}

.cta-copy h2 {
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    letter-spacing: -0.02em;
}

.cta-copy p {
    margin: 8px 0 0;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--muted);
}

.code-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 6px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85em;
    white-space: nowrap;
}

.cta-actions {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */

/* --mag-x / --mag-y выставляет JS (магнитные кнопки); translate не конфликтует с transform */
.btn,
.btn-token {
    translate: var(--mag-x, 0px) var(--mag-y, 0px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s ease,
        border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.2);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #93d2ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    border-color: rgba(var(--accent-rgb), 0.55);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
}

.cta-note {
    width: min(1200px, 100%);
    margin: 14px auto 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.cta-note a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Log ticker ---------- */

.log-ticker {
    width: min(1200px, 100%);
    margin-top: 22px;
    padding: 12px 0;
    overflow: hidden;
    border-block: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.log-ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 48s linear infinite;
}

.log-ticker:hover .log-ticker-track {
    animation-play-state: paused;
}

.log-ticker-group {
    display: flex;
    gap: 40px;
    padding-right: 40px;
}

.tick {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: nowrap;
    color: var(--muted);
}

.tick b {
    margin-right: 6px;
    font-weight: 700;
}

.tick[data-lvl="info"] b { color: var(--accent); }
.tick[data-lvl="debug"] b { color: rgba(255, 255, 255, 0.55); }
.tick[data-lvl="warn"] b { color: rgb(var(--warn-rgb)); }
.tick[data-lvl="error"] b { color: rgb(var(--error-rgb)); }

/* Две одинаковые группы: сдвиг на -50% возвращает ленту в исходную точку без рывка */
@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---------- Scroll reveal (generic) ---------- */

/* Только при JS: без него блоки видны сразу */
.js .reveal-on-scroll {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s var(--ease-out),
        border-color 0.4s ease, background 0.4s ease;
}

.js .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Stats ---------- */

.stats {
    width: min(1200px, 100%);
    margin-top: 72px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 22px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.js .stat.is-visible:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
}

.stat-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: clamp(2.4rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
    background: var(--gradient-hot);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent);
}

.stat-value small {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-label {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------- Features ---------- */

.features {
    width: min(1200px, 100%);
    margin-top: 96px;
    padding-bottom: 8px;
}

.features-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 52px;
}

.features-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0.85;
}

.features-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

.features-header h2 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.features-header p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Одно правило transition (раньше дубль убирал opacity и ломал fade при скролле) */
.feature-card {
    position: relative;
    padding: 30px 26px 32px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.55s var(--ease-out),
        border-color 0.4s ease,
        background 0.4s ease;
}

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card.is-visible:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.3);
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.07), rgba(255, 255, 255, 0.02));
}

/* Заливка-прожектор под курсором (координаты --cx/--cy ставит JS) */
.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(340px circle at var(--cx, 50%) var(--cy, 50%), rgba(var(--accent-rgb), 0.14), transparent 65%);
}

/* Светящаяся рамка под курсором: градиент, вырезанный маской до 1px контура */
.feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(240px circle at var(--cx, 50%) var(--cy, 50%), rgba(var(--accent-rgb), 0.9), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.fx-cursor .features-grid:hover .feature-card::before,
.fx-cursor .features-grid:hover .feature-card::after {
    opacity: 1;
}

.feature-card:not(.is-visible):hover::before,
.feature-card:not(.is-visible):hover::after {
    opacity: 0;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 22px;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(3deg);
    background: rgba(var(--accent-rgb), 0.16);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.feature-tag {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    opacity: 0.8;
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 1.24rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.feature-card p {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--muted);
}

/* ---------- How it works ---------- */

.how {
    width: min(1200px, 100%);
    margin-top: 110px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: center;
}

.how-copy h2 {
    margin: 0 0 28px;
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.how-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.how-steps li {
    display: flex;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.how-steps li:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.04);
}

.how-num {
    flex: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    padding-top: 3px;
}

.how-steps h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
}

.how-steps p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--muted);
}

.how-steps .code-chip {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ---------- Terminal ---------- */

.terminal {
    position: relative;
    min-width: 0;
    margin: 0;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: #070a0f;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(var(--accent-rgb), 0.06),
        0 0 60px rgba(var(--accent-rgb), 0.08);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.terminal-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgb(var(--error-rgb));
}

.terminal-bar span:nth-child(2) { background: rgb(var(--warn-rgb)); }
.terminal-bar span:nth-child(3) { background: #6bffb0; }

.terminal-bar em {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-style: normal;
    color: var(--muted);
}

.terminal-body {
    padding: 20px 22px 24px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.75;
    color: #d6e2f0;
}

.terminal-body code {
    display: block;
    font: inherit;
}

.term-line {
    display: block;
    white-space: pre;
}

.js .terminal .term-line {
    opacity: 0;
    transform: translateX(-6px);
}

.js .terminal.is-visible .term-line {
    animation: termIn 0.35s ease forwards;
    animation-delay: calc(var(--i) * 140ms + 300ms);
}

@keyframes termIn {
    to { opacity: 1; transform: none; }
}

.t-prompt { color: #6bffb0; }
.t-str { color: rgb(var(--warn-rgb)); }
.t-ok { color: #6bffb0; font-weight: 700; }
.t-comment { color: rgba(255, 255, 255, 0.45); font-style: italic; }

.term-cursor::after {
    content: "";
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    vertical-align: -0.2em;
    background: var(--accent);
    animation: blink 1s steps(1) infinite;
}

/* ---------- FAQ ---------- */

.faq {
    width: min(1200px, 100%);
    margin-top: 110px;
}

.faq .features-header {
    margin-bottom: 36px;
}

.faq .features-header h2 {
    margin: 0;
}

.faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.faq-item {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.faq-item[open] {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.04);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    border-radius: inherit;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    flex: none;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    line-height: 1;
    color: var(--accent);
    transition: transform 0.3s var(--ease-out);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-item p {
    margin: 0;
    padding: 0 22px 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ---------- Final CTA ---------- */

.final-cta {
    position: relative;
    isolation: isolate;
    width: min(1200px, 100%);
    margin: 110px auto 0;
    padding: 72px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
    border-radius: 28px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 120%, rgba(var(--accent-rgb), 0.22), transparent 60%),
        radial-gradient(ellipse at 50% -20%, rgba(var(--secondary-rgb), 0.12), transparent 55%),
        #0b0f16;
}

/* Сетка, тающая к краям */
.final-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(var(--accent-rgb), 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 70%);
    mask-image: radial-gradient(ellipse at center, #000, transparent 70%);
}

.final-cta .features-eyebrow {
    margin: 0;
}

.final-cta h2 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2rem, 5.2vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.final-cta p {
    max-width: 520px;
    margin: 0 0 8px;
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--muted);
}

.btn-token {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 56px;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #000;
    background: linear-gradient(110deg, var(--accent) 0%, #c9e8ff 45%, var(--accent) 60%) 0 0 / 220% 100%;
    animation: tokenSheen 3.5s linear infinite;
    border-radius: 999px;
    text-decoration: none;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.25);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out),
        transform 0.8s var(--ease-out),
        translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease;
}

.btn-token::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-token.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.btn-token:hover,
.btn-token:focus-visible {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 16px 36px rgba(var(--accent-rgb), 0.4), 0 0 0 2px rgba(var(--accent-rgb), 0.2);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.3s ease,
        opacity 0.3s ease;
}

.btn-token:hover::before {
    transform: translateX(100%);
}

.btn-token:active {
    transform: translateY(2px) scale(0.97);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.2);
}

@keyframes tokenSheen {
    from { background-position: 100% 0; }
    to { background-position: -120% 0; }
}

/* ---------- Footer ---------- */

.site-footer {
    width: min(1200px, 100%);
    margin-top: 96px;
    padding: 32px 4px 4px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-top {
    max-width: 360px;
}

.footer-top p {
    margin: 10px 0 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--accent);
}

.footer-copy {
    width: 100%;
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

/* ---------- Pause animations when tab hidden ---------- */

.page-hidden .hero-mosaic,
.page-hidden .ambient-orb,
.page-hidden .fallback-pattern,
.page-hidden .scanner-line,
.page-hidden .cta-strip::before,
.page-hidden .log-ticker-track,
.page-hidden .glitch::before,
.page-hidden .text-gradient,
.page-hidden .btn-token {
    animation-play-state: paused;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .features-grid,
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .how {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
}

@media (max-width: 640px) {
    body { padding: 18px; }

    .site-header {
        flex-wrap: wrap;
        padding: 12px 16px;
        top: 8px;
    }

    /* Раньше навигация на мобильных пропадала целиком */
    .site-nav {
        order: 3;
        width: 100%;
        justify-content: space-around;
        gap: 12px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    .hero-layout-wrapper::before { border-radius: 20px; }
    .carousel { height: clamp(380px, 60svh, 520px); border-radius: 20px; }
    .hero--slide { padding: 24px 20px 76px; }
    .hero-mosaic { inset: -1px; translate: none; }
    .content { translate: none; }
    .ambient-orb { display: none; }

    .cta-strip { flex-direction: column; align-items: flex-start; margin-top: 28px; padding: 22px 20px; }
    .cta-actions { width: 100%; }
    /* Только кнопки в CTA: раньше flex: 1 растягивал и кнопку в шапке */
    .cta-actions .btn { flex: 1; }
    .cta-note { margin-top: 10px; }

    .site-nav { gap: 8px; font-size: 0.86rem; }

    .stats { margin-top: 48px; gap: 12px; }
    .stat { padding: 18px 16px; }

    .features { margin-top: 64px; }
    .features-header { margin-bottom: 36px; }
    .features-grid { grid-template-columns: 1fr; }

    .how,
    .faq { margin-top: 72px; }
    .how-steps li { padding: 16px; gap: 14px; }
    .terminal-body { padding: 16px; font-size: 0.76rem; }

    .final-cta { margin-top: 64px; padding: 48px 16px; border-radius: 20px; }
    .btn-token { padding: 16px 40px; }

    .site-footer { margin-top: 64px; flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    .reveal-header,
    .reveal-carousel,
    .reveal-cta,
    .reveal-cta-note,
    .feature-card,
    .btn-token {
        opacity: 1;
        transform: none;
    }

    .hero--slide .hero-title,
    .hero--slide .hero-badge,
    .hero--slide .content p { opacity: 1; }
    .js .reveal-on-scroll,
    .js .terminal .term-line { opacity: 1; transform: none; }
    .glitch::before { display: none; }
    .log-ticker-track { animation: none; }
    .ambient-orb { opacity: 0.3; }
    .mosaic-tile { opacity: 1; transform: none; }
    .mono-title::after { animation: none; opacity: 1; }
    .hero-spot,
    .trail,
    .cursor-glow { display: none !important; }
}

/* ---------- No JS fallback ---------- */

.no-js .carousel { display: block; height: auto; }
.no-js .carousel-slides { position: static; width: auto; height: auto; }
.no-js .hero--slide { position: static; opacity: 1; display: none; height: auto; min-height: 60vh; }
.no-js .hero--slide:first-child { display: block; }
.no-js .hero--slide .hero-title,
.no-js .hero--slide .hero-badge,
.no-js .hero--slide .content p { opacity: 1; }
.no-js .feature-card,
.no-js .btn-token { opacity: 1; transform: translateY(0); }
.no-js .carousel-controls { display: none; }
.no-js .reveal-header,
.no-js .reveal-carousel,
.no-js .reveal-cta,
.no-js .reveal-cta-note {
    opacity: 1;
    transform: none;
    animation: none;
}
/* Long install commands in FAQ answers must wrap on phones. */
.faq-item .code-chip {
    display: inline;
    white-space: normal;
    overflow-wrap: anywhere;
}
