/* ==========================================================
   HERO STORY — BLOOPIN
   1 scène / 1 Lottie / mobile fluide
   ========================================================== */

.bp-story{
  --bp-radius-xl: 34px;
  --bp-shadow-md: 0 18px 34px rgba(15,23,42,.09), 0 6px 18px rgba(15,23,42,.05);
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.bp-story *{
  box-sizing: border-box;
}

.bp-story__pin{
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100svh;
  padding: 10px 25px 25px;
  margin-bottom: 20px;
}

.bp-story__frame{
  position: relative;
  width: 100%;
  min-height: 100svh;
  margin: 0 auto;
  border-radius: 36px;
  overflow: hidden;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,.72),
    rgba(255,255,255,.46)
  );

  box-shadow: var(--bp-shadow-md);

  transform: translateZ(0);
}

.bp-story__frame::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,.48),
    transparent 24%,
    transparent 72%,
    rgba(255,255,255,.16)
  );

  z-index: 2;
}

.bp-story__bg{
  position: absolute;
  inset: 0;
  z-index: 0;

  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(201, 214, 208, .38),
      transparent 24%
    ),

    radial-gradient(
      circle at 78% 16%,
      rgba(241, 214, 154, .26),
      transparent 22%
    ),

    linear-gradient(
      135deg,
      #F6F1E7 0%,
      #EFE8DB 52%,
      #E6ECE8 100%
    );
}
.bp-story__inner{
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 100svh;
  padding: 112px 28px 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr);
  gap: 22px;
  align-items: center;
}

.bp-story__content{
  min-width: 0;
  max-width: 690px;
  padding: clamp(10px, 2vw, 34px) 0;
  margin-left: 20px;
}

.bp-scene-title-global{
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: var(--bp-title-hero-size);
  line-height: var(--bp-title-hero-line);
  letter-spacing: var(--bp-title-hero-spacing);
  font-weight: var(--bp-title-weight);
  color: var(--bp-title-color);
  text-wrap: balance;
}

.bp-scene-title-global > span{
  display: block;
}

.bp-scene-text-global{
  margin: var(--bp-copy-gap-lg) 0 0;
  max-width: var(--bp-copy-max);
  font-size: var(--bp-text-size);
  line-height: var(--bp-text-line);
  font-weight: var(--bp-text-weight);
  color: var(--bp-text-color);
  text-wrap: pretty;
}

.bp-word-accent{
  position: relative;
  display: inline-block;
  white-space: nowrap;
  overflow: visible;
  vertical-align: baseline;
  letter-spacing: -0.035em;
  color: #fff;
  opacity: 0;
  transform: translateY(.08em);
  transition:
    opacity .55s ease,
    transform .7s cubic-bezier(.22, 1, .36, 1),
    color .35s ease;
}

.bp-story.is-ready .bp-word-accent{
  opacity: 1;
  transform: translateY(0);
}

.bp-word-accent::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .08em;
  height: .09em;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 38%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: .9;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1) .08s;
}

.bp-story.is-ready .bp-word-accent::after{
  transform: scaleX(1);
}

.bp-scene__points{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.bp-scene__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.bp-story__visual{
  position: relative;
  min-width: 0;
  min-height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bp-hero-lottie{
  position: relative;
  width: clamp(680px, 54vw, 1040px);
  aspect-ratio: 1600 / 1500;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-5%);
  contain: layout paint;
}

.bp-hero-lottie lottie-player{
  position: absolute;
  width: 100%;
  aspect-ratio: 1600 / 1800;
  height: auto;
  left: -3%;
  top: -5%;
  display: block;
  pointer-events: none;
}

/* TABLET */

@media (min-width: 768px) and (max-width: 1024px){
  .bp-story,
  .bp-story__pin{
    min-height: auto;
  }

  .bp-story__pin{
    padding: 5px 25px 25px;
  }

  .bp-story__frame{
    min-height: auto;
    height: auto;
    border-radius: 28px;
  }

  .bp-story__inner{
    min-height: auto;
    padding: 88px 24px 0px;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }

  .bp-story__content{
    max-width: 100%;
    padding: 0;
    margin-left: 0;
  }

  .bp-story__visual{
    width: 100%;
    min-height: auto;
    overflow: hidden;
  }

  .bp-hero-lottie{
    width: min(100%, 680px);
    aspect-ratio: 1600 / 1460;
    margin: 0 auto;
    transform: none;
    overflow: hidden;
  }

  .bp-hero-lottie lottie-player{
    width: 102%;
    height: auto;
    aspect-ratio: 1600 / 1800;
    left: -2%;
    top: -1%;
  }
}

/* MOBILE */

@media (max-width: 767px){
  .bp-story,
  .bp-story__pin{
    min-height: auto;
  }

  .bp-story__pin{
    padding: 8px 0 50px;
  }

  .bp-story__frame{
    width: calc(100% - 12px);
    min-height: auto;
    margin: 0 auto;
    border-radius: 24px;
  }

  .bp-story__inner{
    min-height: auto;
    padding: 68px 14px 72px;
    grid-template-columns: 1fr;
    gap: 2px;
    align-items: start;
  }

  .bp-story__content{
    order: 1;
    max-width: 100%;
    padding: 0;
    margin: 2px 0 0;
  }

  .bp-story__visual{
    order: 2;
    width: 100%;
    min-height: auto;
    overflow: hidden;
  }

  .bp-scene-title-global{
    font-size: var(--bp-title-mobile-size);
    line-height: var(--bp-title-mobile-line);
    letter-spacing: var(--bp-title-mobile-spacing);
  }

  .bp-scene-text-global{
    margin-top: var(--bp-copy-gap-sm);
    max-width: 100%;
    font-size: var(--bp-text-mobile-size);
    line-height: var(--bp-text-mobile-line);
  }

  .bp-scene__points{
    margin-top: 14px;
  }

  .bp-scene__actions{
    margin-top: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .bp-hero-lottie{
    width: min(108%, 430px);
    aspect-ratio: 1600 / 1540;
    margin: 0 auto;
    transform: none;
  }

  .bp-hero-lottie lottie-player{
    width: 108%;
    height: auto;
    aspect-ratio: 1600 / 1800;
    left: -4%;
    top: -1%;
  }
}

@media (max-width: 460px){
  .bp-hero-lottie{
    width: min(100%, 390px);
    aspect-ratio: 1600 / 1700;
  }

  .bp-hero-lottie lottie-player{
    width: 106%;
    height: auto;
    aspect-ratio: 1600 / 1800;
    left: -1%;
    top: 5%;
  }
}

@media (prefers-reduced-motion: reduce){
  .bp-word-accent,
  .bp-word-accent::after{
    transition: none !important;
  }

  .bp-word-accent{
    opacity: 1 !important;
    transform: none !important;
  }

  .bp-word-accent::after{
    transform: scaleX(1) !important;
  }
}


html.bp-page-loading,
html.bp-page-loading body{
  overflow: hidden;
}

.bp-page-loader{
  position: fixed;
  inset: 0;
  z-index: 999999;

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

  background:#fcf9f1;

  transition:
    opacity .55s ease,
    visibility .55s ease;
}

.bp-page-loader__logo{
  width: clamp(90px, 12vw, 130px);
  height: auto;

  opacity: 0;

  animation:
    bpLogoFade .9s ease forwards,
    bpLogoFloat 2.6s ease-in-out infinite;
}

html:not(.bp-page-loading) .bp-page-loader{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes bpLogoFade{
  from{
    opacity:0;
    transform:translateY(10px) scale(.96);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@keyframes bpLogoFloat{
  0%{
    transform:translateY(0);
  }

  50%{
    transform:translateY(-6px);
  }

  100%{
    transform:translateY(0);
  }
}