/* Meatbot Site | Build v0.9.8R.12 - Hero Section */

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

body {
  font-family: var(--font-family-inter);
  background: var(--color-white);
  color: var(--color-black);
  overflow-x: hidden;
}

/* Page */
.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

/* Remove default margins and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure sections are flush */
.hero,
.pricing {
  margin: 0;
  padding: 0;
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: var(--hero-height);
  /* мягкая подложка как в Figma, чтобы не было белых полей на широких экранах */
  background: linear-gradient(180deg, rgba(255,241,241,0.6) 0%, rgba(255,239,239,0.6) 100%);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hero Container for centering */
.hero__container {
  position: relative;
  width: var(--hero-container-width);
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: var(--hero-content-padding);
}

/* Background image that will parallax */
.hero__background {
  position: absolute;
  /* тянем фон по ширине окна, сохраняем соотношение как в макете */
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 1920px;
  height: 1080px;
  /* было: hero_background.png (оставлен как резерв: hero_background_old.png) */
  background: url('../assets/images/bg_hero_1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* уменьшаем контраст/интенсивность фона как в макете Figma */
  opacity: 0.55;
  z-index: var(--z-background);
  will-change: transform;
}

/* Decorative Elements */
.hero__decorative {
  position: absolute;
  z-index: var(--z-decorative);
}

.hero__decorative--rect-1 {
  width: 1102px;
  height: 1124px;
  left: -449px;
  top: 73px;
  background: var(--color-gray-light);
  opacity: 0.49;
  transform: rotate(-44deg);
}

.hero__decorative--rect-2 {
  width: 1242px;
  height: 1268px;
  left: -242px;
  top: -72px;
  background: var(--color-white);
  opacity: 0.52;
  transform: rotate(-44deg);
}

.hero__decorative--rect-3 {
  width: 1393px;
  height: 1425px;
  left: -50px;
  top: -226px;
  background: var(--color-gray-medium);
  opacity: 0.49;
  transform: rotate(-44deg);
}

/* Additional decorative elements from Figma */
.hero__decorative--rect-1::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('../assets/images/decorative-rect-1.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.hero__decorative--rect-2::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('../assets/images/decorative-rect-2.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.hero__decorative--rect-3::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('../assets/images/decorative-rect-3.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.hero__decorative--ellipse-1 {
  width: 153px;
  height: 91px;
  left: 189px;
  top: 773px;
  background: var(--color-gray-dark);
  border-radius: 50%;
  filter: blur(53px);
  transform: rotate(23deg);
}

.hero__decorative--ellipse-2 {
  width: 172px;
  height: 93px;
  left: 286px;
  top: 742px;
  background: var(--color-gray-dark);
  border-radius: 50%;
  filter: blur(53px);
  transform: rotate(23deg);
}

/* Robot */
.hero__robot {
  position: absolute;
  width: 321px;
  height: 687px;
  left: 170px;
  top: 165px;
  background: url('../assets/images/robot_hero1.png');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: var(--z-robot);
}

/* Content */
.hero__content {
  position: relative;
  z-index: var(--z-content);
}

/* Logo */
.hero__logo {
  position: absolute;
  left: 619px;
  top: 191px;
  width: 221px;
  height: 44px;
  background: url('../assets/images/logo_horizontal_footer.png');
  background-size: contain;
  background-repeat: no-repeat;
}

/* Title (3 lines like in Figma) */
.hero__heading {
  position: absolute;
  left: 619px;
  top: 267px;
  width: 675px;
  display: flex;
  flex-direction: column;
  row-gap: 4px; /* было 3px */
}

.hero__heading-line {
  display: block;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.hero__heading-line:last-child {
  margin-bottom: 0;
}

/* Современная система: Ubuntu Sans Mono, responsive, bold, black */
.hero__heading-line--main {
  font-family: var(--font-family-ubuntu-mono);
  font-weight: 700;
  font-size: var(--hero-title-size);
  line-height: 0.68; /* было 0.55 */
  color: var(--color-black);
  white-space: nowrap;
}

/* Остальные строки: Ubuntu Sans Mono, responsive, regular, #852626 */
.hero__heading-line--sub {
  font-family: var(--font-family-ubuntu-mono);
  font-weight: 400;
  font-size: calc(var(--hero-title-size) * 0.75);
  line-height: 0.68; /* было 0.55 */
  color: var(--color-red-dark);
}

/* Subtitle under main title (red) */
.hero__subtitle {
  position: absolute;
  left: 619px;
  top: 326px;
  width: 675px;
  font-family: var(--font-family-ubuntu-mono);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.087;
  color: var(--color-red-primary);
}

/* Button */
.hero__button {
  position: absolute;
  left: 619px;
  top: 420px;
  width: 318px;
  height: 53px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  overflow: visible;
  z-index: var(--z-content);
  transition: transform 160ms ease; /* плавный подъём как у тарифов */
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* нижний слой (тень) */
.hero__button::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -4px;
  width: 318px;
  height: 53px;
  background: #9F2121;
  z-index: 0;
  border-radius: 4px;
  transition: top 160ms ease, left 160ms ease; /* усиление тени на hover */
}

/* верхний слой */
.hero__button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 318px;
  height: 53px;
  background: #EE3838;
  z-index: 1;
  border-radius: 4px;
}

/* Hover/Active эффекты */
.hero__button:hover { transform: translateY(-4px); }
.hero__button:hover::before { top: 8px; left: -6px; }
.hero__button:active { transform: translateY(-1px); }

.hero__button:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

.hero__button:disabled,
.hero__button[aria-disabled='true'] {
  cursor: not-allowed;
  filter: grayscale(0.2) brightness(0.9);
}

/* Features */
.hero__features {
  position: absolute;
  left: 618px;
  top: 620px; /* было 657px — подняли блок выше */
  width: 747px;
  pointer-events: none;
  z-index: var(--z-content);
}

/* Desktop (default) — как в исходном макете */
.hero__features-title {
  position: absolute;
  left: 0;
  top: 0;
  width: 747px;
  height: 59px;
  font-family: var(--font-family-ubuntu-mono);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.087;
  background: var(--gradient-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* По умолчанию строки заголовка в одну линию */
.hero__features-title-line { display: inline; }

.hero__features-grid {
  position: absolute;
  left: 0;
  top: 66px;
  width: 747px;
  height: 200px;
  display: grid;
  grid-template-columns: var(--hero-features-grid);
  gap: var(--hero-features-gap);
}

.hero__feature {
  position: absolute;
  width: 226px;
  height: 109px;
}

/* Desktop layout coordinates for 6 features */
.hero__features-grid .hero__feature:nth-child(1) { left: 0;   top: 0; }
.hero__features-grid .hero__feature:nth-child(2) { left: 275px; top: 0; }
.hero__features-grid .hero__feature:nth-child(3) { left: 550px; top: 0; }
.hero__features-grid .hero__feature:nth-child(4) { left: 0;   top: 145px; }
.hero__features-grid .hero__feature:nth-child(5) { left: 275px; top: 145px; }
.hero__features-grid .hero__feature:nth-child(6) { left: 550px; top: 145px; }

/* Убираем абсолютное позиционирование — только для адаптивных брейкпоинтов ниже */

/* Заголовки и описания карточек — десктопные базовые */
.hero__feature-title {
  position: absolute;
  left: 0;
  top: 0;
  width: 226px;
  height: 21px;
  font-family: var(--font-family-ubuntu-mono);
  font-weight: 500;
  font-size: var(--hero-features-title-size);
  line-height: 1.087;
  color: var(--color-red-dark);
}

.hero__feature-description {
  position: absolute;
  left: 0;
  top: 28px; /* 21px title + 7px gap */
  width: 226px;
  height: 88px;
  font-family: var(--font-family-ubuntu-mono);
  font-weight: 400;
  font-size: var(--hero-features-desc-size);
  line-height: 1.087;
  color: var(--color-black);
}

/* Auth Link */
.hero__auth {
  position: absolute;
  left: 1334px;
  top: 20px;
  width: 74px;
  height: 13px;
  font-family: var(--font-family-ubuntu);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.087;
  color: var(--color-black);
  text-decoration: none;
  z-index: var(--z-content);
}

.hero__auth:hover {
  color: var(--color-red-primary);
}

/* Текст в кнопке */
.hero__button-text {
  position: relative;
  z-index: 3; /* выше псевдо-слоёв */
  font-family: var(--font-family-ubuntu-mono);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.02;
  color: var(--color-white);
  text-align: center;
  text-shadow: 0 2px 2px rgba(0,0,0,0.25);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Layout - Mobile First Approach */

/* Tablet and below - переключаем на flexbox layout */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  
  .hero__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px var(--container-padding);
  }
  
  /* Скрываем декоративные элементы на планшетах */
  .hero__decorative {
    display: none;
  }
  
  /* Адаптируем робота */
  .hero__robot {
    position: relative;
    left: auto;
    top: auto;
    width: 250px;
    height: 500px;
    margin: 0 auto 40px;
    order: 1;
  }
  
  /* Адаптируем контент */
  .hero__content {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 600px;
    order: 2;
  }
  
  .hero__logo {
    position: relative;
    left: auto;
    top: auto;
    margin: 0 auto 20px;
  }
  
  .hero__heading {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    margin-bottom: 30px;
  }
  
  /* Исправляем налезание заголовков */
  .hero__heading-line {
    display: block;
    margin-bottom: 8px;
  }
  
  .hero__heading-line:last-child {
    margin-bottom: 0;
  }
  
  .hero__button {
    position: relative;
    left: auto;
    top: auto;
    margin: 0 auto 40px;
  }
  
  /* Адаптируем features */
  .hero__features {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 600px;
    order: 3;
    pointer-events: auto;
  }
  
  /* На tablet используем обычную сетку */
  .hero__features-grid {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: var(--hero-features-grid);
    gap: var(--hero-features-gap);
  }
  
  .hero__feature {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }
  
  /* На tablet/mobile заголовки и описания без абсолютного позиционирования */
  .hero__features-title {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    margin: 0 0 20px 0;
  }
  .hero__features-title-line { display: block; }

  .hero__feature-title,
  .hero__feature-description {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
  }
  
  .hero__feature-description {
    top: auto;
    margin-top: 8px;
  }
}

/* Mobile - переключаем на одноколоночную сетку */
@media (max-width: 768px) {
  .hero__container {
    padding: 20px var(--container-padding);
  }
  
  /* Скрываем робота на мобильных */
  .hero__robot {
    display: none;
  }
  
  .hero__content {
    max-width: 100%;
    order: 1; /* Контент теперь первый */
  }
  
  .hero__features {
    max-width: 100%;
    order: 2; /* Features второй */
  }
  
  .hero__features-title {
    font-size: 36px;
    margin-bottom: 16px;
  }
  
  .hero__features-grid {
    grid-template-columns: var(--hero-features-grid);
    gap: var(--hero-features-gap);
  }
  
  .hero__feature {
    margin-bottom: 16px;
  }
}

/* Small Mobile - еще более компактный layout */
@media (max-width: 480px) {
  .hero__container {
    padding: 16px var(--container-padding);
  }
  
  .hero__robot {
    width: 150px;
    height: 300px;
    margin-bottom: 20px;
  }
  
  .hero__features-title {
    font-size: 28px;
    margin-bottom: 12px;
  }
  
  .hero__features-grid {
    gap: var(--hero-features-gap);
  }
  
  .hero__feature {
    margin-bottom: 12px;
  }
}