* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Serif JP", serif;
  background: #000;
  color: #fff;
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0;
  transition: opacity 2.5s ease-out;
  z-index: 1;
  pointer-events: none;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}

.text-block {
  margin-bottom: 35px;
}

/* 注釈 */
.note {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  color: rgba(255, 255, 255, 0.8);
}

/* リンクテキスト（1文字ずつ表示するため inline-block） */
.line .text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.line {
  display: inline-block;
  position: relative;
  font-size: 3rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: white;
}

/* 囲み線（四角形） */
.line .border {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 4辺の線 */
.line .border::before,
.line .border::after,
.line .border span::before,
.line .border span::after {
  content: "";
  position: absolute;
  background: white;
  transition: all 0.6s ease-out;
}

/* 上線（左→右） */
.line .border::before {
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
}

/* 下線（右→左） */
.line .border::after {
  bottom: 0;
  right: 0;
  height: 2px;
  width: 0%;
}

/* 左線（上→下） */
.line .border span::before {
  top: 0;
  left: 0;
  width: 2px;
  height: 0%;
}

/* 右線（下→上） */
.line .border span::after {
  bottom: 0;
  right: 0;
  width: 2px;
  height: 0%;
}

/* 表示後の囲み線アニメーション */
.line.show .border::before { width: 100%; }
.line.show .border::after { width: 100%; transition-delay: 0.6s; }
.line.show .border span::before { height: 100%; transition-delay: 1.2s; }
.line.show .border span::after { height: 100%; transition-delay: 1.8s; }

.note.show {
  opacity: 1;
  transform: translateY(0);
}

.footer-text {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.75);
  opacity: 0;
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
  z-index: 2; /* ← テキストより前面に */
}

.footer-text.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
