/* ================================================================
   PIONEER LOGISTIC — BASE.CSS
   Базовые стили, типографика, reset
   ================================================================ */

/* ----- FONTS ----- */
@font-face {
    font-family: 'Archaica';
    src: url('../fonts/Archaica.woff2') format('woff2'),
         url('../fonts/Archaica.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Seenonim';
    src: url('../fonts/Seenonim.woff2') format('woff2'),
         url('../fonts/Seenonim.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ----- RESET / NORMALIZE ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Seenonim', Arial, sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    line-height: 1.6;
    color: #ffffff;
    background-color: #00060E;
    min-width: 360px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Изображения */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Ссылки */
a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* Кнопки */
button {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

/* Списки */
ul,
ol {
    list-style: none;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Archaica', Georgia, serif;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 6rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}

/* Параграфы */
p {
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

/* ----- UTILITY CLASSES ----- */

/* Скрыть визуально, но оставить для скринридеров */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Контейнер */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: clamp(20px, 4vw, 60px);
    padding-right: clamp(20px, 4vw, 60px);
}

/* Декоративные элементы */
.decor {
    pointer-events: none;
    user-select: none;
}

/* ----- FOCUS STATES (доступность) ----- */
:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* ----- SELECTION ----- */
::selection {
    background-color: #d4af37;
    color: #00060E;
}
main {
    overflow: hidden;
}

/* ================================================================
   MODALS — базовое скрытие модальных окон
   ================================================================ */

/* Скрываем модальное окно кейсов по умолчанию */
.case-modal {
    display: none;
}

.case-modal.is-open {
    display: flex;
}

/* ================================================================
   REQUEST MODAL — форма заявки
   ================================================================ */

body.is-modal-open {
    overflow: hidden;
}

/* затемнение + тёмный фон */
.request-modal {
    position: fixed;
    inset: 0;
    z-index: 250; /* Выше фиксированного меню (z-index: 150) и бокового меню (z-index: 200) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 40px);

    background: rgba(0, 6, 14, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* фон внутри модалки — тёмный градиент + menu-back */
.request-modal__dialog {
    position: relative;
    width: min(50vw, 1200px);
    min-width: 360px;
    max-width: 1200px;

    padding: clamp(20px, 3vw, 32px);
    border-radius: 14px;
    overflow: hidden;

    background:
        radial-gradient(circle at top, rgba(72, 175, 196, 0.25), transparent 55%),
        linear-gradient(135deg, #00060E 0%, #021426 50%, #00060E 100%);
    color: #ffffff;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

/* слой с текстурой */
.request-modal__dialog::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/menu-back.webp") center/cover no-repeat;
    opacity: 0.35;
    pointer-events: none;
}

.request-modal__form,
.request-modal__title,
.request-modal__close {
    position: relative;
    z-index: 1; /* поверх фонового слоя */
}

/* показ/скрытие */
.request-modal--open {
    opacity: 1;
    visibility: visible;
}

.request-modal__title {
    margin: 0 0 24px;
    font-family: 'Archaica', Georgia, serif;
    font-size: clamp(22px, 2.2vw, 28px);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #ffffff;
}

/* сетка полей: 2 колонки */
.request-modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.request-modal__field {
    display: flex;
    flex-direction: column;
}

.request-modal__field--full {
    grid-column: 1 / -1;
}

.request-modal__label {
    margin-bottom: 6px;
    font-family: 'Seenonim', Arial, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* сами поля — белый с 10% прозрачности, белая обводка */
.request-modal__input,
.request-modal__textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 12px;

    font-family: 'Seenonim', Arial, sans-serif;
    font-size: 14px;
    color: #ffffff;
}

.request-modal__input::placeholder,
.request-modal__textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.request-modal__textarea {
    resize: vertical;
    min-height: 80px;
}

/* чекбокс-согласие */
.request-modal__agree {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 10px;
    font-size: 13px;
    font-family: 'Seenonim', Arial, sans-serif;
    color: rgba(255, 255, 255, 0.85);
}

.request-modal__agree a {
    color: #48AFC4;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
/* CF7: убираем лишние отступы и делаем согласие как раньше */
.request-modal__agree .wpcf7-form-control-wrap {
    margin: 0;
}

.request-modal__agree .wpcf7-list-item {
    margin: 0;
}

.request-modal__agree .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
}

/* Текст справа + место под круг */
.request-modal__agree .wpcf7-list-item-label {
    position: relative;
    padding-left: 36px;
    display: inline-block;
}

/* круг */
.request-modal__agree .wpcf7-list-item-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(72, 175, 196, 0.7);
    background: transparent;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease;
}

/* галочка */
.request-modal__agree .wpcf7-list-item-label::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 10px;
    height: 6px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: translateY(-50%) rotate(-45deg);
    transition: border-color 0.2s ease;
}

/* checked */
.request-modal__agree input.request-modal__checkbox:checked + .wpcf7-list-item-label::before {
    background: #0061ff;
    border-color: #0061ff;
}

.request-modal__agree input.request-modal__checkbox:checked + .wpcf7-list-item-label::after {
    border-color: #fcfcfcff;
}


/* скрываем системный чекбокс */
.request-modal__checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* кружок чекбокса */
.request-modal__checkbox-visual {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(72, 175, 196, 0.7);
    background: transparent;
    position: relative;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease;
}

/* галочка */
.request-modal__checkbox-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: 6px 7px;
    border-radius: 2px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(-45deg);
    transition: border-color 0.2s ease;
}

/* состояние checked */
.request-modal__checkbox:checked + .request-modal__checkbox-visual {
    background: #0061ff; /* контрастный лаймовый круг */
    border-color: #0061ff;
}

.request-modal__checkbox:checked + .request-modal__checkbox-visual::after {
    border-color: #fcfcfcff; /* тёмная галочка */
}

/* кнопка — тот же стиль, что "Отправить заявку" (btn btn--primary уже описан в CSS кейсов) */
.request-modal__submit {
    width: 100%;
    margin-top: 8px;
}

/* крестик */
.request-modal__close {
    position: absolute;
    top: 16px;
    right: 18px;

    width: 34px;
    height: 34px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    line-height: 1;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    
    /* Улучшение работы на мобильных устройствах */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
    pointer-events: auto;
    user-select: none;
}

.request-modal__close:hover {
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-family: "Archaica", sans-serif;
    font-weight: 400;
    /*border-radius: 10px;*/
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.04em;
    position: relative;
    overflow: hidden;
}

/* Основной вариант кнопки — как в первом блоке */
.btn--primary {
    background: #00253A;
    border: 1px solid #48AFC4;
    color: #FFFFFF;

    box-shadow:
        0 0 18px rgba(72, 175, 196, 0.45),
        inset 0 0 16px rgba(72, 175, 196, 0.35);
}

/* Ховер */
.btn--primary:hover {
    box-shadow:
        0 0 28px rgba(72, 175, 196, 0.6),
        inset 0 0 22px rgba(72, 175, 196, 0.5);
    transform: translateY(-2px);
}

/* Актив */
.btn--primary:active {
    transform: translateY(0);
    box-shadow:
        0 0 14px rgba(72, 175, 196, 0.35),
        inset 0 0 12px rgba(72, 175, 196, 0.25);
}

/* мобильный адаптив */
@media (max-width: 767px) {
    /* Отступ сверху для модального окна, чтобы не перекрывать фиксированное меню */
    .request-modal {
        align-items: flex-start;
        padding-top: 50px; /* Высота фиксированного меню на мобильных */
        padding-left: clamp(16px, 4vw, 40px);
        padding-right: clamp(16px, 4vw, 40px);
        padding-bottom: clamp(16px, 4vw, 40px);
    }

    .request-modal__dialog {
        width: 100%;
        min-width: 0;
        max-width: 520px;
        margin-top: 0;
    }

    .request-modal__grid {
        grid-template-columns: 1fr;
    }

    .request-modal__field--full {
        grid-column: auto;
    }

    /* Увеличение области нажатия кнопки закрытия на мобильных */
    .request-modal__close {
        width: 44px;
        height: 44px;
        top: 12px;
        right: 12px;
        font-size: 24px;
        /* Увеличиваем область нажатия с помощью padding */
        padding: 8px;
        /* Убеждаемся, что кнопка кликабельна */
        z-index: 10;
        pointer-events: auto;
    }
}

@media (max-width: 480px) {
    .request-modal__dialog {
        max-height: 100%;
        overflow-y: auto;
    }

    /* Еще больше увеличиваем кнопку закрытия на очень маленьких экранах */
    .request-modal__close {
        width: 48px;
        height: 48px;
        top: 10px;
        right: 10px;
        font-size: 26px;
        padding: 10px;
    }
}
.btn--primary {
    min-height: 60px;
}

/* ================================================================
   SCROLL ANIMATIONS — Анимации появления при скролле
   ================================================================ */

/* Начальное состояние элементов (до появления на экране) */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Активное состояние (когда элемент виден) */
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Вариация: появление слева */
.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Вариация: появление справа */
.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Задержки для последовательного появления элементов */
.fade-in.delay-1,
.fade-in-left.delay-1,
.fade-in-right.delay-1 {
    transition-delay: 0.1s;
}

.fade-in.delay-2,
.fade-in-left.delay-2,
.fade-in-right.delay-2 {
    transition-delay: 0.2s;
}

.fade-in.delay-3,
.fade-in-left.delay-3,
.fade-in-right.delay-3 {
    transition-delay: 0.3s;
}

/* ================================================================
   CURSOR BUBBLES — пузыри от курсора
   ================================================================ */

.cursor-bubbles {
    position: fixed;
    inset: 0;
    z-index: 9; /* выше контента, но не лезем в модалки */
    pointer-events: none;
    overflow: hidden;
}

.cursor-bubble {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translate3d(-9999px, -9999px, 0) scale(0);
    will-change: transform, opacity;
    opacity: 0;

   background:
        /* маленький блик (не белый, а холодный) */
        radial-gradient(
            circle at 35% 30%,
            rgba(166, 222, 255, 0.35),
            rgba(30, 119, 220, 0.12) 22%,
            rgba(0, 29, 90, 0.1) 45%,
            rgba(0, 0, 0, 0) 72%
        ),
        /* основное “тело” пузыря */
        radial-gradient(
            circle at 60% 65%,
            rgba(13, 0, 190, 0.12),
            rgba(0, 35, 60, 0.10) 55%,
            rgba(0, 0, 0, 0) 78%
        ),
        /* тёмная кайма */
        radial-gradient(
            circle at 50% 50%,
            rgba(0, 0, 0, 0) 58%,
            rgba(0, 10, 18, 0.50) 74%,
            rgba(0, 0, 0, 0) 90%
        );

    box-shadow:
        0 0 14px rgba(0, 170, 210, 0.12),
        inset 0 0 10px rgba(140, 235, 255, 0.10);

    filter: blur(0.2px);
}

@media (prefers-reduced-motion: reduce) {
    .cursor-bubbles { display: none; }
}
/*отключаем анимацию на мобильном для заголовка страницы*/
@media (max-width: 767px) {
    h1 {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
