@font-face {
  font-family: "Tokyo Sign";
  src: url("/assets/about/tokyo-sign.woff") format("woff");
  font-display: swap;
}

.feje-world-home #about {
  position: relative;
}

.feje-world-home #about > .container {
  position: relative;
  z-index: 1;
}

/* The document wash remains visible through both ends of the scenery.
   There is no viewport fill here, even while the illustration is sticky. */
.about-tokyo {
  position: absolute;
  inset: clamp(-176px, -16svh, -64px) 0 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 255px,
    #000 calc(100% - 205px), transparent);
}

.about-tokyo-window {
  position: sticky;
  top: var(--nav-height, 70px);
  display: grid;
  align-items: end;
  height: min(740px, calc(100svh - var(--nav-height, 70px)));
  overflow: clip;
  --art-opacity: .77;
  opacity: var(--art-opacity);
}

.about-tokyo-scene {
  position: relative;
  width: min(100%, 1900px);
  margin-inline: auto;
}

.about-tokyo-city {
  display: block;
  width: 100%;
  aspect-ratio: 36 / 17;
}

.about-tokyo-track {
  position: absolute;
  inset: 66.7% 0 auto;
  height: 3.6%;
  overflow: clip;
}

.about-tokyo-train {
  position: absolute;
  inset: 0 auto 0 0;
  width: 23%;
  background: url("/assets/about/tokyo-train.svg") right bottom / auto 100% no-repeat;
  opacity: 0;
}

.about-tokyo-sign {
  position: absolute;
  left: 5.5%;
  top: 53%;
  display: block;
  width: max-content;
  padding: .48em .29em;
  border: 1px solid #9d9d97;
  box-shadow: inset 0 0 0 2px #333434, 3px 4px 0 #222323;
  background: #4e4f4d;
  color: #efeee8;
  font: 400 clamp(9px, .85vw, 14px)/1.22 "Tokyo Sign", "Hiragino Sans", "Yu Gothic", sans-serif;
  letter-spacing: .085em;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

@keyframes about-tokyo-pass {
  from { transform: translateX(-105%); }
  to { transform: translateX(440%); }
}

@keyframes about-tokyo-carriage {
  0%, 11%, 89%, 100% { opacity: 0; }
  22%, 74% { opacity: .86; }
}

@media (prefers-reduced-motion: no-preference) {
  .about-tokyo[data-train-visible] .about-tokyo-train {
    animation: about-tokyo-pass 6s 1.1s linear 1 both,
      about-tokyo-carriage 6s 1.1s linear 1 both;
  }

  @supports (animation-timeline: view()) {
    #about { view-timeline-name: --about-chapter; }
    .about-tokyo { mask-image: none; }
    .about-tokyo-window {
      animation: about-tokyo-chapter linear both;
      animation-timeline: --about-chapter;
      animation-range: entry 0% exit 100%;
    }
    .about-tokyo-scene {
      animation: about-tokyo-depth linear both;
      animation-timeline: --about-chapter;
      animation-range: entry 0% exit 100%;
    }
  }
}

@keyframes about-tokyo-chapter {
  0%, 6%, 97%, 100% { opacity: 0; }
  24%, 78% { opacity: var(--art-opacity); }
}

@keyframes about-tokyo-depth {
  from { transform: translateY(8px); }
  to { transform: translateY(-17px); }
}

@media (max-width: 640px) and (orientation: portrait) {
  .about-tokyo {
    mask-image: linear-gradient(to bottom, transparent, #000 205px,
      #000 calc(100% - 175px), transparent);
  }

  .about-tokyo-window {
    height: min(680px, calc(100svh - var(--nav-height, 62px)));
    --art-opacity: .69;
  }

  .about-tokyo-city {
    aspect-ratio: 39 / 59;
  }

  .about-tokyo-sign {
    left: auto;
    right: 2%;
    top: 48%;
    font-size: 9px;
  }

  .about-tokyo-track {
    inset-block-start: 67.6%;
    height: 2.7%;
  }

  .about-tokyo-train {
    width: 46%;
  }

}

@keyframes about-tokyo-pass-phone {
  from { transform: translateX(-103%); }
  to { transform: translateX(223%); }
}

@media (max-height: 470px) and (orientation: landscape) {
  .about-tokyo-scene { width: min(100%, 1050px); }
  .about-tokyo-window { --art-opacity: .61; }
}

@media (max-width: 640px) and (orientation: portrait) and (prefers-reduced-motion: no-preference) {
  .about-tokyo[data-train-visible] .about-tokyo-train {
    animation-name: about-tokyo-pass-phone, about-tokyo-carriage;
  }
}

/* A silver reading column with the small vermilion accent of a print seal. */
.feje-world-home #about {
  --about-paper: #f5f2ed;
  --about-silver: #d4d2cc;
  --about-seal: #dda39b;
}

.feje-world-home #about .about-title {
  color: var(--about-paper);
  line-height: 1.12;
  text-wrap: balance;
}

.feje-world-home #about .about-motto {
  margin-block-start: 1.15rem;
}

.about-motto-quote {
  color: var(--about-paper);
  font: 400 clamp(1.17rem, 2.05vw, 1.7rem)/1.45 Georgia, "Times New Roman", serif;
}

.about-motto-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: .65rem;
  row-gap: .3rem;
  color: var(--about-seal);
  font: 650 .73rem/1.35 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: .145em;
}

.about-motto-ja {
  color: var(--about-silver);
  border-inline-start: 1px solid #c8c5bd67;
  padding-inline-start: .55rem;
  font-family: "Tokyo Sign", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 400;
  letter-spacing: .055em;
  white-space: nowrap;
}

.feje-world-home #about .profile-body {
  margin-block-start: 40px;
  color: var(--about-silver);
  text-align: start;
  font-size: 1.05rem;
  line-height: 1.8;
}

.feje-world-home #about .profile-body > p {
  margin-block-end: 24px;
}

.feje-world-home #about .profile-body strong {
  color: var(--about-paper);
}

.about-philosophy {
  margin: 32px 0;
  padding: 15px 20px;
  border-inline-start: 2px solid var(--about-seal);
  background: linear-gradient(to right, #252424df, #25242472 72%, transparent);
}

.about-philosophy p {
  margin: 0;
  color: var(--about-paper);
  font: italic 1.14em/1.65 Georgia, "Times New Roman", serif;
}

.feje-world-home #about .stat span {
  color: var(--about-silver);
}

.feje-world-home #about .living-decoration[data-living-effect="motto"] {
  --light: #d4d2cc;
}

/* A single distant flight shares the existing chapter visibility gate. */
.about-tokyo-airspace {
  position: absolute;
  inset: 18% 0 auto;
  height: 17%;
  overflow: clip;
}

.about-tokyo-aircraft {
  position: absolute;
  top: 20%;
  left: 0;
  width: clamp(27px, 3.05vw, 49px);
  height: auto;
  opacity: 0;
}

@keyframes about-tokyo-flight {
  0% { transform: translate(-110%, 9px); opacity: 0; }
  12%, 82% { opacity: .54; }
  100% { transform: translate(var(--tokyo-flight-reach), -9px); opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .about-tokyo[data-train-visible] .about-tokyo-aircraft {
    --tokyo-flight-reach: min(100vw, 1900px);
    animation: about-tokyo-flight 16s 7.3s linear 1 both;
  }
}

@media (max-width: 640px) and (orientation: portrait) {
  .about-tokyo-airspace { top: 23%; }
}
