/* ============================================================
   page-solution.css — Solution ページ専用
   (スクロール連動の灯台ビーム + 海キラキラ + 円ハイライト)
   ============================================================ */

/* Stage = Hero + List をまとめる演出舞台 */
.sol-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* ─── 海面のキラキラ ─── */
.sol-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: screen;
}
.sea-sparkle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 181, .95) 0%, rgba(255, 244, 181, 0) 70%);
  opacity: 0;
  animation: seaSparkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes seaSparkle {
  0%, 100% { opacity: 0; transform: scale(.4); }
  50%      { opacity: .9; transform: scale(1.8); }
}

/* ─── 灯台のスポットライト(移動する光) ─── */
.sol-beam-spot {
  position: absolute;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(255, 244, 181, .8) 0%,
      rgba(255, 228, 154, .45) 25%,
      rgba(255, 211, 125, .18) 50%,
      rgba(255, 195, 77, 0) 75%);
  transform: translate(-50%, -50%);
  left: 22%;
  top: 30%;
  filter: blur(28px);
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
  transition: left 1.4s cubic-bezier(.4, 0, .2, 1),
              top  1.4s cubic-bezier(.4, 0, .2, 1),
              opacity .8s ease;
  will-change: left, top;
}

/* 灯台のライト本体(脈動する光源) */
.sol-beam-source {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 244, 181, .95) 0%,
    rgba(255, 228, 154, .6) 30%,
    rgba(255, 195, 77, 0) 70%);
  transform: translate(-50%, -50%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .8s ease, left .6s ease, top .6s ease;
  animation: lightSourcePulse 2.4s ease-in-out infinite;
}
@keyframes lightSourcePulse {
  0%, 100% { filter: blur(18px); }
  50%      { filter: blur(26px); }
}
.sol-stage.beam-active .sol-beam-source { opacity: 1; }

/* 灯台から現在の円へ伸びるビームのしっぽ(動的に回転・伸縮) */
.sol-beam-tail {
  position: absolute;
  left: 0;
  top: 0;
  height: 12px;
  width: 0;
  background: linear-gradient(90deg,
    rgba(255, 244, 181, 1)    0%,
    rgba(255, 228, 154, .7)  20%,
    rgba(255, 211, 125, .35) 55%,
    rgba(255, 195, 77, 0)   100%);
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
  filter: blur(38px);
  opacity: 0;
  will-change: width, transform;
  transition: width 1.4s cubic-bezier(.4, 0, .2, 1),
              transform 1.4s cubic-bezier(.4, 0, .2, 1),
              opacity .8s ease;
}
.sol-stage.beam-active .sol-beam-tail { opacity: 1; }

/* ============================================================
   Hero — 左: 灯台写真 / 右: 白カードに見出し+本文
   ============================================================ */
.sec-sol-hero {
  position: relative;
  min-height: 680px;
  background: var(--paper);       /* フェードの終端色 */
  overflow: hidden;
  padding: 64px 80px 80px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}
/* 灯台写真は section 全幅にフルブリード */
.sec-sol-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.sec-sol-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;   /* 灯台が左に来るようにトリミング */
  display: block;
  /* 下端 30% をフェードアウト → 次セクションへ滑らかに */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, rgba(0,0,0,.6) 80%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 60%, rgba(0,0,0,.6) 80%, rgba(0,0,0,0) 100%);
}
/* テキストカード — 右上にオーバーレイ */
.sec-sol-hero__card {
  position: relative;
  z-index: 2;
  width: 480px;
  max-width: 100%;
  background: rgba(255, 255, 255, .94);
  padding: 40px 44px 44px;
  border-radius: 10px;
  color: var(--navy);
  box-shadow: 0 14px 36px rgba(37, 66, 107, .12);
}
.sec-sol-hero__head-en {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 60px;
  color: var(--navy);
  line-height: 1;
}
.sec-sol-hero__head-ja {
  font-size: 14px;
  color: var(--navy);
  margin: 8px 0 32px;
  letter-spacing: .12em;
}
.sec-sol-hero__title {
  font-weight: 900;
  font-size: 26px;
  color: var(--navy);
  line-height: 1.55;
  margin: 0 0 24px;
}
.sec-sol-hero__lede {
  font-size: 13.5px;
  line-height: 2;
  color: #222;
  margin: 0;
}
.sec-sol-hero__lede strong { color: var(--navy); font-weight: 800; }

@media (max-width: 1023px) {
  .sec-sol-hero { padding: 48px 32px 56px; min-height: 520px; }
  .sec-sol-hero__photo img { object-position: 30% center; }
  .sec-sol-hero__card { width: 420px; padding: 32px 32px 36px; }
  .sec-sol-hero__head-en { font-size: 48px; }
  .sec-sol-hero__title { font-size: 22px; }
}
@media (max-width: 767px) {
  .sec-sol-hero {
    padding: 0;
    min-height: auto;
    display: block;
  }
  /* スマホ: 写真はアスペクト固定、カードは写真の下に縦積み */
  .sec-sol-hero__photo {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .sec-sol-hero__card {
    width: auto;
    margin: -28px 20px 24px;
    padding: 28px 24px 32px;
    border-radius: 8px;
  }
  .sec-sol-hero__head-en { font-size: 36px; }
  .sec-sol-hero__head-ja { margin-bottom: 24px; }
  .sec-sol-hero__title { font-size: 20px; line-height: 1.55; margin-bottom: 18px; }
  .sec-sol-hero__lede { font-size: 13px; line-height: 1.9; }
}

/* ============================================================
   Solutions section — 5つの円形カード(マップ背景)
   ============================================================ */
.sec-sol-list {
  position: relative;
  padding: 80px 40px 96px;
  background: var(--paper);
  overflow: hidden;
}
.sec-sol-list::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/sol-map-bg.png");
  background-size: cover;
  background-position: center;
  opacity: .55;
  z-index: 0;
  /* 上端をフェードイン → Heroからの境目を消す */
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 12%, #000 28%, #000 100%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 12%, #000 28%, #000 100%);
}
/* Hero と List の境目を埋める paper グラデオーバーレイ(さらに滑らかに) */
.sec-sol-list::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(255,254,253,0) 100%);
  z-index: 1;
  pointer-events: none;
}
.sec-sol-list__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.sol-circles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 80px;
  align-items: center;
  justify-items: center;
}

.sol-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: #fff;
  padding: 32px;
  color: var(--navy);
  box-shadow: 0 6px 24px rgba(37, 66, 107, .14);
  /* デフォルトは少し暗め(灯台の光が当たる前) */
  opacity: .55;
  filter: grayscale(40%) brightness(.9);
  transition: opacity 1s ease, filter 1s ease,
              transform .35s cubic-bezier(.4, 0, .2, 1),
              box-shadow .35s ease;
  z-index: 5;
}
/* 灯台の光が当たったとき(IntersectionObserverで .lit を付与) */
.sol-circle.lit {
  opacity: 1;
  filter: none;
}
/* .lit のときに光の輪を点滅させる */
.sol-circle__halo {
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 195, 77, .42) 0%, rgba(255, 195, 77, 0) 70%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 1s ease;
}
.sol-circle.lit .sol-circle__halo {
  opacity: 1;
  animation: solGlow 2.6s ease-in-out infinite;
}
@keyframes solGlow {
  0%, 100% { transform: scale(1); opacity: .55; }
  50%      { transform: scale(1.08); opacity: 1; }
}

.sol-circle:hover {
  transform: scale(1.06);
  opacity: 1;
  filter: none;
  box-shadow: 0 24px 60px rgba(37, 66, 107, .28),
              0 0 60px rgba(255, 195, 77, .45);
}
.sol-circle:hover .sol-circle__halo {
  opacity: 1;
  animation: solGlow 1.6s ease-in-out infinite;
}
.sol-circle__logo {
  max-width: 200px;
  max-height: 60px;
  height: auto;
  margin-bottom: 14px;
  display: block;
  object-fit: contain;
}
.sol-circle__name {
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
  margin: 0 0 14px;
  letter-spacing: .04em;
}
.sol-circle__desc {
  font-size: 12.5px;
  line-height: 1.85;
  color: #4d4d4d;
  margin: 0;
  font-weight: 500;
}

/* ジグザグ配置(PCのみ): 2/4はやや下にずらす */
.sol-circle:nth-child(2) { transform: translateY(40px); }
.sol-circle:nth-child(2):hover { transform: translateY(36px); }
.sol-circle:nth-child(4) { transform: translateY(40px); }
.sol-circle:nth-child(4):hover { transform: translateY(36px); }

/* 5枚目は中央寄せ */
.sol-circle:nth-child(5) {
  grid-column: 1 / -1;
  justify-self: center;
}

@media (max-width: 1023px) {
  .sec-sol-list { padding: 64px 32px 80px; }
  .sol-circles { gap: 36px; }
  .sol-circle { width: 280px; height: 280px; padding: 24px; }
  .sol-circle__name { font-size: 19px; }
  .sol-circle:nth-child(2), .sol-circle:nth-child(4) { transform: translateY(20px); }
  .sol-circle:nth-child(2):hover, .sol-circle:nth-child(4):hover { transform: translateY(16px); }
}
@media (max-width: 767px) {
  .sec-sol-list { padding: 48px 20px 56px; }
  .sol-circles { grid-template-columns: 1fr; gap: 28px; }
  .sol-circle { width: 240px; height: 240px; padding: 20px; }
  .sol-circle__logo { max-width: 150px; max-height: 50px; margin-bottom: 10px; }
  .sol-circle__name { font-size: 17px; margin-bottom: 10px; }
  .sol-circle__desc { font-size: 12px; line-height: 1.75; }
  .sol-circle:nth-child(2), .sol-circle:nth-child(4) { transform: none; }
  .sol-circle:nth-child(5) { grid-column: auto; }
  .sol-beam-spot { width: 480px; height: 480px; }
}

/* ============================================================
   prefers-reduced-motion 対応(アクセシビリティ)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .sol-circle { opacity: 1; filter: none; transition: none; }
  .sol-circle.lit .sol-circle__halo,
  .sol-circle:hover .sol-circle__halo { animation: none; }
  .sea-sparkle { animation: none; opacity: .6; }
  .sol-beam-spot { transition: none; }
}
