:root {
  --ink: #121315;
  --ink-soft: #1b1d20;
  --paper: #f3efe5;
  --paper-muted: #c9c4b9;
  --yellow: #f3d34a;
  --red: #d94b37;
  --cyan: #64c7c1;
  --line: rgba(243, 239, 229, 0.24);
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --page-gutter: clamp(1.25rem, 4vw, 4.5rem);
  --section-space: clamp(5rem, 10vw, 10rem);
  --display: clamp(2.7rem, 8vw, 8rem);
  --title: clamp(2.1rem, 4.8vw, 5rem);
  --body: clamp(1rem, 1.2vw, 1.16rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.55rem 0.85rem;
  color: var(--ink);
  background: var(--yellow);
  transform: translateY(-160%);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0.75rem var(--page-gutter);
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled,
.site-header.menu-visible {
  border-color: var(--line);
  background: rgba(18, 19, 21, 0.94);
}

.site-header.is-scrolled:not(.menu-visible) {
  backdrop-filter: blur(14px);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
}

.brand-mark i {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  background: var(--yellow);
}

.brand-mark i:first-child {
  top: 0;
  left: 0;
}

.brand-mark i:last-child {
  right: 0;
  bottom: 0;
  background: var(--cyan);
  mix-blend-mode: screen;
}

.primary-nav {
  display: flex;
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: center;
  font-size: 0.9rem;
}

.primary-nav a {
  position: relative;
  padding: 0.45rem 0;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(7rem, 14vh, 10rem) var(--page-gutter) clamp(2.5rem, 7vh, 5rem);
  isolation: isolate;
  overflow: hidden;
}

.hero::after {
  position: absolute;
  right: var(--page-gutter);
  bottom: 0;
  left: var(--page-gutter);
  z-index: -1;
  height: 1px;
  content: "";
  background: var(--line);
}

.hero-character {
  position: absolute;
  z-index: -3;
  font-family: var(--serif);
  font-size: clamp(16rem, 42vw, 46rem);
  font-weight: 700;
  line-height: 0.75;
  color: #1d1e21;
  user-select: none;
}

.hero-character-left {
  top: 10vh;
  left: -0.18em;
}

.hero-character-right {
  right: -0.16em;
  bottom: -0.06em;
}

.light-window {
  position: absolute;
  top: 18%;
  left: 48%;
  z-index: -2;
  width: clamp(14rem, 29vw, 29rem);
  aspect-ratio: 0.84;
  transform: translateX(-50%);
}

.pane {
  position: absolute;
  inset: 0;
  opacity: 0.78;
  transform-origin: center;
  animation: pane-align 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pane-yellow {
  background: var(--yellow);
  clip-path: polygon(0 9%, 90% 0, 100% 86%, 12% 100%);
  transform: translate(-18%, 7%) rotate(-8deg);
}

.pane-red {
  background: var(--red);
  clip-path: polygon(13% 0, 100% 13%, 85% 100%, 0 83%);
  transform: translate(16%, -5%) rotate(7deg);
  animation-delay: 100ms;
}

.pane-cyan {
  background: var(--cyan);
  clip-path: polygon(6% 4%, 94% 0, 100% 94%, 0 100%);
  mix-blend-mode: screen;
  transform: translate(1%, 16%) rotate(-2deg);
  animation-delay: 200ms;
}

@keyframes pane-align {
  from {
    opacity: 0;
    translate: var(--start-x, 0) var(--start-y, 2rem);
    scale: 0.94;
  }
}

.hero-copy {
  align-self: center;
  width: min(100%, 65rem);
  margin-left: clamp(0rem, 5vw, 7rem);
}

.hero h1 {
  max-width: 9em;
  margin: 0;
  font-family: var(--serif);
  font-size: var(--display);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 37rem;
  margin: clamp(1.8rem, 4vw, 3.5rem) 0 0 clamp(0rem, 19vw, 18rem);
  padding: 0.75rem 1rem;
  color: var(--paper);
  border-left: 3px solid var(--cyan);
  background: rgba(18, 19, 21, 0.9);
  box-shadow: 0.75rem 0.75rem 0 rgba(18, 19, 21, 0.28);
}

.hero-highlight {
  align-self: end;
  justify-self: end;
  max-width: 24rem;
  margin: 1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 3px solid var(--yellow);
  font-weight: 650;
  letter-spacing: 0.04em;
}

.services,
.advantages,
.about {
  position: relative;
  padding: var(--section-space) var(--page-gutter);
}

.services {
  /* 旋转稿纸与入场位移只在编辑台内显现，不能扩大页面滚动宽度。 */
  overflow: hidden;
}

.section-intro,
.about-heading {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.section-number {
  padding-top: 0.55rem;
  color: var(--yellow);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.section-intro h2,
.about-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--title);
  font-weight: 650;
  line-height: 1.1;
}

.editorial-desk {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
  margin-top: clamp(3rem, 7vw, 7rem);
  padding: clamp(1rem, 4vw, 4rem) 0;
}

.service-sheet {
  position: relative;
  min-width: 0;
  padding: clamp(1.6rem, 3.4vw, 3.5rem);
  color: var(--ink);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.26);
}

.service-sheet h3 {
  max-width: 8em;
  margin: 0 0 clamp(2.2rem, 4vw, 4rem);
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 4.7rem);
  line-height: 1.08;
}

.service-sheet p {
  max-width: 33rem;
  margin: 0;
}

.service-sheet .service-highlight {
  margin-bottom: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.sheet-index {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.sheet-yellow {
  z-index: 1;
  grid-column: 1 / span 7;
  background: var(--yellow);
  transform: rotate(-1.4deg);
}

.sheet-paper {
  z-index: 2;
  grid-column: 6 / span 7;
  margin-top: -2rem;
  background: var(--paper);
  transform: rotate(1deg);
}

.sheet-cyan {
  z-index: 3;
  grid-column: 2 / span 7;
  margin-top: -0.5rem;
  background: var(--cyan);
  transform: rotate(0.8deg);
}

.sheet-dark {
  z-index: 4;
  grid-column: 7 / span 6;
  margin-top: -2.5rem;
  color: var(--paper);
  border: 1px solid rgba(243, 239, 229, 0.42);
  background: var(--ink-soft);
  transform: rotate(-1deg);
}

.advantages {
  color: var(--ink);
  background: var(--paper);
}

.advantages .section-number {
  color: var(--red);
}

.calibration-table {
  margin-top: clamp(3rem, 7vw, 6rem);
  border-top: 2px solid var(--ink);
}

.calibration-item {
  display: grid;
  grid-template-columns: minmax(9rem, 0.75fr) minmax(0, 1.5fr);
  gap: clamp(2rem, 7vw, 8rem);
  padding: clamp(2rem, 4vw, 4rem) 0;
  border-bottom: 1px solid rgba(18, 19, 21, 0.3);
}

.calibration-item h3,
.calibration-item p {
  margin: 0;
}

.calibration-item h3 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.7vw, 2.8rem);
  line-height: 1.25;
}

.calibration-item p {
  max-width: 49rem;
}

.calibration-mark {
  position: absolute;
  left: 0;
  width: clamp(2.5rem, 7vw, 7rem);
  height: 0.35rem;
  margin-top: -2.18rem;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms ease 180ms;
}

.calibration-item.is-visible .calibration-mark {
  transform: scaleX(1);
}

.about {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(3rem, 10vw, 11rem);
  min-height: 80svh;
  overflow: hidden;
}

.about-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 52rem;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  line-height: 1.9;
}

.about-copy p {
  margin: 0 0 1.45em;
}

.about-stamp {
  position: absolute;
  right: -3vw;
  bottom: -0.16em;
  display: flex;
  font-family: var(--serif);
  font-size: clamp(10rem, 27vw, 32rem);
  font-weight: 700;
  line-height: 0.8;
  color: rgba(243, 239, 229, 0.035);
  pointer-events: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: center;
  padding: 2.25rem var(--page-gutter);
  color: var(--paper-muted);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 700ms ease, transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-highlight.reveal {
  /* 看点贴近首屏底边，不下移等待观察器，避免矮屏进入不了触发区。 */
  opacity: 1;
  transform: none;
}

.service-sheet.reveal:nth-child(even) {
  transform: translateX(2.5rem) rotate(1deg);
}

.service-sheet.reveal:nth-child(odd) {
  transform: translateX(-2.5rem) rotate(-1deg);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

@media (max-width: 767px) {
  :root {
    --page-gutter: clamp(1.15rem, 5vw, 1.6rem);
    --section-space: clamp(4.5rem, 18vw, 6.5rem);
  }

  .site-header {
    min-height: 4.25rem;
  }

  .brand {
    font-size: 0.9rem;
  }

  .menu-toggle {
    position: relative;
    z-index: 2;
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.25rem;
    cursor: pointer;
  }

  .menu-toggle-text {
    font-size: 0.85rem;
  }

  .menu-toggle-lines {
    display: grid;
    gap: 0.35rem;
  }

  .menu-toggle-lines i {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-lines i:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-lines i:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .primary-nav {
    position: fixed;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 0;
    padding: 5rem var(--page-gutter) 3rem;
    background: var(--ink);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .primary-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: clamp(2.1rem, 11vw, 3.5rem);
    line-height: 1.25;
  }

  .hero {
    min-height: max(42rem, 100svh);
    padding-top: 7rem;
  }

  .hero-character {
    font-size: clamp(14rem, 78vw, 24rem);
  }

  .hero-character-left {
    top: 16%;
    left: -0.32em;
  }

  .hero-character-right {
    right: -0.32em;
    bottom: 8%;
  }

  .light-window {
    top: 26%;
    left: 54%;
    width: min(59vw, 17rem);
  }

  .hero-copy {
    align-self: center;
    margin-left: 0;
  }

  .hero h1 {
    max-width: 7em;
  }

  .hero-subtitle {
    max-width: 21rem;
    margin: 2rem 0 0;
  }

  .hero-highlight {
    justify-self: stretch;
    max-width: none;
    font-size: 0.92rem;
  }

  .editorial-desk {
    display: block;
    margin-top: 2.5rem;
  }

  .service-sheet {
    width: calc(100% - 0.7rem);
    min-height: 22rem;
    padding: 2rem 1.5rem;
  }

  .service-sheet h3 {
    margin-bottom: 3rem;
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .service-sheet + .service-sheet {
    margin-top: -1rem;
  }

  .sheet-paper,
  .sheet-dark {
    margin-left: 0.7rem;
  }

  .calibration-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2.2rem 0;
  }

  .calibration-mark {
    margin-top: -2.38rem;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 3rem;
    min-height: 0;
  }

  .about-copy {
    font-size: clamp(1.12rem, 5vw, 1.4rem);
    line-height: 1.85;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .site-header {
    min-height: 3.75rem;
  }

  .hero {
    min-height: 100svh;
    padding-top: 4.35rem;
    padding-bottom: 1rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 6.5vw, 3.9rem);
  }

  .hero .hero-subtitle {
    max-width: min(32rem, 72vw);
    margin: 0.65rem 0 0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    line-height: 1.55;
  }

  .light-window {
    top: 22%;
    left: 68%;
    width: 12rem;
  }

  .hero-highlight {
    margin-top: 0.4rem;
    padding-top: 0.45rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 767px) and (orientation: landscape) and (max-height: 500px) {
  .primary-nav.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2rem;
    padding-top: 4.2rem;
  }

  .primary-nav a {
    font-size: clamp(1.45rem, 5vw, 2.2rem);
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .hero-copy {
    margin-left: 0;
  }

  .hero-subtitle {
    margin-left: 18vw;
  }

  .service-sheet {
    padding: 2.3rem;
  }

  .sheet-yellow,
  .sheet-cyan {
    grid-column: 1 / span 8;
  }

  .sheet-paper,
  .sheet-dark {
    grid-column: 5 / span 8;
  }

  .about {
    grid-template-columns: minmax(9rem, 0.55fr) minmax(0, 1.45fr);
    gap: 3rem;
  }
}

@media (min-width: 1100px) {
  .services,
  .advantages,
  .about {
    padding-right: max(var(--page-gutter), calc((100vw - 1680px) / 2));
    padding-left: max(var(--page-gutter), calc((100vw - 1680px) / 2));
  }

  .calibration-item:nth-child(even) h3 {
    padding-left: clamp(1rem, 6vw, 6rem);
  }
}

@media (min-width: 1440px) {
  :root {
    --body: 1.12rem;
  }

  .hero-copy {
    margin-left: max(4rem, 8vw);
  }

  .editorial-desk {
    padding-right: 4vw;
    padding-left: 4vw;
  }
}

@media (min-aspect-ratio: 2 / 1) and (min-width: 1000px) {
  .hero {
    min-height: 40rem;
    max-height: 54rem;
    padding-top: 6.5rem;
  }

  .hero-character {
    font-size: min(35vw, 34rem);
  }

  .light-window {
    top: 16%;
    width: min(25vw, 22rem);
  }

  .hero h1 {
    font-size: min(6.5vw, 6.7rem);
  }
}

@media (max-aspect-ratio: 3 / 4) {
  .hero {
    min-height: 100svh;
  }

  .hero-copy {
    align-self: center;
  }

  .about {
    align-content: center;
  }
}

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .calibration-mark {
    transform: scaleX(1);
  }
}
