/* ═══════════════════════════════════════════
   LANDING — CNCMASTER AI
   Цвета ТОЛЬКО из globals.css
   ═══════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
}
/* ── Анимации ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cncScan {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes shimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
@keyframes glowDrift {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8%, 4%) scale(1.03); }
}

/* ── Тело страницы ── */
body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-image:
        linear-gradient(rgba(45, 52, 54, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 52, 54, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    margin: 0;
    padding: 0;
    padding-bottom: 40px;
}
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

/* ── Навигация ── */
.top-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.nav-logo {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }
.nav-btn {
    background: var(--text-main);
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: background 0.2s, color 0.2s !important;
}
.nav-btn:hover {
    background: var(--accent) !important;
    color: var(--text-main) !important;
}
.nav-login {
    background: var(--accent);
    color: var(--text-main) !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    transition: background 0.2s !important;
}
.nav-login:hover { background: var(--text-main); color: var(--white) !important; }

/* ── Hero ── */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 206, 209, 0.12) 50%, transparent 100%);
    animation: cncScan 5s linear infinite;
    pointer-events: none;
}
.hero-logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--text-main);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.hero-logo span { color: var(--accent); }
.hero-tagline {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-main);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}

/* ── Секции ── */
.section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.section-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

/* ── Карточки (features / video) ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card,
.video-card {
    position: relative;
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.3s ease-out both;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}
.feature-card::before,
.video-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--success), var(--accent));
    background-size: 200% 100%;
    animation: shimmer 5s linear infinite;
}
.feature-card::after,
.video-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at 30% 20%, var(--accent-light) 0%, transparent 60%);
    pointer-events: none;
    animation: glowDrift 8s ease-in-out infinite alternate;
}
.feature-card:hover,
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.feature-card h3,
.video-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}
.feature-card p,
.video-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    margin: 0;
}
.feature-card p strong,
.video-card p strong {
    color: var(--text-main);
    font-weight: 700;
}

/* ── Видео ── */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--text-main);
    margin-top: auto;
}
.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ── Калькулятор ── */
.calc-container {
    max-width: 640px;
    margin: 0 auto 40px;
    padding: 0 20px;
}
.calc-card {
    position: relative;
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out both;
}
.calc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--success), var(--accent));
    background-size: 200% 100%;
    animation: shimmer 5s linear infinite;
}
.calc-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}
.input-field {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.input-field:hover { border-color: var(--accent); }
.input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--white);
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b2bec3' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

/* ── Результаты калькулятора ── */
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    gap: 12px;
}
.result-row.losses { border-left: 3px solid var(--danger); }
.result-row.success { border-left: 3px solid var(--success); }
.result-row.profit { border-left: 3px solid var(--accent); }
.result-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}
.result-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
}
.result-row.losses .result-value { color: var(--danger); }
.result-row.success .result-value { color: var(--success); }
.result-row.profit .result-value { color: var(--accent); }

/* ── Тарифы ── */
.pricing-container {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 20px;
    text-align: center;
}
.pricing-header h2 {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    margin: 0 0 6px;
}
.pricing-header p {
    color: var(--text-light);
    font-size: 14px;
    margin: 0 0 28px;
}
.tarif-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    text-align: left;
}
.tarif-card {
    position: relative;
    background: var(--white);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.25s, box-shadow 0.25s;
    animation: fadeIn 0.3s ease-out both;
}
.tarif-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.tarif-card.popular {
    border: 2px solid var(--accent);
    box-shadow: 0 5px 20px var(--accent-shadow);
}
.tarif-card.popular:hover {
    box-shadow: 0 8px 30px var(--accent-shadow);
}
.tarif-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--text-main);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.tarif-card h3 {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin: 0;
}
.tarif-card.popular h3 { color: var(--accent); }
.tarif-price {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.1;
}
.tarif-price .currency {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light);
    margin-left: 4px;
}
.tarif-period {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.tarif-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.tarif-features li {
    padding: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
}
.tarif-features li:last-child { border-bottom: none; }
.tarif-features li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px; height: 20px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ── Кнопки (принцип «Копир.») ── */
.btn {
    display: inline-block;
    background: var(--text-main);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}
.btn:hover {
    background: var(--accent);
    color: var(--text-main);
}
.btn-accent {
    background: var(--accent);
    color: var(--text-main);
}
.btn-accent:hover {
    background: var(--text-main);
    color: var(--white);
}
.tarif-btn {
    display: block;
    width: 100%;
    padding: 12px 18px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.tarif-btn.default {
    background: var(--text-main);
    color: var(--white);
}
.tarif-btn.default:hover {
    background: var(--accent);
    color: var(--text-main);
}
.tarif-btn.primary {
    background: var(--accent);
    color: var(--text-main);
}
.tarif-btn.primary:hover {
    background: var(--text-main);
    color: var(--white);
}

/* ── Футер ── */
.footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}
.footer p {
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.6;
    text-align: justify;
    margin: 0 0 12px;
}
.footer p strong { color: var(--text-main); }
.footer-copy {
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   АДАПТИВ
   ═══════════════════════════════════════════ */

/* Планшет: 768–1023 */
@media (max-width: 1023px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero h1 { font-size: 28px; }
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 10px; }
}

/* Телефон: <768 */
@media (max-width: 767px) {
    .features-grid,
    .tarif-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .hero {
        padding: 100px 16px 30px;
    }
    .hero h1 { font-size: 22px; }
    .hero-logo { font-size: 22px; }
    .section-container { padding: 0 16px; }
    .calc-container { padding: 0 16px; }
    .pricing-container { padding: 0 16px; }
    .tarif-card { padding: 22px 18px; }
    .tarif-price { font-size: 28px; }
    .feature-card,
    .video-card { padding: 20px 16px; }
    .feature-card h3,
    .video-card h3 { font-size: 16px; }
    .calc-card { padding: 20px 16px; }
    .result-row { padding: 10px 12px; }
    .result-value { font-size: 15px; }
    .footer p { text-align: center; }
}

/* ═══ Гамбургер ═══ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--text-main);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 10px;
    transition: background 0.2s;
}
.hamburger:hover { background: var(--accent); }
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger.active { background: var(--accent); }
.hamburger.active span { background: var(--text-main); }

/* ═══ Адаптив: гамбургер (≤1023) ═══ */
@media (max-width: 1023px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 16px 20px;
        gap: 12px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }
    .nav-links.open { display: flex; }
    .nav-links a,
    .nav-btn,
    .nav-login {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 12px !important;
        border-radius: var(--radius-sm);
    }
    .nav-btn {
        background: var(--text-main);
        color: var(--white) !important;
    }
    .nav-btn:hover { background: var(--accent); color: var(--text-main) !important; }
    .nav-login {
        background: var(--accent);
        color: var(--text-main) !important;
    }
    .nav-login:hover { background: var(--text-main); color: var(--white) !important; }
}
