:root {
  --blue: #1557ff;
  --paper: #fff3b0;
  --coral: #ff6047;
  --ink: #11131a;
  --sky: #e5f1ff;
  --canvas: #fafaf5;
  --white: #ffffff;
  --line: rgba(17, 19, 26, 0.22);
  --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.15rem, 4vw, 5.5rem);
  --section-gap: clamp(5rem, 11vw, 10rem);
  --text-lg: clamp(2.8rem, 7.4vw, 8.8rem);
  --text-h2: clamp(2rem, 4.2vw, 5rem);
  --text-h3: clamp(1.3rem, 2.15vw, 2.3rem);
  --radius-small: 0.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

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

button {
  color: inherit;
  font: inherit;
}

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

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.7rem;
  padding: 0.7rem var(--page-pad);
  border-bottom: 1px solid var(--ink);
  background: rgba(250, 250, 245, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(72vw, 34rem);
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.35;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, 0.38rem);
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid var(--ink);
}

.brand-mark i {
  border-right: 1px solid var(--ink);
  background: var(--paper);
}

.brand-mark i:nth-child(2) {
  background: var(--blue);
}

.brand-mark i:last-child {
  border: 0;
  background: var(--coral);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.8rem);
  font-size: 0.9rem;
  font-weight: 650;
}

.site-nav a {
  position: relative;
  padding: 0.65rem 0;
}

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

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

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: transparent;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: var(--ink);
  content: "";
  transition: transform 180ms ease;
}

.menu-lines {
  position: relative;
}

.menu-lines::before {
  position: absolute;
  top: -0.38rem;
}

.menu-lines::after {
  position: absolute;
  top: 0.38rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(18rem, 0.88fr);
  grid-template-rows: 1fr auto;
  min-height: calc(100svh - 4.7rem);
  border-bottom: 1px solid var(--ink);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(4rem, 9vw, 8rem) clamp(2rem, 6vw, 7rem) clamp(4rem, 7vw, 6rem) var(--page-pad);
}

.hero-bracket {
  position: absolute;
  top: 11%;
  left: calc(var(--page-pad) - 0.12em);
  color: var(--blue);
  font-size: clamp(4rem, 10vw, 12rem);
  font-weight: 300;
  line-height: 1;
  opacity: 0.16;
}

.hero h1 {
  position: relative;
  max-width: 9.5em;
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.hero h1::after {
  display: inline-block;
  width: 0.12em;
  height: 0.72em;
  margin-left: 0.08em;
  background: var(--coral);
  content: "";
  vertical-align: -0.02em;
  animation: cursor-pulse 1.1s steps(1) infinite;
}

.hero-subtitle {
  max-width: 43rem;
  margin: clamp(1.8rem, 4vw, 3.4rem) 0 0 clamp(0rem, 5vw, 5rem);
  padding-left: 1.1rem;
  border-left: 0.38rem solid var(--blue);
  font-size: clamp(1rem, 1.45vw, 1.32rem);
  line-height: 1.82;
}

.turing-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(17, 19, 26, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 19, 26, 0.08) 1px, transparent 1px);
  background-size: clamp(2rem, 4vw, 4.5rem) clamp(2rem, 4vw, 4.5rem);
}

.tape-window {
  position: relative;
  width: min(42vw, 35rem);
  transform: rotate(-7deg);
}

.tape-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: clamp(4.2rem, 8vw, 8rem);
  border: 3px solid var(--ink);
  background: var(--canvas);
  box-shadow: 0.8rem 0.8rem 0 var(--blue);
}

.tape-row span {
  border-right: 2px solid var(--ink);
}

.tape-row span:last-child {
  border-right: 0;
}

.tape-row-top span:nth-child(3) {
  background: var(--blue);
}

.tape-row-bottom {
  margin-top: clamp(4.8rem, 8vw, 7rem);
  box-shadow: -0.8rem 0.8rem 0 var(--coral);
}

.tape-row-bottom span:nth-child(3) {
  background: var(--sky);
}

.tape-head {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: clamp(2.8rem, 5vw, 5rem);
  height: clamp(2.8rem, 5vw, 5rem);
  border: 3px solid var(--ink);
  background: var(--coral);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: read-head 1.4s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tape-head b {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34%;
  height: 34%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.hero-task {
  position: relative;
  z-index: 5;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 6.5rem;
  padding: 1rem var(--page-pad);
  color: var(--white);
  background: var(--ink);
}

.hero-task p {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 2.25rem);
  font-weight: 720;
  letter-spacing: 0.01em;
}

.task-cursor {
  width: 0.75rem;
  height: 2.2rem;
  background: var(--coral);
}

.task-end {
  color: var(--paper);
  font-size: 2.6rem;
  line-height: 1;
}

.section-shell {
  padding: var(--section-gap) var(--page-pad);
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(3rem, 7vw, 6.5rem);
}

.section-index {
  color: var(--blue);
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  font-weight: 850;
  letter-spacing: 0.13em;
}

.section-heading h2,
.about-heading h2 {
  margin: 0;
  font-size: var(--text-h2);
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 1;
}

.services {
  position: relative;
  background: var(--sky);
}

.services::before {
  position: absolute;
  top: 0;
  right: 12%;
  width: 1px;
  height: 100%;
  background: rgba(21, 87, 255, 0.2);
  content: "";
}

.service {
  position: relative;
  border-top: 1px solid var(--ink);
}

.service-primary {
  display: grid;
  grid-template-columns: minmax(3rem, 0.25fr) minmax(13rem, 0.8fr) minmax(17rem, 1.2fr);
  gap: clamp(1rem, 3vw, 4rem);
  align-items: start;
  padding: clamp(2.2rem, 5vw, 4.5rem) 0 clamp(3.5rem, 7vw, 7rem);
}

.service-code {
  color: var(--coral);
  font-size: clamp(1rem, 1.8vw, 1.55rem);
  font-weight: 850;
  letter-spacing: 0.1em;
}

.service h3 {
  margin: 0;
  font-size: var(--text-h3);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.service-highlight {
  display: inline-block;
  margin: 1.2rem 0 0;
  padding: 0.35rem 0.55rem;
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 700;
}

.service-copy {
  max-width: 48rem;
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
}

.service-branches {
  position: relative;
  margin-left: clamp(2rem, 12vw, 13rem);
  border-left: 3px solid var(--blue);
}

.service-branches::before {
  position: absolute;
  top: -3.9rem;
  left: -3px;
  width: clamp(2.2rem, 7vw, 7rem);
  height: 3.9rem;
  border-top: 3px solid var(--blue);
  content: "";
  transform: translateX(calc(-100% + 3px));
}

.service-branch {
  display: grid;
  grid-template-columns: minmax(2.5rem, 0.18fr) minmax(13rem, 0.72fr) minmax(17rem, 1.1fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(2.2rem, 4vw, 3.8rem) 0 clamp(2.2rem, 4vw, 3.8rem) clamp(1.5rem, 4vw, 4rem);
}

.service-branch:nth-child(2) {
  margin-left: clamp(0rem, 5vw, 5rem);
}

.service-branch:nth-child(3) {
  margin-left: clamp(0rem, 10vw, 10rem);
}

.about {
  position: relative;
  display: grid;
  grid-template-columns: minmax(11rem, 0.72fr) minmax(20rem, 1.7fr);
  gap: clamp(2rem, 7vw, 8rem);
  overflow: hidden;
  padding: var(--section-gap) var(--page-pad);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.about-rail {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 0.65rem;
}

.about-rail span {
  border-right: 1px solid var(--ink);
  background: var(--canvas);
}

.about-rail .active {
  background: var(--blue);
}

.about-heading {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: flex-start;
}

.about-copy {
  position: relative;
  z-index: 2;
  padding: clamp(1.5rem, 4vw, 4rem);
  border: 2px solid var(--ink);
  background: var(--canvas);
  box-shadow: clamp(0.55rem, 1vw, 1rem) clamp(0.55rem, 1vw, 1rem) 0 var(--coral);
}

.about-copy p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  line-height: 2;
}

.about-bracket {
  position: absolute;
  right: -0.08em;
  bottom: -0.22em;
  color: var(--blue);
  font-size: clamp(8rem, 24vw, 25rem);
  font-weight: 300;
  line-height: 1;
  opacity: 0.12;
}

.advantages {
  background: var(--canvas);
}

.proof-notes {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 8vw, 7rem);
}

.proof-notes::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--ink);
  content: "";
}

.proof {
  position: relative;
  width: calc(50% - clamp(2rem, 7vw, 7rem));
  padding: clamp(1.6rem, 3vw, 2.8rem);
  border: 2px solid var(--ink);
  background: var(--white);
}

.proof-left {
  align-self: flex-start;
  box-shadow: -0.65rem 0.65rem 0 var(--sky);
}

.proof-right {
  align-self: flex-end;
  box-shadow: 0.65rem 0.65rem 0 var(--paper);
}

.proof::after {
  position: absolute;
  top: 50%;
  width: clamp(2rem, 7vw, 7rem);
  height: 2px;
  background: var(--ink);
  content: "";
}

.proof-left::after {
  left: 100%;
}

.proof-right::after {
  right: 100%;
}

.proof-marker {
  position: absolute;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--ink);
  background: var(--coral);
  transform: translateY(-50%) rotate(45deg);
}

.proof-left .proof-marker {
  left: calc(100% + clamp(2rem, 7vw, 7rem) - 0.4rem);
}

.proof-right .proof-marker {
  right: calc(100% + clamp(2rem, 7vw, 7rem) - 0.4rem);
  background: var(--blue);
}

.proof h3 {
  margin: 0 0 1rem;
  font-size: var(--text-h3);
  line-height: 1.25;
}

.proof p {
  margin: 0;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem 2.5rem;
  min-height: 7rem;
  padding: 1.5rem var(--page-pad);
  color: var(--white);
  background: var(--ink);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  border-bottom: 1px solid var(--paper);
  color: var(--paper);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes read-head {
  from {
    opacity: 0;
    transform: translate(-170%, -50%) rotate(45deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg);
  }
}

@keyframes cursor-pulse {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (max-width: 767px) {
  :root {
    --page-pad: clamp(1rem, 5vw, 1.5rem);
    --section-gap: clamp(4.5rem, 20vw, 7rem);
  }

  html {
    scroll-padding-top: 4.5rem;
  }

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

  .brand {
    max-width: calc(100vw - 8.5rem);
    font-size: 0.76rem;
  }

  .menu-toggle {
    display: inline-flex;
    min-width: 3.8rem;
    min-height: 2.75rem;
    justify-content: flex-end;
    padding: 0;
  }

  .menu-label {
    font-size: 0.78rem;
    font-weight: 700;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    background: var(--canvas);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.6rem);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    min-height: 3.4rem;
    padding: 0.95rem var(--page-pad);
    border-right: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
  }

  .site-nav a:nth-child(even) {
    border-right: 0;
  }

  .site-nav a:nth-child(n + 3) {
    border-bottom: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: auto;
  }

  .hero-copy {
    min-height: 30rem;
    padding: 5.5rem var(--page-pad) 4rem;
  }

  .hero h1 {
    max-width: 7.2em;
    font-size: clamp(3.25rem, 17vw, 5.15rem);
  }

  .hero-subtitle {
    margin-left: 0;
  }

  .turing-stage {
    min-height: 17rem;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .tape-window {
    width: min(82vw, 28rem);
  }

  .tape-row {
    height: clamp(3.4rem, 15vw, 4.8rem);
    box-shadow: 0.55rem 0.55rem 0 var(--blue);
  }

  .tape-row-bottom {
    margin-top: 3.5rem;
    box-shadow: -0.55rem 0.55rem 0 var(--coral);
  }

  .hero-task {
    grid-column: 1;
    min-height: 6rem;
  }

  .service-primary,
  .service-branch {
    grid-template-columns: 2.2rem 1fr;
    gap: 0.8rem 1rem;
  }

  .service-primary {
    padding-bottom: 4.5rem;
  }

  .service-copy {
    grid-column: 2;
    margin-top: 0.6rem;
  }

  .service-branches {
    margin-left: 0.7rem;
  }

  .service-branch,
  .service-branch:nth-child(2),
  .service-branch:nth-child(3) {
    margin-left: 0;
    padding-left: 1.35rem;
  }

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

  .about-heading {
    flex-direction: row;
    align-items: baseline;
  }

  .about-copy {
    box-shadow: 0.55rem 0.55rem 0 var(--coral);
  }

  .about-copy p {
    font-size: 1.05rem;
    line-height: 1.95;
  }

  .proof-notes {
    gap: 3.5rem;
    padding-left: 1.3rem;
  }

  .proof-notes::before {
    left: 0;
  }

  .proof {
    width: 100%;
    padding: 1.35rem;
  }

  .proof::after {
    right: 100%;
    left: auto;
    width: 1.3rem;
  }

  .proof-left .proof-marker,
  .proof-right .proof-marker {
    right: auto;
    left: -1.72rem;
  }

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

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

  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr);
    grid-template-rows: auto auto;
    min-height: 30rem;
  }

  .hero-copy {
    min-height: 20rem;
    padding: 2.5rem var(--page-pad);
  }

  .hero h1 {
    max-width: 10em;
    font-size: clamp(2.5rem, 8vw, 4.8rem);
  }

  .hero-subtitle {
    margin-top: 1.2rem;
    font-size: 0.9rem;
  }

  .turing-stage {
    min-height: 20rem;
    border-top: 0;
    border-left: 1px solid var(--ink);
  }

  .tape-window {
    width: min(33vw, 24rem);
  }

  .tape-row {
    height: 3rem;
  }

  .tape-row-bottom {
    margin-top: 3rem;
  }

  .hero-task {
    grid-column: 1 / -1;
    min-height: 4.5rem;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    width: auto;
    border: 0;
    background: transparent;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .site-nav a {
    min-height: 0;
    padding: 0.45rem 0;
    border: 0;
  }
}

@media (min-width: 768px) {
  .reveal:nth-child(2) { transition-delay: 70ms; }
  .reveal:nth-child(3) { transition-delay: 120ms; }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .service-primary {
    grid-template-columns: 2.5rem minmax(11.5rem, 0.72fr) minmax(0, 1fr);
    gap: 1.5rem;
  }

  .service-branches {
    margin-left: clamp(2.5rem, 8vw, 5rem);
  }

  .service-branch {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.75rem 1.4rem;
    padding-left: clamp(1.25rem, 3vw, 2.5rem);
  }

  .service-branch .service-copy {
    grid-column: 2;
    max-width: none;
    margin-top: 0.5rem;
  }

  .service-branch:nth-child(2) {
    margin-left: clamp(0.75rem, 3vw, 2rem);
  }

  .service-branch:nth-child(3) {
    margin-left: clamp(1.5rem, 6vw, 4rem);
  }
}

@media (min-width: 1100px) {
  .hero-copy {
    min-height: 39rem;
  }

  .service-primary {
    padding-right: 7%;
  }

  .about-copy {
    margin-right: 6vw;
  }
}

@media (min-width: 1440px) {
  :root {
    --page-pad: clamp(5.5rem, 7vw, 9rem);
  }

  .hero {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .hero-copy {
    padding-right: 8vw;
  }

  .services,
  .advantages {
    padding-right: max(var(--page-pad), calc((100vw - 1600px) / 2));
    padding-left: max(var(--page-pad), calc((100vw - 1600px) / 2));
  }

  .about {
    padding-right: max(var(--page-pad), calc((100vw - 1600px) / 2));
    padding-left: max(var(--page-pad), calc((100vw - 1600px) / 2));
  }
}

@media (min-aspect-ratio: 2/1) and (min-width: 1100px) {
  .hero {
    min-height: 42rem;
  }

  .hero-copy {
    min-height: 34rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .tape-window {
    width: min(34vw, 32rem);
  }

  .section-shell,
  .about {
    --section-gap: 7rem;
  }
}

@media (max-aspect-ratio: 3/4) and (min-width: 600px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .hero-copy {
    min-height: 58svh;
  }

  .turing-stage {
    min-height: 31rem;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .tape-window {
    width: min(72vw, 38rem);
  }

  .hero-task {
    grid-column: 1;
  }
}

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

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

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