:root {
    --bg: #050505;
    --text: #f5f5f5;
    --muted: #9ea2a8;
    --accent: #ff8a00;
    --card: #11141a;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 138, 0, 0.12), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(16, 24, 32, 0.65), transparent 40%),
        var(--bg);
    color: var(--text);
    font-variant-numeric: lining-nums;
}

body.nav-open {
    overflow: hidden;
}

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

.wrapper {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

a {
    color: var(--accent);
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    background-color: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 999;
}

.site-header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: nowrap;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.08em;
}

.logo img {
    display: block;
    height: 40px;
}

img {
    max-width: 100%;
    height: auto;
}

nav a {
    margin-left: 1.25rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switcher {
    display: flex;
    flex-direction: column;
    margin-right: 1rem;
    gap: 0.15rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lang-switcher select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: inherit;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.lang-switcher select:focus {
    outline: 2px solid var(--accent);
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    transform: scaleX(1);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1200;
}

.nav-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 34px;
    height: 26px;
    padding: 0;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 999px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 8px;
}

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.site-nav .nav-cta {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

section {
    padding: 4rem 0;
}

.hero {
    padding-top: 5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
}

.hero-illustration {
    margin: 0;
}

.hero-illustration img {
    width: 100%;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: radial-gradient(circle at top, rgba(255, 138, 0, 0.15), transparent);
    padding: 1.5rem;
    animation: heroFloat 8s ease-in-out infinite;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 138, 0, 0.1), transparent 50%);
    filter: blur(80px);
    z-index: -1;
}

.hero {
    position: relative;
}

@keyframes heroFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.stack,
.metrics,
.cases {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
    position: relative;
    overflow: hidden;
}

.stack::after,
.metrics::after,
.cases::after {
    content: "";
    position: absolute;
    top: 15%;
    left: 10%;
    width: 180px;
    height: 180px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent);
    border-radius: 50%;
    filter: blur(60px);
    transform: translate3d(0, 0, 0);
}

.cases::after {
    left: auto;
    right: 10%;
}

.stack-marquee {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.stack-pill {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stack-pill:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 138, 0, 0.6);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.metric {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.metric-value {
    margin: 0 0 0.35rem 0;
    font-size: 1.3rem;
    color: var(--accent);
}

.metric-label {
    margin: 0;
    color: var(--muted);
}

.case-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border-radius: 1.5rem;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.case-text {
    flex: 1;
}

.case-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.case-illustration {
    margin: 0;
    flex: 0 0 auto;
}

.case-illustration img {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.01);
}

.case-controls button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    padding: 0.75rem;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.case-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.contact-meta p {
    margin: 0.4rem 0;
}

.contact-telegram {
    margin-top: 1rem;
}

.challenge form {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.challenge label {
    display: flex;
    flex-direction: column;
    color: var(--muted);
    font-size: 0.9rem;
    gap: 0.4rem;
}

.challenge input {
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    padding: 0.75rem;
}

.challenge-error {
    color: #ff5a5a;
}

.user-challenge {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(14px);
    display: grid;
    place-items: center;
    padding: 2rem;
    z-index: 2000;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.user-challenge.is-visible {
    opacity: 1;
    transform: scale(1);
}

.user-challenge.is-complete {
    opacity: 0;
}

.challenge-content {
    position: relative;
    max-width: 460px;
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 20, 26, 0.92);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.challenge-layer,
.challenge-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
}

.challenge-glow {
    background: radial-gradient(circle at 20% 20%, rgba(255, 138, 0, 0.5), transparent 65%);
    filter: blur(60px);
}

.challenge-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.4;
    animation: gridPan 20s linear infinite;
}

.challenge-rays {
    position: absolute;
    inset: 0;
    background: conic-gradient(from 180deg, rgba(255, 138, 0, 0.15), transparent 40%, rgba(255, 138, 0, 0.1));
    mix-blend-mode: screen;
    animation: raysSpin 18s linear infinite;
    opacity: 0.6;
}

.challenge-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.challenge-particles .particle {
    position: absolute;
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4));
    animation: particleFall 6s linear infinite;
    opacity: 0.6;
}

.challenge-particles .particle:nth-child(odd) {
    animation-duration: 8s;
}

.challenge-particles .particle:nth-child(1) {
    left: 15%;
    animation-delay: 0s;
}

.challenge-particles .particle:nth-child(2) {
    left: 30%;
    animation-delay: 1s;
}

.challenge-particles .particle:nth-child(3) {
    left: 45%;
    animation-delay: 2s;
}

.challenge-particles .particle:nth-child(4) {
    left: 60%;
    animation-delay: 0.5s;
}

.challenge-particles .particle:nth-child(5) {
    left: 75%;
    animation-delay: 1.5s;
}

.challenge-particles .particle:nth-child(6) {
    left: 90%;
    animation-delay: 2.2s;
}

.challenge-particles .particle:nth-child(7) {
    left: 10%;
    animation-delay: 3s;
}

.challenge-particles .particle:nth-child(8) {
    left: 25%;
    animation-delay: 3.5s;
}

.challenge-particles .particle:nth-child(9) {
    left: 55%;
    animation-delay: 4s;
}

.challenge-particles .particle:nth-child(10) {
    left: 70%;
    animation-delay: 4.5s;
}

.challenge-particles .particle:nth-child(11) {
    left: 85%;
    animation-delay: 5s;
}

.challenge-particles .particle:nth-child(12) {
    left: 5%;
    animation-delay: 5.5s;
}

.challenge-layer {
    overflow: hidden;
}

.challenge-orb {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-one {
    top: -40px;
    right: -60px;
}

.orb-two {
    bottom: -60px;
    left: -40px;
    animation-duration: 14s;
}

@keyframes orbFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
    100% {
        transform: translateY(0);
    }
}

.challenge-progress {
    margin: 1.5rem auto;
    width: 140px;
    height: 140px;
    position: relative;
}

.challenge-progress::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 138, 0, 0.4), rgba(5, 5, 5, 0.7));
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 138, 0, 0.2);
}

.challenge-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 6;
}

.progress-bar {
    fill: none;
    stroke: rgba(255, 138, 0, 0.9);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.2s ease;
}

.challenge-percentage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.challenge-steps {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.challenge-step {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: rgba(245, 245, 245, 0.45);
    transition: color 0.3s ease;
}

.challenge-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
}

.challenge-step-dot::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s ease;
}

.challenge-step.is-active {
    color: var(--text);
}

.challenge-step.is-active .challenge-step-dot::after {
    background: var(--accent);
}

.challenge-step.is-complete {
    color: rgba(255, 255, 255, 0.6);
}

.challenge-step.is-complete .challenge-step-dot {
    border-color: var(--accent);
}

.challenge-step.is-complete .challenge-step-dot::after {
    background: var(--accent);
}

.challenge-status {
    text-align: center;
    color: var(--muted);
    min-height: 1.4rem;
    margin-top: 0.3rem;
}

@media (prefers-reduced-motion: reduce) {
    .user-challenge {
        animation: none;
    }

    .challenge-orb {
        animation: none;
    }

    .challenge-grid,
    .challenge-rays,
    .challenge-particles .particle {
        animation: none;
    }
}


@keyframes gridPan {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 80px 80px, 80px 80px;
    }
}

@keyframes raysSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes particleFall {
    0% {
        transform: translateY(-40px);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}
.hero-content h1 {
    font-size: clamp(2.8rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.hero-content p {
    color: var(--muted);
    line-height: 1.7;
    max-width: 640px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.6rem;
    background: var(--accent);
    color: #050505;
    border-radius: 999px;
    font-weight: 600;
    margin-top: 1.5rem;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card {
    background: var(--card);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 200px;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 640px) {
    nav a {
        margin-left: 0;
        margin-right: 0.75rem;
    }

    .case-card {
        flex-direction: column;
    }

    .site-header .wrapper {
        flex-wrap: nowrap;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .lang-switcher {
        display: none;
    }

    .site-nav {
        position: fixed;
        inset: 70px 0 0 0;
        background: rgba(5, 5, 5, 0.9);
        backdrop-filter: blur(18px);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 1500;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav a {
        margin: 0;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .site-nav a:last-child {
        border-bottom: none;
    }

    .site-nav a::after {
        display: none;
    }

    .nav-overlay {
        z-index: 1400;
    }
}
