:root {
  --bg: #f4f6f8;
  --ink: #111822;
  --muted: #59667a;
  --white: #ffffff;
  --night: #07101d;
  --line: rgba(17, 24, 34, 0.12);
  --cyan: #33d6ff;
  --teal: #00a5b7;
  --lime: #7ec66a;
  --gold: #c89746;
  --shadow: 0 24px 70px rgba(5, 14, 27, 0.18);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.58;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 54px);
  color: var(--white);
  background: rgba(7, 16, 29, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  line-height: 1.05;
}

.brand small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(18px, 2vw, 30px);
  flex: 1 1 auto;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.main-nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover {
  color: var(--white);
  border-color: var(--cyan);
}

.menu-button {
  display: none;
  width: 42px;
  height: 38px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--white);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 118px clamp(20px, 6vw, 72px) 44px;
  color: var(--white);
  background: var(--night);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 16, 29, 0.95), rgba(7, 16, 29, 0.7) 46%, rgba(7, 16, 29, 0.24)),
    linear-gradient(0deg, rgba(7, 16, 29, 0.92), rgba(7, 16, 29, 0.08) 58%, rgba(7, 16, 29, 0.52)),
    url("assets/hero-cleanroom.png") center right / cover no-repeat;
  transform: scale(1.01);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(42px, 6.4vw, 82px);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  color: var(--night);
  background: var(--cyan);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.hero-card {
  position: absolute;
  z-index: 1;
  right: clamp(20px, 6vw, 72px);
  bottom: 38px;
  width: min(390px, calc(100% - 40px));
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 16, 29, 0.78);
  box-shadow: var(--shadow);
}

.hero-card span {
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-card strong {
  display: block;
  margin-top: 16px;
  color: var(--white);
  font-size: 26px;
  line-height: 1.12;
}

.hero-card p {
  margin: 14px 0 0;
  font-size: 14px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(var(--max), calc(100% - 40px));
  margin: 28px auto 0;
  border: 1px solid var(--line);
  background: var(--white);
}

.metrics div {
  min-height: 170px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  color: var(--teal);
  font-size: 15px;
}

.metrics span {
  display: block;
  margin-top: 34px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
}

.metrics p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.section h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section p {
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.72fr);
  gap: 54px;
  align-items: center;
}

.about-grid p {
  margin: 22px 0 0;
  max-width: 700px;
  font-size: 16px;
}

.about-grid img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.work,
.writing {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100% - var(--max)) / 2));
  padding-right: max(20px, calc((100% - var(--max)) / 2));
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 34px;
}

.section-heading p {
  max-width: 470px;
  margin: 0;
}

.service-list,
.note-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-list article,
.note-grid article {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.service-list span,
.case-large span,
.case-stack span,
.note-grid time {
  display: block;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.service-list h3,
.case-stack h3,
.note-grid h3 {
  margin: 34px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.18;
}

.service-list p,
.note-grid p {
  margin: 16px 0 0;
  font-size: 14px;
}

.cases {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100% - var(--max)) / 2));
  padding-right: max(20px, calc((100% - var(--max)) / 2));
  color: var(--white);
  background: #11161d;
}

.cases .section-kicker {
  color: var(--lime);
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.72fr);
  gap: 14px;
}

.case-large,
.case-stack article {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #1b2026;
}

.case-large img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.case-large div,
.case-stack div {
  padding: 22px;
}

.case-large h2 {
  margin-top: 12px;
  color: var(--white);
}

.case-large p {
  color: rgba(255, 255, 255, 0.72);
}

.case-stack {
  display: grid;
  gap: 14px;
}

.case-stack img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.case-stack h3 {
  margin-top: 12px;
  color: var(--white);
}

.note-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note-grid h3 {
  margin-top: 42px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 56px;
  align-items: center;
  padding: 92px max(20px, calc((100% - var(--max)) / 2));
  color: var(--white);
  background: var(--night);
}

.contact h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.contact p:not(.eyebrow) {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.72);
}

.contact-box {
  display: grid;
  gap: 12px;
}

.contact-box a {
  display: block;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.contact-box span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.contact-box strong {
  display: block;
  margin-top: 8px;
  color: var(--white);
  font-size: 18px;
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px max(20px, calc((100% - var(--max)) / 2));
  color: rgba(255, 255, 255, 0.66);
  background: #050910;
  font-size: 13px;
}

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

  .menu-button {
    display: inline-block;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    inset: 68px 0 auto;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px 20px 20px;
    background: rgba(7, 16, 29, 0.96);
  }

  body.nav-open .main-nav {
    display: grid;
  }

  .main-nav a {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero {
    min-height: 92vh;
    padding-bottom: 270px;
  }

  .hero-card {
    left: 20px;
    right: 20px;
    bottom: 32px;
    width: auto;
  }

  .metrics,
  .about-grid,
  .service-list,
  .case-layout,
  .note-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 18px;
  }

  .service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid img {
    height: 420px;
  }

  footer {
    display: grid;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 14px;
    gap: 10px;
  }

  .brand small {
    display: none;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .hero {
    min-height: auto;
    align-items: start;
    padding: 104px 18px 30px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.08;
  }

  .hero p {
    margin-top: 18px;
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 22px;
  }

  .hero-card {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 22px;
    padding: 18px;
  }

  .hero-card strong {
    margin-top: 10px;
    font-size: 22px;
  }

  .hero-card p {
    margin-top: 10px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .metrics,
  .section {
    width: calc(100% - 32px);
  }

  .section {
    padding: 70px 0;
  }

  .section h2,
  .contact h2 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .service-list,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .case-large img,
  .case-stack img {
    height: 230px;
  }

  .about-grid img {
    height: 360px;
  }
}
