/* ===================================================================
   FOS: Flight Operations Support — стили сайта
   =================================================================== */

/* ---------- Сброс и переменные ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #555555;
    --accent: #2f6df6;      /* синий для ссылок «Learn more» */
    --dark: #1d1f21;        /* тёмный фон hero-оверлея */
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;   /* плавный скролл по якорям меню */
}

body {
    font-family: "Manrope", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Плавное появление при скролле ----------
   JS добавляет класс .reveal элементам, а .is-visible — когда они
   попадают в зону видимости. Без JS всё просто остаётся видимым. */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Уважаем настройку «уменьшить движение» в системе */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===================================================================
   ХЕДЕР / БУРГЕР-МЕНЮ
   =================================================================== */
.header {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 100;
}

.burger {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(60, 60, 60, 0.6);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

.burger:hover {
    background: rgba(40, 40, 40, 0.85);
}

.burger span {
    display: block;
    width: 28px;
    height: 2px;
    background: #fff;
    transition: transform 0.3s, opacity 0.3s;
}

/* Превращаем бургер в крестик, когда меню открыто */
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Выезжающее меню */
.menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 80vw;
    height: 100vh;
    background: var(--dark);
    z-index: 90;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 40px;
    transform: translateX(100%);   /* спрятано за правым краем */
    transition: transform 0.35s ease;
}

.menu.is-open {
    transform: translateX(0);      /* выезжает на экран */
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 8px 0;
    transition: opacity 0.2s;
}

.menu a:hover {
    opacity: 0.6;
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Десктоп: «приклеенный» фон. На мобильных переопределяется ниже
       на фиксированный слой (см. медиа-запрос в конце файла). */
    background: url("assets/hero.webp") center/cover no-repeat fixed;
    text-align: center;
    padding: 120px 24px;
    overflow: hidden;
}

/* Тёмный полупрозрачный слой поверх фото, чтобы текст читался */
.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 24, 0.6);
}

.hero__content {
    position: relative;
    z-index: 1;           /* поверх оверлея */
    max-width: 1000px;
    color: #fff;
}

.hero__eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    margin-bottom: 32px;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 28px;
}

.hero__text {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    max-width: 620px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
}

.hero__arrow {
    position: absolute;
    z-index: 1;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

/* Секции ниже hero: белый фон + слой поверх фиксированного фото,
   чтобы при скролле они наезжали на «приклеенную» картинку hero */
.services,
.how,
.why,
.footer {
    position: relative;
    z-index: 1;
    background: var(--bg);
}

/* ===================================================================
   УСЛУГИ (4 карточки)
   =================================================================== */
.services {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 100px 24px;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 56px 64px;
}

.feature {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.feature__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    color: var(--text);
}

.feature__icon svg {
    width: 100%;
    height: 100%;
}

.feature__body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature__body p {
    color: var(--muted);
}

/* ===================================================================
   HOW IT WORKS (таймлайн)
   =================================================================== */
.how {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

.how__title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 64px;
}

.timeline {
    position: relative;
}

/* Вертикальная линия по центру */
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--text);
    transform: translateX(-50%);
}

.step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 56px;
}

.step--left  { justify-content: flex-start; }
.step--right { justify-content: flex-end; }

.step__text {
    width: 42%;
}

.step--left .step__text  { text-align: right; }
.step--right .step__text { text-align: left; }

.step__text h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.step__text p {
    color: var(--muted);
}

/* Кружок с номером — по центру на линии */
.step__num {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* ===================================================================
   WHY IMPORTANT
   =================================================================== */
.why {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px 100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.why__text h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 32px;
}

.why__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.why__list li {
    display: flex;
    gap: 16px;
    color: var(--muted);
}

.check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.why__link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.why__link:hover {
    text-decoration: underline;
}

.why__image img {
    width: 100%;
    border-radius: 24px;
    object-fit: cover;
}

/* ===================================================================
   ФУТЕР
   =================================================================== */
.footer {
    text-align: center;
    padding: 80px 24px 100px;
    border-top: 1px solid #e5e5e5;
}

.footer__title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 24px;
}

.footer__email {
    display: inline-block;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 32px;
}

.footer__email:hover {
    text-decoration: underline;
}

.footer__social {
    display: flex;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
    text-transform: lowercase;
}

/* ===================================================================
   АДАПТИВ ПОД ТЕЛЕФОН
   =================================================================== */
@media (max-width: 768px) {
    .services__grid {
        grid-template-columns: 1fr;   /* карточки в один столбец */
    }

    /* Таймлайн — линия слева, всё в один столбец */
    .timeline::before { left: 24px; }

    .step,
    .step--left,
    .step--right {
        justify-content: flex-start;
        padding-left: 64px;
    }

    .step__text,
    .step--left .step__text,
    .step--right .step__text {
        width: 100%;
        text-align: left;
    }

    .step__num { left: 24px; }

    /* «Why» — картинка под текстом */
    .why {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   ВНУТРЕННИЕ СТРАНИЦЫ (Services и т.п.)
   =================================================================== */

/* Тёмный hero внутренних страниц */
.subhero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000 url("assets/services-hero.png") center/cover no-repeat;
    text-align: center;
    overflow: hidden;
}

.subhero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

.subhero__title {
    position: relative;
    color: #fff;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
}

/* Вступительный текст */
.intro {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 24px 40px;
    text-align: center;
}

.intro__lead {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--muted);
    margin-bottom: 24px;
}

/* Два формата услуг */
.formats {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* Карточки форматов — в одном ряду, равной высоты, компактные */
.format-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;   /* обе карточки тянутся до одинаковой высоты */
    max-width: 720px;       /* уже, чем страница => карточки меньше */
    margin: 0 auto 48px;
}

.format-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--text);
    padding: 28px 24px;     /* меньше отступы => меньше карточка */
    text-align: center;
}

/* Два столбца аккордеонов под карточками */
.accordion-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.format-card__icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-card__icon svg {
    width: 34px;
    height: 34px;
}

.format-card__icon--green { background: #019e85; }
.format-card__icon--red   { background: #ee5136; }

.format-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.format-card__text {
    color: var(--muted);
}

/* ---------- Аккордеон ---------- */
.accordion {
    border-bottom: 1px solid #e5e5e5;
}

.accordion:first-child {
    border-top: 1px solid #e5e5e5;
}

.accordion__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--text);
}

.accordion__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

/* Иконка «плюс», которая превращается в «крестик» */
.accordion__icon {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.accordion__icon::before,
.accordion__icon::after {
    content: "";
    position: absolute;
    background: var(--text);
}

.accordion__icon::before {   /* горизонтальная палочка */
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.accordion__icon::after {    /* вертикальная палочка */
    left: 50%;
    top: 0;
    height: 100%;
    width: 2px;
    transform: translateX(-50%);
}

/* Открытое состояние: + повёрнут на 45° = × */
.accordion__head.is-open .accordion__icon {
    transform: rotate(45deg);
}

/* Скрытая панель с плавным раскрытием */
.accordion__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion__inner {
    padding: 0 0 24px;
    color: var(--muted);
    max-width: 90%;
}

/* CTA внизу страницы */
.cta {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 120px;
    text-align: center;
}

.cta__text {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--muted);
    margin-bottom: 28px;
}

.cta__email {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.cta__email:hover {
    text-decoration: underline;
}

/* Серый вариант CTA (страница About) */
.cta--grey {
    max-width: none;
    background: #ededed;
    padding-left: 24px;
    padding-right: 24px;
}

.cta--grey .cta__text,
.cta--grey .cta__email {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta--grey .cta__text {
    display: block;
}

/* Hero страницы About — своя картинка (крыло над облаками) */
.subhero--about {
    background-image: url("assets/about-hero.webp");
}

/* Hero страницы Contacts — двигатель */
.subhero--contacts {
    background-image: url("assets/contacts-hero.webp");
}

/* ===== Страница Contacts ===== */
.contacts {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px 120px;
}

.contacts__title {
    text-align: center;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 20px;
}

.contacts__lead {
    text-align: center;
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 64px;
}

/* Единая карточка: тёмная панель + белая форма, равной высоты */
.contacts__grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.10);
}

/* Тёмная инфо-панель */
.contacts__info {
    background: var(--dark);
    color: #fff;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}

.contacts__info-title {
    font-size: 1.7rem;
    font-weight: 800;
}

.contacts__info-text {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    line-height: 1.6;
}

.contacts__email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    margin-top: 8px;
}

.contacts__email svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--accent);
}

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

/* Круглая кнопка соцсети на тёмном фоне */
.contacts__social .social-btn {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.contacts__social .social-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* ---------- Форма ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #fff;
    padding: 48px 44px;
}

.field {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
}

.field:focus {
    background: #fff;
}

.field::placeholder {
    color: #999;
}

.field:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.field {
    resize: vertical;
    min-height: 120px;
}

.btn-send {
    align-self: flex-start;
    padding: 16px 44px;
    border: none;
    border-radius: 999px;      /* капсула */
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-send:hover {
    background: #1f5bff;
}

.btn-send:active {
    transform: scale(0.98);
}

.btn-send:disabled {
    opacity: 0.6;
    cursor: default;
}

.form-result {
    font-size: 0.95rem;
    min-height: 1.2em;
}

.form-result.is-success { color: #019e85; }
.form-result.is-error   { color: #ee5136; }

/* Текстовый блок About */
.about {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 24px 60px;
    color: var(--text);
}

.about p {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 20px;
}

.about__list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.about__list li {
    position: relative;
    padding-left: 24px;
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 8px;
}

/* маркер-точка */
.about__list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text);
}

/* ===================================================================
   АДАПТИВ — часть 2 (в конце файла, чтобы переопределять базовые стили,
   которые описаны ниже первого медиа-запроса)
   =================================================================== */
@media (max-width: 768px) {
    /* Карточки форматов и контакт-форма — в один столбец */
    .format-cards,
    .contacts__grid {
        grid-template-columns: 1fr;
    }

    /* Аккордеоны — в один непрерывный список (без зазора между группами) */
    .accordion-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Фиксированный фон hero на мобильных через position: fixed
       (работает на iOS, в отличие от background-attachment: fixed) */
    .hero {
        background: transparent;
    }

    .hero__overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        /* стабильная высота: не меняется при скрытии адресной строки,
           поэтому картинка не «прыгает»/«увеличивается» при скролле */
        height: 100vh;
        height: 100lvh;
        background:
            linear-gradient(rgba(20, 22, 24, 0.6), rgba(20, 22, 24, 0.6)),
            url("assets/hero.webp") center / cover no-repeat;
        z-index: 0;
    }

    /* Уменьшаем крупные десктопные отступы, чтобы не было пустых полей */
    .services        { padding: 56px 24px; }
    .how             { padding: 40px 24px 56px; }
    .why             { padding: 40px 24px 56px; gap: 32px; }
    .intro           { padding: 48px 24px 24px; }
    .formats         { padding: 24px 24px 56px; }
    .about           { padding: 48px 24px 40px; }
    .contacts        { padding: 48px 24px 72px; }
    .cta             { padding: 32px 24px 72px; }
    .footer          { padding: 56px 24px 72px; }

    /* последний шаг таймлайна без лишнего отступа снизу */
    .step:last-child { margin-bottom: 0; }

    /* компактнее внутренние отступы карточки контактов */
    .contacts__info,
    .contact-form   { padding: 32px 24px; }
}
