@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600&display=swap');

/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Set page background to black and prevent horizontal overflow */
body {
    background-color: #000000;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Top gradient: pinned to the top, stretches to full width, and overlays the background video */
#top-gradient {
    position: fixed;
    top: -30vh; /* Подняли градиент еще выше за верхнюю границу экрана */
    left: 0;
    width: 100vw;
    height: auto;
    display: block;
    z-index: 0; /* Находится поверх видео-контейнера (у которого z-index: -1) */
    pointer-events: none; /* Пропускает клики мыши, чтобы не мешать элементам управления */
}

/* Container for the background video: occupies 90% of screen height */
.video-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 90vh; /* Увеличили высоту до 90vh (видео занимает еще больше экрана) */
    overflow: hidden;
    z-index: -1;
}

/* Background video: stretched, scaled, and positioned higher up */
#bg-video {
    width: 100%;
    height: 110%; /* Высота самого видео */
    object-fit: cover;
    display: block;
    transform: translateY(0%); /* Подняли само видео еще выше (убрали сдвиг вниз на 5%) */
}

/* Hero Content Area: positioned at the top-center */
.hero-content {
    position: relative;
    z-index: 2; /* Находится поверх видео и верхнего градиента */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 6vh; /* Прижали повыше к верхнему краю экрана (было 15vh) */
    width: 95%;
    max-width: 1100px; /* Сделали контейнер шире (было 800px), чтобы заголовок растянулся по ширине */
    margin: 0 auto;
}

/* Elegant serif heading matching the user's reference image */
.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem; /* Восстановили исходный крупный размер заголовка */
    font-weight: 400;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 2.2rem;
    letter-spacing: -0.015em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); /* Тень для идеальной читаемости поверх видео */
}

/* Premium fully-rounded black button */
.hero-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem; /* Размер шрифта остается комфортным */
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #ffffff;
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1.3rem 2.5rem; /* Увеличили вертикальный отступ для большей высоты кнопки (было 1rem 2.2rem) */
    border-radius: 9999px; /* Полностью скругленная кнопка */
    display: inline-flex;
    align-items: center;
    gap: 0.9rem; /* Увеличили отступ между текстом и точкой */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    outline: none;
}

/* Premium button hover and active states */
.hero-btn:hover {
    background-color: #ffffff; /* При наведении перекрашивается в чисто белый */
    color: #000000; /* Текст становится черным для идеального контраста */
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.hero-btn:active {
    transform: translateY(0);
}

/* Blinking lime-green dot with glowing wave effect */
.blinking-dot {
    width: 10px; /* Увеличили диаметр точки под размер кнопки (было 8px) */
    height: 10px;
    background-color: #4da3ff; /* Яркий салатовый цвет */
    border-radius: 50%;
    position: relative;
    display: inline-block;
    animation: pulse-glow 2s infinite ease-in-out;
}

/* Secondary outer expanding ring/glow */
.blinking-dot::after {
    content: '';
    position: absolute;
    top: -5px; /* Адаптировали под новый размер точки */
    left: -5px;
    right: -5px;
    bottom: -5px;
    background-color: rgba(77, 163, 255, 0.45);
    border-radius: 50%;
    animation: wave-expand 2s infinite ease-in-out;
}

/* Keyframe Animations */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.85);
        box-shadow: 0 0 4px rgba(77, 163, 255, 0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        box-shadow: 0 0 12px rgba(77, 163, 255, 0.9);
    }
}

@keyframes wave-expand {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }
    100% {
        transform: scale(2.3);
        opacity: 0;
    }
}

/* Footer Container: centered vertically at 50vh, with 20px side margins */
.footer-container {
    position: fixed;
    top: 50vh;
    left: 20px;
    right: 20px;
    width: calc(100vw - 40px); /* 20px отступы от боковых краев экрана */
    transform: translateY(-50%); /* Выравниваем ровно по центру экрана */
    z-index: 3; /* Отображается поверх всех остальных слоев */
    display: flex;
    flex-direction: column;
}

/* Layout above the line */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    padding: 0 5px;
}

.footer-title {
    font-family: 'General Sans', -apple-system, sans-serif;
    font-size: 1.4rem; /* Увеличили размер подзаголовков до 1.4rem */
    font-weight: 400; /* Начертание Regular */
    color: #ffffff; /* Чистый белый цвет для обоих подзаголовков */
    letter-spacing: -0.015em;
    margin: 0;
}

/* Убираем все переопределения, оставляя только сброс регистра букв */
.footer-title.quote {
    text-transform: none; /* Убрали принудительные заглавные буквы */
}

/* Semi-transparent white horizontal line */
.footer-divider {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2); /* Полупрозрачная белая линия */
    margin: 1.6rem 0;
    width: 100%;
}

/* Layout below the line */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 5px;
}

/* Social icons on the left */
.footer-socials {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex: 1;
}

.social-icon {
    color: rgba(255, 255, 255, 0.55);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icon:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

/* 4 Anchor links centered */
.footer-links {
    display: flex;
    gap: 2.8rem;
    justify-content: center;
    align-items: center;
    flex: 2;
}

.footer-link {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #ffffff; /* Убрали прозрачность, теперь ссылки чисто белые */
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-link:hover {
    opacity: 0.75; /* Легкая премиальная прозрачность при наведении */
    transform: translateY(-1px); /* Мягкое приподнимание */
}

/* Copyright and company name on the right */
.footer-copyright {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    text-align: right;
    flex: 1;
    letter-spacing: 0.02em;
}

/* Footer Signature Logo: pinned to the very bottom with 20px margins */
.footer-logo-wrap {
    position: fixed;
    bottom: 20px; /* Отступ 20px снизу */
    left: 0;
    right: 0;
    width: 100%;
    padding: 0 20px; /* Боковые отступы ровно 20px */
    box-sizing: border-box; /* Гарантирует точный расчет ширины */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    margin: 0;
}

.footer-logo-text {
    font-family: 'General Sans', -apple-system, sans-serif;
    font-size: 17.2vw; /* Увеличили размер еще сильнее до 21.9vw */
    font-weight: 400; /* Начертание Regular */
    color: #ffffff; /* Белый цвет */
    letter-spacing: -0.03em; /* Межбуквенный интервал */
    margin-right: -0.03em; /* Компенсируем отрицательный интервал последней буквы */
    transform: translateX(-20px); /* Сдвинули заголовок-логотип левее ровно на 20px */
    line-height: 0.8;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    text-align: center;
    width: 100%;
    pointer-events: none; /* Пропускает клики мыши */
    opacity: 0.95;
    text-shadow: none; /* Убрали тень */
    white-space: nowrap; /* Принудительно удерживаем название компании в одну строку */
}

/* Staggered letter-by-letter masked reveal (left to right) */
.footer-logo-text .letter-wrapper {
    display: inline-block;
    overflow: hidden; /* Маска, скрывающая выходящие за ее границы буквы */
    vertical-align: bottom;
    line-height: 0.8;
}

.footer-logo-text .letter-inner {
    display: inline-block;
    opacity: 0;
    transform: translateX(-105%); /* Буква спрятана слева за пределами маски */
    filter: blur(20px); /* Увеличили начальный блюр до 20px для супер-драматичного эффекта */
    animation: letter-reveal-mask 1.2s cubic-bezier(0.05, 0.9, 0.1, 1) forwards; /* Ультра-плавное роскошное замедление */
}

@keyframes letter-reveal-mask {
    0% {
        opacity: 0;
        transform: translateX(-105%);
        filter: blur(20px); /* Начальный блюр 20px */
    }
    25% {
        opacity: 1; /* Быстро делаем букву полностью видимой при появлении */
    }
    100% {
        opacity: 0.95;
        transform: translateX(0); /* Плавный выезд на законное место */
        filter: blur(0); /* Полная резкость в финале */
    }
}

/* Word Masking and Entrance Animation for the Hero Title */
.hero-title .word-wrapper {
    display: inline-block;
    overflow: hidden; /* Маска, скрывающая слова снизу */
    vertical-align: bottom;
    padding-bottom: 0.15em; /* Запас снизу, чтобы хвосты букв (y, p, g) не обрезались */
    margin-bottom: -0.15em;
}

.hero-title .word-inner {
    display: inline-block;
    opacity: 0;
    transform: translateY(105%); /* Начинаем движение снизу за пределами маски */
    filter: blur(20px); /* Глубокий премиальный блюр на старте */
    animation: word-reveal-mask 1.3s cubic-bezier(0.05, 0.9, 0.1, 1) forwards; /* Плавное медленное скольжение вверх */
}

@keyframes word-reveal-mask {
    0% {
        opacity: 0;
        transform: translateY(105%);
        filter: blur(20px);
    }
    30% {
        opacity: 1; /* Быстрый набор видимости */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Встает на свое законное место */
        filter: blur(0); /* Полная резкость */
    }
}

/* Glassmorphism Floating Cursor Card */
.glass-cursor-card {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999; /* Отображается поверх всех слоев */
    pointer-events: none; /* Пропускает все события мыши, чтобы не блокировать клики */
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.08); /* Полупрозрачный белый фон */
    backdrop-filter: blur(12px); /* Размытие фона (эффект матового стекла) */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18); /* Тонкая стеклянная рамка */
    border-radius: 9999px; /* Округлая форма пилюли */
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.15); /* Убрали внешнюю тень, оставили только верхний внутренний блик */
    transform: translate(-50%, -50%) scale(0); /* Центрируем по курсору и скрываем на старте */
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-cursor-card.active {
    opacity: 1;
}

/* Черный стеклянный режим плашки при наведении на кнопку Book a demo */
.glass-cursor-card.dark-mode {
    background: rgba(0, 0, 0, 0.82); /* Глубокий темный стеклянный фон */
    border-color: rgba(255, 255, 255, 0.08); /* Темно-серая стеклянная рамка */
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05); /* Легкий внутренний блик */
}

.cursor-card-text {
    font-family: 'General Sans', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #4da3ff; /* Покрасили в сочный неоновый зеленый цвет (#4da3ff) */
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(77, 163, 255, 0.45); /* Мягкое салатовое свечение */
}

.cursor-card-text .text-white {
    color: #ffffff; /* Первое слово (SAY) красим в чисто белый цвет */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); /* Стандартная четкая тень для белого текста */
}

/* Outlined Cursor Ring */
.cursor-ring-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px; /* Увеличили размер кружка до 48px */
    height: 48px; /* Увеличили размер кружка до 48px */
    border: 1.5px solid rgba(255, 255, 255, 0.45); /* Тонкий белый оутлайн */
    border-radius: 50%;
    z-index: 99998; /* Чуть ниже плашки, но выше всего остального контента */
    pointer-events: none; /* Пропускает все клики */
    transform: translate(-50%, -50%) scale(0); /* Скрыт на старте */
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease;
}

.cursor-ring-outline.active {
    opacity: 1;
}

/* Эффект расширения и затухания кружка при наведении на интерактивные элементы */
.cursor-ring-outline.expanded {
    border-color: rgba(255, 255, 255, 0.15); /* Делаем оутлайн прозрачнее при расширении */
}
