/* ==========================================================================
   NEXUZ BILLING — landing (v2)
   Страница views/index.ejs. nx2-* и токены — public/css/nexuz-v2.css.
   Здесь только локальные компоненты лендинга: hero, планета, статистика,
   преимущества и FAQ-аккордеон.
   ========================================================================== */

body[data-page="landing"] .landing {
    padding-top: clamp(18px, 3.2vw, 40px);
    padding-bottom: clamp(20px, 3vw, 36px);
}

body[data-page="landing"] .landing :where(a, button):focus-visible {
    outline: 2px solid var(--green-300);
    outline-offset: 3px;
}

/* ================= hero ================= */
.landing-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    align-items: center;
    gap: clamp(24px, 4.2vw, 64px);
    padding: clamp(8px, 2vw, 20px) 0 clamp(36px, 5.6vw, 72px);
}

.landing-hero__copy {
    min-width: 0;
    max-width: 720px;
    animation: landingRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-hero__visual {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
    animation: landingRise 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--line-green);
    border-radius: 999px;
    background: var(--pill);
    color: var(--green-200);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.landing-badge .nx2-icon {
    width: 13px;
    height: 13px;
    flex: none;
    color: var(--green-300);
    stroke-width: 1.7;
}

.landing-badge span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.landing-hero__title {
    margin-top: clamp(18px, 2.4vw, 28px);
    font-family: var(--display);
    font-size: clamp(34px, 4.6vw, 64px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.045em;
    color: var(--t100);
    overflow-wrap: break-word;
}

.landing-hero__title em {
    font-style: normal;
    color: var(--green-300);
    text-shadow: 0 0 46px rgba(74, 222, 128, 0.22);
}

.landing-hero__lead {
    margin-top: clamp(14px, 1.8vw, 20px);
    max-width: 540px;
    color: var(--t60);
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.65;
}

/* CTA */
.landing-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: clamp(22px, 2.8vw, 30px);
}

.landing-hero__actions .nx2-btn {
    height: 46px;
    padding: 0 18px;
    font-size: 13px;
}

.landing-status .status-dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--green-300);
    box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.12), 0 0 12px rgba(134, 239, 172, 0.7);
    animation: landingPulse 2.4s ease-in-out infinite;
}

/* stats */
.landing-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    max-width: 560px;
    margin-top: clamp(28px, 3.4vw, 38px);
}

.landing-stat {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 16px 17px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.008));
    transition: var(--smooth);
}

.landing-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(134, 239, 172, 0.45), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.landing-stat:hover {
    border-color: var(--ring);
    transform: translateY(-2px);
}

.landing-stat:hover::before {
    opacity: 1;
}

.landing-stat__top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.landing-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    border: 1px solid var(--ring);
    border-radius: 8px;
    background: var(--pill);
    color: var(--green-300);
}

.landing-stat__icon .nx2-icon {
    width: 14px;
    height: 14px;
}

.landing-stat__label {
    min-width: 0;
    color: var(--t50);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    line-height: 1.35;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.landing-stat__value {
    margin-top: 13px;
    color: var(--green-200);
    font-family: var(--display);
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    overflow-wrap: anywhere;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.landing-stat__value.switching {
    opacity: 0;
    transform: translateY(-6px);
}

/* ================= planet ================= */
.landing-planet {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--line-green);
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 50%, rgba(74, 222, 128, 0.1), transparent 62%),
        linear-gradient(rgba(134, 239, 172, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(134, 239, 172, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 50% 40%, #0c130e, #080b09 70%);
    background-size: auto, 48px 48px, 48px 48px, auto;
    box-shadow:
        inset 0 0 90px rgba(34, 197, 94, 0.07),
        0 36px 80px -50px rgba(0, 0, 0, 0.95);
}

.landing-planet::before {
    content: "";
    position: absolute;
    inset: 14px;
    z-index: 2;
    border: 1px solid rgba(134, 239, 172, 0.09);
    border-radius: 18px;
    pointer-events: none;
}

.landing-planet::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    background: radial-gradient(circle at 50% 50%, transparent 52%, rgba(5, 8, 6, 0.55) 100%);
    pointer-events: none;
}

body[data-page="landing"] #planet-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ================= features ================= */
.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: clamp(4px, 1vw, 12px);
    padding-top: clamp(22px, 3vw, 32px);
    border-top: 1px solid var(--line);
}

.landing-feature {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: clamp(18px, 2.1vw, 24px);
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
    transition: var(--smooth);
}

.landing-feature::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 140px;
    height: 140px;
    border: 1px solid rgba(134, 239, 172, 0.1);
    border-radius: 50%;
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.landing-feature:hover {
    border-color: var(--ring);
    background: linear-gradient(165deg, rgba(74, 222, 128, 0.05), rgba(255, 255, 255, 0.01));
    transform: translateY(-2px);
}

.landing-feature:hover::after {
    border-color: rgba(134, 239, 172, 0.24);
}

.landing-feature__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.landing-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 1px solid var(--ring);
    border-radius: 10px;
    background: var(--pill);
    color: var(--green-300);
}

.landing-feature__icon .nx2-icon {
    width: 18px;
    height: 18px;
}

.landing-feature__index {
    color: var(--t25);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
}

.landing-feature h3 {
    margin-top: clamp(20px, 2.6vw, 28px);
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.landing-feature p {
    margin-top: 7px;
    max-width: 32ch;
    color: var(--t50);
    font-size: 12.5px;
    line-height: 1.55;
}

/* ================= FAQ ================= */
.landing-faq {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
    align-items: start;
    gap: clamp(24px, 4vw, 60px);
    margin-top: clamp(52px, 7vw, 88px);
    padding-top: clamp(28px, 4vw, 40px);
    border-top: 1px solid var(--line);
}

.landing-faq__head {
    position: sticky;
    top: 96px;
    align-self: start;
    min-width: 0;
}

.landing-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--t50);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.landing-kicker::before {
    content: "";
    width: 18px;
    height: 1px;
    flex: none;
    background: var(--green-300);
    opacity: 0.7;
}

.landing-faq__head h2 {
    margin-top: 14px;
    font-size: clamp(28px, 3.3vw, 42px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.landing-faq__head p {
    margin-top: 11px;
    max-width: 30ch;
    color: var(--t50);
    font-size: 12.5px;
    line-height: 1.6;
}

.landing-faq__list {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-top: 1px solid var(--line);
}

.landing-faq__item {
    border-bottom: 1px solid var(--line);
    transition: background 0.3s ease;
}

.landing-faq__item.open {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.035), rgba(74, 222, 128, 0));
}

.landing-faq__q {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 17px 4px;
    color: var(--t80);
    text-align: left;
    transition: color 0.25s ease;
}

.landing-faq__index {
    width: 20px;
    flex: none;
    padding-top: 1px;
    color: var(--t25);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
}

.landing-faq__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(13px, 1.2vw, 14.5px);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.45;
}

.landing-faq__q:hover,
.landing-faq__q:hover .landing-faq__text,
.landing-faq__item.open .landing-faq__q {
    color: #fff;
}

.landing-faq__chevron {
    width: 26px;
    height: 26px;
    flex: none;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--t40);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease, color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.landing-faq__q:hover .landing-faq__chevron {
    color: var(--green-300);
    border-color: var(--ring-hi);
}

.landing-faq__item.open .landing-faq__chevron {
    transform: rotate(180deg);
    color: var(--green-300);
    border-color: var(--ring);
    background: var(--pill);
}

.landing-faq__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-faq__a-inner {
    max-width: 74ch;
    padding: 0 4px 18px 38px;
    color: var(--t50);
    font-size: 12.5px;
    line-height: 1.7;
}

.landing-faq__a a {
    color: var(--green-300);
    text-decoration: underline;
    text-decoration-color: rgba(134, 239, 172, 0.35);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.landing-faq__a a:hover {
    color: var(--green-200);
    text-decoration-color: rgba(187, 247, 208, 0.7);
}

/* ================= footer spacing ================= */
body[data-page="landing"] .nx2-footer {
    margin-top: clamp(52px, 7vw, 84px);
}

/* ================= motion ================= */
@keyframes landingRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes landingPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.12), 0 0 12px rgba(134, 239, 172, 0.7);
    }
    50% {
        opacity: 0.55;
        box-shadow: 0 0 0 5px rgba(134, 239, 172, 0.04), 0 0 12px rgba(134, 239, 172, 0.2);
    }
}

/* ================= responsive ================= */
@media (max-width: 1180px) {
    .landing-hero {
        gap: 32px;
    }
    .landing-planet {
        max-width: 470px;
    }
}

@media (max-width: 1024px) {
    .landing-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(26px, 5vw, 40px);
        padding-bottom: clamp(34px, 6vw, 52px);
    }
    .landing-hero__copy {
        max-width: none;
    }
    .landing-hero__visual {
        justify-content: center;
    }
    .landing-planet {
        max-width: 440px;
    }
    .landing-faq {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
    .landing-faq__head {
        position: static;
    }
    .landing-faq__head p {
        max-width: 60ch;
    }
}

@media (max-width: 860px) {
    .landing-features {
        grid-template-columns: minmax(0, 1fr);
    }
    .landing-feature p {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .landing-hero {
        padding-top: 4px;
    }
    .landing-planet {
        max-width: 380px;
        border-radius: 20px;
    }
    .landing-planet::before {
        inset: 10px;
        border-radius: 13px;
    }
    .landing-hero__actions .nx2-btn {
        flex: 1 1 100%;
        width: 100%;
    }
    .landing-faq {
        margin-top: clamp(44px, 9vw, 64px);
    }
}

@media (max-width: 520px) {
    .landing-badge {
        font-size: 9px;
        letter-spacing: 0.08em;
        padding: 5px 10px;
    }
    .landing-hero__title {
        font-size: clamp(32px, 10.4vw, 42px);
    }
    .landing-stats {
        grid-template-columns: minmax(0, 1fr);
    }
    .landing-faq__q {
        gap: 10px;
        padding: 15px 2px;
    }
    .landing-faq__index {
        display: none;
    }
    .landing-faq__a-inner {
        padding: 0 2px 16px;
    }
    .landing-planet {
        max-width: 320px;
    }
}

@media (max-width: 380px) {
    .landing-hero__title {
        font-size: clamp(30px, 10.2vw, 36px);
    }
    .landing-planet {
        max-width: 280px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-hero__copy,
    .landing-hero__visual,
    .landing-status .status-dot {
        animation: none;
    }
}
