@font-face {
  font-family: "Mass Shippori Display";
  src: url("../fonts/song/ShipporiMinchoB1-Medium-subset.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Mass Shippori Reading";
  src: url("../fonts/song/ShipporiMinchoB1-Regular-subset.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Mass Zen Utility";
  src: url("../fonts/song/ZenKakuGothicNew-Medium-subset.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #eee9df;
  --paper-light: #f5f1e9;
  --ink: #20241f;
  --ink-soft: #434942;
  --muted: #6f726b;
  --forest: #17231d;
  --sea: #6f8888;
  --rust: #9b7350;
  --line: rgba(32, 36, 31, 0.2);
  --night: #111713;
  --night-soft: #1a221e;
  --display: "Mass Shippori Display", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --reading: "Mass Shippori Reading", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --utility: "Mass Zen Utility", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--reading);
  font-size: 17px;
  line-height: 2;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
}

button,
input {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper-light);
  color: var(--ink);
  font-family: var(--utility);
  font-size: 13px;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid #c89a70;
  outline-offset: 4px;
}

.review-band {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-light);
  color: var(--muted);
  font-family: var(--utility);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.review-band strong {
  color: #714c3c;
  font-weight: 500;
}

.work-nav {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(5vw, 24px);
  border-bottom: 1px solid var(--line);
  background: var(--paper-light);
  color: var(--muted);
  font-family: var(--utility);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.work-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  text-decoration: none;
}

.work-nav a:hover {
  color: var(--forest);
}

.work-nav p {
  text-align: right;
}

.work-nav p span {
  color: var(--sea);
}

.utility-label {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.06em;
}

.film-heading {
  display: grid;
  width: min(1180px, calc(100% - 96px));
  grid-template-columns: minmax(360px, 1fr) minmax(240px, 0.64fr);
  align-items: end;
  gap: 80px;
  margin: 0 auto;
  padding: clamp(82px, 9vw, 132px) 0 clamp(66px, 7vw, 102px);
}

.film-heading h1 {
  margin-top: 24px;
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 500;
  line-height: 1.55;
}

.film-heading__note {
  justify-self: end;
  padding-bottom: 12px;
  color: var(--sea);
  font-size: 14px;
}

.film-room {
  padding: clamp(38px, 5vw, 76px) max(4vw, 20px) clamp(96px, 11vw, 160px);
  background: var(--night);
  color: var(--paper-light);
}

.film-room__frame {
  position: relative;
  width: min(1280px, 100%);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  background: #080b09;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.film-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080b09;
}

.film-room__frame.is-enhanced .film-video {
  pointer-events: none;
}

.film-start {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(8, 11, 9, 0.08), rgba(8, 11, 9, 0.38));
  color: #f6f1e7;
  font-family: var(--utility);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.film-room__frame.is-enhanced .film-start {
  display: grid;
}

.film-start__mark {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(246, 241, 231, 0.68);
  border-radius: 50%;
  background: rgba(14, 19, 16, 0.3);
}

.film-start__mark::after {
  display: block;
  width: 0;
  height: 0;
  margin: 21px 0 0 25px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #f6f1e7;
  content: "";
}

.film-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 18px;
  background: rgba(8, 11, 9, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.film-controls button {
  min-width: 58px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #f2ede4;
  font-family: var(--utility);
  font-size: 11px;
  cursor: pointer;
}

.film-controls button:hover {
  color: #d2aa84;
}

.film-controls__progress-label {
  display: grid;
  min-height: 44px;
  align-items: center;
}

.film-controls__progress {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  accent-color: #d2aa84;
  cursor: pointer;
}

.film-controls__time {
  color: rgba(242, 237, 228, 0.68);
  font-family: var(--utility);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.film-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 30px;
  background: var(--night-soft);
  text-align: center;
}

.film-error p:first-child {
  font-family: var(--display);
  font-size: 24px;
}

.film-error p:last-child {
  color: rgba(245, 241, 233, 0.72);
  font-size: 13px;
}

.film-room__meta {
  display: flex;
  width: min(1280px, 100%);
  justify-content: space-between;
  gap: 24px;
  margin: 18px auto 0;
  color: rgba(245, 241, 233, 0.58);
  font-family: var(--utility);
  font-size: 10px;
  line-height: 1.6;
}

.film-room__meta span {
  margin-right: 12px;
  color: rgba(245, 241, 233, 0.88);
}

.film-room__credit {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(245, 241, 233, 0.62);
}

.film-room__credit a {
  color: inherit;
  text-decoration-color: rgba(245, 241, 233, 0.36);
  text-underline-offset: 0.22em;
}

.film-room__credit a:hover {
  color: var(--paper-light);
  text-decoration-color: currentColor;
}

.scene-record {
  display: grid;
  width: min(1120px, calc(100% - 96px));
  grid-template-columns: minmax(300px, 0.8fr) minmax(460px, 1.2fr);
  gap: clamp(80px, 10vw, 160px);
  margin: 0 auto;
  padding: clamp(130px, 14vw, 210px) 0;
}

.scene-record__intro h2,
.film-passage__copy h2 {
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 500;
  line-height: 1.65;
}

.scene-record__intro > p:last-child {
  width: min(100%, 410px);
  margin-top: 42px;
  color: var(--ink-soft);
  font-size: 14px;
}

.scene-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: scene;
}

.scene-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  counter-increment: scene;
}

.scene-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.scene-list span {
  color: var(--sea);
  font-family: var(--utility);
  font-size: 11px;
}

.scene-list span::before {
  margin-right: 12px;
  color: var(--muted);
  content: "0" counter(scene);
}

.scene-list p {
  color: var(--ink-soft);
  font-size: 15px;
}

.film-afterglow {
  display: grid;
  min-height: 84svh;
  place-content: center;
  justify-items: center;
  gap: 38px;
  padding: 110px 24px 160px;
  background: var(--paper-light);
  text-align: center;
}

.film-afterglow h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
}

.film-passage {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(54px, 8vw, 128px);
  padding: clamp(118px, 13vw, 190px) max(6vw, 34px);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.film-passage__photo {
  width: min(100%, 780px);
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #d7d0c4;
  box-shadow: 0 26px 76px rgba(37, 38, 32, 0.14);
}

.film-passage__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 58%;
  filter: brightness(1.05) saturate(0.9);
}

.film-passage__copy {
  width: min(100%, 500px);
}

.film-passage__copy > p:not(.utility-label) {
  width: min(100%, 400px);
  margin-top: 34px;
  color: var(--ink-soft);
  font-size: 14px;
}

.film-passage__primary,
.film-passage__return {
  display: flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  color: var(--forest);
  text-decoration: none;
}

.film-passage__primary {
  gap: 10px;
  margin-top: 42px;
  border-bottom: 1px solid rgba(32, 36, 31, 0.32);
  font-family: var(--display);
  font-size: 16px;
}

.film-passage__return {
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 10px;
}

.work-footer {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px max(5vw, 24px);
  border-top: 1px solid var(--line);
  background: var(--paper-light);
  color: var(--muted);
  font-family: var(--utility);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .review-band {
    justify-content: space-between;
    gap: 12px;
    padding-inline: 16px;
    font-size: 9px;
  }

  .work-nav {
    padding-inline: 16px;
  }

  .film-heading {
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 76px 0 68px;
  }

  .film-heading h1 {
    font-size: 34px;
  }

  .film-heading__note {
    justify-self: start;
    padding: 0;
  }

  .film-room {
    padding: 20px 0 80px;
  }

  .film-room__frame {
    width: 100%;
    aspect-ratio: auto;
  }

  .film-video {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .film-start {
    inset: 0 0 106px;
  }

  .film-start__mark {
    width: 52px;
    height: 52px;
  }

  .film-start__mark::after {
    margin: 17px 0 0 21px;
    border-top-width: 9px;
    border-bottom-width: 9px;
    border-left-width: 14px;
  }

  .film-controls {
    position: relative;
    grid-template-columns: auto 1fr auto;
    gap: 4px 8px;
    min-height: 106px;
    padding: 8px 10px;
  }

  .film-controls__progress-label {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .film-controls__toggle {
    grid-column: 1;
    grid-row: 2;
  }

  .film-controls__time {
    grid-column: 2;
    grid-row: 2;
    justify-self: center;
  }

  .film-controls__mute {
    grid-column: 3;
    grid-row: 2;
  }

  .film-controls__fullscreen {
    display: none;
  }

  .film-room__meta {
    display: grid;
    gap: 5px;
    padding: 0 20px;
  }

  .scene-record {
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
    gap: 68px;
    padding: 110px 0 138px;
  }

  .scene-record__intro h2,
  .film-passage__copy h2 {
    font-size: 29px;
  }

  .scene-list li {
    grid-template-columns: 86px 1fr;
    gap: 16px;
  }

  .scene-list p {
    font-size: 14px;
  }

  .film-afterglow {
    min-height: 72svh;
  }

  .film-passage {
    grid-template-columns: 1fr;
    gap: 54px;
    padding: 96px 20px 120px;
  }

  .film-passage__photo {
    width: calc(100% + 20px);
    margin-left: -20px;
    aspect-ratio: 4 / 3;
  }

  .film-passage__copy {
    width: calc(100% - 20px);
    justify-self: center;
  }

  .work-footer {
    display: grid;
    justify-items: start;
  }
}

@media (max-width: 370px) {
  .review-band span {
    max-width: 170px;
  }

  .film-heading h1 {
    font-size: 31px;
  }

  .scene-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .review-band {
    display: grid;
    min-height: 48px;
    justify-content: center;
    gap: 2px;
    padding: 7px 12px;
    text-align: center;
  }

  .work-nav {
    min-height: 52px;
  }

  .work-nav p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .review-band,
  .skip-link,
  .work-nav,
  .film-room,
  .film-passage {
    display: none;
  }
}
