/**
 * Section: Hero Section (#hero / .hero-section)
 * Space Chemical Design System
 * Figma spec: 1440x711px, hero-bg.png background, 813px white card overlay with 35.2px blur
 */

.hero-section {
  position: relative;
  width: 100%;
  max-width: var(--sc-container-max, 1440px);
  margin-left: auto;
  margin-right: auto;
  height: 711px;
  background-color: var(--color-white, #FFFFFF);
  overflow: hidden;
  box-sizing: border-box;
}

.hero-section__container {
  max-width: var(--sc-container-max, 1440px);
  height: 711px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
}

/* Ambient Media Background (Figma 457:63 / Video for Desktop & Tablet, Poster for Mobile) */
.hero-section__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-section__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}

.hero-section__poster-wrap {
  display: none;
  width: 100%;
  height: 100%;
}

.hero-section__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

/* Hero video remains visible across all viewports including mobile */

/* Backward compatibility */
.hero-section__bg {
  display: none;
}

/* Frosted White Plate Overlay (Figma 429:1363: плашка 813x711px, smooth gradient + soft blur dissolve into video) */
.hero-section__card {
  width: 813px;
  max-width: 100%;
  height: 711px;
  background: transparent;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  box-shadow: none;
  padding: 80px var(--space-77, 77px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.hero-section__card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 52%, rgba(255, 255, 255, 0.95) 70%, rgba(255, 255, 255, 0) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  mask-image: linear-gradient(to right, black 0%, black 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0%, black 72%, transparent 100%);
}

.hero-section__text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-section__title {
  font-family: var(--font-cygre, 'Cygre', sans-serif);
  font-size: clamp(44px, 4.6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--color-primary, #FF5C00);
  margin: 0;
  text-transform: none;
}

.hero-section__desc {
  font-family: var(--font-cygre, 'Cygre', sans-serif);
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 400;
  line-height: 1.5;
  color: #1F2937;
  max-width: 520px;
  margin: 0;
}

.hero-section__cta {
  margin-top: 0;
}

.hero-section__cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-section__features {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .hero-section__card {
    width: 720px;
    padding: 100px 48px;
    gap: 48px;
  }
}

/* Tablet Redesign (768px - 1050px): Professional, stylish composition with visible liquid video */
@media (max-width: 1050px) {
  .hero-section {
    height: auto;
    min-height: clamp(620px, 75vh, 760px);
    display: flex;
    align-items: center;
    background-color: var(--color-white, #FFFFFF);
    overflow: hidden;
    padding: 50px 0 70px;
    box-sizing: border-box;
    position: relative;
  }

  .hero-section__container {
    height: auto;
    min-height: auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    position: relative;
    z-index: 2;
  }

  .hero-section__media {
    position: absolute;
    inset: 0;
    width: 135%;
    left: auto;
    right: -35%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
  }

  .hero-section__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .hero-section__card {
    width: auto;
    max-width: 520px;
    min-height: auto;
    padding: 24px 32px 24px 0;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    border-radius: 20px;
    box-shadow: none !important;
    gap: 28px;
    position: relative;
    z-index: 2;
  }

  .hero-section__card::before {
    border-radius: 20px;
    background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 0.94) 68%, rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    mask-image: linear-gradient(to right, black 0%, black 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0%, black 78%, transparent 100%);
  }

  .hero-section__title {
    font-size: clamp(48px, 6.2vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.01em;
  }

  .hero-section__desc {
    font-size: clamp(18px, 2.3vw, 21px);
    max-width: 390px;
    line-height: 1.35;
  }

  .hero-section__cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
  }

  .hero-section__features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
  }

  .hero-section__feature-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-cygre, 'Cygre', sans-serif);
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    line-height: 1.3;
  }

  .hero-section__feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(255, 92, 0, 0.12);
    color: var(--color-primary, #FF5C00);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
  }
}

/* Mobile Devices (< 768px): Live looping hero video on mobile as well */
@media (max-width: 767px) {
  .hero-section {
    min-height: auto;
    height: auto;
    padding: 0 0 50px;
    position: relative;
    background-color: var(--color-white, #FFFFFF);
    overflow: hidden;
  }

  .hero-section__container {
    height: auto !important;
    min-height: auto !important;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
  }

  .hero-section__media {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: clamp(230px, 60vw, 285px);
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, black 0%, black 76%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 76%, transparent 100%);
  }

  .hero-section__video {
    display: block !important;
    position: absolute;
    top: -75px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(580px, 156vw, 720px);
    height: auto;
    max-width: none;
    object-fit: cover;
    object-position: right center;
  }

  .hero-section__poster-wrap {
    display: none;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 1 !important;
    overflow: hidden !important;
  }

  .hero-section__poster {
    display: block !important;
    position: absolute !important;
    top: -95px !important;
    left: 50% !important;
    transform: translateX(-35%) !important;
    width: clamp(340px, 92vw, 410px) !important;
    height: auto !important;
    pointer-events: none !important;
    z-index: 1 !important;
    opacity: 0.98 !important;
  }

  .hero-section__card {
    height: auto !important;
    min-height: auto !important;
    width: 100%;
    max-width: 100%;
    gap: 20px;
    position: relative;
    z-index: 2;
    padding: clamp(160px, 44vw, 195px) 0 0 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    box-shadow: none !important;
    justify-content: flex-start !important;
  }

  .hero-section__card::before {
    display: none !important;
  }

  .hero-section__title {
    font-size: clamp(40px, 10.5vw, 48px);
    line-height: 1.02;
  }

  .hero-section__desc {
    font-size: 17px;
    line-height: 1.35;
    max-width: 100%;
  }

  .hero-section__cta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 4px;
  }

  .hero-section__features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
  }

  .hero-section__feature-item {
    font-size: 14.5px;
    color: #333333;
  }
}

/* Wide Displays (1441px+): Smooth Edge Dissolve into Canvas Boundary */
@media (min-width: 1441px) {
  .hero-section__media {
    mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
  }
}
