/* === LANDING.CSS ===
 * assets/css/landing.css
 * НАЗНАЧЕНИЕ: Стили лендинга (hero, features, pricing, CTA, footer)
 * СВЯЗИ: templates/landing.php, style.css
 * РАЗМЕР: ~680 строк
 */

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.hero-gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: hsl(var(--primary));
    top: -200px;
    left: -100px;
}

.hero-gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: hsl(var(--secondary));
    bottom: -150px;
    right: -100px;
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(hsl(var(--border) / 0.2) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--border) / 0.2) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--surface-2));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    font-size: 0.875rem;
    color: hsl(var(--primary));
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.hero-stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: hsl(var(--border));
}

/* ============================================
   HERO PREVIEW WINDOW
   ============================================ */
.hero-preview {
    position: relative;
    z-index: 1;
    margin-top: 4rem;
    padding: 0 1rem;
}

.hero-preview-window {
    max-width: 900px;
    margin: 0 auto;
    background: hsl(var(--surface-1));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 60px -15px hsl(var(--primary) / 0.2);
}

.hero-preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: hsl(var(--surface-2));
    border-bottom: 1px solid hsl(var(--border));
}

.hero-preview-dots {
    display: flex;
    gap: 0.5rem;
}

.hero-preview-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.hero-preview-dots .dot.red { background: #ef4444; }
.hero-preview-dots .dot.yellow { background: #eab308; }
.hero-preview-dots .dot.green { background: #22c55e; }

.hero-preview-title {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.hero-preview-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 300px;
}

.hero-preview-sidebar {
    padding: 1rem;
    background: hsl(var(--surface-0));
    border-right: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-chat-msg {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    max-width: 90%;
}

.preview-chat-user {
    background: hsl(var(--primary) / 0.2);
    color: hsl(var(--primary));
    align-self: flex-end;
}

.preview-chat-ai {
    background: hsl(var(--surface-2));
    color: hsl(var(--muted-foreground));
}

.hero-preview-main {
    padding: 1.5rem;
}

.preview-code-lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-code-line {
    height: 12px;
    background: hsl(var(--surface-3));
    border-radius: 4px;
}

.preview-code-line.short { width: 40%; }
.preview-code-line.medium { width: 70%; }

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--surface-2));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    font-size: 0.875rem;
    color: hsl(var(--primary));
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    padding: 6rem 0;
    background: hsl(var(--surface-0));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: hsl(var(--surface-1));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: hsl(var(--primary) / 0.3);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.feature-icon-purple {
    background: hsl(var(--secondary) / 0.15);
    color: hsl(var(--secondary));
}

.feature-icon-green {
    background: hsl(var(--success) / 0.15);
    color: hsl(var(--success));
}

.feature-icon-orange {
    background: hsl(var(--warning) / 0.15);
    color: hsl(var(--warning));
}

.feature-icon-pink {
    background: hsl(330 80% 60% / 0.15);
    color: hsl(330 80% 60%);
}

.feature-icon-cyan {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-it-works-section {
    padding: 6rem 0;
    background: hsl(var(--surface-1));
}

.steps-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.step-card {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    text-align: center;
}

.step-number {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    color: hsl(var(--background));
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 50%;
    z-index: 1;
}

.step-content {
    padding: 3rem 2rem 2rem;
    background: hsl(var(--surface-2));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
}

.step-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
    border-radius: 1rem;
    margin: 0 auto 1.5rem;
}

.step-icon-purple {
    background: hsl(var(--secondary) / 0.15);
    color: hsl(var(--secondary));
}

.step-icon-green {
    background: hsl(var(--success) / 0.15);
    color: hsl(var(--success));
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.step-description {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

.step-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--muted-foreground));
    padding-top: 4rem;
}

/* ============================================
   PRICING SECTION
   ============================================ */
.pricing-section {
    padding: 6rem 0;
    background: hsl(var(--surface-0));
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    padding: 2rem;
    background: hsl(var(--surface-1));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
}

.pricing-card-featured {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 40px -10px hsl(var(--primary) / 0.3);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    color: hsl(var(--background));
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 1.5rem;
}

.pricing-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-price {
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.price-period {
    font-size: 1rem;
    color: hsl(var(--muted-foreground));
}

.pricing-description {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.pricing-features {
    list-style: none;
    flex: 1;
    margin-bottom: 1.5rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li.disabled {
    color: hsl(var(--muted-foreground));
    opacity: 0.6;
}

.text-green-500 {
    color: hsl(var(--success));
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: 6rem 0;
}

.cta-card {
    position: relative;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, hsl(var(--surface-2)) 0%, hsl(var(--surface-1)) 100%);
    border: 1px solid hsl(var(--border));
    border-radius: 1.5rem;
    text-align: center;
    overflow: hidden;
}

.cta-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.cta-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.cta-gradient-orb-1 {
    width: 400px;
    height: 400px;
    background: hsl(var(--primary));
    top: -150px;
    left: -100px;
}

.cta-gradient-orb-2 {
    width: 300px;
    height: 300px;
    background: hsl(var(--secondary));
    bottom: -100px;
    right: -50px;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 4rem 0 2rem;
    background: hsl(var(--surface-1));
    border-top: 1px solid hsl(var(--border));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
}

.footer-tagline {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--surface-2));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    color: hsl(var(--muted-foreground));
    transition: all 0.2s ease;
}

.social-link:hover {
    background: hsl(var(--surface-3));
    color: hsl(var(--foreground));
    border-color: hsl(var(--primary) / 0.3);
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: hsl(var(--muted-foreground));
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: hsl(var(--primary));
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border));
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-preview-content {
        grid-template-columns: 1fr;
    }

    .hero-preview-sidebar {
        border-right: none;
        border-bottom: 1px solid hsl(var(--border));
    }

    .hero-stat-divider {
        display: none;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .step-connector {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: span 2;
    }

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

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.375rem;
    }
}

/* ============================================
   LANDING TOPBAR — theme toggle
============================================ */
.landing-topbar {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 20;
}

.landing-theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    color: var(--text-secondary, #9ca3af);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    backdrop-filter: blur(8px);
}
.landing-theme-btn:hover {
    background: var(--bg-hover, rgba(255,255,255,0.1));
    color: var(--text-primary);
    border-color: var(--color-primary, #22d3ee);
}
.landing-theme-btn i { width: 18px; height: 18px; }

/* Показываем нужную иконку в зависимости от темы */
html.dark  .theme-icon-dark  { display: none; }
html.dark  .theme-icon-light { display: block; }
html.light .theme-icon-light { display: none; }
html.light .theme-icon-dark  { display: block; }
/* По умолчанию (dark): показываем sun */
.theme-icon-dark  { display: block; }
.theme-icon-light { display: none; }
