/* ====== 全体共通：端のズレ吸収 ====== */
:root { --bleed: 2px; } /* 端のにじみ対策。必要なら 3px に */

/* ====== 1) セクション共通レイヤー ====== */
.section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.section .container { position: relative; z-index: 2; }

/* 背景スライドの受け皿（notes/apply など） */
.section .bg-slideshow {
  position: absolute;
  inset: calc(-1 * var(--bleed));
  z-index: 0;
}

/* スライド（フェードのみ。scale はズレの原因なので無効） */
.bg-slide,
.hero-slide {
  position: absolute;
  inset: calc(-1 * var(--bleed));
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
  transform: none;
}
.bg-slide.active,
.hero-slide.active { opacity: 1; }

/* 旧オーバーレイ要素は使わない（競合防止） */
.notes-overlay, .apply-overlay { display: none !important; }

/* ====== 2) ヒーロー（1ページ目） ====== */
.section-hero {
  min-height: 100vh;
  background: #0b0b0c;
  padding: 0;
}
.hero-slideshow { position: absolute; inset: calc(-1 * var(--bleed)); z-index: 0; }
.hero-overlay {
  position: absolute;
  inset: calc(-1 * var(--bleed));
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 70% 30%, rgba(255,255,255,0.15), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.65));
}
.hero-content { text-align: center; padding-top: 64px; }
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.25;
  margin: 0 16px 16px;
  text-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.hero-subtitle { margin: 0 0 24px; color: var(--muted); letter-spacing: .12em; }

/* 下からふわっと（タイトル→少し遅れてサブタイトル） */
.hero-title.reveal, .hero-subtitle.reveal { opacity: 0; transform: translateY(16px); }
.hero-title.reveal {
  transition: opacity 1.2s cubic-bezier(.2,.8,.2,1),
              transform 1.2s cubic-bezier(.2,.8,.2,1);
}
.hero-subtitle.reveal {
  transition: opacity 1.2s cubic-bezier(.2,.8,.2,1) .6s,
              transform 1.2s cubic-bezier(.2,.8,.2,1) .6s;
}
.hero-title.reveal.in-view, .hero-subtitle.reveal.in-view {
  opacity: 1; transform: translateY(0);
}

/* ====== 3) 2・3ページ目のオーバーレイは ::before に統一 ====== */
.section-notes::before,
.section-apply::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--bleed));  /* 受け皿・スライドと同じ inset */
  pointer-events: none;
  z-index: 1;
}
.section-notes::before {
  background:
    radial-gradient(1200px 600px at 70% 30%, rgba(255,255,255,0.08), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,0.48), rgba(0,0,0,0.76));
}
.section-apply::before {
  background:
    radial-gradient(1200px 600px at 70% 30%, rgba(255,255,255,0.08), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,0.30), rgba(0,0,0,0.55));
}

/* ====== 雑多な残骸の無効化（縁・光り・旧疑似要素） ====== */
.lux-title, .lux-title::after {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  color: inherit !important;
  text-shadow: none !important;
  animation: none !important;
  content: normal !important;
}
/* 以前の ::before/::after 背景があれば止める */
.section-notes::after, .section-apply::after { content: none !important; display: none !important; }

/* スクロールインジケータ（任意。現状のまま） */
.scroll-indicator{
  position:absolute; left:50%; bottom:24px; transform:translateX(-50%);
  display:grid; place-items:center; gap:6px; color:var(--muted);
  font-size:12px; letter-spacing:.2em;
}
.scroll-indicator i{
  width:2px; height:40px; background:var(--gold);
  animation:scroll 1.6s ease-in-out infinite; border-radius:999px;
  box-shadow:0 0 20px rgba(255,215,0,0.35);
}
@keyframes scroll{
  0%{ transform:translateY(0); opacity:.6; }
  50%{ transform:translateY(6px); opacity:1; }
  100%{ transform:translateY(0); opacity:.6; }
}