@import url('https://fonts.googleapis.com/css2?family=Science+Gothic:wght@100..900&display=swap');

/* ============================================================
   ОБЩИЕ НАСТРОЙКИ СТРАНИЦЫ
   ============================================================ */

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

    background-image:
            url("/img/background.webp"),
            linear-gradient(135deg, #ffdf3d 0%, #ebbc4e 100%);
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center center, center center;
}

/* ============================================================
   КОНТЕЙНЕР
   ============================================================ */

.jp-pitch {
    min-height: 100vh;
    display: flex;
    align-items: center;      /* на десктопе прямоугольник по центру */
    justify-content: center;
    background: transparent;
}

/* "ЭКРАН ТЕЛЕФОНА" */

.jp-pitch__phone {
    position: relative;
    box-sizing: border-box;
    width: min(420px, 100vw);
    aspect-ratio: 9 / 16;
    max-height: 100vh;

    background-image:
            url("/img/mobile_background.webp"),
            linear-gradient(135deg, #5af0cf 0%, #32c09a 100%);
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center center, center center;

    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
    padding: 32px 20px 28px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================================
   ХЕДЕР (ЛОГОТИП + ЛИНИЯ)
   ============================================================ */

.jp-pitch__header {
    flex: 0 0 110px;      /* десктоп: фиксированная высота первого блока */
    text-align: center;
}

.jp-pitch__logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jp-pitch__logo-main {
    font-size: 40px;
    font-family: "Science Gothic";
    font-weight: 700;
    color: #ffe36b;
    text-shadow:
            3px 3px 0 #ffffff,
            -2px -2px 0 #32ffd0;
}

.jp-pitch__logo-sub {
    font-size: 14px;
    font-family: "Science Gothic";
    font-weight: 300;
    color: #ffffff;
}

.jp-pitch__divider {
    width: 50%;
    height: 1px;
    margin: 14px auto 0;
    background-color: #ffffff;
    opacity: 0.7;
}

/* ============================================================
   ОСНОВНОЙ БЛОК: ШАГИ
   ============================================================ */

/* под логотипом: шаги занимают всю оставшуюся высоту */

.jp-pitch__main {
    flex: 1 1 auto;
    display: flex;
}

/* сам шаг как экран */

.jp-step {
    display: none;
    flex: 1 1 auto;
    flex-direction: column;
}

.jp-step--active {
    display: flex;
}

/* СРЕДНЯЯ ЗОНА ШАГА: фиксированная область, контент по центру */

.jp-step__middle {
    flex: 1 1 auto;
    display: flex;
    align-items: center;      /* центр по вертикали */
    justify-content: center;  /* по горизонтали */
    padding: 8px 0;
    min-height: 0;
}

.jp-step__middle-inner {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;

    display: flex;
    justify-content: center;  /* центр по горизонтали */
    align-items: center;      /* центр по вертикали (заодно для карточек на 2-3 шагах) */
}

/* НИЖНЯЯ ЗОНА ШАГА: блок под кнопку + строка шагов */

.jp-step__bottom {
    flex: 0 0 140px;          /* десктоп: суммарная высота 3-го и 4-го блока */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 8px;
    padding-bottom: 6px;
}

/* ============================================================
   КРУГИ + PLAY (ШАГ 1)
   ============================================================ */

/* базовый размер круга (десктоп/общий) */

.jp-pitch__play-wrapper {
    position: relative;
    width: min(300px, 70vw);
    height: min(300px, 70vw);
}

.jp-pitch__circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

/* внешний белый круг */

.jp-pitch__circle--outer {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* внутренний жёлтый круг */

.jp-pitch__circle--inner {
    width: 70%;
    height: 70%;
    margin: auto;
    background-color: #ffd33f;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
	position: relative;
}

/* текст по кругу */

.jp-pitch__circle-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.jp-pitch__circle-text-svg {
    width: 94%;
    height: 94%;
    transform-origin: 50% 50%;
    animation: jp-words-rotate 27s linear infinite;
}

.jp-pitch__circle-text-inner {
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    fill: #888888;
}

@keyframes jp-words-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* кнопка play */

.jp-pitch__play-btn {
    position: relative;
    width: 140px;
    height: 140px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

/* треугольник */

.jp-pitch__play-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 57%;
    border-style: solid;
    border-width: 42px 0 42px 78px;
    border-color: transparent transparent transparent #54e6c2;
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    animation: jp-play-pulse 2.4s ease-out infinite;
}

.jp-pitch__play-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

@keyframes jp-play-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }
    55% {
        transform: translate(-50%, -50%) scale(1.08);
        filter: drop-shadow(0 0 24px rgba(0, 0, 0, 0.35));
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }
}

/* ============================================================
   БОЛЬШАЯ 3D-КНОПКА (ШАГ 1 и 2)
   ============================================================ */

.jp-pitch__cta-wrapper {
    flex: 0 0 80px;               /* десктоп: высота блока под кнопку */
    margin: 0 auto 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* на шаге 3 используется как пустой плейсхолдер:
   .jp-pitch__cta-wrapper--empty — без содержимого */

.jp-pitch__cta-base {
    position: relative;
    display: inline-block;
    background: #ebbc4e;
    border: 1px solid #1a1a1a;
    padding: 0;
    transform: translate(7px, 7px);
}

.jp-pitch__cta-btn {
    position: relative;
    display: block;
    min-width: 220px;
    padding: 14px 28px;
    font-family: "Science Gothic";
    background: #ffdf3d;
    border: 1px solid #1a1a1a;

    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 0.04em;
    text-align: center;
    cursor: pointer;

    transform: translate(-7px, -7px);
    transition: transform 0.08s ease-out;
}

.jp-pitch__cta-btn:hover {
    transform: translate(-7px, -7px);
}

.jp-pitch__cta-btn:active {
    transform: translate(0, 0);
}

.jp-pitch__cta-btn:focus-visible {
    outline: 1px solid #ffffff;
    outline-offset: 1px;
}

@media (max-width: 400px) {
    .jp-pitch__cta-btn {
        min-width: 200px;
        font-size: 13px;
    }
}

/* заблокированное состояние большой кнопки */

.jp-pitch__cta-btn.is-disabled,
.jp-pitch__cta-btn.is-disabled:hover,
.jp-pitch__cta-btn.is-disabled:active {
    background: #c3c3c3;
    border-color: #888888;
    color: #555555;
    cursor: default;
    transform: translate(-7px, -7px);
}

/* ============================================================
   НАВИГАЦИЯ ПО ШАГАМ (НИЗ)
   ============================================================ */

.jp-step-nav {
    flex: 0 0 32px;               /* десктоп: фиксированная высота строки шагов */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.jp-step-nav__left,
.jp-step-nav__right {
    display: flex;
    align-items: center;
}

.jp-step-nav__btn {
    border: 1px solid #ffffff;
    background: transparent;
    color: #ffffff;
    font-size: 11px;
    text-transform: uppercase;
    padding: 6px 10px;
    cursor: pointer;
}

.jp-step-nav__btn.is-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.jp-step-indicator {
    font-size: 11px;
    color: #ffffff;
    opacity: 0.9;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ============================================================
   ШАГ 2: ДВА ВИДЕОБЛОКА
   ============================================================ */

.jp-step2-grid {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 auto;
}

/* общие карточки (шаг 2 и 3) */

.jp-card {
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(0, 0, 0, 0.12);
    padding: 10px 12px;
}

.jp-card__thumb {
    width: 72px;
    min-width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.jp-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 10px;
}

.jp-card__title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #ffffff;
}

.jp-card__btn {
    align-self: flex-start;
    border: 1px solid #1a1a1a;
    background: #ffdf3d;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

/* ============================================================
   ШАГ 3: ТРИ ФИНАЛЬНЫХ БЛОКА
   ============================================================ */

.jp-step3-grid {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto;
}

.jp-card--final {
    background: rgba(0, 0, 0, 0.10);
}

/* ============================================================
   ФУТЕР-ТЕГ (НЕ ИСПОЛЬЗУЕМ)
   ============================================================ */

.jp-pitch__footer {
    display: none;
}

/* ============================================================
   ВИДЕО-ОВЕРЛЕЙ
   ============================================================ */

.jp-video-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.jp-video-overlay--visible {
    display: flex;
}

/* blur только на десктепах */

@media (min-width: 768px) {
    .jp-video-overlay {
        backdrop-filter: blur(6px);
    }
}

/* внутренняя рамка с видео */

.jp-video-overlay__inner {
    position: relative;
    width: min(420px, 100vw);
    aspect-ratio: 9 / 16;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    border-radius: 0;
    overflow: hidden;
}

/* мобилка: 90% экрана, без скруглений */

@media (max-width: 768px) {
    .jp-video-overlay__inner {
        width: min(420px, 90vw);
        height: auto;
        max-height: 90vh;
        aspect-ratio: 9 / 16;
        box-shadow: none;
        border-radius: 0;
    }
}

/* крестик */

.jp-video-overlay__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.jp-video-overlay__close::before,
.jp-video-overlay__close::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 3px;
    background: #ffffff;
    border-radius: 0;
}

.jp-video-overlay__close::before {
    transform: rotate(45deg);
}

.jp-video-overlay__close::after {
    transform: rotate(-45deg);
}

@media (max-width: 480px) {
    .jp-video-overlay__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

/* контейнер под iframe */

.jp-video-frame {
    position: absolute;
    inset: 0;
    background: #111111;   /* темно-серый фон под видео */
    overflow: hidden;
}


/* сам iframe */

.jp-video-overlay__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
	z-index: 1;
}

/* ============================================================
   МОБИЛКИ: подгоняем высоту под реальный видимый экран
   ============================================================ */
@media (max-width: 480px) {

    /* Телефон — на всю видимую высоту (без полоски браузера) */
    .jp-pitch {
        align-items: stretch;
    }

    .jp-pitch__phone {
        width: 100vw;
        height: 100dvh;           /* ключевой момент: dvh */
        max-height: none;
        aspect-ratio: auto;
        border-width: 0;
        box-shadow: none;
        padding: 12px 16px 10px;
    }

    /* Центральный блок — чутка компактнее, без лишних отступов */
    .jp-step__middle {
        flex: 1 1 auto;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .jp-step__middle-inner {
        max-width: 350px;
    }

    /* Нижний блок — фиксированный, но небольшой */
    .jp-step__bottom {
        flex: 0 0 140px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .jp-pitch__cta-wrapper {
        margin-bottom: 4px;
    }

    .jp-step-nav {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* КРУГ: масштабируем ещё и по высоте, чтобы не съедал экран.
       55vh = максимум ~55% видимой высоты, остальное остаётся кнопке и шагам. */
    .jp-pitch__play-wrapper {
        width:  min(340px, 80vw, 55vh);
        height: min(340px, 80vw, 55vh);
    }
}

/* Спираль на жёлтом круге */
.jp-pitch__circle--inner::before {
    content: "";
    position: absolute;
    inset: -5%; /* чуть меньше круга, чтобы не упиралось в белый край */
    background-image: url("/img/spiral.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border-radius: 50%;
    pointer-events: none;      /* чтобы не мешать клику по кнопке */
    animation: jp-spiral-rotate 18s linear infinite;
    z-index: 0;                /* под треугольником play, но над жёлтым фоном */
}

/* Вращение спирали влево (против часовой стрелки) */
@keyframes jp-spiral-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Лоадер поверх видео */
.jp-video-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
    z-index: 2;
}

.jp-video-loader--visible {
    opacity: 1;
}

.jp-video-loader__spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    animation: jp-video-spinner 1s linear infinite;
    margin-bottom: 10px;
}

.jp-video-loader__text {
    opacity: 0.9;
}

/* крутящийся кружок */
@keyframes jp-video-spinner {
    to {
        transform: rotate(360deg);
    }
}
