@charset "UTF-8";

/* RESET */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption,
footer, header, hgroup, main, menu, nav, output,
ruby, section, summary, time, mark, audio, video {
    margin: 0; padding: 0; border: 0;
    font: inherit; font-size: 100%;
    vertical-align: baseline;
}
html { line-height: 1; }
ol, ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; }
q, blockquote { quotes: none; }
a img { border: none; }
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav,
section, summary { display: block; }

* { margin: 0; padding: 0; outline: none; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --white:    #f1ebe8;
    --black:    #000000;
    --dark:     #0a0806;
    --gold:     #c4a46b;
    --gold-lt:  #d4b884;
    --muted:    rgba(241, 235, 232, 0.55);
    --border:   rgba(241, 235, 232, 0.18);

    --font-head: 'TT Interphases Pro', Arial, sans-serif;
    --font-body: 'TT Interphases Pro', Arial, sans-serif;
    --font-light:'TT Interphases Pro', Arial, sans-serif;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   BASE
   ============================================================ */
html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--dark);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

@media (pointer: coarse) { body { cursor: auto; } }

a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(241,235,232,0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2147483000;
    transform: translate(-50%, -50%);
    transition: width .3s var(--ease), height .3s var(--ease),
                background .3s, border-color .3s, opacity .3s;
    opacity: 0;
}
.cursor-ring.hovering { width: 52px; height: 52px; background: rgba(0,0,0,0.6); }
.cursor-ring.visible  { opacity: 1; }

.cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 5px; height: 5px;
    background: var(--white);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2147483001;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .3s;
}
.cursor-dot.visible { opacity: 1; }

.cursor-trail {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2147482999;
    transform: translate(-50%, -50%);
    background: rgba(241,235,232,0.55);
    transition: opacity .4s;
}

@keyframes cursorClick {
    0%   { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
    40%  { transform: translate(-50%,-50%) scale(2.2); opacity: 0.5; }
    100% { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
}
.cursor-ring.clicking { animation: cursorClick .4s ease-out; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Background image */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('../img/home.jpg') center center / cover no-repeat;
    animation: bgBreath 22s ease-in-out infinite alternate;
}

@keyframes bgBreath {
    from { transform: scale(1)    translate(0, 0); }
    to   { transform: scale(1.05) translate(-1%, -0.5%); }
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(8, 6, 4, 0.88) 0%,
        rgba(8, 6, 4, 0.65) 50%,
        rgba(8, 6, 4, 0.82) 100%
    );
}

#canvasRipple {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 48px;
}

.header__logo img {
    display: block;
    height: 60px;
    width: auto;
}

.header__phone {
    font-family: var(--font-body);
    font-size: 18px;
    letter-spacing: 0.04em;
    color: var(--white);
    transition: color .25s;
}
.header__phone:hover { color: var(--gold); }

/* ============================================================
   HERO CONTENT
   ============================================================ */
.hero__content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 0 48px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

.hero__left {
    flex: 1;
    max-width: 520px;
    animation: fadeRise 1.1s var(--ease) both;
}

@keyframes fadeRise {
    from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
    to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

.hero__eyebrow {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 18px;
}

.hero__title {
    font-family: var(--font-head);
    font-size: clamp(48px, 5.5vw, 80px);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 22px;
}

.hero__lead {
    font-family: var(--font-body);
    font-size: clamp(19px, 2vw, 26px);
    font-weight: 100;
    line-height: 1.45;
    color: var(--white);
    opacity: 0.95;
    margin-bottom: 14px;
}

.hero__desc {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(241, 235, 232, 0.8);
    margin-bottom: 32px;
}
.hero__desc strong { color: var(--gold-lt); }

.hero__features {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.hero__feature {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 17px;
    color: rgba(241,235,232,0.85);
}

.hero__feature-icon {
    color: var(--gold);
    font-size: 7px;
    flex-shrink: 0;
}
.hero__feature strong { color: var(--white); font-weight: 600; }

/* Right column */
.hero__right {
    flex: 0 0 auto;
    width: min(680px, 52vw);
    animation: fadeRise 1.3s 0.15s var(--ease) both;
}

/* Scroll hint */
.hero__scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 48px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.hero__scroll-line {
    flex: 0 0 44px;
    height: 1px;
    background: var(--muted);
}

/* ============================================================
   VIDEO BLOCK
   ============================================================ */
.video-block {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000;
    border: 1px solid #c4a46b;
}

.video-block__video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Top bar */
.video-block__topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.video-block__label {
    font-size: 12px;
    letter-spacing: 0.06em;
    color: rgba(241,235,232,0.9);
}

.video-block__controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-block__ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 50%;
    cursor: pointer;
    transition: background .22s;
}
.video-block__ctrl:hover { background: rgba(255,255,255,0.22); }

/* Play/Pause icon toggle */
#btnPlayPause svg { pointer-events: none; }
#btnPlayPause .icon-play  { display: none; }
#btnPlayPause .icon-pause { display: block; }
#btnPlayPause.paused .icon-play  { display: block; }
#btnPlayPause.paused .icon-pause { display: none; }

/* Sound icon toggle */
#btnSound svg { pointer-events: none; }
#btnSound .icon-muted { display: block; }
#btnSound .icon-sound { display: none; }
#btnSound.sound-on .icon-muted { display: none; }
#btnSound.sound-on .icon-sound { display: block; }

/* Play button (shown when paused) */
.video-block__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    z-index: 4;
    cursor: pointer;
    border: none;
    transition: background .3s;
}
.video-block__play:hover { background: rgba(0,0,0,0.5); }
.video-block__play svg { transition: transform .3s var(--ease); }
.video-block__play:hover svg { transform: scale(1.1); }

/* ============================================================
   FOS — inline form in video block
   ============================================================ */
.fos {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 5;
}

/* --- Step 1: кнопка --- */
.fos__btn-wrap {
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    padding-top: 32px;
}

.fos__trigger {
    padding: 15px 38px;
    background: rgba(20, 12, 4, 0.75);
    border: 1px solid rgba(196,164,107,0.55);
    border-radius: 3px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    letter-spacing: 0.08em;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .3s, border-color .3s, color .3s, transform .2s;
}
.fos__trigger:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
    transform: translateY(-2px);
}

/* --- Step 2: форма --- */
.fos__form-wrap {
    background: rgba(10, 7, 4, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(196,164,107,0.2);
    padding: 16px 18px 14px;
    animation: slideUp .35s var(--ease) both;
}

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

.fos__form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.fos__form-title {
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
}

.fos__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fos__input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(241,235,232,0.06);
    border: 1px solid rgba(241,235,232,0.14);
    border-radius: 3px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color .22s, background .22s;
    -webkit-appearance: none;
}
.fos__input::placeholder { color: rgba(241,235,232,0.35); }
.fos__input:focus { border-color: var(--gold); background: rgba(241,235,232,0.09); }
.fos__input.err { border-color: #c0392b; }

.fos__actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.fos__submit {
    padding: 13px 18px;
    background: var(--gold);
    border: none;
    border-radius: 3px;
    color: var(--black);
    font-family: var(--font-body);
    font-size: 15px;
    letter-spacing: 0.08em;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s, transform .2s;
}
.fos__submit:hover { background: var(--gold-lt); transform: translateY(-1px); }

.fos__cancel {
    padding: 13px 16px;
    background: transparent;
    border: 1px solid rgba(241,235,232,0.2);
    border-radius: 3px;
    color: rgba(241,235,232,0.55);
    font-family: var(--font-body);
    font-size: 15px;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .22s, color .22s;
}
.fos__cancel:hover {
    border-color: rgba(241,235,232,0.5);
    color: var(--white);
}

.fos__agree {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    color: rgba(241,235,232,0.4);
    cursor: pointer;
    line-height: 1.4;
}
.fos__agree input { flex-shrink: 0; accent-color: var(--gold); }
.fos__agree a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* Success */
.fos__success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 8px 0 2px;
}
.fos__success-icon {
    font-size: 28px;
    color: var(--gold);
    line-height: 1;
}
.fos__success p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

/* ============================================================
   DUST CANVAS
   ============================================================ */
#canvasDust {
    position: fixed;
    inset: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9000;
}

/* ============================================================
   BOTTOM SHEET — скрыт везде по умолчанию
   ============================================================ */
.bottom-sheet {
    display: none; /* показывается только на мобайле через JS */
    position: fixed;
    inset: 0;
    z-index: 800;
    pointer-events: none;
}
.bottom-sheet.is-open {
    pointer-events: all;
}

.bottom-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background .4s var(--ease);
}
.bottom-sheet.is-open .bottom-sheet__backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.bottom-sheet__panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: #100d0a;
    border-top: 1px solid rgba(196,164,107,0.22);
    border-radius: 16px 16px 0 0;
    padding: 10px 24px 40px;
    padding-bottom: max(40px, calc(24px + env(safe-area-inset-bottom)));
    transform: translateY(100%);
    transition: transform .42s var(--ease);
}
.bottom-sheet.is-open .bottom-sheet__panel {
    transform: translateY(0);
}

.bottom-sheet__handle {
    width: 36px; height: 4px;
    background: rgba(241,235,232,0.2);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.bottom-sheet__close {
    position: absolute;
    top: 16px; right: 20px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(241,235,232,0.07);
    border: 1px solid rgba(241,235,232,0.12);
    border-radius: 50%;
    color: var(--muted);
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.bottom-sheet__close:hover { color: var(--white); border-color: rgba(241,235,232,0.3); }

.bottom-sheet__label {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}
.bottom-sheet__title {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 6px;
}
.bottom-sheet__sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}

/* BS Form */
.bs-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bs-form__input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(241,235,232,0.05);
    border: 1px solid rgba(241,235,232,0.14);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    -webkit-appearance: none;
    transition: border-color .22s, background .22s;
}
.bs-form__input::placeholder { color: rgba(241,235,232,0.3); }
.bs-form__input:focus { border-color: var(--gold); background: rgba(241,235,232,0.08); }
.bs-form__input.err { border-color: #c0392b; }

.bs-form__submit {
    padding: 17px;
    background: var(--gold);
    border: none;
    border-radius: 4px;
    color: var(--black);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background .25s;
    margin-top: 4px;
}
.bs-form__submit:hover { background: var(--gold-lt); }

.bs-form__agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: rgba(241,235,232,0.4);
    cursor: pointer;
    line-height: 1.5;
}
.bs-form__agree input { flex-shrink: 0; accent-color: var(--gold); margin-top: 2px; }
.bs-form__agree a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

.bs-form__success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 0 8px;
    gap: 12px;
}
.bs-form__success-icon {
    font-size: 48px;
    color: var(--gold);
    line-height: 1;
}
.bs-form__success p {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
}

/* ============================================================
   MOBILE BAR — скрыт на десктопе
   ============================================================ */
.mobile-bar { display: none; }

/* ============================================================
   TABLET (до 1080px)
   ============================================================ */
@media (max-width: 1080px) {
    .hero__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
        padding-top: 20px;
    }
    .hero__left  { max-width: 100%; }
    .hero__right { width: 100%; max-width: 620px; align-self: center; }
}

/* ============================================================
   MOBILE (до 768px) — видео как фон героя
   ============================================================ */
@media (max-width: 768px) {

    .cursor-ring, .cursor-dot { display: none; }
    .bottom-sheet { display: block; }

    /* ---- Header ---- */
    .header {
        padding: 20px 20px;
        position: relative;
        z-index: 20;
    }
    .header__logo img { height: 32px; }
    .header__phone { font-size: 14px; }

    /* ---- Hero: видео как фон ---- */
    .hero { min-height: 100svh; }

    /* Фоновое изображение убираем — его заменяет видео */
    .hero__bg { display: none; }

    /* Видеоблок — абсолютно поверх всего как фон */
    .hero__right {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .video-block {
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    /* Видео растягивается на весь блок */
    .video-block__video {
        object-position: center center;
    }

    /* Топбар видео — иконка справа */
    .video-block__topbar {
        z-index: 15;
        justify-content: flex-end;
    }

    /* FOS (кнопка и форма в видео) — скрываем, bottom sheet справляется */
    .fos { display: none; }

    /* Градиент поверх видео — чтобы текст читался */
    .hero__right::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 2;
        background:
            linear-gradient(to bottom,
                rgba(8,6,4,0.55) 0%,
                rgba(8,6,4,0.2) 35%,
                rgba(8,6,4,0.6) 70%,
                rgba(8,6,4,0.88) 100%
            );
    }

    /* ---- Контент поверх видео ---- */
    .hero__content {
        position: relative;
        z-index: 10;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 0;
        padding: 0 24px 80px;
        max-width: 100%;
        flex: 1 1 auto;
        min-height: 0;
    }

    .hero__left {
        flex: none;
        max-width: 100%;
        padding-bottom: 0;
        position: relative;
        z-index: 5;
    }

    .hero__eyebrow { font-size: 11px; margin-bottom: 8px; }

    .hero__title {
        font-size: clamp(34px, 9vw, 52px);
        margin-bottom: 10px;
    }

    .hero__lead {
        font-size: clamp(15px, 4vw, 19px);
        margin-bottom: 6px;
    }

    .hero__desc { font-size: 13px; margin-bottom: 14px; line-height: 1.55; }

    .hero__features { gap: 6px; }
    .hero__feature { font-size: 14px; }

    /* Скролл хинт */
    .hero__scroll-hint { display: none; }

    /* ---- Sticky bottom bar ---- */
    .mobile-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 500;
        padding: 12px 16px max(12px, env(safe-area-inset-bottom));
        background: rgba(8,6,4,0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(196,164,107,0.18);
    }

    .mobile-bar__call {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 14px 18px;
        border: 1px solid rgba(241,235,232,0.18);
        border-radius: 4px;
        color: var(--white);
        font-family: var(--font-body);
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        transition: border-color .25s, color .25s;
    }
    .mobile-bar__call:hover { border-color: var(--gold); color: var(--gold); }

    .mobile-bar__form {
        flex: 1;
        padding: 14px 12px;
        background: var(--gold);
        border: none;
        border-radius: 4px;
        color: var(--black);
        font-family: var(--font-body);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.05em;
        cursor: pointer;
        transition: background .25s;
    }
    .mobile-bar__form:hover { background: var(--gold-lt); }
}

/* ============================================================
   SMALL PHONES (до 420px)
   ============================================================ */
@media (max-width: 420px) {
    .hero__title { font-size: 36px; }
    .header__logo img { height: 28px; }
    .mobile-bar__call span { display: none; }
    .mobile-bar__call { padding: 14px; }
    .bottom-sheet__title { font-size: 22px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}