/* static/css/core/utilities.css */

/* ============================================================
   УТИЛИТЫ — LYNXREACTOR
   ============================================================ */

/* Контейнер */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Секции */
.section {
    padding: var(--section-padding);
    background-color: var(--color-primary-dark);
    transition: background-color 0.3s ease;
}
.section-dark { background-color: var(--color-primary-dark); }
.section-graphite { background-color: var(--color-secondary-dark); }
.section-light {
    background-color: var(--color-light-bg);
    color: var(--color-text-dark);
}
.section-light p { color: var(--color-text-secondary); }

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

.section-label {
    font-family: var(--font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-gold);
    display: block;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.05;
    margin-bottom: 16px;
    color: var(--color-text-primary);
}

.section-description {
    font-size: 17px;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
}

/* Отступы */
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-secondary { color: var(--color-text-secondary); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

/* ============================================================
   СКРОЛЛБАР
   ============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--color-gold-dark);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

* {
    scrollbar-color: var(--color-gold-dark) var(--color-scrollbar-track);
    scrollbar-width: thin;
}

/* ============================================================
   АНИМАЦИИ
   ============================================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes goldPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(200, 154, 91, 0.1); }
    50% { box-shadow: 0 0 40px rgba(200, 154, 91, 0.3); }
}

/* Анимация при скролле */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }
.animate-on-scroll.delay-6 { transition-delay: 0.6s; }

/* Карточки при ховере */
.card-hover {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   ИСПРАВЛЕНИЯ (FIXES)
   ============================================================ */

/* Предотвращение переполнения текста */
p, h1, h2, h3, h4, h5, h6, span, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Предотвращение переполнения секций */
.hero-section,
.services-section,
.tariffs-section,
.landing-section,
.business-section,
.refactor-section,
.portfolio-section,
.cta-section,
.faq-section,
.tech-section {
    overflow-x: hidden;
    width: 100%;
}

/* Печать */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .btn,
    .hero-buttons,
    .hero-scroll-indicator {
        display: none !important;
    }

    .hero-section,
    .services-section,
    .tariffs-section,
    .landing-section,
    .business-section,
    .refactor-section,
    .portfolio-section,
    .cta-section,
    .faq-section,
    .tech-section {
        padding: 40px 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}