/* Homepage hero */
.main-home {
  overflow: visible;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 50vw, 960px);
  --hero-slide-duration: 4.5s;
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.hero__slide.is-active {
  z-index: 1;
  opacity: 1;
}

.hero__media {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__slide--zoom-in.is-active .hero__media {
    animation: hero-zoom-in var(--hero-slide-duration) ease-out both;
    transition: none;
  }

  .hero__slide--zoom-out.is-active .hero__media {
    animation: hero-zoom-out var(--hero-slide-duration) ease-out both;
    transition: none;
  }

  .hero__slide:not(.is-active) .hero__media {
    animation: none;
    transition: transform 0s linear 1.2s;
    transform: scale(1);
  }
}

@keyframes hero-zoom-in {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.04);
  }
}

@keyframes hero-zoom-out {
  from {
    transform: scale(1.04);
  }

  to {
    transform: scale(1);
  }
}

.hero__gradient {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__gradient--top {
  top: 0;
  height: clamp(120px, 12.66vw, 243px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
}

.hero__gradient--bottom {
  bottom: 0;
  height: clamp(280px, 28.65vw, 550px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.5vw, 48px);
  justify-content: flex-end;
  min-height: clamp(560px, 50vw, 960px);
  padding-bottom: clamp(80px, 8.85vw, 170px);
}

.hero__title {
  max-width: 28ch;
  font-size: clamp(32px, 3.23vw, 62px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero__desc {
  max-width: 28ch;
  font-size: clamp(16px, 1.04vw, 20px);
  font-weight: 400;
  line-height: 1.7;
  color: #fff;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Slider dots */
.hero__dots {
  position: absolute;
  bottom: clamp(32px, 3.65vw, 70px);
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 100px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.hero__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  height: 8px;
  padding: 0;
  line-height: 0;
}

.hero__dot img {
  width: 8px;
  height: 8px;
}

@media (max-width: 767px) {
  .hero__content {
    padding-bottom: 100px;
  }

  .hero__title {
    max-width: 100%;
  }
}

/* Homepage intro */
.home-intro {
  position: relative;
  background-color: #f5f3ef;
  padding-block: clamp(80px, 8.75vw, 168px);
  overflow: visible;
}

.home-intro__side-text {
  position: absolute;
  top: 50%;
  z-index: 0;
  font-size: clamp(48px, 5.2vw, 104px);
  font-weight: 800;
  line-height: 1.3;
  color: #d0ccc5;
  opacity: 0.3;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(-50%);
  transform-origin: center center;
  pointer-events: none;
  user-select: none;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow: visible;
}

.home-intro__side-text--left {
  left: clamp(8px, 2vw, 24px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(-50%) rotate(180deg);
}

.home-intro__side-text--right {
  right: clamp(8px, 2vw, 24px);
  letter-spacing: 0.18em;
}

.reveal-section:not(.is-visible) .home-intro__side-text--left.reveal-scale {
  transform: translateY(-50%) rotate(180deg) scale(0.96);
}

.reveal-section.is-visible .home-intro__side-text--left.reveal-scale {
  transform: translateY(-50%) rotate(180deg);
}

.reveal-section:not(.is-visible) .home-intro__side-text--right.reveal-scale {
  transform: translateY(-50%) scale(0.96);
}

.reveal-section.is-visible .home-intro__side-text--right.reveal-scale {
  transform: translateY(-50%);
}

.home-intro__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(40px, 3.54vw, 68px);
  text-align: center;
}

.home-intro__title {
  max-width: 18em;
  font-size: clamp(28px, 2.29vw, 44px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: #191919;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-intro__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 1.67vw, 32px);
}

.home-intro__desc {
  max-width: 42em;
  font-size: clamp(15px, 0.94vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: #535353;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-intro__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 164px;
  height: 54px;
  padding-inline: 28px;
  background-color: #fff;
  border-radius: 1000px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #191919;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.home-intro__button:hover {
  background-color: #f99c1b;
  color: #fff;
}

.home-intro__button-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

@media (max-width: 1023px) {
  .home-intro__side-text {
    font-size: clamp(28px, 5vw, 56px);
    opacity: 0.18;
  }

  .home-intro__side-text--left {
    left: clamp(8px, 2vw, 20px);
    letter-spacing: 0.1em;
  }

  .home-intro__side-text--right {
    right: clamp(8px, 2vw, 20px);
    letter-spacing: 0.14em;
  }
}

@media (max-width: 767px) {
  .home-intro__side-text {
    top: auto;
    bottom: auto;
    transform: none;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: clamp(36px, 12vw, 64px);
    opacity: 0.1;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
  }

  .home-intro__side-text--left {
    top: clamp(20px, 5vw, 36px);
    left: clamp(8px, 2.5vw, 16px);
    right: auto;
    letter-spacing: 0.1em;
    transform: none;
  }

  .home-intro__side-text--right {
    bottom: clamp(4px, 1.5vw, 12px);
    right: clamp(8px, 2.5vw, 16px);
    left: auto;
    letter-spacing: 0.14em;
    text-align: right;
  }

  /* Override desktop vertical rotate — mobile is horizontal */
  .reveal-section:not(.is-visible) .home-intro__side-text--left.reveal-scale,
  .reveal-section.is-visible .home-intro__side-text--left.reveal-scale,
  .reveal-section:not(.is-visible) .home-intro__side-text--left.reveal-transform,
  .reveal-section.is-visible .home-intro__side-text--left.reveal-transform {
    transform: none;
  }

  .reveal-section:not(.is-visible) .home-intro__side-text--left.reveal-scale {
    transform: scale(0.96);
  }

  .reveal-section:not(.is-visible) .home-intro__side-text--right.reveal-scale {
    transform: scale(0.96);
  }

  .reveal-section.is-visible .home-intro__side-text--right.reveal-scale,
  .reveal-section.is-visible .home-intro__side-text--right.reveal-transform {
    transform: none;
  }

  .home-intro__inner {
    padding-inline: clamp(12px, 4vw, 24px);
  }

  .home-intro__title,
  .home-intro__desc {
    max-width: 100%;
  }
}

/* Homepage products */
.home-products {
  background-color: #fff;
  padding-block: clamp(80px, 8.75vw, 168px);
  overflow-x: clip;
}

.home-products__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-products__title {
  max-width: 18em;
  margin-bottom: clamp(24px, 2.08vw, 40px);
  font-size: clamp(28px, 2.08vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #191919;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-products__desc {
  max-width: 42em;
  margin-bottom: clamp(40px, 3.125vw, 60px);
  font-size: clamp(15px, 0.94vw, 18px);
  font-weight: 400;
  line-height: 1.5;
  color: #535353;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-products__carousel {
  width: 100%;
  margin: 0 0 clamp(40px, 3.125vw, 60px);
}

.home-products__track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(8px, 1.04vw, 20px);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-products__card {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-products__card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.04vw, 20px);
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.home-products__card:hover {
  transform: translateY(-8px);
}

.home-products__image {
  width: 100%;
  aspect-ratio: 320 / 500;
  border-radius: clamp(16px, 1.25vw, 24px);
  background-color: #f4f4f4;
  overflow: hidden;
}

.home-products__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-products__card:hover .home-products__image img {
  transform: scale(1.06);
}

.home-products__name {
  font-size: clamp(15px, 0.94vw, 18px);
  font-weight: 600;
  line-height: 1.3;
  color: #191919;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-products__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 164px;
  height: 54px;
  padding-inline: 28px;
  background-color: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 1000px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #191919;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.home-products__button:hover {
  background-color: #f99c1b;
  border-color: #f99c1b;
  color: #fff;
}

.home-products__button-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

@media (max-width: 767px) {
  .home-products__title,
  .home-products__desc {
    max-width: 100%;
    padding-inline: clamp(4px, 2vw, 12px);
  }

  .home-products__track {
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .home-products__track::-webkit-scrollbar {
    display: none;
  }

  .home-products__card {
    flex: 0 0 calc((100% - 24px) / 2.5);
    min-width: calc((100% - 24px) / 2.5);
    scroll-snap-align: start;
  }

  .home-products__card:hover {
    transform: none;
  }
}

/* Homepage contact CTA */
.home-contact {
  background-color: #fff;
  padding-block: clamp(0px, 1.5vw, 24px) clamp(80px, 8.75vw, 168px);
}

.home-contact__inner {
  display: flex;
  justify-content: center;
}

.home-contact__banner {
  position: relative;
  width: 100%;
  min-height: clamp(240px, 22vw, 380px);
  overflow: hidden;
  border-radius: clamp(20px, 1.67vw, 32px);
  isolation: isolate;
}

.home-contact__banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("/assets/images/homepage/contact-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transform-origin: center center;
  animation: home-contact-breathe 3s ease-in-out infinite alternate;
  will-change: transform;
}

.home-contact__banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.42);
  transition: background-color 0.6s ease;
}

.home-contact__banner:hover::before {
  animation-play-state: paused;
  transform: scale(1.08);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-contact__banner:hover::after {
  background-color: rgba(0, 0, 0, 0.52);
}

.home-contact__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 1.25vw, 24px);
  min-height: inherit;
  padding: clamp(40px, 4.17vw, 72px) clamp(24px, 3.13vw, 60px);
  text-align: center;
}

.home-contact__eyebrow {
  margin: 0;
  font-size: clamp(13px, 0.83vw, 16px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.home-contact__title {
  max-width: 16em;
  margin: 0;
  font-size: clamp(26px, 2.08vw, 40px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #fff;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-contact__desc {
  max-width: 28em;
  margin: 0;
  font-size: clamp(15px, 0.94vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.88);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-contact__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 164px;
  height: 54px;
  margin-top: clamp(8px, 0.83vw, 16px);
  padding-inline: 28px;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 1000px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #fff;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.home-contact__button:hover {
  background-color: #fff;
  border-color: #fff;
  color: #191919;
}

.home-contact__button-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  transition: filter 0.25s ease;
}

.home-contact__button:hover .home-contact__button-dot {
  filter: brightness(0);
}

@keyframes home-contact-breathe {
  from {
    transform: scale(1.03);
  }

  to {
    transform: scale(1.07);
  }
}

@media (max-width: 767px) {
  .home-contact__title,
  .home-contact__desc {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-contact__banner::before {
    animation: none;
    transform: scale(1.04);
    will-change: auto;
  }

  .home-contact__banner:hover::before {
    transform: scale(1.04);
    transition: none;
  }

  .home-products__card,
  .home-products__image img {
    transition: none;
  }

  .home-products__card:hover {
    transform: none;
  }

  .home-products__card:hover .home-products__image img {
    transform: none;
  }
}
