/**
 * Hero — Figma desktop 1920, mobile 390.
 * Layout: descriptor → headline row (H1 + CTA) → video + logos strip.
 */

.home-v2 .v2-section.v2-section--hero,
.v2-section--hero {
  --v2-hero-header-overlap: calc(100vw * 70 / 390);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--v2-hero-header-overlap));
  min-height: calc(100dvh - var(--v2-hero-header-overlap));
  height: auto;
  max-height: none;
  margin-top: 0;
  padding-block: calc(100vw * 60 / 390) calc(100vw * 20 / 390);
  margin-bottom: var(--v2-section-gap);
  overflow: hidden;
}

.v2-section--hero .v2-hero__title-line.v2-hero__title-line--mobile {
  display: none;
}

@media (max-width: 1023px) {
  .v2-section--hero .v2-hero__title-line.v2-hero__title-line--desktop {
    display: none;
  }

  .v2-section--hero .v2-hero__title-line.v2-hero__title-line--mobile {
    display: block;
  }

  .is-lang-uk .v2-section--hero .v2-hero__title {
    max-width: 100%;
    font-size: min(40px, calc(100vw * 35 / 390));
  }
}

.v2-section--hero > .v2-hero {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.v2-section--hero .v2-hero__intro {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: calc(100vw * 15 / 390); /* descriptor → title, 15 / 390 */
  margin-bottom: calc(100vw * 28 / 390); /* intro → media, 28 / 390 */
}

.v2-section--hero .v2-hero__intro .v2-descriptor {
  margin: calc(100vw * 14 / 390) 0 0;
}

.v2-section--hero .v2-hero__title {
  margin: 0;
  max-width: 350px;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: #202020;
}

.v2-section--hero .v2-hero__title-line {
  display: block;
  line-height: 1;
  white-space: nowrap;
}

.v2-section--hero .v2-hero__title-line--accent {
  color: #64db69;
}

.v2-section--hero .v2-hero__cta--desktop {
  display: none;
}

.v2-section--hero .v2-hero__cta--mobile {
  display: block;
  flex-shrink: 0;
  width: 100%;
}

.v2-section--hero .v2-hero__cta--mobile .v2-btn--primary {
  --cta-size: calc(100vw * 60 / 390);
  display: flex;
  align-items: center;
  width: 100%;
  max-width: none;
  height: var(--cta-size);
  gap: 0;
  flex-shrink: 0;
}

.v2-section--hero .v2-hero__cta--mobile .v2-btn--primary .v2-btn__text {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: var(--cta-size);
  min-height: var(--cta-size);
  padding: calc(100vw * 14 / 390) calc(100vw * 28 / 390);
  font-size: calc(100vw * 16 / 390);
  border-radius: 130px;
}

.v2-section--hero .v2-hero__cta--mobile .v2-btn--primary .v2-btn__icon {
  flex: none;
  width: var(--cta-size);
  min-width: var(--cta-size);
  height: var(--cta-size);
  border-radius: 50%;
}

.v2-section--hero .v2-hero__cta--mobile .v2-btn--primary .v2-btn__icon-img {
  width: calc(100vw * 24 / 390);
  height: calc(100vw * 24 / 390);
}

.v2-section--hero .v2-hero__media {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  overflow: visible;
  width: 100%;
  margin-bottom: calc(100vw * 24 / 390); /* logos → CTA, 24 / 390 */
}

.v2-section--hero .v2-hero__video {
  position: relative;
  overflow: hidden;
  border-radius: calc(100vw * 10 / 390);
}

.v2-section--hero .v2-hero__video-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(100, 219, 105, 0.12);
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.v2-section--hero .v2-hero__video.is-playing .v2-hero__video-shield {
  opacity: 0;
  visibility: hidden;
}

.v2-section--hero .v2-hero__video-el {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 350 / 226;
  object-fit: cover;
  pointer-events: none;
}

.v2-section--hero .v2-hero__video-el::-webkit-media-controls,
.v2-section--hero .v2-hero__video-el::-webkit-media-controls-start-playback-button,
.v2-section--hero .v2-hero__video-el::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}

.v2-section--hero .v2-hero__logos {
  position: static;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vw * 20 / 390);
  margin-top: calc(100vw * 10 / 390);
  padding: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.v2-section--hero .v2-hero__logos-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: calc(100vw * 23 / 390);
  width: 100%;
  min-height: calc(100vw * 20 / 390);
  margin: 0;
  padding: 0;
  list-style: none;
}

.v2-section--hero .v2-hero__logos-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: calc(100vw * 20 / 390);
}

.v2-section--hero .v2-hero__logos-list img {
  display: block;
  width: var(--hero-logo-w);
  height: var(--hero-logo-h);
  max-height: none;
  object-fit: contain;
  transform: scale(1.18);
  transform-origin: center;
}

@media (min-width: 1024px) {
  .home-v2 .v2-section.v2-section--hero,
  .v2-section--hero {
    --v2-hero-header-overlap: clamp(62px, 4.17vw, 72px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    height: 100svh;
    max-height: 100svh;
    margin-top: calc(-1 * var(--v2-hero-header-overlap));
    padding-block: clamp(112px, 7.08vw, 136px) clamp(32px, 2.5vw, 48px);
    margin-bottom: 0;
    overflow: hidden;
  }

  .v2-section--hero > .v2-hero {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: calc(100vw * 50 / 1920);
    min-height: 0;
  }

  .v2-section--hero .v2-hero__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: clamp(24px, 2.083vw, 40px);
    row-gap: calc(100vw * 20 / 1920);
    align-items: end;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .v2-section--hero .v2-hero__intro .v2-descriptor {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: start;
    gap: 13px;
    margin: 0;
    font-size: clamp(16px, 1.042vw, 20px);
    line-height: 1;
    color: rgba(32, 32, 32, 0.3);
  }

  .v2-section--hero .v2-hero__intro .v2-descriptor__dot {
    width: 10px;
    height: 10px;
    background: #64db69;
  }

  .v2-section--hero .v2-hero__title {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    min-width: 0;
    max-width: min(61.77vw, 1186px);
    font-size: clamp(40px, 5.208vw, 100px);
    line-height: 0.95;
  }

  .v2-section--hero .v2-hero__title-line {
    display: inline;
    white-space: normal;
    line-height: 0.95;
  }

  .v2-section--hero .v2-hero__title-line + .v2-hero__title-line::before {
    content: ' ';
  }

  .v2-section--hero .v2-hero__cta--desktop {
    display: block;
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    justify-self: end;
  }

  .v2-section--hero .v2-hero__cta--mobile {
    display: none;
  }

  .v2-section--hero .v2-hero__media {
    --hero-media-radius: clamp(10px, 1.042vw, 20px);
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    margin-bottom: 0;
  }

  .v2-section--hero .v2-hero__video {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    border-radius: var(--hero-media-radius);
  }

  .v2-section--hero .v2-hero__video-shield {
    display: none;
  }

  .v2-section--hero .v2-hero__video-el {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: var(--hero-media-radius);
  }

  /* Figma: 704×80 white tab, logos row 608×20 — overlay on video */
  .v2-section--hero .v2-hero__logos {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(36.67vw, 704px);
    max-width: none;
    height: clamp(60px, 4.17vw, 80px);
    margin: 0;
    padding-inline: clamp(24px, 2.5vw, 48px);
    border-radius: clamp(10px, 1.042vw, 20px) 0 0 0;
    background: var(--color-canvas);
  }

  .v2-section--hero .v2-hero__logos-list {
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    max-width: 608px;
    margin-inline: 0;
    gap: 0;
  }

  .v2-section--hero .v2-hero__logos-list li {
    flex: 0 0 auto;
  }

  .v2-section--hero .v2-hero__logos-list img {
    width: var(--hero-logo-w-desktop);
    height: var(--hero-logo-h-desktop);
    max-height: none;
    object-fit: contain;
    transform: none;
  }
}
