* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  width: 100%;
}

html {
  font-size: 62.5%;
}

@media screen and (max-width: 768px) {
  html {
    font-size: 58%;
  }
}

body {
  font-size: 1.6em;
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.75em;
  letter-spacing: 0.1rem;
  background-color: #055379;
}

/* .noto-sans jp-<uniquifier> {
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
} */

.sp-view {
  display: none;
}

.pc-view {
  display: block;
}

@media screen and (max-width: 768px) {
  .sp-view {
    display: block;
  }

  .pc-view {
    display: none;
  }
}

#key-visual {
  background-image: url(../images/bg-image.jpg);
  background-size: cover;
  background-position: center bottom;
  height: 100svh;
  position: relative;
}

.lead-copy {
  opacity: 0;
  position: absolute;
  top: 4%;
  right: 2%;
  z-index: 99;
  width: clamp(12px, 2.75vw, 30px);
  filter: drop-shadow(0 0 10px #011e28);
  transition: opacity 0.5s ease; /* ←これを追加 */
}

@media screen and (max-width: 768px) {
  .lead-copy {
    top: 30%;
    left: 49%;
  }
}

.title-ct {
  display: flex;
  flex-direction: column;
  width: 80vw;
  max-width: 830px;
  margin: auto;
  align-items: center;
  filter: drop-shadow(0 0 10px #0C2B3F);
  justify-content: center;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media screen and (max-width: 768px) {
  .title-ct {
    top: 15%;
  }
}

.main-title,
.sub-title {
  display: block;
  width: 100%;
  height: auto;
}

/* xの基準サイズ（ここでは1rem = 10px相当） */
:root {
  --x: 1rem;
}

/* sub-title の余白設定 */
.title-ct img:first-child {
  margin-top: var(--x); /* 上余白：x */
}

/* main-title の余白設定 */
.title-ct .main-title {
  margin-top: calc(var(--x) * 2); /* 下余白：2x */
}

.sub-title {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.main-title-glitch {
  display: none;
}

.main-title-glitch {
  position: relative;
  width: 100%;
  max-width: 830px;
  margin-top: calc(var(--x) * 2);
}

@media screen and (max-width: 768px) {
  .main-title-glitch {
    margin-top: calc(var(--x) * 0.75);
  }
}

.main-title-glitch img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 10;
}

/* 共通レイヤー調整 */
.main-title-glitch::before,
.main-title-glitch::after,
.main-title-glitch .glitch-line1,
.main-title-glitch .glitch-line2,
.main-title-glitch .glitch-line3,
.main-title-glitch .glitch-line4 {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/main-title.svg") no-repeat center/contain;
  opacity: 0; /* ← 初期は完全非表示！ */
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: screen;
  filter: brightness(1.2);
  animation: glitch-opacity 2s infinite;
}

@keyframes glitch-opacity {
  0%,
  100% {
    opacity: 0;
  }
  2%,
  4%,
  6%,
  8%,
  10%,
  12%,
  14%,
  16% {
    opacity: 0.3; /* ← チラッと表示される時だけ透ける */
  }
}

/* 各レイヤーのclipとアニメーション */
.main-title-glitch::before {
  clip-path: polygon(0 0, 100% 0, 100% 15%, 0 15%);
  animation: wild-glitch 2s infinite linear, glitch-opacity 2s infinite;
}

.main-title-glitch::after {
  clip-path: polygon(0 85%, 100% 85%, 100% 100%, 0 100%);
  animation: wild-glitch 2s infinite linear reverse, glitch-opacity 2s infinite;
}

.main-title-glitch .glitch-line1 {
  clip-path: polygon(0 20%, 100% 20%, 100% 30%, 0 30%);
  animation: wild-glitch 2s infinite linear, glitch-opacity 2s infinite;
  animation-delay: 0.1s;
}

.main-title-glitch .glitch-line2 {
  clip-path: polygon(0 35%, 100% 35%, 100% 45%, 0 45%);
  animation: wild-glitch 2s infinite linear, glitch-opacity 2s infinite;
  animation-delay: 0.2s;
}

.main-title-glitch .glitch-line3 {
  clip-path: polygon(0 50%, 100% 50%, 100% 60%, 0 60%);
  animation: wild-glitch 2s infinite linear, glitch-opacity 2s infinite;
  animation-delay: 0.3s;
}

.main-title-glitch .glitch-line4 {
  clip-path: polygon(0 65%, 100% 65%, 100% 75%, 0 75%);
  animation: wild-glitch 2s infinite linear, glitch-opacity 2s infinite;
  animation-delay: 0.4s;
}

/* 🔥 激しめなジャギジャギアニメーション */
@keyframes wild-glitch {
  0% {
    transform: translateX(0) skewX(0deg) scale(1);
  }
  2% {
    transform: translateX(-10px) skewX(-2deg) scaleX(1.02);
  }
  4% {
    transform: translateX(15px) skewX(3deg) scaleX(0.98);
  }
  6% {
    transform: translateX(-7px) skewX(-4deg);
  }
  8% {
    transform: translateX(12px) skewX(2deg);
  }
  10% {
    transform: translateX(-5px) skewX(0deg);
  }
  12% {
    transform: translateX(10px) skewX(-3deg);
  }
  14% {
    transform: translateX(-12px) skewX(2deg);
  }
  16% {
    transform: translateX(8px) skewX(-1deg);
  }
  18% {
    transform: translateX(0) skewX(0deg) scale(1);
  }
  100% {
    transform: translateX(0) skewX(0deg);
  }
}

.key-footer {
  opacity: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  width: 100%;
  position: absolute;
  bottom: 0;
  box-sizing: border-box;
  gap: 1rem;
  transition: opacity 0.5s ease; /* ←これを追加 */
}

@media screen and (max-width: 768px) {
  .key-footer {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari対応 */
  }
}

.date-ct {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.banner-ct {
  display: block;
  width: 300px;
  height: auto;
  aspect-ratio: 3 / 1;
  background-image: url(../images/banner-shikoujikken.jpg);
  background-size: cover;
  background-position: center;
  border-radius: 0.6rem;
  border: solid 1px #fff;
  box-shadow: 0px 0px 10px #055379d6;
  transition: background-image 0.3s ease;
}

.banner-ct:hover {
  background-image: url(../images/banner-ubugoe.jpg);
}

.nomore-logo {
  opacity: 0;
  width: clamp(125px, 8vw, 175px);
  transition: opacity 0.5s ease; /* ←これを追加 */
}

@media screen and (max-width: 768px) {
  .nomore-logo {
    padding: 2rem;
    margin: auto;
  }
}

@keyframes fade-pop {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-pop {
  animation: fade-pop 2s ease-out forwards;

}
