/* Страница, которая продаёт офис. Опирается на tokens.css
   и soon.css: шапка и подвал описаны там.

   Одета как страница книг: первый экран — тёмно-синяя сцена
   с фото крыла и голубым светом, золото вторым акцентом,
   Cormorant крупно, плоские кнопки с разрядкой, тонкие линии. */

.office {
    --of-ink: #0b1d2b;
    --of-gold: #d8b46a;
    --of-gold-soft: rgba(216, 180, 106, 0.35);
    --of-gold-text: #8a6a2e;
    --of-line: rgba(29, 79, 107, 0.14);
    --of-ease: cubic-bezier(.2, .7, .2, 1);

    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px 110px;
}

/* Сцены выходят на всю ширину окна — без сдвига вбок */

body:has(> main.office) {
    overflow-x: clip;
}


/* ----- Кнопки — как .bk-btn ----- */

.office .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 52px;
    padding: 0 30px;

    border-radius: 0;

    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.25s var(--of-ease),
        background-color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease;
}

.office .btn-primary {
    background: var(--of-gold);
    border: 1px solid var(--of-gold);
    color: var(--of-ink);
}

@media (hover: hover) {
    .office .btn-primary:hover {
        transform: translateY(-2px);

        background: var(--white);
        border-color: var(--white);
        color: var(--of-ink);

        box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.6);
    }
}

.office .btn:focus-visible {
    outline: 2px solid var(--of-gold);
    outline-offset: 3px;
}


/* ----- Первый экран: тёмная сцена на всю ширину ----- */

.office-top {
    position: relative;
    isolation: isolate;

    margin: 0 calc(50% - 50vw);
    padding: 104px calc(50vw - 50%) 96px;

    overflow: hidden;

    background: var(--of-ink);
    color: var(--white);
}

.office-top::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        radial-gradient(55% 90% at 78% 30%, rgba(56, 183, 215, 0.24), transparent 70%),
        linear-gradient(90deg, rgba(8, 21, 32, 0.94) 0%, rgba(8, 21, 32, 0.6) 55%, rgba(8, 21, 32, 0.25) 100%),
        url("/static/images/hero.jpg") right bottom / cover no-repeat;
}

.office-eyebrow {
    margin: 0 0 20px;

    color: var(--of-gold);

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.office-top h1 {
    max-width: 15ch;
    margin: 0 0 28px;

    color: var(--white);

    font-family: var(--font-header);
    font-size: clamp(42px, 6.4vw, 84px);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: 0.01em;
}

.office-lead {
    max-width: 52ch;
    margin: 0 0 40px;
    padding-top: 26px;

    border-top: 1px solid rgba(255, 255, 255, 0.14);

    color: rgba(255, 255, 255, 0.8);

    font-size: 17px;
    line-height: 1.7;
}

.office-buttons {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.office-price {
    color: rgba(255, 255, 255, 0.6);

    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}


/* ----- Четыре возможности: тонкие линии и золотые номера ----- */

.office-things {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 56px;

    margin: 96px 0;

    counter-reset: office-thing;
}

.office-things article {
    position: relative;

    padding: 34px 0 40px;

    border-top: 1px solid var(--of-line);

    counter-increment: office-thing;
}

/* Номер — оформление, как у «Как получить» на странице книг */

.office-things article::before {
    content: "0" counter(office-thing);

    display: block;

    margin-bottom: 18px;

    color: var(--of-gold);

    font-family: var(--font-header);
    font-size: 40px;
    font-variant-numeric: lining-nums;
    line-height: 1;
}

.office-things article::after {
    content: "";

    position: absolute;
    left: 0;
    top: -1px;

    width: 56px;
    height: 1px;

    background: var(--of-gold);
}

.office-things h2 {
    margin: 0 0 12px;

    color: var(--of-ink);

    font-family: var(--font-header);
    font-size: clamp(26px, 2.6vw, 32px);
    font-weight: 500;
    line-height: 1.1;
}

.office-things p {
    margin: 0;

    color: #5b5b5b;

    font-size: 15px;
    line-height: 1.75;
}


/* ----- Цена: тёмная сцена, как «Бесплатная книга» ----- */

.office-money {
    position: relative;
    isolation: isolate;

    padding: 80px 32px 84px;

    overflow: hidden;

    background: var(--of-ink);
    border-radius: 0;

    color: var(--white);

    text-align: center;
}

.office-money::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        radial-gradient(50% 70% at 50% 0%, rgba(56, 183, 215, 0.22), transparent 70%),
        linear-gradient(180deg, rgba(8, 21, 32, 0.5), rgba(8, 21, 32, 0.9)),
        url("/static/images/hero.jpg") right bottom / cover no-repeat;
}

/* Тонкая золотая рамка внутри — как на обложке книги */

.office-money::after {
    content: "";

    position: absolute;
    inset: 12px;
    z-index: -1;

    border: 1px solid rgba(216, 180, 106, 0.2);

    pointer-events: none;
}

.office-money h2 {
    margin: 0 0 16px;

    color: var(--white);

    font-family: var(--font-header);
    font-size: clamp(34px, 4.4vw, 54px);
    font-weight: 500;
    font-variant-numeric: lining-nums;
    line-height: 1.05;
}

.office-money p {
    max-width: 560px;
    margin: 0 auto 34px;

    color: rgba(255, 255, 255, 0.75);

    font-size: 15px;
    line-height: 1.7;
}


/* ----- Появление ----- */

@media (prefers-reduced-motion: no-preference) {

    @keyframes of-rise {
        from { opacity: 0; transform: translateY(26px); }
    }

    .office-top > * {
        animation: of-rise 0.9s var(--of-ease) backwards;
    }

    .office-top > :nth-child(2) { animation-delay: 0.08s; }
    .office-top > :nth-child(3) { animation-delay: 0.16s; }
    .office-top > :nth-child(4) { animation-delay: 0.24s; }
}

@media (prefers-reduced-motion: reduce) {

    .office .btn { transition: none; }

    .office .btn-primary:hover { transform: none; }
}


@media (max-width: 760px) {

    .office {
        padding: 0 20px 72px;
    }

    .office-top {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    /* На узком экране крыло уходит под текст — фон плотнее */

    .office-top::before {
        background:
            radial-gradient(70% 50% at 80% 10%, rgba(56, 183, 215, 0.22), transparent 70%),
            linear-gradient(180deg, rgba(8, 21, 32, 0.78), rgba(8, 21, 32, 0.9)),
            url("/static/images/hero.jpg") right bottom / cover no-repeat;
    }

    .office-lead {
        font-size: 16px;
    }

    .office-things {
        grid-template-columns: minmax(0, 1fr);
        margin: 64px 0;
    }

    .office-things article {
        padding: 28px 0 32px;
    }

    .office-money {
        padding: 60px 22px 64px;
    }
}
