:root {
  --paper: #f5f2ea;
  --paper-bright: #fbfaf6;
  --ink: #10203e;
  --blue: #1746e0;
  --blue-dark: #092b88;
  --acid: #ddf36a;
  --line: rgba(23, 70, 224, 0.42);
  --line-light: rgba(245, 242, 234, 0.35);
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --section-space: clamp(6rem, 11vw, 10rem);
  --max-width: 1600px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-180%);
}

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

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

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 5.25rem;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 234, 0.94);
  transition: min-height 220ms ease, box-shadow 220ms ease;
}

.site-header.is-scrolled {
  min-height: 4.5rem;
  box-shadow: 0 10px 30px rgba(16, 32, 62, 0.06);
}

.company-name {
  width: fit-content;
  max-width: 75vw;
  font-size: clamp(0.88rem, 1.35vw, 1.2rem);
  font-weight: 750;
  letter-spacing: 0.015em;
  line-height: 1.3;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 3.5rem);
  font-size: 0.94rem;
  font-weight: 700;
}

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

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

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

.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.7rem;
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--ink);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 0.35rem 0;
  background: currentColor;
  transition: transform 180ms ease;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: 1fr auto;
  min-height: min(58rem, 100svh);
  padding: 9.5rem var(--gutter) 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before,
.hero::after,
.hero-lines::before,
.hero-lines::after {
  position: absolute;
  z-index: 0;
  background: var(--line);
  content: "";
  pointer-events: none;
}

.hero-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  top: 5.25rem;
  bottom: 0;
  left: var(--gutter);
  width: 1px;
}

.hero::after {
  top: 5.25rem;
  right: var(--gutter);
  bottom: 0;
  width: 1px;
}

.hero-lines::before {
  top: 27%;
  right: 0;
  left: 0;
  height: 1px;
}

.hero-lines::after {
  top: 5.25rem;
  bottom: 0;
  left: 42%;
  width: 1px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 43rem;
  padding: 4rem clamp(2rem, 5vw, 6rem) 5rem 2.5rem;
}

.eyebrow,
.section-number {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 2rem;
  color: var(--blue);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-number::before {
  width: 2.6rem;
  height: 4px;
  background: var(--acid);
  content: "";
}

.hero h1 {
  max-width: 12em;
  font-size: clamp(2.8rem, 5.4vw, 6rem);
}

.hero-summary {
  max-width: 32rem;
  margin-top: 2rem;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.75;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 12.5rem;
  min-height: 3.75rem;
  margin-top: 2.5rem;
  padding: 0.8rem 1.25rem 0.8rem 1.5rem;
  border: 1px solid transparent;
  font-weight: 800;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button span {
  font-size: 1.25rem;
}

.button-primary {
  background: var(--blue);
  color: #fff;
}

.button-primary:hover {
  background: var(--blue-dark);
}

.hero-media {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-height: 34rem;
  margin: 2rem 0 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
}

.hero-media img {
  object-position: 56% center;
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-media:hover img {
  transform: scale(1.025);
}

.hero-media figcaption,
.service-media figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.hero-index {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.section {
  position: relative;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: var(--section-space) var(--gutter);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(16rem, 0.45fr);
  gap: 4rem;
  align-items: end;
  margin-bottom: clamp(4rem, 7vw, 7rem);
}

.section-heading .section-number {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-heading h2,
.about h2 {
  font-size: clamp(2.7rem, 5vw, 5.4rem);
}

.section-heading > p:last-child {
  max-width: 30rem;
  padding-left: 2rem;
  border-left: 1px solid var(--blue);
  font-size: 1.05rem;
}

.service-list {
  border-top: 1px solid var(--line);
}

.service-item {
  position: relative;
  display: grid;
  grid-template-columns: 0.6fr 2.2fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 10.5rem;
  padding: 2rem 1.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  transition: background-color 220ms ease, color 220ms ease;
}

.service-item::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blue);
  content: "";
  transform: translateX(-101%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-item:hover {
  color: #fff;
}

.service-item:hover::before {
  transform: translateX(0);
}

.service-number {
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 800;
}

.service-item:hover .service-number {
  color: var(--acid);
}

.service-body {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) 1fr;
  gap: 2rem;
  align-items: center;
}

.service-body h3 {
  font-size: clamp(1.65rem, 2.7vw, 2.6rem);
}

.service-body p {
  max-width: 34rem;
}

.service-mark {
  justify-self: end;
  color: rgba(16, 32, 62, 0.25);
  font-family: Consolas, monospace;
  font-size: clamp(1.25rem, 2.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.service-item:hover .service-mark {
  color: rgba(255, 255, 255, 0.28);
}

.service-media-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1px;
  margin-top: 5rem;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.service-media {
  position: relative;
  min-height: 25rem;
  overflow: hidden;
  background: var(--paper);
}

.service-media img {
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-media:hover img {
  transform: scale(1.035);
}

.connection {
  width: 100%;
  max-width: none;
  padding-right: var(--gutter);
  padding-left: var(--gutter);
  background: var(--blue);
  color: var(--paper-bright);
}

.connection::before,
.connection::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-light);
  content: "";
}

.connection::before {
  left: var(--gutter);
}

.connection::after {
  right: var(--gutter);
}

.connection-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  max-width: calc(var(--max-width) - (var(--gutter) * 2));
  margin: 0 auto 5rem;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.connection-copy {
  padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 5vw, 5rem) clamp(3rem, 6vw, 6rem) 0;
  border-right: 1px solid var(--line-light);
}

.section-number-light {
  color: var(--paper-bright);
}

.connection h2 {
  max-width: 12em;
  font-size: clamp(2.8rem, 5.6vw, 5.8rem);
}

.connection-copy > p:last-child {
  max-width: 38rem;
  margin-top: 2.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
}

.connection-directions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.connection-directions span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 15rem;
  padding: 1rem;
  border-right: 1px solid var(--line-light);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 800;
  writing-mode: vertical-rl;
}

.connection-directions span:last-child {
  border-right: 0;
}

.connection-directions span::after {
  width: 4px;
  height: 2.2rem;
  margin-top: 1.25rem;
  background: var(--acid);
  content: "";
}

.connection-image {
  position: relative;
  max-width: calc(var(--max-width) - (var(--gutter) * 2));
  height: clamp(23rem, 45vw, 42rem);
  margin: 0 auto;
  overflow: hidden;
}

.connection-image::after {
  position: absolute;
  inset: 0;
  background: rgba(23, 70, 224, 0.38);
  content: "";
  mix-blend-mode: color;
}

.connection-image img {
  object-position: center 58%;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(4rem, 9vw, 10rem);
  align-items: start;
  min-height: 42rem;
}

.about-title {
  position: sticky;
  top: 8rem;
}

.about-copy {
  padding-top: 3.7rem;
  border-top: 1px solid var(--blue);
}

.about-copy p {
  max-width: 38rem;
}

.about-lead {
  margin-bottom: 2rem;
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 750;
  line-height: 1.6;
}

.contact-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  padding: clamp(3.5rem, 7vw, 7rem) var(--gutter);
  background: var(--blue);
  color: #fff;
}

.contact-strip p {
  margin-bottom: 1rem;
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.contact-strip h2 {
  font-size: clamp(2rem, 4.5vw, 4.8rem);
}

.button-accent {
  margin-top: 0;
  background: var(--acid);
  color: var(--ink);
}

.button-accent:hover {
  background: #efff9d;
}

.site-footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 2rem;
  align-items: center;
  padding: 3.25rem var(--gutter) 6.5rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.site-footer > p:not(.copyright) {
  min-height: 3rem;
  padding-right: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.footer-company {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.copyright {
  grid-column: 1 / -1;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
}

.fixed-contact {
  position: fixed;
  z-index: 200;
  right: clamp(1rem, 2.2vw, 2.25rem);
  bottom: clamp(1rem, 2.2vw, 2.25rem);
  display: grid;
  place-items: center;
  width: 6.25rem;
  height: 6.25rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 40px rgba(16, 32, 62, 0.24);
  font-size: 0.95rem;
  font-weight: 800;
  transition: background-color 180ms ease, color 180ms ease, transform 220ms ease;
}

.fixed-contact:hover {
  background: var(--acid);
  color: var(--ink);
  transform: translateY(-5px) rotate(-4deg);
}

.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js-enabled [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    min-height: 4.75rem;
  }

  .menu-toggle {
    position: relative;
    z-index: 2;
    display: block;
  }

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

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

  .site-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    padding: 6rem var(--gutter);
    background: var(--blue);
    color: #fff;
    font-size: clamp(2rem, 9vw, 4rem);
    transform: translateY(-105%);
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .site-nav[data-open="true"] {
    transform: translateY(0);
  }

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

  .hero-lines::after {
    left: 50%;
  }

  .hero-copy {
    padding: 5rem 1.25rem 4rem;
  }

  .hero-media {
    min-height: 31rem;
    margin-top: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .section-heading,
  .about,
  .contact-strip {
    grid-template-columns: 1fr;
  }

  .section-heading > p:last-child {
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--blue);
    border-left: 0;
  }

  .service-item {
    grid-template-columns: 0.35fr 2fr;
  }

  .service-body {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .service-mark {
    display: none;
  }

  .service-media-grid,
  .connection-grid {
    grid-template-columns: 1fr;
  }

  .connection-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line-light);
  }

  .connection-directions span {
    min-height: 10rem;
    writing-mode: horizontal-tb;
  }

  .about-title {
    position: static;
  }

  .about-copy {
    padding-top: 2rem;
  }

  .contact-strip .button {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 1.1rem;
    --section-space: 5.5rem;
  }

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

  .company-name {
    max-width: 16rem;
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 5.5rem;
  }

  .hero-copy {
    padding: 4rem 0.35rem 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 12.8vw, 4.5rem);
  }

  .hero-summary {
    max-width: 22rem;
  }

  .hero-media {
    min-height: 27rem;
  }

  .hero-media img {
    object-position: 68% center;
  }

  .section-heading {
    gap: 2rem;
    margin-bottom: 3.25rem;
  }

  .section-heading h2,
  .about h2,
  .connection h2 {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .service-item {
    grid-template-columns: 2.5rem 1fr;
    gap: 0.85rem;
    min-height: 12rem;
    padding: 2rem 0.35rem;
  }

  .service-media-grid {
    margin-top: 3rem;
  }

  .service-media {
    min-height: 19rem;
  }

  .connection-grid {
    margin-bottom: 2rem;
  }

  .connection-copy {
    padding: 3rem 0.35rem;
  }

  .connection-directions {
    grid-template-columns: 1fr;
  }

  .connection-directions span {
    justify-content: space-between;
    min-height: auto;
    padding: 1.25rem 0.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--line-light);
  }

  .connection-directions span::after {
    width: 2.2rem;
    height: 4px;
    margin-top: 0;
  }

  .connection-image {
    height: 26rem;
  }

  .connection-image img {
    object-position: 66% center;
  }

  .about {
    min-height: auto;
  }

  .contact-strip {
    gap: 2rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-bottom: 7.5rem;
  }

  .site-footer > p:not(.copyright) {
    min-height: auto;
    padding: 0 0 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .copyright {
    grid-column: auto;
  }

  .fixed-contact {
    width: 5.25rem;
    height: 5.25rem;
    font-size: 0.84rem;
  }
}

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

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

  .js-enabled [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
