:root {
  --paper: #f2eddf;
  --ink: #15191b;
  --signal: #f04b32;
  --ready: #c8e86a;
  --muted: #758078;
  --paper-dim: #d9d4c7;
  --line: rgba(21, 25, 27, 0.2);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --page-pad: clamp(1.25rem, 4vw, 5.5rem);
  --section-gap: clamp(5rem, 10vw, 10rem);
  --header-height: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  min-height: var(--header-height);
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: rgba(242, 237, 223, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 2rem;
  gap: 0.18rem;
  flex: 0 0 auto;
}

.brand-mark i { display: block; height: 0.17rem; background: var(--ink); }
.brand-mark i:nth-child(1) { width: 100%; }
.brand-mark i:nth-child(2) { width: 72%; background: var(--signal); }
.brand-mark i:nth-child(3) { width: 42%; }

.site-nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.8rem); }

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.28rem;
  width: 0;
  height: 0.2rem;
  background: var(--signal);
  transition: width 220ms var(--ease);
}

.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { width: 100%; }

.menu-toggle { display: none; }

main { overflow: clip; }

.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-height) + clamp(3rem, 9vh, 7rem)) var(--page-pad) clamp(4rem, 8vh, 7rem);
  display: grid;
  grid-template-columns: minmax(2.5rem, 0.25fr) minmax(0, 1.1fr) minmax(16rem, 0.8fr);
  gap: clamp(1.5rem, 5vw, 6rem);
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: var(--header-height) var(--page-pad) auto;
  height: 1px;
  background: var(--line);
}

.hero-rail {
  position: relative;
  justify-self: start;
  width: 2rem;
  height: min(57vh, 32rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.rail-line {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 1px;
  background: var(--line);
}

.rail-node {
  z-index: 1;
  width: 0.65rem;
  height: 0.65rem;
  background: var(--paper);
  border: 1px solid var(--muted);
}

.rail-node.is-active { width: 1.1rem; height: 1.1rem; background: var(--signal); border-color: var(--signal); }

.hero-copy { position: relative; z-index: 2; max-width: 52rem; }

.hero-kicker {
  margin: 0 0 clamp(1.5rem, 4vh, 3.5rem);
  padding-left: 1.25rem;
  position: relative;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.4vw, 1.3rem);
}

.hero-kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--signal);
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 7.5vw, 9rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 850;
}

.hero h1 br { display: block; }

.hero-subtitle {
  width: min(100%, 40rem);
  margin: clamp(2rem, 5vh, 4rem) 0 0 clamp(1rem, 7vw, 8rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

.cue-stage {
  position: relative;
  width: 100%;
  height: min(60vh, 34rem);
  align-self: center;
  border-left: 1px solid var(--line);
}

.cue {
  position: absolute;
  left: 0;
  display: block;
  height: clamp(1.35rem, 2vw, 2.1rem);
  transform: scaleX(0);
  transform-origin: left;
  animation: cue-in 600ms var(--ease) forwards;
}

.cue::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.8rem;
  height: 1px;
  background: var(--ink);
  transform: translateX(-100%);
}

.cue i { position: absolute; right: 0; top: 0; width: 0.5rem; height: 100%; background: var(--ink); }
.cue-1 { top: 11%; width: 82%; background: var(--signal); animation-delay: 120ms; }
.cue-2 { top: 32%; width: 54%; background: var(--ink); animation-delay: 210ms; }
.cue-2 i { background: var(--ready); }
.cue-3 { top: 57%; width: 92%; background: var(--muted); animation-delay: 300ms; }
.cue-3 i { background: var(--signal); }
.cue-4 { top: 80%; width: 68%; background: var(--ready); animation-delay: 390ms; }

.cue-terminal {
  position: absolute;
  right: 3%;
  bottom: 0;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--ready);
  box-shadow: 0 0 0 0.4rem var(--paper), 0 0 0 calc(0.4rem + 1px) var(--line);
}

@keyframes cue-in { to { transform: scaleX(1); } }

.services, .strengths { padding: var(--section-gap) var(--page-pad); }

.section-intro {
  display: grid;
  grid-template-columns: minmax(6rem, 0.25fr) 1fr;
  gap: clamp(1.5rem, 5vw, 6rem);
  align-items: baseline;
  margin-bottom: clamp(3rem, 8vw, 7rem);
}

.section-index {
  color: var(--signal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5.5vw, 6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.service-sequence { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }

.service-item {
  --track-width: 72%;
  position: relative;
  min-height: 18rem;
  padding: clamp(2.2rem, 5vw, 5rem) 0;
  display: grid;
  grid-template-columns: minmax(14rem, 0.8fr) minmax(12rem, 0.6fr) minmax(18rem, 1fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.service-item:nth-child(2) { --track-width: 48%; padding-left: 8%; }
.service-item:nth-child(3) { --track-width: 88%; padding-right: 5%; }
.service-item:nth-child(4) { --track-width: 63%; padding-left: 14%; }

.service-track {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--track-width);
  height: 0.42rem;
  background: var(--ink);
  overflow: visible;
  transition: width 450ms var(--ease);
}

.service-track span { position: absolute; left: 0; top: 0; width: 22%; height: 100%; background: var(--signal); }
.service-track i { position: absolute; right: -0.45rem; top: -0.32rem; width: 0.9rem; height: 0.9rem; background: var(--ready); }
.service-item:hover .service-track { width: min(100%, calc(var(--track-width) + 5%)); }

.service-heading { display: flex; align-items: baseline; gap: 1rem; }
.service-number { color: var(--muted); font-size: 0.72rem; font-weight: 750; }
.service-heading h3 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.6rem); line-height: 1.2; letter-spacing: -0.04em; }
.service-hook { margin: 0; font-family: var(--font-serif); font-size: clamp(1.15rem, 1.8vw, 1.55rem); line-height: 1.5; }
.service-body { margin: 0; max-width: 38rem; color: #303638; font-size: clamp(0.98rem, 1.2vw, 1.08rem); }

.about {
  position: relative;
  padding: var(--section-gap) var(--page-pad);
  color: var(--paper);
  background: var(--ink);
  display: grid;
  grid-template-columns: minmax(5rem, 0.25fr) minmax(12rem, 0.55fr) minmax(20rem, 1.2fr);
  gap: clamp(1.5rem, 5vw, 6rem);
}

.about-marker { position: relative; min-height: 25rem; border-left: 1px solid rgba(242, 237, 223, 0.24); }
.about-marker span { position: absolute; top: 5%; left: -1px; width: 0.4rem; height: 37%; background: var(--signal); }
.about-marker i { position: absolute; top: 43%; left: -0.55rem; width: 1.1rem; height: 1.1rem; background: var(--ready); }
.about-heading .section-index { display: block; margin-bottom: 2rem; color: var(--ready); }
.about-heading h2 { font-size: clamp(2.5rem, 4.6vw, 5rem); }
.about-copy { max-width: 50rem; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.about-copy p { margin: 0 0 1.5em; }
.about-copy p:first-child { font-family: var(--font-serif); font-size: 1.08em; }
.about-copy p:last-child { margin-bottom: 0; color: var(--paper-dim); }

.strengths .section-intro { margin-bottom: clamp(2rem, 5vw, 4rem); }
.strength-lines { border-top: 1px solid var(--ink); }

.strength-item {
  position: relative;
  padding: clamp(2rem, 4vw, 4rem) 0;
  display: grid;
  grid-template-columns: minmax(3rem, 0.18fr) minmax(14rem, 0.55fr) minmax(20rem, 1fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.strength-item:nth-child(even) { margin-left: 8%; }
.strength-signal { width: 1rem; height: 1rem; margin-top: 0.4rem; background: var(--signal); transition: transform 260ms var(--ease), background 260ms ease; }
.strength-item:nth-child(even) .strength-signal { background: var(--ready); border: 1px solid var(--ink); }
.strength-item:hover .strength-signal { transform: translateX(1.2rem); background: var(--ready); }
.strength-item h3 { margin: 0; font-size: clamp(1.3rem, 2vw, 2rem); line-height: 1.3; }
.strength-item p { margin: 0; max-width: 44rem; color: #303638; }

.site-footer {
  padding: clamp(3rem, 6vw, 5rem) var(--page-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  color: var(--paper);
  background: var(--ink);
  font-size: 0.85rem;
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--paper-dim); text-underline-offset: 0.25rem; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--ready); }

.reveal { opacity: 0; transform: translateY(0.75rem); transition: opacity 520ms ease, transform 520ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 1099px) {
  .hero { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .hero-subtitle {
    width: auto;
    max-width: 40rem;
    margin-left: clamp(0rem, 4vw, 2.5rem);
  }
  .cue-stage { position: absolute; right: -7%; bottom: 5%; width: 43%; height: 35%; opacity: 0.7; }
  .service-item { grid-template-columns: minmax(14rem, 0.75fr) 1.25fr; }
  .service-hook { grid-column: 1; }
  .service-body { grid-column: 2; grid-row: 1 / span 2; }
  .about { grid-template-columns: minmax(4rem, 0.18fr) minmax(0, 1fr); }
  .about-heading { grid-column: 2; }
  .about-copy { grid-column: 2; }
  .about-marker { grid-row: 1 / span 2; }
}

@media (max-width: 767px) {
  :root { --header-height: 4rem; --section-gap: clamp(4.5rem, 18vw, 7rem); }

  .brand { max-width: calc(100vw - 6.5rem); font-size: 0.75rem; }
  .brand > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

  .menu-toggle {
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 0.45rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 0;
  }

  .menu-toggle span { display: block; width: 1.15rem; height: 2px; background: currentColor; transition: transform 220ms ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(0.225rem) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-0.225rem) rotate(-45deg); }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    padding: 1rem var(--page-pad) 2rem;
    display: grid;
    gap: 0;
    color: var(--paper);
    background: var(--ink);
    transform: translateY(calc(-100% - var(--header-height)));
    visibility: hidden;
    transition: transform 300ms var(--ease), visibility 300ms;
  }

  .site-nav.is-open { transform: none; visibility: visible; }
  .site-nav a { min-height: 3.5rem; color: var(--paper-dim); border-bottom: 1px solid rgba(242, 237, 223, 0.16); }
  .site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--paper); }
  .site-nav a::after { bottom: 0.75rem; background: var(--ready); }

  .hero {
    min-height: 100svh;
    padding-top: calc(var(--header-height) + 2.5rem);
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 1rem;
    align-content: center;
  }

  .hero-rail { width: 1.25rem; height: 61vh; }
  .hero-kicker { margin-bottom: 2rem; font-size: 0.98rem; }
  .hero h1 { font-size: clamp(3.15rem, 15.5vw, 5rem); }
  .hero-subtitle { margin: 2.2rem 0 0; font-size: 0.98rem; }
  .cue-stage { right: -17%; bottom: 2%; width: 53%; height: 24%; opacity: 0.5; }

  .section-intro { grid-template-columns: 1fr; gap: 1.2rem; margin-bottom: 3rem; }
  .service-item,
  .service-item:nth-child(2),
  .service-item:nth-child(3),
  .service-item:nth-child(4) {
    min-height: 0;
    padding: 3.2rem 0;
    display: block;
  }

  .service-heading { margin-bottom: 1.35rem; }
  .service-hook { margin-bottom: 1rem; }
  .service-body { font-size: 0.96rem; }

  .about { grid-template-columns: 1.3rem minmax(0, 1fr); gap: 1.2rem; }
  .about-marker { min-height: 100%; }
  .about-heading .section-index { margin-bottom: 1.2rem; }
  .about-copy { font-size: 1rem; }

  .strength-item,
  .strength-item:nth-child(even) {
    margin-left: 0;
    padding: 2.3rem 0;
    grid-template-columns: 1.1rem minmax(0, 1fr);
    gap: 1rem;
  }

  .strength-item h3 { grid-column: 2; }
  .strength-item p { grid-column: 2; }
  .strength-signal { grid-row: 1 / span 2; }
}

@media (orientation: landscape) and (max-height: 500px) {
  :root { --header-height: 3.6rem; }
  .hero { min-height: 31rem; padding-top: 5.2rem; padding-bottom: 3rem; grid-template-columns: 1.5rem minmax(0, 1fr) minmax(12rem, 0.55fr); }
  .hero-rail { height: 22rem; }
  .hero-kicker { margin-bottom: 1rem; font-size: 0.85rem; }
  .hero h1 { font-size: clamp(3rem, 8vw, 5rem); }
  .hero-subtitle { margin-top: 1.2rem; padding-top: 0.7rem; font-size: 0.88rem; }
  .cue-stage { position: relative; right: auto; bottom: auto; width: 100%; height: 19rem; opacity: 0.75; }
}

@media (min-width: 1100px) {
  .site-header { min-height: var(--header-height); }
  .services { padding-top: clamp(8rem, 12vw, 13rem); }
}

@media (min-width: 1440px) {
  :root { --page-pad: clamp(5rem, 7vw, 9rem); }
  .hero { grid-template-columns: minmax(4rem, 0.2fr) minmax(36rem, 1.15fr) minmax(24rem, 0.85fr); }
  .service-item { grid-template-columns: minmax(19rem, 0.8fr) minmax(17rem, 0.6fr) minmax(26rem, 1fr); }
}

@media (min-aspect-ratio: 2 / 1) and (min-width: 1000px) {
  .hero { min-height: max(36rem, 100svh); padding-top: calc(var(--header-height) + 3rem); padding-bottom: 3rem; }
  .hero-rail, .cue-stage { height: min(64vh, 27rem); }
  .hero h1 { font-size: clamp(4rem, 6.4vw, 8rem); }
  .hero-subtitle { margin-top: 2rem; }
}

@media (max-aspect-ratio: 3 / 4) {
  .hero { align-content: center; }
  .hero-copy { align-self: center; }
}

@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; }
  .reveal { opacity: 1; transform: none; }
}
