/* /var/www/relyn/static_src/css/life.css */

.life-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 24px 90px;
}

.life-shell {
  position: relative;
  width: 100%;
  max-width: 1920px;
  min-height: 1395px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 77px;

  /* blur controls */
  --life-blur-w: 1650px;
  --life-blur-h: 620px;
  --life-blur-top: 58%;
  --life-blur-blur: 95px;
  --life-blur-opacity: 0.78;
}

.life-blur-layer {
  position: absolute;
  left: 50%;
  top: var(--life-blur-top);
  transform: translate(-50%, -50%);
  width: var(--life-blur-w);
  height: var(--life-blur-h);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%,
      rgba(166, 151, 224, 0.70) 0%,
      rgba(99, 62, 178, 0.82) 45%,
      rgba(0, 0, 0, 0.00) 78%);
  filter: blur(var(--life-blur-blur));
  opacity: var(--life-blur-opacity);
  pointer-events: none;
  z-index: 0;
}

.life-header {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.life-kicker {
  margin: 0;
  font-family: "Urbanist", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.life-title {
  margin: 22px 0 0;
  font-family: "Urbanist", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.16;
  color: #FFFFFF;
}

/* stage that holds all boxes; positions are relative to 1920 canvas */
.life-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1920px;
  height: 950px;
  margin-top: 33px;
}

/* shared box */
.life-box {
  position: absolute;
  border-radius: 20px;
  overflow: hidden;

  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.75);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.life-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ✅ Desktop exact placements (based on screen edges) */
/* 1: top after title 33, left 152 */
.life-box-1 {
  width: 167px;
  height: 464px;
  top: 0;
  left: 152px;
}

/* 7: top after title 33, right 152 */
.life-box-7 {
  width: 167px;
  height: 464px;
  top: 0;
  right: 152px;
}

/* 2: top 142, left 349 */
.life-box-2 {
  width: 334px;
  height: 430px;
  top: 109px; /* 142 - 33 = 109 relative to stage top */
  left: 349px;
}

/* 5: top 142, right 349 */
.life-box-5 {
  width: 334px;
  height: 430px;
  top: 109px;
  right: 349px;
}

/* 3: top 611, left 152 */
.life-box-3 {
  width: 530px;
  height: 380px;
  top: 578px; /* 611 - 33 = 578 */
  left: 152px;
}

/* 6: top 611, right 152 */
.life-box-6 {
  width: 530px;
  height: 380px;
  top: 578px;
  right: 152px;
}

/* 4: top 298, left/right 734 (center) */
.life-box-4 {
  width: 455px;
  height: 550px;
  top: 265px; /* 298 - 33 = 265 */
  left: 50%;
  transform: translate(-50%, 10px);
}

/* ✅ In-view */
.life-shell.is-inview .life-box {
  transform: translateY(0);
  opacity: 1;
}

.life-shell.is-inview .life-box-4 {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ✅ Header entrance */
.life-header {
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.life-shell.is-inview .life-header {
  transform: translateY(0);
  opacity: 1;
}

/* ✅ Laptop: same design pattern as desktop, but scaled down to avoid overlap (desktop untouched) */
@media (max-width: 1440px) and (min-width: 1025px) {
  .life-shell {
    min-height: 1250px;
    --life-blur-w: 1450px;
    --life-blur-h: 580px;
    --life-blur-top: 56%;
    --life-blur-blur: 92px;
  }

  .life-kicker {
    font-size: 18px;
    letter-spacing: 0.16em;
  }

  .life-title {
    font-size: 40px;
  }

  /* ✅ stage scales by width, keeping desktop geometry */
  .life-stage {
    width: 100%;
    max-width: 1440px;
    height: auto;
    aspect-ratio: 1920 / 950;
    margin-top: 28px;
  }

  /* ✅ same pattern/alignments as desktop (percent-based = no overlap) */
  .life-box-1 {
    width: 8.6979%;
    height: 48.8421%;
    top: 0%;
    left: 7.9167%;
  }

  .life-box-7 {
    width: 8.6979%;
    height: 48.8421%;
    top: 0%;
    right: 7.9167%;
  }

  .life-box-2 {
    width: 17.3958%;
    height: 45.2632%;
    top: 11.4737%;
    left: 18.1771%;
  }

  .life-box-5 {
    width: 17.3958%;
    height: 45.2632%;
    top: 11.4737%;
    right: 18.1771%;
  }

  .life-box-3 {
    width: 27.6042%;
    height: 40%;
    top: 60.8421%;
    left: 7.9167%;
  }

  .life-box-6 {
    width: 27.6042%;
    height: 40%;
    top: 60.8421%;
    right: 7.9167%;
  }

  .life-box-4 {
    width: 23.6979%;
    height: 57.8947%;
    top: 27.8947%;
    left: 50%;
    transform: translate(-50%, 10px);
  }
}

/* ✅ Tablet (landscape): same pattern/alignments as desktop, just smaller */
@media (max-width: 1024px) and (min-width: 769px) and (orientation: landscape) {
  .life-shell {
    min-height: 1180px;
    --life-blur-w: 1300px;
    --life-blur-h: 540px;
    --life-blur-top: 55%;
    --life-blur-blur: 88px;
  }

  .life-kicker {
    font-size: 17px;
    letter-spacing: 0.15em;
  }

  .life-title {
    font-size: 34px;
  }

  .life-stage {
    width: 100%;
    max-width: 1024px;
    height: auto;
    aspect-ratio: 1920 / 950;
    margin-top: 26px;
  }

  .life-box-1 {
    width: 8.6979%;
    height: 48.8421%;
    top: 0%;
    left: 7.9167%;
  }

  .life-box-7 {
    width: 8.6979%;
    height: 48.8421%;
    top: 0%;
    right: 7.9167%;
  }

  .life-box-2 {
    width: 17.3958%;
    height: 45.2632%;
    top: 11.4737%;
    left: 18.1771%;
  }

  .life-box-5 {
    width: 17.3958%;
    height: 45.2632%;
    top: 11.4737%;
    right: 18.1771%;
  }

  .life-box-3 {
    width: 27.6042%;
    height: 40%;
    top: 60.8421%;
    left: 7.9167%;
  }

  .life-box-6 {
    width: 27.6042%;
    height: 40%;
    top: 60.8421%;
    right: 7.9167%;
  }

  .life-box-4 {
    width: 23.6979%;
    height: 57.8947%;
    top: 27.8947%;
    left: 50%;
    transform: translate(-50%, 10px);
  }
}

/* ✅ Mobile + Tablet portrait: same pattern/alignments as desktop, and remove extra space under the image */
@media (max-width: 768px) {
  .life-section {
    padding: 0 16px 96px;
  }

  .life-shell {
    min-height: 0; /* ✅ removes forced empty space under stage */
    --life-blur-w: 1300px;
    --life-blur-h: 620px;
    --life-blur-top: 52%;
    --life-blur-blur: 90px;
  }

  .life-kicker {
    font-size: 16px;
    letter-spacing: 0.14em;
  }

  .life-title {
    font-size: 28px;
    line-height: 1.18;
  }

  .life-stage {
    width: 100%;
    max-width: 520px;
    height: auto;
    aspect-ratio: 1920 / 950;
    margin-top: 24px;
    margin-bottom: 0; /* ✅ no extra gap */
  }

  .life-box {
    border-radius: 18px;
  }

  .life-box-1 {
    width: 8.6979%;
    height: 48.8421%;
    top: 0%;
    left: 7.9167%;
  }

  .life-box-7 {
    width: 8.6979%;
    height: 48.8421%;
    top: 0%;
    right: 7.9167%;
  }

  .life-box-2 {
    width: 17.3958%;
    height: 45.2632%;
    top: 11.4737%;
    left: 18.1771%;
  }

  .life-box-5 {
    width: 17.3958%;
    height: 45.2632%;
    top: 11.4737%;
    right: 18.1771%;
  }

  .life-box-3 {
    width: 27.6042%;
    height: 40%;
    top: 60.8421%;
    left: 7.9167%;
  }

  .life-box-6 {
    width: 27.6042%;
    height: 40%;
    top: 60.8421%;
    right: 7.9167%;
  }

  .life-box-4 {
    width: 23.6979%;
    height: 57.8947%;
    top: 27.8947%;
    left: 50%;
    transform: translate(-50%, 10px);
  }
}

@media (max-width: 480px) {
  .life-title {
    font-size: 26px;
  }

  .life-stage {
    max-width: 480px;
    margin-top: 22px;
  }
}
