:root {
  --graphite: #171c21;
  --graphite-soft: #252b31;
  --paper: #f1ebdd;
  --paper-deep: #ddd4c2;
  --amber: #ffb000;
  --mist-blue: #9fc9d6;
  --earth-red: #d95e40;
  --ink: #171c21;
  --white-ink: #f8f4e9;
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --gutter: clamp(1.25rem, 4vw, 5rem);
  --section-space: clamp(4.75rem, 10vw, 10rem);
  --text-sm: clamp(0.82rem, 0.4vw + 0.72rem, 1rem);
  --text-body: clamp(1rem, 0.35vw + 0.92rem, 1.2rem);
  --text-title: clamp(2.45rem, 6.8vw, 8rem);
  --text-section: clamp(2.1rem, 4.5vw, 5.2rem);
  --header-height: 5.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.32em;
}

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

.skip-link {
  position: fixed;
  top: 0.65rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--amber);
  color: var(--graphite);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem var(--gutter);
  background: color-mix(in srgb, var(--graphite) 91%, transparent);
  border-bottom: 1px solid rgba(241, 235, 221, 0.16);
  backdrop-filter: blur(14px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 24rem;
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.wordmark-mark {
  width: 2.6rem;
  height: 0.72rem;
  flex: 0 0 auto;
  background: linear-gradient(90deg, var(--amber) 0 18%, transparent 18% 27%, var(--mist-blue) 27% 100%);
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.25rem, 2vw, 2.2rem);
}

nav a {
  position: relative;
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
  color: var(--paper-deep);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

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

nav a:hover::after,
nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

main {
  overflow: clip;
}

section {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.hero {
  position: relative;
  min-height: max(42rem, 100svh);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(20rem, 1.08fr);
  align-items: stretch;
  padding: calc(var(--header-height) + clamp(3rem, 9vh, 7rem)) var(--gutter) clamp(4rem, 9vh, 7rem);
  background: var(--graphite);
}

.hero::before {
  content: "";
  position: absolute;
  inset: var(--header-height) auto 0 0;
  width: 0.42rem;
  background: var(--amber);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 46rem;
  padding-right: clamp(1rem, 5vw, 5.5rem);
}

.eyebrow {
  display: block;
  margin-bottom: clamp(2rem, 5vh, 4.5rem);
  color: var(--mist-blue);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
}

h1 {
  max-width: 9em;
  margin-bottom: clamp(2rem, 4vw, 4.5rem);
  color: var(--paper);
  font-size: var(--text-title);
  letter-spacing: -0.055em;
}

.hero-highlight {
  max-width: 28rem;
  margin-bottom: 0.8rem;
  color: var(--amber);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.2vw + 1rem, 2.15rem);
  font-weight: 600;
  line-height: 1.45;
}

.hero-subtitle {
  max-width: 36rem;
  margin-bottom: 0;
  color: var(--paper-deep);
  font-size: var(--text-body);
}

.light-calibrator {
  position: relative;
  min-height: 31rem;
  align-self: center;
  display: grid;
  grid-template-rows: repeat(7, minmax(2.75rem, 1fr));
  gap: clamp(0.5rem, 1.3vh, 1rem);
  padding: 1rem 0 1rem clamp(1.5rem, 4vw, 4rem);
}

.light-calibrator::before {
  content: "";
  position: absolute;
  inset: 0 0 0 19%;
  background: linear-gradient(90deg, rgba(255, 176, 0, 0.26), rgba(255, 176, 0, 0.02) 58%, transparent);
  filter: blur(16px);
}

.light-slat {
  position: relative;
  display: flex;
  align-items: center;
  width: var(--slat-width, 90%);
  padding-inline: clamp(1rem, 2vw, 2rem);
  overflow: hidden;
  background: var(--graphite-soft);
  border-left: 0.42rem solid var(--amber);
  box-shadow: -1.2rem 0 2.5rem rgba(255, 176, 0, 0.08);
  transform-origin: left center;
  animation: open-slat 760ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.light-slat:nth-child(1) { --slat-width: 84%; animation-delay: 120ms; }
.light-slat:nth-child(2) { --slat-width: 98%; animation-delay: 210ms; }
.light-slat:nth-child(3) { --slat-width: 72%; animation-delay: 300ms; }
.light-slat:nth-child(4) { --slat-width: 91%; animation-delay: 390ms; }
.light-slat:nth-child(5) { --slat-width: 64%; animation-delay: 480ms; }
.light-slat:nth-child(6) { --slat-width: 78%; animation-delay: 570ms; }
.light-slat:nth-child(7) { --slat-width: 47%; animation-delay: 660ms; }

.light-slat span {
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.8vw, 1.65rem);
  letter-spacing: 0.3em;
}

.light-slat-empty {
  border-left-color: var(--mist-blue);
  opacity: 0.5;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 6rem);
  border-bottom: 1px solid rgba(23, 28, 33, 0.28);
}

.section-heading h2 {
  margin-bottom: 0.2em;
  color: var(--ink);
  font-size: var(--text-section);
  letter-spacing: -0.04em;
}

.section-index {
  color: var(--earth-red);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.24em;
}

.section-heading-dark {
  border-bottom-color: rgba(241, 235, 221, 0.22);
}

.section-heading-dark h2 {
  color: var(--paper);
}

.section-heading-dark .section-index {
  color: var(--amber);
}

.services {
  position: relative;
  padding: var(--section-space) var(--gutter);
  background: var(--graphite);
}

.service-shutters {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.service-panel {
  --panel-shift: 0;
  position: relative;
  width: min(82rem, calc(100% - var(--panel-shift)));
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(20rem, 1.15fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: center;
  min-height: 16rem;
  margin-left: var(--panel-shift);
  padding: clamp(2rem, 4vw, 4.5rem);
  background: var(--paper);
  color: var(--ink);
  border-left: clamp(0.45rem, 0.9vw, 0.9rem) solid var(--panel-accent, var(--amber));
  clip-path: inset(0 0 0 0);
  transform-origin: left center;
}

.service-panel:nth-child(1) { --panel-accent: var(--amber); }
.service-panel:nth-child(2) { --panel-shift: clamp(0rem, 8vw, 8rem); --panel-accent: var(--mist-blue); }
.service-panel:nth-child(3) { --panel-shift: clamp(0rem, 3vw, 3rem); --panel-accent: var(--earth-red); }
.service-panel:nth-child(4) { --panel-shift: clamp(0rem, 12vw, 12rem); --panel-accent: var(--amber); }

.service-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: clamp(1.2rem, 3vw, 3rem);
  width: clamp(2.5rem, 5vw, 5.5rem);
  height: 0.42rem;
  background: var(--panel-accent);
}

.service-number {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--earth-red);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.service-key h3 {
  margin-bottom: 0.8rem;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.4vw, 2.75rem);
  line-height: 1.2;
}

.service-key strong {
  color: var(--earth-red);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
}

.service-panel p {
  margin-bottom: 0;
  font-size: clamp(1rem, 0.45vw + 0.92rem, 1.24rem);
}

.reveal-panel {
  opacity: 0;
  clip-path: inset(0 98% 0 0);
  transition: clip-path 720ms cubic-bezier(0.2, 0.72, 0.2, 1), opacity 180ms linear;
}

.reveal-panel.is-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.about {
  position: relative;
  padding: 0 var(--gutter) var(--section-space);
  background: linear-gradient(to bottom, var(--graphite) 0 14%, var(--paper-deep) 14% 100%);
}

.about-ruler {
  position: absolute;
  top: 14%;
  right: var(--gutter);
  bottom: 0;
  width: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  border-right: 1px solid rgba(23, 28, 33, 0.3);
}

.about-ruler span {
  width: 0.65rem;
  border-top: 1px solid var(--earth-red);
}

.about-sheet {
  position: relative;
  z-index: 1;
  width: min(88rem, calc(100% - clamp(0rem, 3vw, 3rem)));
  padding: clamp(3rem, 8vw, 8rem);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 1.4rem 1.4rem 0 var(--mist-blue);
}

.about-copy {
  display: grid;
  grid-template-columns: 0.85fr 1.1fr 0.95fr;
  gap: clamp(2rem, 5vw, 6rem);
}

.about-copy p {
  margin-bottom: 0;
}

.about-copy p:nth-child(2) {
  margin-top: clamp(2rem, 5vw, 5rem);
}

.about-copy p:nth-child(3) {
  margin-top: clamp(4rem, 10vw, 10rem);
}

.reveal-steady {
  filter: brightness(0.68);
  transition: filter 900ms ease;
}

.reveal-steady.is-visible {
  filter: brightness(1);
}

.strengths {
  padding: var(--section-space) var(--gutter);
  background: var(--graphite);
}

.strength-notes {
  width: min(83rem, 100%);
  margin-inline: auto;
}

.strength-note {
  position: relative;
  width: min(47rem, calc(100% - var(--note-x, 0px)));
  padding: clamp(1.6rem, 3vw, 3rem) clamp(1.5rem, 4vw, 4rem);
  color: var(--ink);
  background: var(--note-bg, var(--paper));
  border-top: 0.42rem solid var(--note-accent, var(--amber));
  transform: translate(var(--note-x, 0), 1.6rem);
  opacity: 0;
  transition: transform 520ms cubic-bezier(0.2, 0.72, 0.2, 1), opacity 420ms ease;
}

.strength-note + .strength-note {
  margin-top: -0.35rem;
}

.strength-note:nth-child(1) { --note-x: 0; }
.strength-note:nth-child(2) { --note-x: min(24vw, 18rem); --note-bg: #dce7e6; --note-accent: var(--mist-blue); }
.strength-note:nth-child(3) { --note-x: min(8vw, 6rem); --note-bg: #eadbca; --note-accent: var(--earth-red); }
.strength-note:nth-child(4) { --note-x: min(30vw, 22rem); --note-accent: var(--amber); }

.strength-note.is-visible {
  transform: translate(var(--note-x, 0), 0);
  opacity: 1;
}

.strength-note h3 {
  margin-bottom: 0.8rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2vw, 2.15rem);
}

.strength-note p {
  margin-bottom: 0;
}

.site-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  width: 72%;
  height: 0.45rem;
  background: linear-gradient(90deg, var(--earth-red) 0 18%, var(--amber) 18% 64%, var(--mist-blue) 64% 100%);
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@keyframes open-slat {
  from { opacity: 0; transform: scaleX(0.04); }
  to { opacity: 1; transform: scaleX(1); }
}

/* 窄屏：光栅转为标题下方的横向校准带。 */
@media (max-width: 767px) {
  :root {
    --header-height: 7.7rem;
    --gutter: clamp(1rem, 5vw, 1.5rem);
    --section-space: clamp(4rem, 18vw, 6rem);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.72rem;
    padding-bottom: 0.45rem;
  }

  .wordmark {
    width: 100%;
    max-width: none;
    font-size: 0.78rem;
  }

  .wordmark-mark {
    width: 2.1rem;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }

  nav a {
    min-height: 2.75rem;
    font-size: 0.77rem;
  }

  .hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-height) + 2.4rem);
    padding-bottom: 3rem;
  }

  .hero-copy {
    padding-right: 0;
  }

  .eyebrow {
    margin-bottom: 2rem;
    font-size: 0.75rem;
  }

  h1 {
    max-width: 7.5em;
    margin-bottom: 1.8rem;
  }

  .hero-highlight {
    font-size: 1.18rem;
  }

  .hero-subtitle {
    font-size: 0.94rem;
  }

  .light-calibrator {
    width: 100%;
    min-height: 11rem;
    margin-top: 2.25rem;
    grid-template-rows: repeat(7, 0.85rem);
    gap: 0.42rem;
    padding: 0;
  }

  .light-slat {
    min-height: 0;
    padding-inline: 0.6rem;
    border-left-width: 0.25rem;
  }

  .light-slat span {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
  }

  .section-heading {
    margin-bottom: 2.5rem;
  }

  .section-index {
    font-size: 0.7rem;
  }

  .service-panel {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: 0;
    margin-left: 0;
    padding: 2rem 1.3rem 2.2rem 1.5rem;
  }

  .service-panel p {
    font-size: 0.98rem;
  }

  .about {
    padding-right: calc(var(--gutter) + 0.55rem);
  }

  .about-sheet {
    width: 100%;
    padding: 2.5rem 1.45rem 3rem;
    box-shadow: 0.55rem 0.55rem 0 var(--mist-blue);
  }

  .about-copy {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-copy p:nth-child(2),
  .about-copy p:nth-child(3) {
    margin-top: 0;
  }

  .about-ruler {
    right: var(--gutter);
    width: 0.65rem;
  }

  .strength-note {
    width: calc(100% - var(--note-x-mobile, 0rem));
    padding: 1.8rem 1.35rem 2rem;
  }

  .strength-note:nth-child(1) { --note-x: 0; --note-x-mobile: 0; }
  .strength-note:nth-child(2) { --note-x: 0.75rem; --note-x-mobile: 0.75rem; }
  .strength-note:nth-child(3) { --note-x: 0; --note-x-mobile: 0; }
  .strength-note:nth-child(4) { --note-x: 0.75rem; --note-x-mobile: 0.75rem; }

  .strength-note + .strength-note {
    margin-top: 0.85rem;
  }
}

/* 中等宽度：保留遮光片错位，内部改为单列以消除双列最小宽度溢出。 */
@media (min-width: 768px) and (max-width: 1099px) {
  .service-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

/* 手机横屏：压缩首屏纵向节奏，保持所有内容可滚动。 */
@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --header-height: 3.25rem;
  }

  .site-header {
    min-height: var(--header-height);
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    padding: 0.2rem 1rem;
  }

  .wordmark {
    width: auto;
    max-width: 12rem;
    gap: 0.42rem;
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .wordmark-mark {
    width: 1.55rem;
    height: 0.52rem;
  }

  nav {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: clamp(0.25rem, 1.6vw, 0.85rem);
  }

  nav a {
    min-height: 2.75rem;
    margin-left: 0;
    padding-inline: 0.1rem;
    font-size: clamp(0.65rem, 1.35vw, 0.73rem);
  }

  .hero {
    width: 100%;
    min-width: 0;
    min-height: 100svh;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    align-items: center;
    gap: clamp(0.75rem, 2.5vw, 1.4rem);
    padding: calc(var(--header-height) + 0.6rem) 1rem 0.45rem 1.25rem;
  }

  .hero-copy {
    min-width: 0;
    max-width: none;
    align-self: center;
    padding-right: 0;
  }

  .eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.64rem;
    line-height: 1.2;
    letter-spacing: 0.035em;
  }

  h1 {
    max-width: none;
    margin-bottom: 0.4rem;
    font-size: clamp(1.9rem, 5vw, 2.55rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
  }

  .hero-highlight {
    max-width: none;
    margin-bottom: 0.18rem;
    font-size: clamp(0.92rem, 2.25vw, 1.12rem);
    line-height: 1.3;
  }

  .hero-subtitle {
    max-width: 32rem;
    margin-bottom: 0;
    font-size: clamp(0.72rem, 1.55vw, 0.82rem);
    line-height: 1.5;
  }

  .light-calibrator {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: min(68svh, 15rem);
    align-self: center;
    margin-top: 0;
    grid-template-rows: repeat(7, minmax(0, 1fr));
    gap: 0.38rem;
    padding: 0;
    overflow: hidden;
  }

  .light-calibrator::before {
    inset: 0 0 0 5%;
  }

  .light-slat {
    max-width: 100%;
    min-width: 0;
    padding-inline: 0.55rem;
    border-left-width: 0.25rem;
  }

  .light-slat span {
    overflow: hidden;
    font-family: var(--font-sans);
    font-size: 0.63rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }
}

/* 平板：保持错位关系，但缩短横向位移。 */
@media (min-width: 768px) and (max-width: 1099px) and (min-height: 501px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.82fr);
  }

  .about-copy {
    grid-template-columns: 1fr 1fr;
  }

  .about-copy p:nth-child(2) {
    margin-top: 3rem;
  }

  .about-copy p:nth-child(3) {
    grid-column: 1 / -1;
    width: 70%;
    margin-top: 0;
    margin-left: 20%;
  }
}

/* 桌面：扩大业务遮光片的交错距离。 */
@media (min-width: 1100px) {
  .services {
    padding-right: max(var(--gutter), calc((100vw - 106rem) / 2));
  }

  .service-panel:nth-child(even) .service-key {
    order: 2;
  }

  .service-panel:nth-child(even) p {
    order: 1;
  }
}

/* 宽屏：限制阅读行长，增加光栅留白。 */
@media (min-width: 1440px) {
  :root {
    --gutter: max(5rem, calc((100vw - 100rem) / 2));
  }

  .hero {
    grid-template-columns: minmax(34rem, 0.9fr) minmax(34rem, 1.1fr);
  }

  .light-calibrator {
    padding-left: 5rem;
  }
}

/* 超宽屏：让构图向中心收束，避免内容被横向拉散。 */
@media (min-aspect-ratio: 2/1) and (min-height: 501px) {
  .hero {
    min-height: max(38rem, 100svh);
    grid-template-columns: minmax(34rem, 43rem) minmax(38rem, 54rem);
    justify-content: center;
  }

  .service-shutters,
  .section-heading {
    max-width: 100rem;
    margin-right: auto;
    margin-left: auto;
  }

  .about-sheet {
    margin-inline: auto;
  }
}

/* 偏高竖屏：首屏强化纵向光隙，业务文本保持舒展。 */
@media (max-aspect-ratio: 3/4) {
  .hero {
    min-height: 100svh;
  }

  .light-calibrator {
    margin-top: clamp(2rem, 6vh, 4rem);
  }

  .service-shutters {
    gap: 1.4rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-panel,
  .reveal-steady,
  .strength-note {
    opacity: 1;
    clip-path: none;
    filter: none;
    transform: translate(var(--note-x, 0), 0);
  }
}
