/* ===========================================
   HERO BLOCK STYLES - Объединённые и очищенные
   =========================================== */

/* Базовые стили hero секции */
.hero {
    position: relative;
    width: 100vw;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background-color: #ffffff;
    overflow: hidden;
    background-image: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Фоновый контейнер для Spline */
.spline-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh;
    z-index: 0;
    overflow: hidden;
    background-color: #ffffff;
    display: block;
}

.spline-background spline-viewer {
    width: 200%;
    height: 100vh;
    transform-origin: left center;
    transform: scale(1.35) translateX(-60vw);
    z-index: 0;
}

/* Скрытие водяного знака Spline */
::part(watermark),
::shadow-part(watermark) {
    display: none !important;
}

spline-viewer {
    --watermark-display: none;
}

.spline-background iframe {
    display: none;
}

/* Контентная область hero */
.hero__content {
    position: relative;
    z-index: 999;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    transform: translateZ(0);
    padding-top: 8vh;
}

.content-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: relative;
    text-align: left;
    margin: 0 auto;
    transform: translateX(60px) translateY(-140px);
}

/* Заголовок h1 */
h1 {
    font-family: 'Gilroy', sans-serif;
    font-size: 78px;
    line-height: 0.9;
    margin: 0;
    padding: 0;
    font-weight: 400;
    text-transform: uppercase;
    color: #1a1a1a;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-direction: row;
}

h1 span {
    display: block;
    text-align: left;
    margin-left: 0;
}

/* Стили для AI текста */
h1 .ai-text {
    color: #FF6B00;
    font-size: 300px;
    font-weight: 400;
    line-height: 0.9;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    transform: translateX(-280px) translateY(250px);
}

/* Контейнер для правой части заголовка */
h1 .title-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    justify-content: flex-start;
    margin-left: 0;
}

/* Стили для остального текста */
h1 .mobile-text {
    color: #FF6B00;
    font-size: 82px;
    font-weight: 400;
    line-height: 0.9;
    margin-left: 0;
    margin-bottom: 0;
}

h1 .app-text,
h1 .flutter-text {
    color: #1a1a1a;
    font-size: 82px;
    font-weight: 400;
    line-height: 0.9;
    margin-left: 0;
    margin-bottom: 0;
}

/* Правый блок с описанием - больше не используется */
.text-right {
    display: none;
}

p {
    font-family: 'Gilroy', sans-serif;
    font-size: 22px;
    line-height: 1.4;
    color: #333333;
    margin: 0;
    text-align: left;
    width: 100%;
}

/* Описание под заголовком */
.hero-description {
    font-size: 22px;
    line-height: 1.4;
    color: #333333;
    margin: 50px 0 0 0;
    text-align: left;
    max-width: 360px;
    width: 100%;
    margin-left: 0;
    display: block;
    position: relative;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Кнопка CTA */
.hero__content .cta-button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
    margin-top: 28px;
    min-width: 200px;
    width: fit-content;
    font-size: 16px;
    font-weight: 600;
    background-color: #FF6B00;
    letter-spacing: 0.02em;
    position: static;
    text-align: center;
    padding-left: 40px;
    padding-right: 40px;
}

.hero__content .cta-button:focus,
.hero .cta-button:focus {
    outline: none !important;
    border: none !important;
    box-shadow: 0 6px 12px rgba(255, 107, 0, 0.2) !important;
}

.hero__content .cta-button:hover,
.hero .cta-button:hover {
    outline: none !important;
    border: none !important;
}

.hero__content .cta-button:focus-visible,
.hero .cta-button:focus-visible {
    outline: none !important;
    border: none !important;
}

/* Оптимизация для мобильных устройств */
.mobile-view .hero {
    -webkit-overflow-scrolling: touch;
    will-change: transform;
    touch-action: pan-y;
}

/* Fix для Safari mobile */
@supports (-webkit-touch-callout: none) {
    .mobile-view .hero {
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }
}

/* ===========================================
   МЕДИА-ЗАПРОСЫ - ПРОПОРЦИОНАЛЬНАЯ АДАПТИВНОСТЬ
   =========================================== */

/* Большие экраны (1400px+): стандартная высота */
@media (min-width: 1401px) {
    .spline-background {
        height: 100vh;
    }
}

/* Средне-большие экраны (1200-1400px): небольшое увеличение высоты */
@media (max-width: 1400px) and (min-width: 1201px) {
    .hero {
        height: calc(75vh + 5vw);
        min-height: 85vh;
        max-height: 110vh;
        background-size: 220% auto;
        background-position: left top;
    }
    .spline-background {
        height: calc(100vh + 5vw);
        min-height: 100vh;
        max-height: 110vh;
    }
    .hero__content {
        padding-left: 60px;
        max-width: 1100px;
    }
    .hero-description {
        max-width: 360px;
    }
}

/* Десктоп средний (1000-1200px): пропорциональное увеличение */
@media (max-width: 1200px) and (min-width: 1001px) {
    body, .hero {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative;
    }
    .hero {
        width: 100vw !important;
        overflow-x: hidden !important;
    }
    .spline-background {
        width: 100vw !important;
        left: 0;
        overflow-x: hidden !important;
    }
    .spline-background spline-viewer {
        width: 120vw !important;
        transform-origin: left center;
        transform: scale(1.1) translateX(-10vw);
        min-width: 100vw;
    }
    
    .hero__content {
        padding-left: 115px;
        padding-top: 0;
        max-width: 900px;
        margin-left: 4vw;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        transform: translateY(-10%) translateX(5%);
    }

    .content-group {
        gap: 0;
        transform: translateX(40px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        height: 100%;
    }

    h1 {
        font-size: 64px;
        white-space: nowrap;
    }

    h1 span {
        margin-left: 0;
    }

    .text-right {
        margin-left: 0;
        width: 400px;
    }

    p {
        font-size: 20px;
    }

    .hero .cta-button {
        margin-left: 0;
    }

    .hero-description {
        margin-left: 0;
        font-size: 20px;
        max-width: 360px;
    }
}

/* Адаптивы для экранов меньше 1064px */
@media (max-width: 1064px) and (min-width: 1001px) {
    .hero {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
    
    .spline-background {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
    }
    
    .hero__content {
        padding: 20px;
        padding-top: 0;
        max-width: 900px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        transform: translateY(-10%) translateX(5%);
    }

    .content-group {
        gap: 0;
        transform: translateX(40px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        height: 100%;
    }

    h1 {
        font-size: 60px;
        white-space: nowrap;
    }

    h1 span {
        margin-left: 0;
    }

    .hero-description {
        margin-left: 0;
        font-size: 18px;
        max-width: 550px;
    }

    .hero .cta-button {
        margin-left: 0;
    }
}

@media (min-width: 800px) and (max-width: 1064px) {
    h1 {
        font-size: 62px;
    }
    
    h1 .mobile-text,
    h1 .app-text,
    h1 .flutter-text {
        font-size: 62px;
    }
    
    h1 .ai-text {
        font-size: 224px;
        transform: translateX(-220px) translateY(186px);
    }
}

/* Планшет большой (800-1000px): больше высоты */
@media (max-width: 1000px) and (min-width: 801px) {
    .hero {
        height: calc(60vh + 12vw);
        max-height: 120vh;
        background-size: 300% auto;
        background-position: left top;
    }
    .spline-background {
        height: calc(100vh + 12vw);
        min-height: 110vh;
        max-height: 120vh;
    }
    
    .hero__content {
        padding: 28px;
        padding-top: calc(8vh + 50px);
        max-width: 800px;
        margin-left: 0;
        padding-left: 16px;
        padding-right: 16px;
    }

    .content-group {
        gap: 0;
    }

    h1 {
        font-size: 64px;
    }

    h1 span {
        margin-left: 0;
        font-size: 58px;
        white-space: nowrap;
    }

    .hero-description {
        margin-left: 0;
        font-size: 19px;
        max-width: 550px;
    }

    .hero .cta-button {
        margin-left: 0;
    }
}

/* Планшет средний (600-800px): значительное увеличение высоты */
@media (max-width: 800px) and (min-width: 601px) {
    .hero {
        min-height: 640px;
        max-height: 800px;
        background-size: 350% auto;
        background-position: left top;
    }
    .spline-background {
        height: calc(100vh + 18vw);
        min-height: 115vh;
        max-height: 130vh;
    }
    
    .hero__content {
        padding: 26px;
        padding-top: calc(8vh + 50px);
        max-width: 700px;
        box-sizing: border-box;
    }
    
    .content-group {
        gap: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .text-right {
        margin-left: 0 !important;
        width: 100%;
        order: 2;
    }

    h1 {
        font-size: 42px !important;
        line-height: 1.1;
        margin-bottom: 16px;
    }

    h1 span {
        margin-left: 0;
    }
    
    h1 .mobile-text,
    h1 .app-text,
    h1 .flutter-text {
        font-size: 42px;
    }
    
    h1 .ai-text {
        font-size: 150px;
        transform: translateX(-140px) translateY(126px);
    }

    .hero-description {
        margin-left: 0;
        font-size: 16px;
        max-width: 360px !important;
        margin-top: 16px;
        padding-right: 20px;
    }

    .hero .cta-button {
        margin-left: 0;
        margin-top: 20px;
    }
}

/* Общее правило для скрытия 3D анимации на экранах 600px и меньше */
/* ВАЖНО: размещаем ДО специфичных медиа-запросов */
@media (max-width: 600px) {
    .spline-background,
    .spline-background spline-viewer,
    spline-viewer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .hero {
        min-height: 100vh;
        height: 100vh;
    }
    .spline-background {
        width: 100vw;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        left: 0;
        top: 0;
        background: none;
        opacity: 1;
        display: block;
    }
    .spline-background spline-viewer {
        width: 200vw;
        height: 100vh;
        transform-origin: left center;
        transform: scale(1) translateX(calc(-80vw + 250px));
        display: block;
        visibility: visible;
        opacity: 1;
    }
    .hero__content {
        padding-top: 1vh;
        padding-bottom: 1vh;
        margin-left: -110px !important;
    }
    .hero h1 {
        font-size: 32px;
        line-height: 1.05;
    }
    
    h1 .mobile-text,
    h1 .app-text,
    h1 .flutter-text {
        font-size: 32px;
    }
    
    h1 .ai-text {
        font-size: 120px;
        position: absolute;
        transform: translateX(-110px) translateY(40px);
    }
    .hero-description {
        font-size: 4vw;
        margin-top: 12px;
        margin-bottom: 12px;
        max-width: 280px !important;
    }
    .hero__content .cta-button {
        min-width: unset;
        width: 100%;
        font-size: 16px;
        height: 44px;
        padding-left: 0;
        padding-right: 0;
        margin-top: 16px;
        margin-bottom: 0;
    }
    .hero__content h1[itemprop="headline"] span {
        display: inline;
    }
    .hero__content h1[itemprop="headline"] {
        font-size: 38px;
        line-height: 1.08;
        word-break: break-word;
        white-space: pre-line;
    }
}

/* Мобильный большой (480-600px): максимальная адаптация */
@media (max-width: 600px) and (min-width: 481px) {
    .hero {
        height: 660px; /* Фиксированная высота 100vh */
        min-height: 0;
        max-height: 100vh;
    }
    .spline-background {
        height: calc(100vh + 25vw);
        min-height: 120vh;
        max-height: 140vh;
        opacity: 0.8;
        display: none; /* Скрываем 3D анимацию */
    }

    .spline-background spline-viewer {
        width: 150%;
        height: 110%;
        transform-origin: center center;
        transform: scale(1.1);
        display: none; /* Скрываем 3D анимацию */
    }
    
    .hero__content {
        padding: 24px;
        padding-top: calc(8vh + 50px);
        width: 100%;
        box-sizing: border-box;
        margin-left: -50px !important;
    }
    
    .text-container {
        grid-template-columns: 1fr;
        gap: 24px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 8px;
    }

    .text-left {
        width: 100%;
        padding-left: 0;
    }

    h1 {
        font-size: 38px !important;
        line-height: 1.1;
        margin-bottom: 16px;
    }

    h1 span {
        margin-left: 0;
    }
    
    h1 .ai-text {
        font-size: 120px;
        position: absolute;
        transform: translateX(-110px) translateY(40px);
    }

    p {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .hero-description {
        margin-left: 0;
        font-size: 14px;
        max-width: 280px !important;
        margin-top: 16px;
        padding-right: 8px;
    }

    .hero .cta-button {
        margin-left: 0;
        width: auto;
        min-width: 200px;
        margin-top: 20px;
        padding: 0 24px;
    }
}

/* Для экранов от 340px до 500px - скрываем верхний AI */
@media (max-width: 500px) and (min-width: 340px) {
    .hero-title-desktop .mobile-text::before {
        content: "AI ";
        color: #FF6B00;
    }
    .hero-title-mobile .ai-text-mobile {
        display: none !important;
    }
}

/* Для экранов от 481px до 500px - смещаем контент на 60px влево */
@media (max-width: 500px) and (min-width: 481px) {
    .hero__content {
        margin-left: -110px !important;
    }
    .hero-title-desktop .mobile-text::before {
        content: "AI ";
        color: #FF6B00;
    }
}

/* Для экранов шире 500px - скрываем AI в мобильном заголовке */
@media (min-width: 501px) {
    .hero-title-mobile .ai-text-mobile {
        display: none !important;
    }
}

/* Для экранов от 501px до 600px - возвращаем размер шрифта 48px и исходное позиционирование */
@media (max-width: 600px) and (min-width: 501px) {
    h1 {
        font-size: 48px !important;
        line-height: 1.1;
        margin-bottom: 16px;
    }
    .hero__content {
        margin-left: -50px !important;
    }
    .hero-description {
        margin-top: -50px !important;
    }
}

/* Мобильный стандартный (360-480px): компактная высота с достаточным местом */
@media (max-width: 480px) and (min-width: 361px) {   
    .hero {
        height: 540px;
        min-height: 0;
        max-height: 100vh;
        background-size: 500% auto;
        background-position: left top;
        background-repeat: no-repeat;
    }
    .spline-background {
        height: calc(100vh + 30vw);
        min-height: 125vh;
        max-height: 145vh;
        opacity: 0.5;
        display: none; /* Скрываем 3D анимацию */
    }

    .spline-background spline-viewer {
        width: 180%;
        height: 100%;
        transform-origin: left center;
        transform: scale(0.9);
        display: block;
        visibility: visible;
        display: none; /* Скрываем 3D анимацию */
    }

    .hero__content {
        padding: 20px;
        padding-top: calc(8vh + 50px);
        width: 100%;
        box-sizing: border-box;
        margin-left: -110px !important;
    }

    .content-group {
        gap: 0;
        padding: 0 8px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    h1 {
        font-size: 38px !important;
        line-height: 1.1 !important;
        margin-bottom: 16px;
    }

    h1 span {
        margin-left: 0;
    }
    
    h1 .ai-text {
        font-size: 120px;
        position: absolute;
        transform: translateX(-110px) translateY(40px);
    }

    p {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 18px;
    }

    .hero .cta-button {
        width: auto;
        min-width: 180px;
        margin-left: 0;
        padding: 0 20px;
        height: 44px;
        font-size: 14px;
        margin-top: 18px;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.4;
        margin-top: 12px;
        margin-left: 0;
        max-width: 280px !important;
        padding-right: 8px;
    }
}

/* Малый мобильный (до 360px): максимальная высота для маленьких экранов */
@media (max-width: 360px) {
    .hero {
        height: 600px; /* Фиксированная высота 100vh */
        min-height: 0;
        max-height: 100vh;
    }
    .spline-background {
        height: calc(100vh + 35vw);
        min-height: 130vh;
        max-height: 150vh;
        opacity: 0.4;
        display: none; /* Скрываем 3D анимацию */
    }

    .spline-background spline-viewer {
        width: 200%;
        height: 100%;
        transform-origin: left center;
        transform: scale(0.8);
        display: none; /* Скрываем 3D анимацию */
    }
    
    .hero__content {
        padding: 16px;
        padding-top: calc(8vh + 50px);
        width: 100%;
        box-sizing: border-box;
        margin-left: -110px !important;
    }

    h1 {
        font-size: 32px !important;
        line-height: 1.1;
    }

    h1 span {
        margin-left: 0;
    }
    
    h1 .ai-text {
        font-size: 120px;
        position: absolute;
        transform: translateX(-110px) translateY(40px);
    }
    
    .hero-description {
        margin-left: 0;
        font-size: 15px;
        line-height: 1.4;
        margin-bottom: 12px;
        max-width: 280px;
        padding-right: 4px;
        margin-top: 30px;
    }

    p {
        font-size: 14px;
        line-height: 1.4;
    }

    .hero .cta-button {
        margin-left: 0;
        min-width: 210px;
        height: 42px;
        font-size: 13px;
        margin-top: 16px;
    }
}

/* Ландшафтная ориентация на низких экранах */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 100vh;
    }

    .spline-background {
        height: 100vh;
    }

    .hero__content {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    h1 {
        font-size: 46px;
    }

    h1 span {
        margin-left: 0;
    }

    .content-group {
        gap: 0;
    }

    p {
        font-size: 16px;
    }

    .spline-background spline-viewer {
        width: 120%;
        height: 120%;
        transform-origin: left center;
    }
}

/* ===========================================
   АДАПТИВНЫЕ ОТСТУПЫ ДЛЯ CONTENT-WRAPPER - УБРАНЫ
   =========================================== */

/* Отступы убраны, так как hero блок теперь не фиксирован */

/* Общее правило для скрытия 3D анимации на экранах 600px и меньше */
@media (max-width: 600px) {
    .spline-background,
    .spline-background spline-viewer,
    spline-viewer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .hero {
        width: 100vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        background-color: #ffffff;
        background-image: none;
        overflow: hidden;
    }
    .spline-background {
        width: 100vw;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        left: 0;
        top: 0;
        background: none;
        opacity: 1;
        display: block;
    }
    .spline-background spline-viewer {
        width: 200vw;
        height: 100vh;
        transform-origin: left center;
        transform: scale(1) translateX(calc(-80vw + 250px));
        display: block;
        visibility: visible;
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .hero {
        background-position: left center !important;
        height: 600px !important;
    }
    .spline-background spline-viewer {
        width: 220vw;
        transform: scale(1) translateX(calc(-100vw + 250px));
    }
}

.hero__background {
    display: block;
}

/* Для всех экранов до 1600px — одинаковые отступы слева и справа */
@media (max-width: 1600px) {
  .hero__content {
    max-width: 1200px;
    margin-left: 0;
    margin-right: 0;
    padding-left: max(120px, 8vw);
    padding-right: 40px;
  }
  .hero-description {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    max-width: 600px;
  }
  .hero__content .cta-button {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Для мобильных устройств — чуть меньше отступы */
@media (max-width: 800px) {
  .hero__content {
    padding: 0 12px;
    padding-top: 4vh;
  }
}

@media (min-width: 1601px) {
  .hero__content {
    max-width: 1400px;
  }
  .hero-description {
    max-width: 700px;
  }
}

.hero__content h1, .hero__content .headline, .hero__content h1[itemprop="headline"] {
    font-size: 88px;
    line-height: 1.05;
}

.hero-title-mobile {
  display: none;
}
.hero-title-desktop {
  display: block;
}
@media (max-width: 500px) {
  .hero-title-desktop {
    display: none !important;
  }
  .hero-title-mobile {
    display: block !important;
    font-size: 32px;
    line-height: 1.0;
    text-align: left;
    text-transform: uppercase;
    color: #1a1a1a;
    font-family: 'Gilroy', sans-serif;
    font-weight: 400;
    margin: 0 !important;
    padding: 0 !important;
    word-break: break-word;
    white-space: pre-line;
  }
  .hero-title-mobile span {
    margin: 0 !important;
    padding: 0 !important;
    display: block;
  }
  .hero-title-mobile br {
    display: none;
  }
  .hero-title-mobile .mobile-orange {
    color: #FF6B00;
  }
  .hero-title-mobile .ai-text-mobile {
    color: #FF6B00;
    font-size: 32px;
    font-weight: 400;
    line-height: 0.9;
    display: block;
    margin-bottom: 5px;
  }
} 