@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Cormorant+Garamond:wght@500;700&family=Noto+Sans+JP:wght@400;700;900&display=swap");

:root {
  --ink: #171516;
  --paper: #f3eee8;
  --red: #e3232c;
  --cyan: #55bad4;
}

/*-------------------------------------------
共通設定
-------------------------------------------*/
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Noto Sans JP", sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
a {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
::selection {
  background: var(--red);
  color: white;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: film-grain 1.8s steps(4, end) infinite;
}
@keyframes film-grain {
  0% {
    background-position: 0 0;
    opacity: 0.045;
  }
  25% {
    background-position: 28px -18px;
    opacity: 0.065;
  }
  50% {
    background-position: -24px 22px;
    opacity: 0.05;
  }
  75% {
    background-position: 14px 34px;
    opacity: 0.07;
  }
  100% {
    background-position: 0 0;
    opacity: 0.045;
  }
}

.film-loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  gap: 1rem;
  background: var(--ink);
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1;
}
.film-loader b {
  color: var(--red);
  font:
    700 0.75rem "Noto Sans JP",
    sans-serif;
  letter-spacing: 0.25em;
}
.film-loader.is-finished {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.75s ease,
    visibility 0.75s ease;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 4vw;
  mix-blend-mode: difference;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}
.site-header p {
  margin: 0;
}
.site-header a {
  text-decoration: none;
}
.mark {
  display: inline-block;
  width: 120px;
  font-size: 2.125rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.mark span,
.scroll-link span {
  color: var(--red);
}
.scroll-link span {
  margin-left: 0.5rem;
}

/*-------------------------------------------
章の共通レイアウトと背景
-------------------------------------------*/
.chapter {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(6rem, 10vh, 9rem) 8vw 8vh;
  overflow: hidden;
  background: var(--ink);
}
.scene-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.78) contrast(1.06);
  transition:
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.4s ease;
}
.chapter:hover > .scene-photo {
  transform: scale(1.045);
  filter: saturate(0.95) contrast(1.07);
}
.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(8, 8, 9, 0.87),
      rgba(8, 8, 9, 0.32) 68%,
      rgba(8, 8, 9, 0.35)
    ),
    linear-gradient(0deg, rgba(8, 8, 9, 0.7), transparent 38%);
}
/* 写真の端を暗転させ、隣の章へつながる境界をつくる。文字は前面に残す。 */
.chapter:not(.hero)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--ink) 0%,
    rgba(23, 21, 22, 0.72) 4%,
    transparent 17%,
    transparent 79%,
    rgba(23, 21, 22, 0.72) 94%,
    var(--ink) 100%
  );
}
.chapter-index {
  position: absolute;
  z-index: 5;
  top: clamp(5rem, 8vh, 8rem);
  left: 8vw;
  margin: 0;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.chapter-index::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.8rem;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
  animation: signal-pulse 2.4s ease-in-out infinite;
}
@keyframes signal-pulse {
  0%,
  100% {
    opacity: 0.45;
    box-shadow: 0 0 0 0 rgba(227, 35, 44, 0.2);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 0 0.45rem rgba(227, 35, 44, 0);
  }
}
.chapter-content {
  position: relative;
  z-index: 4;
  width: 100%;
}
.chapter h2 {
  margin: 0;
  font-size: clamp(3.75rem, 8vw, 8rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
}
.chapter-content
  > p:not(.kicker):not(.vs-line):not(.closing-small):not(.glitch-copy):not(
    .closing-copy
  ):not(.credits) {
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.9;
}
.kicker,
.eyebrow {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

/*-------------------------------------------
01 シグナル
-------------------------------------------*/
.hero {
  align-items: center;
}
.hero::before {
  background: radial-gradient(
    circle at 70% 48%,
    transparent 12%,
    rgba(8, 8, 9, 0.2) 47%,
    rgba(8, 8, 9, 0.72)
  );
}
.hero-copy {
  position: relative;
  z-index: 4;
  width: 100%;
}
.hero h1 {
  margin: 2rem 0;
  font:
    700 clamp(5.4rem, 15vw, 15rem)/0.72 "Cormorant Garamond",
    serif;
  letter-spacing: -0.07em;
}
.hero h1 em {
  color: transparent;
  -webkit-text-stroke: 1px var(--paper);
  font-style: normal;
}
.villain {
  margin: 2.5rem 0 1rem;
  color: var(--red);
  font-size: clamp(1.6rem, 3.8vw, 4rem);
  font-weight: 900;
}
.release {
  margin: 0;
  color: var(--red);
  font:
    clamp(2.8rem, 6vw, 6rem) "Archivo Black",
    sans-serif;
}
.hero-cat {
  position: absolute;
  z-index: 2;
  width: min(48vw, 720px);
  right: 5vw;
  top: 20vh;
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.55));
  will-change: transform;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: min(46vw, 720px);
  aspect-ratio: 1;
  right: 4vw;
  top: 15vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(175, 5, 19, 0.2), transparent 66%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-side {
  position: absolute;
  z-index: 4;
  right: 4vw;
  bottom: 10vh;
  writing-mode: vertical-rl;
  color: var(--red);
  font-size: clamp(1.4rem, 2.8vw, 2.8rem);
  font-weight: 900;
}

/*-------------------------------------------
02 目撃
-------------------------------------------*/
.chapter-landscape .scene-photo {
  object-position: center 45%;
}
.sighting-copy {
  max-width: 55rem;
}
.sighting-copy h2 span {
  color: var(--red);
}
.sighting-copy > p:last-child {
  margin-top: 2rem;
}

/*-------------------------------------------
03 登場人物
-------------------------------------------*/
@property --focus-x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 13%;
}
@property --mobile-focus-x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}
.chapter-recruit {
  --focus-x: 13%;
  --mobile-focus-x: 0%;
  align-items: stretch;
  transition: --mobile-focus-x 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.chapter-recruit::before {
  background: linear-gradient(
    180deg,
    rgba(8, 8, 9, 0.8),
    rgba(8, 8, 9, 0.18) 36%,
    rgba(8, 8, 9, 0.9) 82%
  );
}
.cast-backdrop {
  top: 24%;
  height: 76%;
  object-position: center top;
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000);
  filter: saturate(0.65) brightness(0.7);
}
.chapter-recruit:hover > .cast-backdrop {
  filter: saturate(0.65) brightness(0.7);
}
.cast-spotlight {
  position: absolute;
  inset: 24% 0 0;
  z-index: 2;
  pointer-events: none;
  background: url("../assets/characters-sunglasses.png") center top / cover
    no-repeat;
  mask-image: radial-gradient(
    ellipse 20vw 52vh at var(--focus-x) 46%,
    #000 50%,
    rgba(0, 0, 0, 0.85) 66%,
    transparent 86%
  );
  transition: --focus-x 0.55s ease;
}
.cast-hotspots {
  position: absolute;
  z-index: 3;
  inset: 24% 0 24%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.cast-hotspot {
  cursor: crosshair;
}
.cast-content {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-items: start;
  padding-top: 7vh;
  pointer-events: none;
}
.cast-heading {
  grid-row: 1;
}
.cast-heading h2 {
  white-space: nowrap;
  font-size: clamp(3rem, 6.5vw, 6.5rem);
}
.cast-heading h2 span {
  color: var(--red);
}
.cast-featured {
  grid-row: 3;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 1rem;
  width: fit-content;
  min-width: min(25rem, 100%);
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0.8rem 1.2rem;
  border-left: 3px solid var(--red);
  background: rgba(8, 8, 9, 0.82);
  text-shadow: 0 4px 18px #000;
  backdrop-filter: blur(10px);
}
.cast-featured.is-changing {
  animation: cast-enter 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.cast-featured small {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.cast-featured strong {
  grid-column: 2;
  color: var(--paper);
  font:
    700 clamp(2rem, 5vw, 5rem)/0.85 "Cormorant Garamond",
    serif;
}
.cast-featured span {
  grid-column: 2;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}
@keyframes cast-enter {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.cast-list {
  grid-row: 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
}
.cast-name {
  display: grid;
  align-content: center;
  min-height: 8.5rem;
  padding: 1rem;
  border: 0;
  background: rgba(9, 9, 10, 0.76);
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.28s ease,
    transform 0.28s ease;
}
.cast-name:hover,
.cast-name:focus-visible,
.cast-name.is-active {
  background: rgba(227, 35, 44, 0.92);
  transform: translateY(-7px);
}
.cast-name small {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}
.cast-name strong {
  font:
    700 clamp(1.1rem, 2vw, 2rem) "Cormorant Garamond",
    serif;
  letter-spacing: 0.04em;
}
.cast-name span {
  font-size: 0.8rem;
  line-height: 1.5;
}

/*-------------------------------------------
04 対峙
-------------------------------------------*/
.chapter-vs .scene-photo {
  object-position: center 55%;
}
.vs-content {
  max-width: 65rem;
}
.vs-line {
  margin: 0 0 3rem;
  font-size: clamp(1.4rem, 3.2vw, 3rem);
  font-weight: 900;
}
.vs-line span {
  color: var(--red);
  font:
    italic 700 1.25em "Cormorant Garamond",
    serif;
}
.vs-content h2 em {
  color: #f12c73;
  font-style: normal;
}
.vs-content > p:last-child {
  margin-top: 2rem;
}

/*-------------------------------------------
05 真相
-------------------------------------------*/
.chapter-truth .scene-photo {
  object-position: 58% center;
}
.truth-content {
  max-width: 70rem;
}
.truth-content h2 span {
  color: var(--cyan);
}
.truth-content > p:last-child {
  margin-top: 2rem;
}

/*-------------------------------------------
06 最後の通信
-------------------------------------------*/
.chapter-transmission::before {
  background: rgba(4, 4, 5, 0.62);
}
.transmission-content {
  max-width: 70rem;
  margin: auto;
  text-align: center;
}
.transmission-content h2 {
  font-family: "Cormorant Garamond", serif;
}
.transmission-content h2 span {
  color: var(--red);
}
.signal {
  max-width: 36rem;
  margin: 3rem auto 0;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.68);
  text-align: left;
  backdrop-filter: blur(8px);
}
.signal b,
.signal i {
  color: var(--red);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.16em;
}
.signal p {
  line-height: 1.9;
}

/*-------------------------------------------
07 動物たちの証言
-------------------------------------------*/
.chapter-witness .scene-photo {
  object-position: center 58%;
}
.chapter-witness::before {
  background: linear-gradient(
    90deg,
    rgba(8, 8, 9, 0.9),
    rgba(8, 8, 9, 0.36) 72%,
    rgba(8, 8, 9, 0.1)
  );
}
.witness-content {
  max-width: 70rem;
}
.witness-content h2 span {
  color: var(--red);
}
.witness-content > p:last-child {
  margin-top: 2rem;
}

/*-------------------------------------------
08 観客への反転
-------------------------------------------*/
.chapter-reveal .scene-photo {
  object-position: center 40%;
}
.chapter-reveal::before {
  background: linear-gradient(
    90deg,
    rgba(4, 7, 14, 0.88),
    rgba(4, 7, 14, 0.42)
  );
}
.reveal-content {
  max-width: 72rem;
}
.reveal-content h2 span {
  color: var(--cyan);
}
.reveal-content > p:nth-last-child(2) {
  margin-top: 2rem;
}
.glitch-copy {
  margin: 2rem 0 0;
  color: var(--red);
  font:
    clamp(1.3rem, 3vw, 2.6rem) "Archivo Black",
    sans-serif;
}

/*-------------------------------------------
09 公開
-------------------------------------------*/
.closing {
  text-align: center;
}
.closing::before {
  background:
    linear-gradient(
      90deg,
      rgba(4, 5, 9, 0.58),
      rgba(4, 5, 9, 0.14),
      rgba(4, 5, 9, 0.58)
    ),
    rgba(4, 5, 9, 0.08);
}
.closing-content {
  display: grid;
  justify-items: center;
  padding-top: 4vh;
}
.closing-small {
  margin: 0 0 2rem;
  color: var(--red);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
}
.closing h2 {
  font:
    700 clamp(5rem, 14vw, 14rem)/0.75 "Cormorant Garamond",
    serif;
  letter-spacing: -0.08em;
}
.closing h2 span {
  color: transparent;
  -webkit-text-stroke: 1px var(--paper);
}
.closing-copy {
  margin: 2rem 0;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
}
.release-block {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  color: var(--red);
}
.release-block strong {
  font:
    clamp(3rem, 6vw, 5.5rem) "Archivo Black",
    sans-serif;
}
.release-block span {
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 900;
}
.credits {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.8;
}
.replay {
  margin-top: 2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--red);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition:
    color 0.25s,
    letter-spacing 0.25s;
}
.replay:hover,
.replay:focus-visible {
  color: var(--red);
  letter-spacing: 0.23em;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 4vw;
  border-top: 1px solid #453c3e;
  color: #b3a9a4;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

/*-------------------------------------------
小さい画面
-------------------------------------------*/
@media (max-width: 800px) {
  .site-header p {
    display: none;
  }
  .chapter {
    padding: 7.5rem 7vw 4rem;
  }
  .chapter-index {
    top: 5.25rem;
    left: 7vw;
  }
  .chapter h2 {
    font-size: clamp(3.25rem, 12vw, 6rem);
  }
  .chapter::before {
    background: linear-gradient(
      0deg,
      rgba(7, 7, 8, 0.9),
      rgba(7, 7, 8, 0.48) 80%
    );
  }
  .hero h1 {
    font-size: clamp(2rem, 9.8vw, 4.5rem);
  }
  .hero-cat {
    width: 78vw;
    max-width: 500px;
    top: 34vh;
    right: -6vw;
    opacity: 0.82;
  }
  .hero-side {
    bottom: 6vh;
    font-size: 1.5rem;
  }
  .villain {
    margin-top: 2rem;
  }
  .cast-content {
    padding-top: 0;
  }
  .cast-heading h2 {
    font-size: clamp(2rem, 9.5vw, 4rem);
  }
  .cast-featured {
    display: none;
  }
  .cast-backdrop {
    top: 22%;
    height: 78%;
    object-position: var(--mobile-focus-x) top;
  }
  .cast-spotlight {
    inset: 22% 0 0;
    background-position: var(--mobile-focus-x) top;
    mask-image: radial-gradient(
      ellipse 45vw 32vh at 50% 43%,
      #000 50%,
      rgba(0, 0, 0, 0.85) 66%,
      transparent 86%
    );
  }
  .cast-hotspots {
    display: none;
  }
  .cast-list {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    border: 0;
    background: none;
  }
  .cast-name {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.65rem;
    min-height: 3.65rem;
    padding: 0.5rem 0.75rem;
  }
  .cast-name:hover,
  .cast-name:focus-visible,
  .cast-name.is-active {
    transform: none;
  }
  .cast-name small {
    grid-row: 1 / span 2;
  }
  .cast-name strong {
    min-width: 0;
    font-size: 1.25rem;
  }
  .cast-name span {
    grid-column: 2;
    font-size: 0.875rem;
    line-height: 1.45;
  }
  .vs-line {
    margin-bottom: 2rem;
  }
  .chapter-truth {
    align-items: flex-end;
  }
  .chapter-truth .scene-photo {
    object-position: 84% center;
  }
  .chapter-truth h2 {
    font-size: clamp(2.5rem, 10.5vw, 4rem);
    line-height: 1.05;
  }
  .chapter-truth h2 span {
    white-space: nowrap;
  }
  .truth-content {
    margin-bottom: 1rem;
  }
  .chapter-transmission h2 {
    font-size: clamp(2rem, 8.2vw, 3.25rem);
    line-height: 1.12;
  }
  .chapter-transmission h2 span {
    white-space: nowrap;
  }
  .signal {
    margin-top: 2rem;
  }
  .closing h2 {
    font-size: clamp(2rem, 9.3vw, 4.5rem);
  }
  .closing .scene-photo {
    object-position: 82% center;
  }
  .release-block {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
  }
  footer {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .chapter {
    padding-top: 6.5rem;
  }
  .chapter-index {
    top: 4.8rem;
  }
  .cast-name {
    min-height: 3.65rem;
  }
  .closing-small {
    margin-bottom: 1.25rem;
  }
  .closing-copy {
    margin: 1.2rem 0;
  }
  .credits {
    margin-top: 1rem;
  }
  .replay {
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
