/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;  /* Плавная прокрутка ко всем якорям */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #141413;
    color: #fff;
    
}

/* Контейнер шапки */
.site-header {
    position: relative;
    width: 100%;
    z-index: 150;
}

/* Градиентный фон, который появляется при скролле */
.header-gradient {
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 14rem;
    background-color: #0c0a09;
    pointer-events: none; /*Чтобы можно клацать на кнопочки через градиент*/
    
     background: linear-gradient(
        to bottom,
        rgba(12, 10, 9, 1) 0%,
        rgba(12, 10, 9, 0) 100%
    );

    z-index: 100;
    transition: opacity 0.1s ease;
}

/* При скролле градиент становится видимым */
body.scrolled .header-gradient {
    opacity: 1;
}

.logo  {
    display: none;
    position: fixed;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    letter-spacing: -0.025em;
    z-index: 150;
    text-decoration: none;
    transition: opacity 0.3s ease;
    top: 4rem; /* 64px */
    left: 6rem; /* 96px */
    transform: none; /* Убираем центрирование */
}

/* При скролле скрываем логотип */
body.scrolled .logo {
    opacity: 0;
    pointer-events: none; /* Чтобы нельзя было кликнуть */
}

/* Основная навигация для десктопов */
.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: fixed;
    z-index: 150;
    /*Центрирование в мобильном */
    left: 50%;
    transform: translateX(-50%);
    top: 2.25rem;
    transition: all 0.3s ease;
    
}

/* При скролле навигация превращается в капсулу */
.main-nav.scrolled {
    background-color: rgba(12, 10, 9, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    
    /* Перемещение влево*/
    left: 6rem;
    top: 3rem;
    
    /* Граница для капсулы */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Эффекты при наведении на капсулу */
.main-nav.scrolled:hover {
    background-color: rgba(12, 10, 9, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.main-nav.scrolled .nav-text {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* В капсуле скрываем стрелки */
.main-nav.scrolled .nav-arrow {
    display: none;
}

/* Кнопки навигации */
.nav-btn {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: none;
    border: none;
    transition: all 0.3s ease;
    padding: 0.25rem;
    text-decoration: none;
}

/* Иконки в кнопках навигации */
.nav-icon {
    color: #d6d3d1;
    opacity: 0.8;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Контейнер для содержимого кнопки навигации */
.nav-btn-content {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

/* Текст в кнопках навигации */
.nav-text {
    color: #d6d3d1;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.25rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Стрелка в кнопках навигации */
.nav-arrow {
    transform: translateX(-1rem);
    opacity: 0;
    filter: blur(4px);
    font-family: 'Inter', sans-serif;
    color: #d6d3d1;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Эффекты при наведении (только когда не в капсуле) */
.nav-btn:hover .nav-text {
    text-decoration-color: #d6d3d1;
    text-decoration-style: dotted;
}

.nav-btn:hover .nav-arrow {
    transform: translateX(0);
    opacity: 0.6;
    filter: blur(0);
}

/* Эффекты при наведении в капсуле */
.main-nav.scrolled .nav-btn:hover .nav-icon {
    opacity: 1;
    transform: scale(1.1);
}

.main-nav.scrolled .nav-btn:hover .nav-text {
    opacity: 1;
}


/*Контейнер контента*/
.container {
    position: relative;
    padding-bottom: 5rem;    /* 120px / 16 = 7.5rem */
    padding-left: 1.5rem;        /* 32px / 16 = 2rem */
    padding-right: 1.5rem;
    overflow: hidden;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/*Хиро-блок*/

.hero {
    display: flex;
    position: relative;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 5rem;
    z-index: 50;
    padding-bottom: 3rem;
}
.hero-scope {
    position: relative;
    overflow: hidden;
}

.hero-scope::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;

    background-image:
        /* диагонали */
        repeating-linear-gradient(
            60deg,
            rgba(255,255,255,0.04) 0,
            rgba(255,255,255,0.04) 1px,
            transparent 1px,
            transparent 32px
        ),
        repeating-linear-gradient(
            -60deg,
            rgba(255,255,255,0.04) 0,
            rgba(255,255,255,0.04) 1px,
            transparent 1px,
            transparent 32px
        ),
        /* вертикали */
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.035) 0,
            rgba(255,255,255,0.035) 1px,
            transparent 1px,
            transparent 32px
        );

    opacity: 0.5;
    
    /* плавное исчезновение вниз (по желанию) */
    mask-image: linear-gradient(
        to bottom,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,1) 70%,
        rgba(0,0,0,0) 100%
    );
}

.hero-text h1{
    font-size: 2.2rem; 
    line-height: 2.8rem;
    transition: all 0.3s ease;
}

.hero-text p{
    font-size: 0.8125rem; /* 15px / 16 = 0.9375rem */
    transition: all 0.3s ease;
    margin-top: 1rem
}

.buttons-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
}

.butt-hero {
    display: flex;
    justify-content: center;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    color: white;
    font-family: monospace;
    font-size: 12px;
}

.butt-hero:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.butt-hero-full-width {
    grid-column: span 2; /* ЗАНИМАЕТ 2 КОЛОНКИ! */
}


/*Блок услуг*/

.service {
    padding-left: 0rem;
    padding-right: 0rem;
    padding-bottom: 3rem;
}

.service h1{
    font-size: 2.2rem; 
    line-height: 2.8rem; 
}


.service-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    position: relative;
    background: #0c0c0c;
    padding: 1.5rem;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    overflow: hidden;
    transition: transform .3s ease, border-color .3s ease;
}

.service-card:hover {
  transform: scale(1.02);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 10px 30px rgba(237, 245, 252, 0.1); /*Белая подсветка*/
}

.a123 {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.service-card-text {
    font-size: 0.9rem;
    font-family: monospace;
    margin-bottom: 1.5rem;
     height: 70px;    
}

.price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
}

.service-icon {
    opacity: 0.8;
    font-size: 2rem;
}

.open-modal {
    display: inline-flex;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
    justify-content: center;
    padding: 8px 20px;
    background: transparent;
    transition: all 0.3s ease;
    color: white;
    border-radius: 9999px;
    font-family: monospace;
    text-decoration: none;
    font-size: 14px;
}

.open-modal:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.10);
}

/*ABOUT*/

.about {
    padding-left: 0rem;
    padding-right: 0rem;
    
}

.about h1 {
    font-size: 2.2rem; 
    line-height: 2.8rem;
}

.about p {
    line-height: 1.5em;
}

.about-content {
    margin-top: 1.5rem;
    max-width: 800px;
}

.ab-bt-cont {
    display: flex;
    margin-top: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-butt {
    display: flex;
    border: 2px solid rgba(255,255,255,0.1);
    justify-content: center;
    padding: 8px 20px;
    background: transparent;
    transition: all 0.3s ease;
    color: white;
    border-radius: 9999px;
    font-family: monospace;
    text-decoration: none;
    font-size: 12px;
    gap: 1rem;
    align-items: center;
}

.about-butt:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.10);
}

footer {
    margin: 2rem;
    text-align: center;
    opacity: 0.5;
    font-size: 12px;
    
    
}

/* МОДАЛЬНОЕ ОКНО */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
    overflow-y: auto; /* Прокрутка при больших окнах */
  padding: 50px 20px; /* Отступ сверху и по бокам */
}

/* активное состояние */
.modal.active {
    display: flex;
    align-items: flex-start;     /* вертикальный центр */
    justify-content: center;  /* горизонтальный центр */
}

/* затемнение */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: -1; /* Чтобы окно было поверх */
}

/* окно */
.modal-window {
    position: relative;      /* или static */
    width: min(600px, 90%);
    background: #252525;
    border-radius: 1rem;
    padding: 2rem;
    color: white;
    overflow: visible;
    opacity: 0;
    transform: scale(.95);
    transition: .25s ease;
}

.modal-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.price-modal {
    font-size: 16px;
    margin: 0.5rem 0rem 2rem 0rem;
    font-weight: 900;
    opacity: 0.65;
}

.modal-close {
    cursor: pointer;
    display: flex;
    background: transparent;
    color: white;
    border: none;
    opacity: 0.5;
    font-size: 2.5rem;
    height: 100%;
}
.modal-close:hover {
    opacity: 1;
}

.modal-window-content{
    display: flex;
    font-size: 1rem;
    font-family: sans-serif;
    flex-direction: column;
    gap: 1.5rem;
    line-height: 1.5em;
    
}

.modal-window-content ul {
    margin-left: 2rem;
}
.modal-window-content ol {
    margin-left: 2rem;
}

.ol-li-modal {
    margin-bottom: 1rem;
}

.modal-window-content li p{
    margin-top: 0.2rem;
    opacity: 0.9;
}

.mdlpwarn {
    align-content: center;
    border: 2px solid rgba(255,255,255,0.1);
    padding: 8px 20px;
    border-radius: 10px;
    text-align: center;
    font-family: monospace;
    font-size: 1rem;
}
.modal-wind-button {
    display: flex;
    border: 2px solid rgba(255,255,255,0.1);
    justify-content: center;
    padding: 8px 20px;
    background: transparent;
    transition: all 0.3s ease;
    color: white;
    border-radius: 9999px;
    font-family: monospace;
    text-decoration: none;
    font-size: 14px;
    margin-top: 2rem;
}

.modal-wind-button:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.10);
}

/* анимация появления */
.modal.active .modal-window {
  opacity: 1;
  transform: scale(1);
}




/* Медиа-запросы для адаптивности */

/* Для экранов больше 1024px (Компьютеры) */
@media (min-width: 1024px) {
    .main-nav {
        display: flex;
        left: 20rem;
        top: 4rem;
        transform: none;
    }
    
    .logo {
        display: flex;
    }
    .container {
       /* 15rem */
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 7.5rem;
    }
    
    .hero { 
        margin-top: 14rem;
        padding-bottom: 14rem;
    }
    
    .hero-text h1{
    font-size: 3.4rem; 
    line-height: 4.5rem; 
}
    
    .hero-text p{
    font-size: 1rem; /* 15px / 16 = 0.9375rem */
}
    
    .buttons-hero {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        width: auto;
    }
    
     .butt-hero-full-width {
        grid-column: auto; /* Отменяем растяжение */
    }
    
    .service {
    padding-left: 6rem;
    padding-right: 6rem;
    padding-bottom: 6rem;
}
    
       .about{
    padding-left: 6rem;
    padding-right: 6rem;
}
    
    .service-grid{
    grid-template-columns: 1fr 1fr 1fr;
}
    .service h1{
    font-size: 3.4rem; 
    line-height: 4.5rem; 
}
    
    .about h1{
    font-size: 3.4rem; 
    line-height: 4.5rem; 
}
    }

/* Для экранов меньше 1024px (Мобильное) */
@media (max-width: 1023px) {
    .site-header {
        padding-top: 5rem;
    }
    
    /* На мобильных не показываем капсулу */
    .main-nav.scrolled {
        display: none;
    }
    
     .main-nav {
    gap: 1rem;
    top: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav-btn {
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
  }

  .nav-icon {
    font-size: 1.25rem;
    opacity: 1;
  }

  .nav-text {
    font-size: 0.875rem; /* 14px */
  }

 .service-card-text {
    height: auto;
  }

    .header-gradient {
    background: linear-gradient(
        to bottom,
        rgba(12, 10, 9, 1) 0%,
        rgba(12, 10, 9, 1) 30px,
        rgba(12, 10, 9, 0.9) 60px,
        rgba(12, 10, 9, 0.7) 90px,
        rgba(12, 10, 9, 0.5) 120px,
        rgba(12, 10, 9, 0.3) 150px,
        rgba(12, 10, 9, 0) 100%
    );
    }
    
    .nav-arrow {
    display: none;
    }
}