/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --border: #475569;
    --radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

/* ==========================================================================
   2. LAYOUT
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   3. COMPONENTS — Buttons & Forms
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

.btn--primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

.btn--secondary:hover {
    background: var(--bg-card);
}

.btn--full {
    width: 100%;
}

.btn--sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ==========================================================================
   4. SECTIONS — Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo__dot {
    color: var(--accent);
}

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

.nav__link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--text-primary);
}

.nav__link--cta {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
}

.nav__link--cta:hover {
    background: var(--accent-hover);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ==========================================================================
   5. SECTIONS — Hero
   ========================================================================== */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero__content {
    max-width: 800px;
}

.hero__badge {
    display: inline-block;
    background: var(--bg-card);
    color: var(--accent);
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   6. SECTIONS — Stats
   ========================================================================== */
.stats {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat__number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat__label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   7. SECTIONS — Services
   ========================================================================== */
.services {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.service-card__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card__text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.service-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

.service-card__price {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================================================
   8. SECTIONS — Cases
   ========================================================================== */
.cases {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* ← изменил с 400px на 280px */
    gap: 2rem;
}

.case-card {
    background: var(--bg-primary);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 100%; /* ← добавлено */
    overflow-wrap: break-word; /* ← добавлено для переноса длинных слов */
    word-wrap: break-word; /* ← добавлено для старых браузеров */
}

.case-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* ← добавлено, чтобы заголовок и ссылка переносились */
}

.case-card__title {
    font-size: 1.5rem;
    flex: 1; /* ← добавлено */
    min-width: 0; /* ← добавлено для корректного переноса */
    overflow-wrap: break-word; /* ← добавлено */
}

.case-card__link,
.case-card__tag {
    color: var(--accent);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.case-card__tag {
    background: var(--bg-card);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
}

.case-card__text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    overflow-wrap: break-word; /* ← добавлено */
}

/* ==========================================================================
   9. SECTIONS — Why
   ========================================================================== */
.why {
    padding: 100px 0;
}

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

.why__item {
    text-align: center;
}

.why__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.why__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.why__text {
    color: var(--text-secondary);
}

/* ==========================================================================
   10. SECTIONS — Process
   ========================================================================== */
.process {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.process__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process__step {
    position: relative;
}

.process__number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.process__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.process__text {
    color: var(--text-secondary);
}

/* ==========================================================================
   11. SECTIONS — Contact
   ========================================================================== */
.contact {
    padding: 100px 0;
    background: var(--bg-primary);
}

.contact__content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact__text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form__note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form__note a {
    color: var(--accent);
}

.contact__info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact__link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.contact__link:hover {
    color: var(--accent);
}

/* ==========================================================================
   12. SECTIONS — Footer
   ========================================================================== */
.footer {
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer__tagline {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer__links {
    display: flex;
    gap: 2rem;
}

.footer__links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer__copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   13. UTILITIES — Sticky Elements
   ========================================================================== */
.sticky-bottom {
    position: relative;
    transition: all 0.3s ease;
}

.sticky-bottom.is-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sticky-placeholder {
    display: none;
}

.sticky-bottom.is-sticky + .sticky-placeholder {
    display: block;
}

/* Sticky Bar (компактная полоска) */
.sticky-bar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--accent);
    padding: 0.75rem 0;
    z-index: 900;
}

.sticky-bar__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sticky-bar__text {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.sticky-bar.is-sticky + .sticky-placeholder {
    height: 60px;
}

/* ==========================================================================
   14. RESPONSIVE — 768px and below
   ========================================================================== */
@media (max-width: 768px) {
    /* Header */
    .burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .nav.active {
        transform: translateY(0);
    }

    /* Hero */
    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    /* Section titles */
    .section-title {
        font-size: 2rem;
    }

    /* Footer */
    .footer__content {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   15. RESPONSIVE — 600px and below
   ========================================================================== */
@media (max-width: 600px) {
    .sticky-bar__content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .sticky-bar {
        padding: 1rem 0;
    }
}