/* ================================
   АИС «Медвеженок» — Stylesheet
   Светлая тема
   ================================ */

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --gradient-soft: linear-gradient(135deg, rgba(124,58,237,0.1) 0%, rgba(167,139,250,0.1) 100%);
    --shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
    --shadow-lg: 0 20px 60px rgba(124, 58, 237, 0.18);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.55);
}

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

.btn-ghost:hover {
    background: var(--border-light);
    border-color: var(--primary-light);
}

.btn-ghost-light {
    background: rgba(124,58,237,0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(124,58,237,0.15);
}

.btn-ghost-light:hover {
    background: rgba(124,58,237,0.15);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-dark);
    font-weight: 700;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius-sm);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 20px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
}

/* Hero */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,0.08), transparent),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(167,139,250,0.06), transparent);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    color: var(--primary-dark);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text);
}

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

.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* Journal Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.journal-mockup {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
    transition: var(--transition);
}

.journal-mockup:hover {
    transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.mockup-dots span:nth-child(2) { background: #fbbf24; }
.mockup-dots span:nth-child(3) { background: #22c55e; }

.mockup-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.mockup-body {
    padding: 12px;
}

.mockup-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    align-items: center;
}

.mockup-row:nth-child(even) {
    background: var(--bg-light);
}

.header-row {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent !important;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.grade {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-weight: 700;
    font-size: 13px;
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-header.light h2,
.section-header.light p {
    color: var(--text);
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    color: var(--text);
}

.section-header p {
    font-size: 18px;
    color: var(--text-muted);
}

/* Features */
.features {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.feature-card.featured {
    border-color: var(--primary);
    background: var(--gradient-soft);
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    color: var(--primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Modules */
.modules {
    background: var(--bg);
    position: relative;
}

.modules::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(124,58,237,0.04), transparent);
    pointer-events: none;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

.module-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.module-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.module-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--primary);
}

.module-icon svg {
    width: 100%;
    height: 100%;
}

.module-text h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.module-text p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Compare */
.compare {
    background: var(--bg-light);
}

.compare-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 15px;
}

.compare-table th,
.compare-table td {
    padding: 18px 24px;
    text-align: left;
}

.compare-table thead th {
    background: var(--gradient-soft);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.compare-table tbody tr {
    border-top: 1px solid var(--border-light);
}

.compare-table tbody tr:hover {
    background: var(--bg-light);
}

.compare-table .old {
    color: #ef4444;
}

.compare-table .new {
    color: #22c55e;
    font-weight: 600;
}

.cross-icon,
.check-icon {
    margin-right: 6px;
    font-weight: 700;
}

/* Tariffs */
.tariffs {
    background: var(--bg);
    position: relative;
}

.tariffs::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 40% at 50% 60%, rgba(124,58,237,0.04), transparent);
    pointer-events: none;
}

.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.tariff-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    transition: var(--transition);
    position: relative;
}

.tariff-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.tariff-card.popular {
    border-color: var(--primary);
    background: var(--gradient-soft);
    transform: scale(1.03);
}

.tariff-card.popular:hover {
    transform: scale(1.05) translateY(-4px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popular-badge svg {
    width: 12px;
    height: 12px;
}

.tariff-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}

.tariff-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.tariff-price {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1;
    color: var(--text);
}

.tariff-price span {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

.tariff-card .btn {
    width: 100%;
    margin-bottom: 28px;
}

.tariff-features {
    list-style: none;
}

.tariff-features li {
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.tariff-features li svg {
    flex-shrink: 0;
}

/* FAQ */
.faq {
    background: var(--bg-light);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.faq-icon {
    font-size: 22px;
    color: var(--primary);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 28px 22px;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* CTA */
.cta {
    background: var(--gradient);
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

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

.cta h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: white;
}

.cta p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    flex-wrap: wrap;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

.cta-features svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* Footer */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .journal-mockup {
        transform: none;
        max-width: 380px;
    }

    .features-grid,
    .modules-grid,
    .tariffs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .nav,
    .header-actions {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .features-grid,
    .modules-grid,
    .tariffs-grid {
        grid-template-columns: 1fr;
    }

    .tariff-card.popular {
        transform: none;
    }

    .tariff-card.popular:hover {
        transform: translateY(-4px);
    }

    .compare-table th,
    .compare-table td {
        padding: 14px 16px;
        font-size: 14px;
    }

    .cta h2 {
        font-size: 28px;
    }

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

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 30px;
    }

    .btn-large {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .cta-features {
        flex-direction: column;
        gap: 12px;
    }
}
