:root {
  --paper: #f6efe3;
  --paper-deep: #eee3d1;
  --ink: #174c54;
  --ink-soft: #46656a;
  --coral: #e27f52;
  --footer: #123f46;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  clip-path: inset(50%);
  text-decoration: none;
  white-space: nowrap;
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

.landing-hero {
  position: relative;
  width: 100%;
  min-height: clamp(52rem, 62.55vw, 75rem);
  overflow: hidden;
  isolation: isolate;
}

.landing-hero__art {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.landing-hero__content {
  width: min(100%, 160rem);
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(7rem, 9vw, 10rem) 51% 4rem clamp(3rem, 7vw, 9rem);
}

.landing-hero__eyebrow,
.landing-hero__intro,
.story-copy p {
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
}

.landing-hero__eyebrow {
  margin: 0 0 1.35rem;
  color: var(--ink-soft);
  font-size: clamp(0.92rem, 1.05vw, 1.14rem);
  letter-spacing: 0.08em;
}

.landing-hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
  font-size: clamp(3.25rem, 5.4vw, 6.2rem);
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.28;
}

.landing-hero h1 span,
.story-copy p span {
  display: block;
  white-space: nowrap;
}

.landing-hero__intro {
  width: max-content;
  max-width: 100%;
  margin: clamp(1.5rem, 2.4vw, 2.25rem) 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.1vw, 1.18rem);
  letter-spacing: 0.05em;
  line-height: 1.9;
}

.landing-hero__login {
  position: absolute;
  z-index: 10;
  top: clamp(1.5rem, 2.6vw, 2.75rem);
  right: clamp(1.5rem, 3.5vw, 4.5rem);
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border: 1px solid rgb(23 76 84 / 32%);
  background: rgb(246 239 227 / 88%);
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.landing-hero__login:hover,
.landing-hero__login:focus-visible {
  border-color: var(--ink);
  background: var(--paper);
  transform: translateY(-2px);
}

.landing-hero__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(1.8rem, 3vw, 2.7rem);
}

.landing-hero__nav a {
  display: inline-flex;
  min-width: 7.7rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border: 1px solid rgb(23 76 84 / 30%);
  background: rgb(246 239 227 / 82%);
  color: var(--ink);
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.landing-hero__nav a:hover,
.landing-hero__nav a:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.ambient-motion {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  animation-play-state: paused;
}

.landing-hero__leaves {
  right: clamp(0.5rem, 3vw, 4.5rem);
  bottom: clamp(0.8rem, 2.5vw, 3rem);
  width: clamp(7rem, 9vw, 12rem);
  height: auto;
  opacity: 0.58;
  animation: leaves-drift 9s ease-in-out infinite alternate;
}

.is-motion-active .ambient-motion {
  animation-play-state: running;
}

.landing-story {
  position: relative;
  width: min(100%, 160rem);
  margin: clamp(-11rem, -8vw, -8rem) auto 0;
  padding: 0 clamp(1rem, 2.5vw, 4rem) clamp(2.5rem, 3vw, 4rem);
  isolation: isolate;
}

.landing-story__route {
  position: absolute;
  z-index: 0;
  top: 4rem;
  bottom: 7rem;
  left: 24%;
  width: 54%;
  height: calc(100% - 11rem);
  object-fit: fill;
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.story-section {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  width: 100%;
  min-height: clamp(42rem, 46vw, 60rem);
  align-items: start;
  scroll-margin-top: 1.5rem;
}

.story-section--workbench {
  z-index: 4;
}

.story-section--research {
  z-index: 3;
  margin-top: clamp(-8rem, -6vw, -5rem);
}

.story-section--ideas {
  z-index: 2;
  margin-top: clamp(-7rem, -5vw, -4rem);
}

.story-section--about {
  z-index: 1;
  min-height: clamp(49rem, 51vw, 66rem);
  margin-top: clamp(-6rem, -4vw, -3rem);
}

.story-copy {
  position: relative;
  z-index: 4;
}

.story-copy h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
  font-size: clamp(2.7rem, 3.7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.story-copy__rule {
  display: block;
  width: 3.7rem;
  margin: 1rem 0 1.3rem;
  border-top: 2px solid var(--coral);
  transform: rotate(-3deg);
  transform-origin: left center;
}

.story-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.25vw, 1.28rem);
  letter-spacing: 0.08em;
  line-height: 1.95;
}

.story-figure,
.room-entry {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
}

.story-figure img,
.room-entry img {
  display: block;
  width: 100%;
  height: auto;
}

.story-figure img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.story-figure:hover img {
  transform: scale(1.012);
}

.story-section--workbench .story-copy {
  grid-column: 1 / 5;
  grid-row: 1;
  padding: clamp(8rem, 9.5vw, 12.5rem) 0 0 clamp(2rem, 5vw, 7rem);
}

.story-figure--workbench {
  grid-column: 4 / 13;
  grid-row: 1;
  clip-path: polygon(2% 8%, 7% 4%, 13% 5%, 19% 1%, 27% 3%, 36% 0, 45% 3%, 54% 1%, 64% 3%, 74% 0, 83% 3%, 91% 2%, 97% 6%, 100% 13%, 99% 82%, 96% 91%, 89% 94%, 81% 98%, 70% 96%, 60% 100%, 49% 97%, 38% 99%, 28% 96%, 19% 98%, 11% 94%, 5% 95%, 1% 88%, 0 72%, 2% 58%, 0 42%, 2% 26%);
}

.story-figure--research {
  grid-column: 1 / 9;
  grid-row: 1;
  clip-path: polygon(0 10%, 5% 5%, 13% 7%, 21% 2%, 31% 4%, 40% 1%, 51% 3%, 62% 0, 72% 3%, 82% 1%, 91% 4%, 97% 8%, 100% 17%, 98% 31%, 100% 47%, 98% 63%, 100% 78%, 96% 90%, 89% 94%, 80% 93%, 70% 98%, 60% 96%, 49% 100%, 38% 97%, 27% 99%, 18% 95%, 9% 98%, 2% 92%, 0 79%);
}

.story-section--research .story-copy {
  grid-column: 9 / 13;
  grid-row: 1;
  padding: clamp(7rem, 8.5vw, 11rem) clamp(2rem, 4vw, 5rem) 0 clamp(1.5rem, 3vw, 4rem);
}

.story-section--ideas .story-copy {
  grid-column: 1 / 5;
  grid-row: 1;
  padding: clamp(8rem, 9vw, 12rem) 0 0 clamp(2rem, 5vw, 7rem);
}

.story-figure--ideas {
  grid-column: 4 / 13;
  grid-row: 1;
  clip-path: polygon(3% 12%, 8% 8%, 15% 9%, 22% 4%, 30% 6%, 39% 2%, 49% 4%, 59% 1%, 68% 4%, 77% 2%, 86% 5%, 94% 4%, 99% 10%, 100% 25%, 98% 40%, 100% 56%, 98% 72%, 100% 86%, 96% 95%, 86% 97%, 76% 95%, 65% 99%, 54% 96%, 43% 100%, 32% 97%, 22% 99%, 13% 95%, 6% 97%, 1% 90%, 0 75%, 2% 58%, 0 42%, 2% 27%);
}

.about-guide {
  display: block;
  width: clamp(4.75rem, 5.4vw, 6.5rem);
  height: auto;
  margin: clamp(0.55rem, 0.9vw, 0.9rem) 0 0 clamp(4.6rem, 5vw, 6.5rem);
  pointer-events: none;
  user-select: none;
}

.story-section--about .story-copy {
  grid-column: 1 / 5;
  grid-row: 1;
  padding: clamp(18rem, 22vw, 27rem) 0 0 clamp(2rem, 5vw, 7rem);
}

.room-entry {
  grid-column: 4 / 13;
  grid-row: 1;
  align-self: start;
  aspect-ratio: 1484 / 1060;
  overflow: visible;
  text-decoration: none;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.room-entry:hover,
.room-entry:focus-visible {
  transform: translateY(-5px);
}

.room-entry__scene {
  position: absolute;
  z-index: 1;
  inset: 6.2% 4.9% 7.2%;
  overflow: hidden;
  background: #08131b;
}

.room-entry__scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(-1.5%) scale(1.16);
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}

.room-entry:hover .room-entry__scene img,
.room-entry:focus-visible .room-entry__scene img {
  opacity: 0.94;
  transform: translateY(-1.5%) scale(1.18);
}

.room-entry .room-entry__frame {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.has-js .landing-hero__art {
  animation: hero-settle 1.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.has-js .landing-hero__eyebrow,
.has-js .landing-hero h1,
.has-js .landing-hero__intro,
.has-js .landing-hero__nav {
  opacity: 0;
  transform: translateY(1rem);
  animation: hero-copy-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.has-js .landing-hero h1 {
  animation-delay: 120ms;
}

.has-js .landing-hero__intro {
  animation-delay: 240ms;
}

.has-js .landing-hero__nav {
  animation-delay: 360ms;
}

.has-js .reveal .story-copy,
.has-js .reveal .story-figure,
.has-js .reveal .room-entry,
.has-js .reveal .about-guide {
  opacity: 0;
  transition: opacity 700ms ease, transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .reveal .story-copy {
  transform: translateY(1.5rem);
}

.has-js .reveal .story-figure,
.has-js .reveal .room-entry {
  transform: translateY(2.5rem) scale(0.985);
}

.has-js .reveal .about-guide {
  transform: translate(-1rem, -0.5rem) rotate(-3deg);
}

.has-js .reveal.is-visible .story-copy,
.has-js .reveal.is-visible .story-figure,
.has-js .reveal.is-visible .room-entry,
.has-js .reveal.is-visible .about-guide {
  opacity: 1;
  transform: none;
}

.has-js .reveal.is-visible .story-figure,
.has-js .reveal.is-visible .room-entry {
  transition-delay: 100ms;
}

.has-js .reveal.is-visible .about-guide {
  transition-delay: 180ms;
}

.landing-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: clamp(2rem, 3vw, 3rem) clamp(1.25rem, 5vw, 6rem) max(2rem, env(safe-area-inset-bottom));
  background: var(--footer);
  color: var(--paper);
}

.landing-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(100%, 132rem);
  margin: 0 auto;
  align-items: center;
  gap: 1rem 3rem;
}

.landing-footer__nav {
  display: flex;
  grid-column: 2;
}

.landing-footer__nav a {
  color: rgb(246 239 227 / 78%);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-decoration-color: rgb(246 239 227 / 36%);
  text-underline-offset: 0.35rem;
  transition: color 180ms ease, transform 180ms ease;
}

.landing-footer__nav a:hover,
.landing-footer__nav a:focus-visible {
  color: var(--paper);
  transform: translateY(-2px);
}

.landing-footer__meta {
  grid-column: 1;
  margin: 0;
  color: rgb(246 239 227 / 52%);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

@keyframes hero-settle {
  from {
    opacity: 0.72;
    transform: scale(1.018);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-copy-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes leaves-drift {
  from {
    transform: translate3d(0, -0.4rem, 0) rotate(-3deg);
  }

  to {
    transform: translate3d(-1rem, 0.8rem, 0) rotate(5deg);
  }
}

@media (max-width: 1100px) {
  .landing-hero__content {
    padding-right: 44%;
    padding-left: clamp(2rem, 5vw, 4rem);
  }

  .story-section--workbench .story-copy,
  .story-section--ideas .story-copy,
  .story-section--about .story-copy {
    padding-left: 2.2rem;
  }

  .story-section--research .story-copy {
    padding-right: 2.2rem;
    padding-left: 1.5rem;
  }
}

@media (max-width: 720px) {
  .landing-hero {
    min-height: 47rem;
  }

  .landing-hero__art {
    top: auto;
    height: 46%;
    object-position: 72% center;
  }

  .landing-hero__content {
    min-height: 47rem;
    padding: max(4.2rem, env(safe-area-inset-top)) 1.35rem 22rem;
  }

  .landing-hero__login {
    top: max(1rem, env(safe-area-inset-top));
    right: 1rem;
    min-height: 2.4rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
  }

  .landing-hero__eyebrow {
    margin-bottom: 1.1rem;
    font-size: 0.9rem;
  }

  .landing-hero h1 {
    font-size: clamp(2.25rem, 10.8vw, 3.4rem);
    line-height: 1.3;
  }

  .landing-hero__intro {
    width: auto;
    margin-top: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .landing-hero__nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .landing-hero__nav a {
    min-width: 0;
    min-height: 2.9rem;
    padding: 0.65rem 0.25rem;
    font-size: 0.86rem;
  }

  .landing-hero__leaves {
    right: -1.6rem;
    bottom: 1rem;
    width: 7rem;
    opacity: 0.42;
  }

  .landing-story {
    width: 100%;
    margin-top: 0;
    padding: 0 0 max(3rem, env(safe-area-inset-bottom));
  }

  .landing-story__route {
    display: none;
  }

  .story-section,
  .story-section--research,
  .story-section--ideas,
  .story-section--about {
    min-height: 0;
    grid-template-columns: 1fr;
    margin-top: 0;
    padding-top: 4.8rem;
  }

  .story-section .story-copy,
  .story-section--workbench .story-copy,
  .story-section--research .story-copy,
  .story-section--ideas .story-copy,
  .story-section--about .story-copy {
    grid-column: 1;
    grid-row: 1;
    padding: 0 1.35rem 1.8rem;
  }

  .story-copy h2 {
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .story-copy__rule {
    margin: 0.85rem 0 1.05rem;
  }

  .story-copy p {
    font-size: 1rem;
  }

  .story-figure,
  .story-figure--workbench,
  .story-figure--research,
  .story-figure--ideas,
  .room-entry {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    clip-path: polygon(0 5%, 8% 3%, 18% 5%, 29% 1%, 40% 4%, 52% 1%, 64% 4%, 76% 2%, 88% 5%, 100% 2%, 100% 100%, 0 100%);
  }

  .room-entry {
    clip-path: none;
  }

  .story-section--research .story-copy {
    padding-left: 18%;
  }

  .about-guide {
    width: 4.75rem;
    margin: 0.65rem 0 0 6.8rem;
  }

  .story-section--about {
    padding-bottom: 0;
  }

}

@media (max-width: 390px) {
  .landing-hero__content,
  .story-section .story-copy {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .landing-hero h1 {
    font-size: 2.2rem;
  }

  .landing-hero__nav a {
    letter-spacing: 0.05em;
  }

  .story-section--research .story-copy {
    padding-left: 15%;
  }
}

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

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

  .has-js .landing-hero__eyebrow,
  .has-js .landing-hero h1,
  .has-js .landing-hero__intro,
  .has-js .landing-hero__nav,
  .has-js .reveal .story-copy,
  .has-js .reveal .story-figure,
  .has-js .reveal .room-entry,
  .has-js .reveal .about-guide {
    opacity: 1;
    transform: none;
  }
}
