/* Hero Slider (KAPPARA) - scoped to .kp-hero only */

/*
  Goals (do not touch anything else on the site):
  - First view content must be centered (match existing container width)
  - Prevent next slide from peeking (clip within the slider frame)
  - Match the existing site hero background (white + subtle radial gradient)
*/

.kp-hero{
  position: relative;
  padding: 0px 0 8px; /* match .hero */
  overflow: hidden;
  background: transparent; /* use page white */
  color: inherit;
}

/* Match the existing hero background glow */
.kp-hero::before{
  content:"";
  position:absolute;
  inset:-200px -200px auto -200px;
  height: 520px;
  background:
    radial-gradient(closest-side, rgba(143,178,214,.22), rgba(143,178,214,0)),
    radial-gradient(closest-side, rgba(15,47,87,.15), rgba(15,47,87,0));
  pointer-events:none;
}

/* Frame = centered container and clipping box */
.kp-hero__inner{
  position: relative;
}
.kp-hero__frame{
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden; /* prevents next slide peeking */
}

.kp-hero__track{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  transition: transform .55s ease;
  will-change: transform;
}

/* Slide is always 100% of the frame */
.kp-hero__slide{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 34px;
  align-items: start;
  min-height: clamp(400px, 72vh, 720px);
  padding: 0 var(--kp-hero-pad, 20px); /* align content to container while frame is full-bleed */
}

/* ===== Slide variants (KATANA-like composition) =====
   1) TEXT ONLY  : centered copy, no image
   2) IMAGE ONLY : centered media card
*/

/* Text-only slides: 1 column + centered content */
.kp-hero__slide--text{
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.kp-hero__slide--text .kp-hero__content{
  width: min(860px, 100%);
}
.kp-hero__slide--text .kp-hero__subcopy,
.kp-hero__slide--text .kp-hero__list{
  margin-left: auto;
  margin-right: auto;
}
.kp-hero__slide--text .kp-hero__actions{
  justify-content: center;
}
/* Make eyebrow line symmetrical on centered slides */
.kp-hero__slide--text .kp-hero__eyebrow{
  justify-content: center;
}
.kp-hero__slide--text .kp-hero__eyebrow::after{
  content:"";
  width: 22px;
  height: 1px;
  background: rgba(15,47,87,.55);
}

/* Image-only slide: 1 column + centered media */
.kp-hero__slide--image{
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
}
.kp-hero__slide--image .kp-hero__media{
  width: min(860px, 100%);
  height: clamp(260px, 52vh, 560px);
}
.kp-hero__slide--image .kp-hero__media-bg{
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
}

.kp-hero__content{
  position: relative;
  z-index: 2;
  padding: 0 0 22px;
}

.kp-hero__eyebrow{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 12px;
  color: rgba(15,47,87,.9);
  text-transform: uppercase;
}
.kp-hero__eyebrow::before{
  content:"";
  width: 22px;
  height: 1px;
  background: rgba(15,47,87,.55);
}

.kp-hero__headline{
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.kp-hero__subcopy{
  margin: 0 0 18px;
  color: rgba(14, 23, 38, 0.86);
  line-height: 1.7;
  max-width: 52ch;
}

.kp-hero__list{
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.kp-hero__list li{
  padding-left: 22px;
  position: relative;
  color: rgba(14, 23, 38, 0.86);
  font-weight: 700;
}
.kp-hero__list li::before{
  content:"";
  width: 10px; height: 10px;
  border-radius: 999px;
  position: absolute;
  left: 0; top: 10px;
  background: rgba(143,178,214,.85);
}

.kp-hero__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.kp-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  user-select: none;
}
.kp-btn:active{ transform: translateY(1px); }

.kp-btn--primary{
  background: linear-gradient(180deg, #113a6c, #0f2f57);
  color:#fff;
  box-shadow: 0 14px 36px rgba(15,47,87,.25);
}
.kp-btn--ghost{
  background: rgba(15,47,87,.04);
  border-color: rgba(15,47,87,.14);
  color: rgba(14,23,38,.86);
}

/* Media card (uses a theme image if present) */
.kp-hero__media{
  position: relative;
  height: 100%;
}
.kp-hero__media-bg{
  position:absolute;
  inset: 0;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.64), rgba(255,255,255,.18)),
    url("./hero.jpg") center/cover no-repeat;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 26px 60px rgba(2, 10, 24, .12);
}

.kp-hero__controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 12px;
  margin-top: 14px;
}
.kp-hero__arrow{
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,.75);
  color: rgba(14,23,38,.86);
  font-size: 26px;
  cursor: pointer;
}
.kp-hero__dots{
  display:flex;
  gap: 8px;
  align-items:center;
}
.kp-hero__dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.08);
  cursor: pointer;
}
.kp-hero__dot.is-active{
  width: 26px;
  background: rgba(143,178,214,.85);
  border-color: rgba(143,178,214,.95);
}

.kp-hero__progress{
  margin-top: 12px;
  height: 3px;
  background: rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  overflow: hidden;
}
.kp-hero__progress-bar{
  height: 100%;
  width: 0%;
  background: rgba(143,178,214,.95);
  border-radius: 999px;
  transition: width .05s linear;
}

.kp-hero__scroll{
  margin-top: 18px;
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 800;
  color: rgba(14,23,38,.70);
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 12px;
}
.kp-hero__scroll-arrow{
  display:inline-block;
  transform: translateY(0);
  animation: kpScroll 1.2s ease-in-out infinite;
}
@keyframes kpScroll{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(4px); }
}

@media (max-width: 980px){
  .kp-hero__slide{
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 18px;
  }
  .kp-hero__media{
    height: 240px;
  }
  /* Keep the image-only slide feeling like a "panel" even on mobile */
  .kp-hero__slide--image .kp-hero__media{
    height: min(52svh, 420px);
  }
  .kp-hero__actions .kp-btn{
    width: min(420px, 100%);
    justify-content:center;
  }
  .kp-hero__actions{ justify-content:center; }
}
/* ===== Full-width background (SAFE) - keep grid layout ===== */

/* 背景は画面いっぱいに敷く（中身には触らない） */
.kp-hero{
  position: relative;
  --kp-hero-pad: max(20px, calc((100vw - var(--container, 1200px))/2));
  width: 100%;
  overflow: hidden;
}

.kp-hero::before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(closest-side, rgba(143,178,214,.22), rgba(143,178,214,0)),
    radial-gradient(closest-side, rgba(15,47,87,.15), rgba(15,47,87,0));
  pointer-events:none;
  z-index: 0;
}


/* 中身は必ず背景の上に */
.kp-hero__inner,
.kp-hero__frame{
  position: relative;
  z-index: 1;
}

/* スライドのレイアウトは壊さない：gridのまま、高さだけ付与 */
.kp-hero__slide{
  min-height: 55svh;       /* ファーストビューらしい高さ */
  align-items: center;      /* gridの縦センタリング */
}

/* ヘッダー分だけ少し余白（固定ヘッダーがある場合の保険） */
.kp-hero__frame{
  padding-top: clamp(24px, 6vh, 72px);
  padding-bottom: clamp(18px, 4vh, 48px);
}
.kp-hero__slide--text .kp-hero__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ▼ テキストブロック自体を中央揃え */
.kp-hero__slide--text .kp-hero__content {
  text-align: center;
  margin: 0 auto;
}
