/* ==========================================================
   HERO
   ========================================================== */

.home-hero {
  position: sticky;
  top: 0;
  z-index: 1;
  isolation: isolate;

  width: 100%;
  min-height: 100vh;
  min-height: 100svh;

  display: flex;
  align-items: flex-end;

  overflow: hidden;
  contain: paint;

  color: var(--studio-white);
  background: var(--studio-black);

  opacity: 1;
  filter: none;
  transform: none;
}

/* Image de fond */

.home-hero__background {
  position: absolute;
  inset: 0;
  z-index: -3;

  background-image: url("../images/hero-studio.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;

  opacity: 1;
  filter: none;
  transform: none;
  will-change: auto;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}

/* Voile sombre */

.home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -2;

  opacity: 1;
  filter: none;
  transform: none;
  will-change: auto;

  background:
    linear-gradient(
      90deg,
      rgba(3, 7, 11, 0.97) 0%,
      rgba(3, 7, 11, 0.91) 24%,
      rgba(3, 7, 11, 0.7) 47%,
      rgba(3, 7, 11, 0.32) 72%,
      rgba(3, 7, 11, 0.22) 100%
    ),
    linear-gradient(
      0deg,
      rgba(3, 7, 11, 0.78) 0%,
      rgba(3, 7, 11, 0.12) 55%,
      rgba(3, 7, 11, 0.2) 100%
    );
}

/* ==========================================================
   RÉSEAUX SOCIAUX À GAUCHE
   ========================================================== */

.home-hero__rail {
  position: absolute;
  top: calc(var(--header-height) + 18px);
  bottom: 34px;
  left: clamp(20px, 3vw, 52px);
  z-index: 4;

  width: 40px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.home-hero__rail-line {
  width: 1px;
  min-height: 40px;
  flex: 1;

  background: rgba(255, 255, 255, 0.38);
}

.home-hero__socials {
  margin: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.home-hero__social-link {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--studio-white);
  line-height: 0;

  transition:
    color 200ms ease,
    transform 200ms ease;
}

.home-hero__social-link svg {
  display: block;

  width: 20px;
  height: 20px;

  flex-shrink: 0;
  overflow: visible;
}

.home-hero__social-link:hover,
.home-hero__social-link:focus-visible {
  color: var(--studio-red);

  transform: translateY(-3px);
}

.home-hero__rail-label {
  margin-top: 18px;

  color: rgba(255, 255, 255, 0.68);

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;

  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ==========================================================
   CONTENU DU HERO
   ========================================================== */

.home-hero__inner {
  width: min(calc(100% - 180px), 1480px);
  min-height: 100vh;
  min-height: 100svh;

  margin-inline: auto;

  padding:
    calc(var(--header-height) + 60px)
    0
    clamp(60px, 7vh, 90px);

  display: flex;
  align-items: flex-end;
  transform: translateY(-100px);
}

.home-hero__content {
  width: min(760px, 61vw);
  margin-left: clamp(50px, 7vw, 120px);
}

.home-hero__eyebrow {
  margin: 0 0 22px;

  color: var(--studio-red);

  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.home-hero__content-frame {
  position: relative;

  padding:
    clamp(30px, 3.5vw, 54px)
    clamp(30px, 4vw, 60px);

  border: 1px solid rgba(255, 255, 255, 0.24);

  background: rgba(4, 9, 14, 0.38);

  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home-hero__index {
  position: absolute;
  top: -10px;
  left: 28px;

  margin: 0;
  padding: 0 10px;

  color: rgba(255, 255, 255, 0.62);
  background: var(--studio-dark);

  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.14em;
}

.home-hero__title {
  max-width: 680px;
  margin: 0;

  color: var(--studio-white);

  font-size: clamp(42px, 4.6vw, 78px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.home-hero__title span {
  display: block;
  color: var(--studio-red);
}

.home-hero__description {
  max-width: 570px;

  margin: clamp(26px, 3.5vh, 40px) 0 0;

  color: rgba(255, 255, 255, 0.78);

  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 400;
  line-height: 1.7;
}

.home-hero__cta {
  position: relative;

  width: fit-content;
  margin-top: 30px;
  padding: 12px 0;

  display: inline-flex;
  align-items: center;
  gap: 28px;

  color: var(--studio-white);

  font-size: 14px;
  font-weight: 600;
}

.home-hero__cta::after {
  content: "";

  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;

  height: 2px;

  background: var(--studio-red);

  transform: scaleX(1);
  transform-origin: left;

  transition: transform 250ms ease;
}

.home-hero__cta svg {
  width: 20px;
  height: 20px;

  flex-shrink: 0;

  transition: transform 200ms ease;
}

.home-hero__cta:hover::after,
.home-hero__cta:focus-visible::after {
  transform: scaleX(0.3);
}

.home-hero__cta:hover svg,
.home-hero__cta:focus-visible svg {
  transform: translateX(6px);
}

/* ==========================================================
   INDICATION DE SCROLL
   ========================================================== */

.home-hero__scroll {
  position: absolute;
  right: clamp(24px, 4vw, 62px);
  bottom: 34px;
  z-index: 4;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;

  color: rgba(255, 255, 255, 0.72);

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-hero__scroll svg {
  width: 22px;
  height: 22px;

  animation: studio-scroll-arrow 1.8s ease-in-out infinite;
}

@keyframes studio-scroll-arrow {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(7px);
  }
}

/* ==========================================================
   RESPONSIVE DU HERO
   ========================================================== */

@media (max-width: 1280px) {
  .home-hero__inner {
    width: min(calc(100% - 140px), 1280px);
  }

  .home-hero__content {
    width: min(680px, 68vw);
    margin-left: 50px;
  }
}

@media (max-width: 1050px) {
  .home-hero__rail {
    left: 20px;
  }

  .home-hero__inner {
    width: min(calc(100% - 110px), 900px);
  }

  .home-hero__content {
    width: min(680px, 100%);
    margin-left: 40px;
  }

  .home-hero__title {
    font-size: clamp(44px, 7vw, 68px);
  }
}

@media (max-width: 767px) {
  .home-hero {
    min-height: max(760px, 100svh);
  }

  .home-hero__background {
    background-position: 64% center;
  }

  .home-hero__overlay {
    background:
      linear-gradient(
        90deg,
        rgba(3, 7, 11, 0.92) 0%,
        rgba(3, 7, 11, 0.78) 100%
      ),
      linear-gradient(
        0deg,
        rgba(3, 7, 11, 0.94) 0%,
        rgba(3, 7, 11, 0.4) 68%,
        rgba(3, 7, 11, 0.5) 100%
      );
  }

  .home-hero__rail {
    display: none;
  }

  .home-hero__inner {
    width: calc(100% - 32px);
    min-height: max(760px, 100svh);

    padding:
      calc(var(--header-height) + 70px)
      0
      70px;
  }

  .home-hero__content {
    width: 100%;
    margin-left: 0;
  }

  .home-hero__eyebrow {
    margin-bottom: 18px;

    font-size: 10px;
  }

  .home-hero__content-frame {
    padding: 30px 24px;
  }

  .home-hero__index {
    left: 18px;
  }

  .home-hero__title {
    font-size: clamp(38px, 11vw, 56px);
    line-height: 1;
    letter-spacing: -0.045em;
  }

  .home-hero__description {
    margin-top: 24px;

    font-size: 15px;
    line-height: 1.6;
  }

  .home-hero__cta {
    margin-top: 25px;

    font-size: 13px;
  }

  .home-hero__scroll {
    display: none;
  }
}

@media (max-width: 420px) {
  .home-hero__content-frame {
    padding: 28px 20px;
  }

  .home-hero__title {
    font-size: 37px;
  }
}
