/* Hero */
.hero {
  position: relative;
  height: var(--hero-height);
  background: var(--color-hero-bg);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.5s ease;
}

.hero__bg.is-fade-out {
  opacity: 0;
}

.hero__title,
.hero__subtitle {
  transition: opacity 0.35s ease;
}

.hero__title.is-fade-out,
.hero__subtitle.is-fade-out {
  opacity: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding-inline: var(--side-padding);
}

.hero__text {
  max-width: 631px;
  margin-left: max(0px, calc((100% - var(--content-max)) / 2 - var(--side-padding) + 145px));
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.33vw, 48px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text-primary);
  white-space: pre-line;
}

.hero__subtitle {
  margin-top: 16px;
  font-size: clamp(18px, 1.67vw, 24px);
  line-height: 1.5;
  color: var(--color-text-primary);
  white-space: pre-line;
}

.hero__form {
  margin-top: 32px;
  display: flex;
  align-items: stretch;
  max-width: 420px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero__input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 16px;
  min-width: 0;
}

.hero__input::placeholder {
  color: var(--color-text-secondary);
}

.hero__submit {
  flex-shrink: 0;
  padding: 0 28px;
  border: none;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 18px;
  cursor: pointer;
}

.hero__submit:hover {
  background: var(--color-accent-hover);
}

.hero__dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 2;
}

.hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero__dot.is-active {
  background: var(--color-accent);
}

.hero__arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-inline: 24px;
  pointer-events: none;
  z-index: 2;
}

.hero__arrow {
  pointer-events: auto;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section common */
.section {
  padding-block: 64px;
}

.section--muted {
  background: var(--color-bg-section);
}

.section__head {
  text-align: center;
  margin-bottom: 48px;
}

.section__title {
  font-size: 24px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.section__desc {
  margin-top: 12px;
  font-size: 16px;
  color: var(--color-text-secondary);
}

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(80, 83, 99, 0.12);
}

.product-card__img {
  width: 100%;
  aspect-ratio: 144 / 104;
  object-fit: cover;
}

.product-card__body {
  padding: 16px 12px 20px;
}

.product-card__name {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}

.product-card__text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-primary);
}

/* Cases */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.case-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.case-card__visual {
  width: 100%;
  aspect-ratio: 310 / 194;
  object-fit: cover;
}

.case-card__body {
  padding: 20px;
}

.case-card__name {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.case-card__text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-text-primary);
}

/* Trust */
.trust {
  text-align: center;
}

.trust__quote-wrap {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 24px;
  align-items: start;
  text-align: left;
  max-width: 960px;
  margin-inline: auto;
}

.trust__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.trust__quote {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-primary);
}

.trust__author {
  margin-top: 16px;
  font-size: 16px;
  color: var(--color-text-secondary);
}

/* Brand band */
.brand-band {
  position: relative;
  min-height: 288px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.brand-band__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-band__content {
  position: relative;
  z-index: 1;
  padding: 48px 24px;
  max-width: 960px;
}

.brand-band__title {
  font-size: 36px;
  font-weight: 500;
}

.brand-band__text {
  margin-top: 16px;
  font-size: 20px;
  opacity: 0.95;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.service-item__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--color-bg-muted);
  border-radius: 50%;
}

.service-item__title {
  font-size: 14px;
  font-weight: 500;
}

/* About + timeline */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-block__text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-primary);
}

.timeline {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}

.timeline__item {
  flex: 0 0 140px;
  scroll-snap-align: start;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.timeline__year {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
}

.timeline__desc {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-line;
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-block {
    grid-template-columns: 1fr;
  }

  .hero__text {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}
