/* ============================================
   RESET
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #6a11cb;
    --color-secondary: #2575fc;
    --color-text: #1a1a2e;
    --color-text-muted: #6b7280;
    --color-bg: #faf9fb;
    --color-white: #fff;
    --color-border: #e5e7eb;
    --color-yellow: #ffc743;
    --color-yellow-soft: #fff280;
    --color-dark: #0e0e12;
    --gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 44px;
}

h2 {
    font-size: 1.9rem;
}

h3 {
    font-size: 1.375rem;
}

/* ============================================
   HEADINGS — ADAPTIVE
   ============================================ */

@media (max-width: 1024px) {
    h1 {
        font-size: 40px;
    }
}

@media (max-width: 968px) {
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 1.375rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.125rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    h4 {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 24px;
        letter-spacing: -0.01em;
    }

    h2 {
        font-size: 1.375rem;
    }

    h3 {
        font-size: 1rem;
    }

    h4 {
        font-size: 0.9375rem;
    }
}

p {
    color: var(--color-text-muted);
}

section[id] {
    scroll-margin-top: 100px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
}

/* ============================================
   UTILITIES
   ============================================ */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.125rem;
}

.btn-gradient {
    background: var(--gradient);
    color: var(--color-white);
    box-shadow: 0 8px 24px rgba(37, 117, 252, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 117, 252, 0.4);
}

.btn-outline {
    background: var(--color-white);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

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

.btn-white {
    background: var(--color-white);
    color: var(--color-text);
}

.btn-white:hover {
    background: #f3f4f6;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    transition: top 0.3s ease;
}

.site-header.scrolled {
    top: 10px;
}

.header-shell {
    height: 60px;
    width: 100%;
    max-width: 1180px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 10px 8px 20px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    pointer-events: auto;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled .header-shell {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--color-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    padding: 6px 8px 6px 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

@media (max-width: 1280px) {
    .main {
        margin-top: 60px;
    }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 6px 2px;
    transition: color var(--transition);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: var(--gradient);
    transition: width 0.25s ease;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after {
    width: 100%;
}

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

.link-login {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0 6px;
    transition: color var(--transition);
}

.link-login:hover {
    color: var(--color-text);
}

.lang-switcher {
    position: relative;
    display: inline-flex;
}

.lang-switcher summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0 6px;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.lang-switcher summary::-webkit-details-marker {
    display: none;
}

.lang-switcher summary:hover {
    color: var(--color-text);
}

.lang-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.lang-chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.25s var(--ease);
}

.lang-switcher[open] .lang-chevron {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 150px;
    padding: 6px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lang-menu a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}

.lang-menu a:hover {
    background: var(--color-bg);
}

.lang-menu a.active {
    background: rgba(106, 17, 203, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

.btn-header {
    padding: 8px 16px;
    font-size: 0.825rem;
    font-weight: 600;
    background: var(--color-dark);
    color: var(--color-white);
    border: 1px solid var(--color-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-header:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.btn-header + .btn-header {
    background: transparent;
    color: var(--color-dark);
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: none;
}

.btn-header + .btn-header:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--color-dark);
    box-shadow: none;
}

/* ============================================
   BURGER & MOBILE MENU
   ============================================ */
.burger {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--transition), border-color var(--transition);
}

.burger span {
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }

.burger[aria-expanded="true"] span:nth-child(1) {
    top: 19px;
    transform: translateX(-50%) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
    top: 19px;
    transform: translateX(-50%) rotate(-45deg);
}

.mobile-menu {
    width: 100%;
    max-width: 1180px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    pointer-events: auto;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.mobile-menu.open {
    max-height: 520px;
    padding: 20px 24px 24px;
    display: flex;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav a {
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.mobile-actions .link-login {
    font-size: 0.9rem;
}

.mobile-actions .lang-switcher {
    display: flex;
    flex-direction: column;
}

.mobile-actions .lang-switcher summary {
    width: 100%;
    height: 44px;
    justify-content: space-between;
}

.mobile-actions .lang-menu {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.mobile-actions .btn-gradient {
    background: var(--color-dark);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   FOOTER  (light theme — matches site background)
   ============================================ */
.site-footer {
    position: relative;
    color: #b1b1b1;
    border-top: 1px solid var(--color-border);
}

.site-footer:hover {
    color: #fff;
}

.site-footer .logo {
    color: var(--color-text);
}

.footer-layer {
    height: 450px;
    background: #01011e;
}

.footer-transition {
    aspect-ratio: 1440 / 134;
    width: 100%;
    user-select: none;
    z-index: 1;
    top: -1px;
    left: 0;
    right: 0;
    position: absolute;
    pointer-events: none;
}

.footer-layer-2 {
    height: 200px;
    background: #020a3a;
    background-image: linear-gradient(to bottom,
    color-mix(in srgb, #010113 0%, transparent) 0%,
    color-mix(in srgb, #010113 5%, transparent) 19%,
    color-mix(in srgb, #010113 15%, transparent) 34%,
    color-mix(in srgb, #010113 30%, transparent) 47%,
    color-mix(in srgb, #010113 44%, transparent) 56.5%,
    color-mix(in srgb, #010113 58%, transparent) 65%,
    color-mix(in srgb, #010113 70%, transparent) 73%,
    color-mix(in srgb, #010113 80%, transparent) 80%,
    color-mix(in srgb, #010113 88%, transparent) 86%,
    color-mix(in srgb, #010113 94%, transparent) 91%,
    color-mix(in srgb, #010113 97%, transparent) 95%,
    color-mix(in srgb, #010113 100%, transparent) 100%);
}

.footer-images {
    height: 450px;
    aspect-ratio: auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.footer-images-inner {
    inset: 0;
    position: absolute;
}

.footer-images-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    max-width: 100%;
}

.footer-images-bottom {
    height: 45%;
    bottom: 0;
    left: 0;
    right: 0;
    position: absolute;
    background-image: linear-gradient(to bottom,
    color-mix(in srgb, #020a3a 0%, transparent) 0%,
    color-mix(in srgb, #020a3a 5%, transparent) 19%,
    color-mix(in srgb, #020a3a 15%, transparent) 34%,
    color-mix(in srgb, #020a3a 30%, transparent) 47%,
    color-mix(in srgb, #020a3a 44%, transparent) 56.5%,
    color-mix(in srgb, #020a3a 58%, transparent) 65%,
    color-mix(in srgb, #020a3a 70%, transparent) 73%,
    color-mix(in srgb, #020a3a 80%, transparent) 80%,
    color-mix(in srgb, #020a3a 88%, transparent) 86%,
    color-mix(in srgb, #020a3a 94%, transparent) 91%,
    color-mix(in srgb, #020a3a 97%, transparent) 95%,
    color-mix(in srgb, #020a3a 100%, transparent) 100%);
}

.footer-inner {
    position: absolute;
    inset: 0;
    z-index: 10;
}

.site-footer .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-motto {
    color: #f5f5f5;
    line-height: 1.5;
    font-weight: 600;
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-block {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.footer-block-title {
    text-transform: uppercase;
    color: #f5f5f5;
    font-size: 12px;
    line-height: 16px;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.footer-links a {
    font-size: 0.9rem;
    color: #b1b1b1;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-bottom p {
    color: var(--color-text-muted);
}

.footer-socials {
    display: flex;
    gap: 24px;
}

.footer-socials a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.footer-socials a:hover {
    color: var(--color-text);
}

.contactAndRegister {
    height: 398px;
    display: flex;
    align-items: center;
}

.contactAndRegisterWrapper {
    margin-top: 50px;
    width: 100%;
    max-width: 600px;
    display: flex;
    padding: 40px;
}

/* Кнопки CTA в футере не должны выталкивать блок за ширину экрана на узких вьюпортах */
@media (max-width: 640px) {
    .cta-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cta-container .btn-secondary,
    .cta-container .btn-glass {
        width: 100%;
    }
}

.contactAndRegisterInner {
    display: flex;
    gap: 40px;
    flex-direction: column;
}

@media(max-width: 1280px) {
    .site-header {
        left: 0;
        right: 0;
        top: 0;
    }

    .header-shell {
        border-radius: 0;
        padding: 8px 12px 8px 16px;
        max-width: none;
    }
}

/* ============================================
   ADAPTIVE — header / footer / базовое
   ============================================ */
@media (max-width: 968px) {
    .main-nav {
        display: none;
    }

    .header-actions .link-login,
    .header-actions .lang-switcher {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .burger {
        display: block;
    }

    .footer-top {
        gap: 24px;
    }

    .footer-links {
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-layer-2 {
        height: 350px;
    }

    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .header-actions .btn-header.btn-register {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
        letter-spacing: -0.01em;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .header-shell {
        padding: 8px 8px 8px 12px;
        gap: 10px;
    }

    .header-actions {
        gap: 6px;
    }

    .logo {
        font-size: 0.95rem;
        gap: 6px;
    }

    .logo-mark {
        width: 24px;
        height: 24px;
    }
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-text {
    height: 30px;
    width: auto;
    display: block;
}

/* ===== CTA container ===== */

.cta-container {
    display: flex;
    width: 100%;
    gap: 0.75rem;
    flex-direction: row;
}

/* ===== Кнопка "Start free trial" ===== */

.btn-secondary {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    width: fit-content;
    height: 2.75rem;
    padding: 0 18px;
    cursor: pointer;
    font-family: var(--font-inter, "Inter", sans-serif);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #18181a;
    border-radius: 12px;
    text-decoration: none;
}

.btn-secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: linear-gradient(#fff 0%, #f7f7f7 100%);
    border: 1px solid #e6e6e6;
    box-shadow: inset 0 0 0 1px #fff, 0 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.1s linear, box-shadow 0.1s linear;
}

.btn-secondary:hover::before {
    border-color: #d7d7d7;
    box-shadow: inset 0 0 0 1px #fff, 0 2px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(239, 239, 239, 0.5);
}

.btn-secondary:active::before {
    background: linear-gradient(#f7f7f7 0%, #fff 100%);
    border-color: #d7d7d7;
    inset: 1px;
    box-shadow: inset 0 0 0 1px #fff, 0 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary > span {
    position: relative;
    z-index: 10;
}

/* ===== Кнопка "Get a demo" ===== */

.btn-glass {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    width: fit-content;
    height: 2.75rem;
    padding: 0 18px;
    cursor: pointer;
    font-family: var(--font-inter, "Inter", sans-serif);
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 19.23%, rgba(247, 247, 247, 0.01) 128.85%),
    radial-gradient(71.81% 71.81% at 50% 14.41%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    box-shadow: 0 2.2px 0 -1.1px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: filter 200ms;
}

.btn-glass:hover {
    filter: brightness(1.25);
}

.btn-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(114.63% 124.7% at 50% 1.97%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.3) 100%);
    -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
    mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
    -webkit-mask-clip: content-box, border-box;
    mask-clip: content-box, border-box;
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.btn-glass > span {
    position: relative;
    z-index: 10;
}

