/* ============================================================
   Avrile — Hero Homepage
   Aurora animée + HeroRotator (die animation) + cursor displacement.
   ============================================================ */

.avr-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--avr-color-cream-warm);
  width: 100%;
}

/* ----------------------------------------------------------
   SVG filter defs — displacement map (invisible)
---------------------------------------------------------- */
.avr-hero__part-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ----------------------------------------------------------
   Aurora — override depuis global-classes
---------------------------------------------------------- */
.avr-hero .avr-aurora {
  inset: -6%;
  max-width: none;
  max-height: none;
}

/* ----------------------------------------------------------
   Grain
---------------------------------------------------------- */
.avr-hero .avr-grain {
  z-index: 1;
}

/* ----------------------------------------------------------
   Stage — contenu centré sur 100vh
---------------------------------------------------------- */
.avr-hero__stage {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(110px, 14vh, 168px) clamp(28px, 4.5vw, 76px) clamp(40px, 7vh, 80px);
}

/* ----------------------------------------------------------
   Headline — bloc Migra 200
---------------------------------------------------------- */
.avr-hero__headline {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  font-family: var(--avr-font-logo);
  font-weight: var(--avr-weight-light);
  font-style: normal;
  color: var(--avr-fg);
  line-height: 0.84;
  letter-spacing: -0.018em;
  font-size: clamp(65px, 11.9vw, 202px);
}

/* ----------------------------------------------------------
   Lignes L1 (rotor) et L2 (for good)
---------------------------------------------------------- */
.avr-hero__l1,
.avr-hero__l2 {
  font-family: var(--avr-font-logo);
  font-style: normal;
  font-weight: var(--avr-weight-light);
}

.avr-hero__l1 {
  display: block;
  text-align: left;
  align-self: flex-start;
}

.avr-hero__l2 {
  display: block;
  text-align: right;
  align-self: flex-end;
  padding-left: clamp(220px, 32vw, 580px);
  margin-top: 0.3em;
}

.avr-hero__l2 em {
  font-family: var(--avr-font-logo);
  font-style: italic;
  font-weight: var(--avr-weight-light);
}

/* ----------------------------------------------------------
   Rotor — perspective + sizer
---------------------------------------------------------- */
.avr-hero__rotor {
  position: relative;
  display: inline-block;
  vertical-align: top;
  perspective: 720px;
}

.avr-hero__rotor-sizer {
  visibility: hidden;
  display: inline-block;
  white-space: nowrap;
}

.avr-hero__rotor-word {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block;
  white-space: nowrap;
  transform-style: preserve-3d;
}

/* ----------------------------------------------------------
   Lettres — die animation (rotation sur l'axe X)
---------------------------------------------------------- */
.avr-hero__ltr {
  display: inline-block;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.avr-hero__rotor-word.is-in .avr-hero__ltr {
  animation: avr-die-in 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.avr-hero__rotor-word.is-out .avr-hero__ltr {
  animation: avr-die-out 0.52s cubic-bezier(0.6, 0.04, 0.86, 0.2) forwards;
}

@keyframes avr-die-in {
  from { opacity: 0; transform: translateY(0.42em) rotateX(-90deg); }
  55%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

@keyframes avr-die-out {
  from { opacity: 1; transform: translateY(0) rotateX(0deg); }
  to   { opacity: 0; transform: translateY(-0.42em) rotateX(90deg); }
}

/* ----------------------------------------------------------
   Foot — mention + tagline
---------------------------------------------------------- */
.avr-hero__foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 80px);
  width: 100%;
}

.avr-hero__mention {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--avr-font-body);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  color: var(--avr-color-cream);
  white-space: nowrap;
}

.avr-hero__foot-tag {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(14px, 1.8vh, 22px);
}

.avr-hero__tag {
  margin: 0;
  text-align: left;
  max-width: min(760px, 64vw);
  font-family: var(--avr-font-body);
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.55;
  font-weight: 400;
  color: var(--avr-fg);
  text-wrap: pretty;
}

.avr-hero__rule {
  display: none;
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */
@media (max-width: 760px) {
  .avr-hero__stage {
    padding: 104px 22px 44px;
    justify-content: flex-start;
  }

  .avr-hero__headline {
    flex: 0 0 auto;
    font-size: clamp(50px, 15.3vw, 87px);
    margin-top: 8vh;
  }

  .avr-hero__l2 {
    padding-left: clamp(40px, 22vw, 140px);
  }

  .avr-hero__foot {
    margin-top: auto;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 28px;
  }

  .avr-hero__foot-tag {
    align-items: flex-start;
  }

  .avr-hero__mention {
    white-space: normal;
  }

  .avr-hero__tag {
    max-width: 100%;
    text-align: left;
  }
}

/* ----------------------------------------------------------
   Reduced motion
---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .avr-hero__rotor-word.is-in .avr-hero__ltr,
  .avr-hero__rotor-word.is-out .avr-hero__ltr {
    animation: none;
  }
}
