/* 竜ケ崎電設 トップ メインビジュアルのキャッチ v2（2026-10-23）
   戻す: wp option update ryuden_kv_v2 0 */

/* 現場写真を活かす：左から紺のグラデーション */
.rk-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 20, 60, .88) 0%, rgba(8, 20, 60, .62) 38%, rgba(8, 20, 60, .18) 72%, rgba(8, 20, 60, .05) 100%),
    linear-gradient(0deg, rgba(8, 20, 60, .55) 0%, rgba(8, 20, 60, 0) 40%);
}

/* 高さを抑える（16:9だと大きい画面で縦に長すぎる） */
#visual .c-visual__figure {
  aspect-ratio: auto;
  height: clamp(580px, 82vh, 860px);
}
#visual .c-visual__img {
  object-position: center 30%;
}

/* 写真をゆっくりズーム */
#visual .slick-current .c-visual__img {
  animation: rk-zoom 9s ease-out both;
}
@keyframes rk-zoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

.rk {
  position: absolute;
  z-index: 3;
  left: clamp(24px, 7vw, 120px);
  bottom: clamp(56px, 13%, 110px);
  max-width: 760px;
  color: #fff;
  text-align: left;
}
.rk * {
  text-align: left !important;
}

.rk__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  font-family: "Montserrat", "Anton", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .24em;
  color: rgba(255, 255, 255, .9);
}
.rk__since {
  padding: 6px 12px;
  background: #be392e;
  color: #fff;
  letter-spacing: .18em;
}
.rk__place {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rk__place::before {
  content: "";
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, .7);
}

.rk__ttl {
  margin: 0 0 28px !important;
  padding: 0 !important;
  font-size: clamp(3.2rem, 4.1vw, 5.6rem) !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  letter-spacing: .06em !important;
  white-space: nowrap;
  color: #fff !important;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}
.rk__line {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
}
.rk__line > span {
  display: inline-block;
}
/* PCは1行で見せる（スマホは「、」の後で改行） */
@media (min-width: 768px) {
  .rk__line {
    display: inline-block;
    vertical-align: top;
  }
}
.rk__ttl em {
  font-style: normal;
  background: linear-gradient(transparent 68%, rgba(190, 57, 46, .9) 68%, rgba(190, 57, 46, .9) 92%, transparent 92%);
  padding: 0 .04em;
}

.rk__sub {
  margin: 0;
  padding-left: 18px;
  border-left: 2px solid #be392e;
  font-size: clamp(1.3rem, 1.1vw, 1.5rem);
  font-weight: 500;
  line-height: 2;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .92);
}

/* 右端の縦書き英字 */
.rk__vert {
  position: absolute;
  z-index: 3;
  right: clamp(16px, 3vw, 44px);
  top: 50%;
  margin: 0;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .4em;
  color: rgba(255, 255, 255, .6);
}

/* スクロール表示 */
.rk__scroll {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding-bottom: 64px;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .8);
}
.rk__scroll::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 52px;
  background: rgba(255, 255, 255, .8);
  transform-origin: top;
  animation: rk-scroll 2.2s ease-in-out infinite;
}
@keyframes rk-scroll {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* スライドが切り替わるたびに文字が下からせり上がる */
#visual .slick-current .rk__line > span {
  animation: rk-up 1s cubic-bezier(.2, .75, .2, 1) both;
  animation-delay: calc(.25s + var(--i, 0) * .14s);
}
#visual .slick-current .rk__eyebrow,
#visual .slick-current .rk__sub {
  animation: rk-fade 1s ease-out both;
}
#visual .slick-current .rk__eyebrow {
  animation-delay: .1s;
}
#visual .slick-current .rk__sub {
  animation-delay: .7s;
}
@keyframes rk-up {
  from { transform: translateY(105%); }
  to { transform: translateY(0); }
}
@keyframes rk-fade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  #visual .c-visual__figure {
    aspect-ratio: 3 / 4;
    height: auto;
  }
  .rk {
    left: 20px;
    right: 20px;
    bottom: 44px;
  }
  .rk__eyebrow {
    gap: 10px;
    margin-bottom: 18px;
    font-size: 1rem;
    letter-spacing: .16em;
  }
  .rk__place::before {
    width: 20px;
  }
  .rk__ttl {
    font-size: clamp(2.6rem, 7.6vw, 3.4rem) !important;
    white-space: normal;
    margin-bottom: 18px !important;
  }
  .rk__sub {
    padding-left: 12px;
    font-size: 1.25rem;
    line-height: 1.85;
  }
  .rk__vert {
    display: none;
  }
  .rk__scroll {
    display: none;
  }
  .rk-overlay {
    background: linear-gradient(0deg, rgba(8, 20, 60, .9) 0%, rgba(8, 20, 60, .55) 50%, rgba(8, 20, 60, .2) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #visual .slick-current .c-visual__img,
  #visual .slick-current .rk__line > span,
  #visual .slick-current .rk__eyebrow,
  #visual .slick-current .rk__sub,
  .rk__scroll::after {
    animation: none;
  }
}
