/* === Сброс стилей === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Глобальные переменные === */
:root {
  /* === Цвета === */
  --orange: #fd9c2b;
  --soft-orange: #fab47e;
  --middle-orange: #fad3b9;
  --light-orange: #fce8da;
  --web-orange: #fef7ee;
  /* === === */
  --violet: #4f42e4;
  --soft-violet: #7a70eb;
  --middle-violet: #a69ff1;
  --light-violet: #cdc9f7;
  --web-violet: #ebeafc;
  /* === === */
  --neon: #c7df44;
  --soft-neon: #d1e668;
  --middle-neon: #e1ef9e;
  --light-neon: #eaf4bd;
  --web-neon: #f9fce8;
  /* === === */
  --graphite: #292e3c;
  --soft-graphite: #5a5e6d;
  --middle-graphite: #cdccdb;
  --light-graphite: #f0effc;
  --web-graphite: #f5f4fd;
  /* === === */
  --white: #ffffff;
  --dark-white: #f4f4f4;
  /* === === */
  --text: #000000;
  --white-text: #ffffff;
  --light-text: #1f2937;

  /* === ШРИФТОВЫЕ ПЕРЕМЕННЫЕ === */

  /* 1. ВЕСА ШРИФТА */
  --fw-light: 300;      /* 🪶 Очень тонкий */
  --fw-regular: 400;    /* 📄 Обычный */
  --fw-medium: 500;     /* ➕ Средний */
  --fw-bold: 700;       /* 🟦 Жирный */
  --fw-black: 900;      /* 🔥 Максимум */
  --fw-extrabold: 950;  /* ⚡ Экстра */

  /* 2. РАЗМЕРЫ */
  --fs-xxl: 72px;
  --fs-xl: 56px;
  --fs-large: 40px;
  --fs-mid: 24px;
  --fs-base: 18px;
  --fs-smal: 16px;
  --fs-xs: 14px;
  --fs-xxs: 12px;

  /* 3. СТИЛЬ */
  --fs-italic: italic;     /* 📖 Курсив */
  --fs-oblique: oblique;   /* ↘️ Наклон */

  /* 4. РАСТЯЖЕНИЕ */
  --fs-normal: normal;         /* ➖ Нормальная ширина */
  --fs-condensed: condensed;   /* ➰ Сжатый */
  --fs-expanded: expanded;     /* ➕ Растянутый */

  /* 5. МЕЖБУКВЕННЫЙ ИНТЕРВАЛ */
  --ls-none: 0;           /*   Без промежутков */
  --ls-tight: -0.05em;    /*  Узкий */
  --ls-normal: 0.02em;    /*  Стандарт */
  --ls-wide: 0.1em;       /*  Широкий */

  /* 6. ВЫСОТА СТРОКИ */
  --lh-tight: 1.2;     /* 📦 Компактная */
  --lh-normal: 1.5;    /* 📖 Стандартная */
  --lh-loose: 1.8;     /* 🌬️ Воздушная */

  /* 7. СЕМЕЙСТВА ШРИФТОВ */
  --ff-primary: 'Source Sans 3', sans-serif;    /* 🌐 Основной */
  --ff-heading: 'Source Sans 3', sans-serif;    /* 🏷️ Заголовки */
  --ff-mono: 'Roboto Mono', monospace;          /* 💻 Код */

  /* === Размеры === */
  --container-width: 1400px;
  --content-width: 1250px;
  --container-padding: 2rem;
  --gap: 2rem;
  --radius-xl: 50px;
  --radius-md: 10px;

  /* === Отступы === */
  --pad-section: 100px;
  --pad-mini: 60px 0;
}

/* === Базовые стили === */
html { 
    scroll-padding-top: 95px; /* высота твоего хедера */
}

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--dark-white);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  scroll-behavior: smooth;

  main {
    margin-top: 98px;
    margin-bottom: 7.5px;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  h5 {
    font-size: 38px;
    font-weight: 900;
    color: var(--graphite);
    letter-spacing: -1px;
    line-height: 1.2;
  }

  h1 {
    font-size: 56px;
    font-weight: 1000;
    color: var(--graphite);
    letter-spacing: -1px;
    line-height: 1.2;
  }

  h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--graphite);
    letter-spacing: -1px;
    line-height: 1.2;
  }

  h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--graphite);
    letter-spacing: -1px;
    line-height: 1.2;
  }

  p {
    font-size: 18px;
    font-weight: 500;
    color: var(--graphite);
    letter-spacing: 0px;
    line-height: 1.2;
  }

  /* === Блоки и контейнеры универсальные === */
  .block {
    min-height: 100px;
    background-color: var(--white);
    width: 100%;
    margin: 15px auto;
    max-width: 1370px;
    border-radius: 25px;
    border: 10px solid var(--white);
    display: flex;
    flex-direction: column;
  }

  .auto-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    box-sizing: border-box;
    background-color: var(--white);
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    padding: 50px;
    margin: 0;
    flex: 1;
  }
}

/* === Хедер === */
.home-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  max-width: 1384px;
  width: 100%;
  margin: 15px auto;
  gap: 1.5rem;
  max-height: 50px;
  background-color: var(--white);
  border: 8px solid var(--white);
  border-radius: 25px;
  padding: 0 12px;
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.10),
    0 16px 40px rgba(15, 23, 42, 0.10);
  z-index: 9999;

  .logo-container {
    a {
      display: flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;

      img {
        height: 47px;
        width: auto;
        flex-shrink: 0;
      }

      h5 {
        margin: 0;
        white-space: nowrap;
      }
    }
  }

  nav {
    ul {
      display: flex;
      list-style: none;
      gap: 1.5rem;
      margin: 0;
      padding: 0;
      justify-content: center;
    }
  }

  button {
    background-color: #6b7182;
    border: 3px solid #6b7182;
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;

    &:hover {
      background-color: #5A6175;
      border: 3px solid #5A6175;
    }

    p {
      color: var(--dark-white);
      margin: 0;
      font-size: 16px;
    }
  }
}

/* === Херо блок === */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: 0;

  .hero-text {
    h3 {
      margin: 10px 0 60px 0;
      line-height: 1.15;
    }
  }

  .buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;

    .btn {
      display: inline-block;
      border-radius: var(--radius-md);
      text-align: center;
      width: 100%;
      max-width: 400px;

      &:hover {
        transform: scale(1.05);
        transition: transform 0.6s ease;
      }

      &:not(:hover) {
        transition: transform 0.4s ease;
      }
    }

    .btn2 {
      display: inline-block;
      border-radius: var(--radius-md);
      text-align: center;
      width: 100%;
      max-width: 400px;

      &:hover {
        transform: scale(1.05);
        transition: transform 0.6s ease;
        border: 3px solid var(--soft-violet);
      }

      &:not(:hover) {
        transition: transform 0.4s ease;
      }
    }
    

    .btn-primary {
      background: var(--white);
      border: 3px solid var(--graphite);
      padding: 36px 0;
    }

    .btn-secondary {
      background: var(--web-violet);
      border: 3px solid var(--middle-violet);
      padding: 20px 0;
    }
  }
}

.hero-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  
  img {
    max-width: 550px;
    height: auto;
    display: block;
    animation: pulse 2s ease-in-out infinite;
    transition: transform 0.6s ease;
    
    &:hover {
      transform: scale(1.05);
      animation-play-state: paused;
    }
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
/* ====================== */

/* === Статистика === */
.stats-content {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  flex: 1;

  .cont {
    text-align: center;
    padding: 2rem;
    background: var(--web-violet);
    border: 3px solid var(--middle-violet);
    border-radius: 20px;
    flex: 1;                           /* ← РАВНАЯ ширина */
    display: flex;                     /* ← Flex внутри */
    flex-direction: column;            /* ← Вертикально */
    justify-content: center;           /* ← Центр по высоте */
    align-items: center;

    &:hover {
      transform: scale(1.035);
      transition: transform 0.6s ease;
      border: 3px solid var(--soft-violet);
    }

    &:not(:hover) {
      transition: transform 0.4s ease;
    }

    .stats {
      flex: 1;
      text-align: center;
      pointer-events: none;

      .number {
        color: var(--color-text);
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        justify-content: center;
      }

      .label {
        line-height: 1.4;
      }
    }
  }
}

/* === Как это работает? === */
.how-it-works-content {
  width: 100%;
  text-align: center;

  h1 {
    margin-bottom: 64px;
  }

  .how-it-works-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
    box-sizing: border-box;
    margin: 0 auto 2rem;

    .work-step {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      text-align: left;
      gap: 1rem;

      .num-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        width: 100%;
        justify-content: flex-start;

        .num {
          width: 64px;
          height: 64px;
          background: var(--web-neon);
          border: 3px solid var(--middle-neon);
          border-radius: 17px;
          display: flex;
          align-items: center;
          justify-content: center;
          flex-shrink: 0;

          h2 {
            margin: 0;
            line-height: 1;
          }
        }

        .num-line {
          flex: 1;
          max-width: 290px;
          margin-left: 10px;
          height: 6px;
          background: linear-gradient(90deg, var(--web-neon) 0%, var(--middle-neon) 100%);
          border-radius: 10px;
        }
      }

      .text-container {
        width: 100%;
        text-align: left;

        h3 {
          font-weight: 700;
          color: var(--light-text);
          margin-bottom: 0.8rem;
          line-height: 1.3;
          text-align: left;
        }

        p {
          margin: 0;
          line-height: 1.5;
          text-align: left;
        }
      }
    }
  }
}

/* === Преимущества === */
.advantages-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  flex: 1;

  .advantages-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
    box-sizing: border-box;
    margin: 0 auto;

    .advantages {
      display: flex;
      gap: 10px;
      justify-content: center;
      width: 100%;

      .advantages-step {
        gap: 5px;
        text-align: center;
        padding: 40px;
        background: var(--web-neon);
        border: 3px solid var(--middle-neon);
        border-radius: 20px;
        flex: 1;                           /* ← РАВНАЯ ширина */
        display: flex;                     /* ← Flex внутри */
        flex-direction: column;            /* ← Вертикально */
        justify-content: center;           /* ← Центр по высоте */
        align-items: center;

        &:hover {
          transform: scale(1.035);
          transition: transform 0.6s ease;
          border: 3px solid var(--neon);
        }

        &:not(:hover) {
        transition: transform 0.4s ease;
        }

        img {
          height: 275px;
          margin-bottom: 1rem;
        }

        h3 {
          margin-bottom: 0.5rem;
          font-weight: 700;
          text-align: center;
        }

        p {
          line-height: 1.4;
          text-align: center;
        }
      }
    }
  }
}

/* === Верифицированные исполнители === */
.verified-freelancers-content {
  width: 100%;
  text-align: center;

  h1 {
    margin-bottom: 64px;
  }
  .verified-freelancers {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;

    .verified-freelancers-steps {
      list-style: none;
      width: 100%;
      gap: 2rem;
      margin: 0 auto;

      .verified-step {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
        padding-top: 2rem;

        .verified-header {
          display: flex;
          align-items: center;
          justify-content: center;

          img {
            height: 30px;
            width: auto;
            margin-right: 10px;
            flex-shrink: 0;
            align-items: center;
          }

          h3 {
            font-weight: 700;
            line-height: 1.3;
            text-align: left;
            font-size: 24px;
          }
        }

        .verified-text {
          text-align: left;

          p {
            margin: 0;
            text-align: left;
          }
        }
      }
    }

    .verified-freelancers-visual {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;

      img {
        max-width: 350px;
        height: auto;
        display: block;
        border-radius: 20px;
        animation: pulse2 3s ease-in-out infinite;
        transition: transform 0.6s ease;
        
        &:hover {
          transform: scale(1.09);
          animation-play-state: paused;
        }
      }
    }
  }
}

@keyframes pulse2 {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}
/* ====================== */

/* === Если остались вопросы === */
.questions-content {
  h1 {
    text-align: center;
    margin: 50px 0 30px 0;
  }

  .questions-list {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;

    .questions-item {
      border-radius: 16px;
      overflow: hidden;

      .item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        background: var(--web-orange);
        border: 3px solid var(--soft-orange);
        border-radius: 16px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        position: relative;

        &::after {
          content: '+';
          font-size: 50px;
          font-weight: 1000;
          line-height: 0;
          color: var(--soft-orange);
          transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
          margin-left: auto;
        }

        h3 { margin: 0; flex: 1; }
        span {
          font-size: 14px;
          font-weight: 600;
          color: var(--soft-orange);
          min-width: 60px;
          text-align: center;
        }

        &:hover {
          border-color: var(--orange);
        }
      }

      .answer {
        height: 0;
        padding: 0 20px;
        background: var(--web-orange);
        border-left: 3px solid var(--orange);
        border-right: 3px solid var(--orange);
        border-bottom: 3px solid var(--orange);
        border-radius: 0 0 16px 16px;
        overflow: hidden;
        opacity: 0;
        transform: scaleY(0) translateY(-5px);
        transform-origin: top;
        transition: height 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                    opacity 0.5s ease 0.1s,
                    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                    padding 0.4s ease;

        p {
          margin: 20px 0;
          opacity: 0;
          transform: translateY(15px);
          transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
        }
      }

      &.active .item {
        border-bottom: none;
        border-radius: 16px 16px 0 0;

        &::after { 
          transform: rotate(45deg); 
          
        }
      }

      &.active .answer {
        height: auto;
        padding: 20px 20px;
        opacity: 1;
        transform: scaleY(1) translateY(0);

        p { 
          opacity: 1; 
          transform: translateY(0); 
        }
      }
    }
  }
}

.faq-still {
  padding: 20px;
  background: var(--web-orange);
  border: 3px solid var(--soft-orange);
  border-radius: 20px;
  margin-top: 15px;
  flex-shrink: 0;

  h3 {
    margin-bottom: 1rem;
    font-weight: 800;
  }

  button {
    margin-top: 1rem;
    background-color: var(--light-orange);
    border: 3px solid var(--soft-orange);
    border-radius: 10px;
    padding: 10px;

    a {
      p {
        font-size: 14px;
      }
    }

    &:hover {
      transform: scale(1.045);
      transition: transform 0.6s ease;
      border: 3px solid var(--orange);
    }

    &:not(:hover) {
    transition: transform 0.4s ease;
    }
  }
}
/* ====================== */

/* === Поддержка === */
.gotovy-content {
  text-align: center;
  flex-direction: column;
  gap: 2rem;
  padding: 4rem 2rem;

  h1 {
    margin-bottom: 1rem;
  }

  p {
    margin-bottom: 2rem;
    text-align: center;
  }

  .buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;

    .btn {
      display: inline-block;
      border-radius: var(--radius-md);
      text-align: center;
      width: 100%;
      max-width: 400px;

      &:hover {
        transform: scale(1.05);
        transition: transform 0.6s ease;
      }

      &:not(:hover) {
        transition: transform 0.4s ease;
      }
    }

    .btn2 {
      display: inline-block;
      border-radius: var(--radius-md);
      text-align: center;
      width: 100%;
      max-width: 400px;

      &:hover {
        transform: scale(1.05);
        transition: transform 0.6s ease;
        border: 3px solid var(--soft-violet);
      }

      &:not(:hover) {
        transition: transform 0.4s ease;
      }
    }
    

    .btn-primary {
      background: var(--white);
      border: 3px solid var(--graphite);
      padding: 36px 0;
    }

    .btn-secondary {
      background: var(--web-violet);
      border: 3px solid var(--middle-violet);
      padding: 20px 0;
    }
  }
}

/* === Футер === */
footer {
  .block {
    padding: 0;
    margin-bottom: 0;
    border-radius: 25px 25px 0 0;
  }
  
  .footer-content {
    padding: 2rem;

    p {
      text-align: center;
    }
  }
}

.version {
  display: inline-block;
  margin: 0;
  padding: 0px 6px;
  color: var(--color-text-light);
  background-color: #32cd32;
  border: 3px solid #32cd32;
  color: var(--text);
  font-weight: var(--fw-medium);
  border-radius: 20px;
  text-align: center;
}

/* 🔥 ЯНДЕКС АДАПТАЦИЯ v2 - КАРТИНКИ + ШРИФТЫ */
:root {
  --min-vw: 16;  /* БАЗОВЫЙ размер = 16px */
}

/* 🔥 КАРТИНКИ НИКОГДА НЕ РАСТЯГИВАЮТСЯ */
img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;  /* ЯНДЕКС СТИЛЬ */
}

/* 🔥 АДАПТИВНЫЕ ШРИФТЫ clamp() */
h1 { 
  font-size: clamp(28px, 5vw, 56px); 
  line-height: 1.1; 
}
h5 { 
  font-size: clamp(24px, 4.5vw, 38px); 
}
h2 { 
  font-size: clamp(24px, 4vw, 42px); 
}
h3 { 
  font-size: clamp(18px, 3vw, 24px); 
}
p { 
  font-size: clamp(14px, 2.5vw, 18px); 
  line-height: 1.5;
}

/* 🔥 КОНТЕЙНЕРЫ */
.auto-container {
  width: 100%;
  max-width: clamp(320px, 95vw, 1400px);
  padding: clamp(1rem, 3vw, 2rem);
  margin: 0 auto;
}

/* 🔥 БРЕЙКПОИНТЫ ЯНДЕКС */
@media (max-width: 1200px) {
  .content { 
    flex-direction: column; 
    padding: clamp(1.5rem, 4vw, 3rem);
    gap: clamp(1rem, 3vw, 2rem);
  }
}

@media (max-width: 768px) {
  html { scroll-padding-top: clamp(75px, 20vh, 95px); }
  
  /* 🔥 МОБАЙЛ ХЕДЕР */
  .home-header {
    flex-direction: column;
    gap: 1rem;
    padding: clamp(1rem, 4vw, 1.5rem);
    min-height: 110px;
  }
  
  nav ul { 
    flex-wrap: wrap; 
    gap: clamp(0.75rem, 2vw, 1.5rem);
    justify-content: center;
  }
  
  /* 🔥 КАРТИНКИ МОБАЙЛ */
  .hero-visual img,
  .verified-freelancers-visual img { 
    max-width: clamp(250px, 80vw, 550px); 
  }
  
  /* 🔥 КАРТОЧКИ СТЕКИ */
  .stats-content,
  .advantages-steps { flex-direction: column; gap: 1rem; }
  
  .how-it-works-steps { flex-direction: column; gap: 1.5rem; }
  
  .verified-freelancers { grid-template-columns: 1fr; }
  
  .content { padding: clamp(1rem, 5vw, 2rem); }
}

@media (max-width: 480px) {
  /* 🔥 ТАКТИЛЬНЫЕ КНОПКИ 44px+ */
  .btn-primary { min-height: 52px; padding: 1rem 0 !important; }
  .btn-secondary { min-height: 48px; padding: 0.75rem 0 !important; }
  
  /* 🔥 МАЛЕНЬКИЕ ЭКРАНЫ */
  .cont, .advantages-step { padding: clamp(1rem, 6vw, 1.5rem); }
  
  .num { width: 52px; height: 52px; }
  .num h2 { font-size: clamp(20px, 5vw, 24px); }
  
  .block { 
    margin: clamp(8px, 2vw, 15px) clamp(0.5rem, 3vw, 1rem);
    border-radius: clamp(16px, 4vw, 25px);
  }
}

/* 🔥 iPhone X+ Safe Area */
@supports (padding: max(0px)) {
  @media (max-width: 480px) {
    .home-header { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  }
}

/* 🔥 LANDSCAPE МОБАЙЛ */
@media (max-height: 500px) and (orientation: landscape) {
  main { margin-top: clamp(70px, 15vh, 90px); }
  .content { padding: clamp(1rem, 4vw, 1.5rem); }
}
