/* ============================================================
   XBY-TECH — 方案 A：克制科技白
   Light background · generous whitespace · refined typography
   ============================================================ */

:root {
  /* ---- brand tokens ---- */
  --bg: #f7f8fa;
  --bg-soft: #eef0f4;
  --surface: #ffffff;
  --ink: #14161c;
  --ink-2: #454b57;
  --ink-3: #8b919e;
  --line: #e5e8ee;
  --accent: #0b7a75;
  --accent-ink: #e6f5f3;
  --accent-soft: #e8f4f2;
  --trust-red: #b3453a;

  --font-sans: "Inter", "Helvetica Neue", "PingFang SC", "Hiragino Sans",
    "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "Hiragino Mincho ProN",
    "Yu Mincho", Georgia, serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --container: 1120px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 28, 0.04),
    0 12px 32px rgba(20, 22, 28, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

/* ---------------- reset ---------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------------- layout helpers ---------------- */
.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

.section {
  padding-block: clamp(72px, 9vw, 128px);
}

.section--soft {
  background: var(--bg-soft);
}

.section--dark {
  background: var(--ink);
  color: #fff;
}

/* ---------------- reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------- header ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(247, 248, 250, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 0;
  flex: 0 1 auto;
}

.brand__mark {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.brand__name {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 17px;
  line-height: 1.2;
}

.brand__name small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  white-space: normal;
  word-break: break-word;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-shrink: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding-block: 6px;
  transition: color 0.25s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--ink);
}

.nav__link.is-active::after,
.nav__link:hover::after {
  transform: scaleX(1);
}

.lang {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
}

.lang__btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.lang__btn:hover {
  color: var(--ink);
}

.lang__btn.is-active {
  background: var(--ink);
  color: #fff;
}

/* language popup (mobile only) */
.lang-pop {
  display: none;
  position: relative;
}

.lang-pop__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
}

.lang-pop__globe {
  width: 17px;
  height: 17px;
}

.lang-pop__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 132px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
}

.lang-pop.open .lang-pop__menu {
  display: block;
}

.lang-pop__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-pop__item:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.lang-pop__item.is-active {
  background: var(--accent);
  color: #fff;
}

/* hamburger (mobile) */
.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  position: relative;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.nav__toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.3s var(--ease);
}

.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 20px; }
.nav__toggle span:nth-child(3) { top: 26px; }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  padding-block: clamp(72px, 10vw, 140px) clamp(64px, 8vw, 110px);
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 760px;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero__kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.hero__title {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}

.hero__title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.32em;
  background: var(--accent-soft);
  z-index: -1;
  border-radius: 2px;
}

.hero__sub {
  margin-top: 28px;
  max-width: 560px;
  font-size: 17px;
  color: var(--ink-2);
}

.hero__actions {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 122, 117, 0.28);
}

.btn--ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------------- section headings ---------------- */
.section__head {
  max-width: 640px;
  margin-bottom: clamp(44px, 6vw, 72px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.kicker--center {
  justify-content: center;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.kicker--center::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section__sub {
  margin-top: 16px;
  font-size: 16px;
  color: var(--ink-2);
}

/* ---------------- services cards (home) ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(11, 122, 117, 0.4);
  box-shadow: var(--shadow);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 26px;
}

.card__icon svg {
  width: 26px;
  height: 26px;
}

.card__num {
  position: absolute;
  top: 22px;
  right: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
}

.card__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card__sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.card__desc {
  font-size: 15px;
  color: var(--ink-2);
  flex-grow: 1;
}

.card__link {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.card__link .arrow {
  transition: transform 0.25s var(--ease);
}

.card:hover .card__link .arrow {
  transform: translateX(4px);
}

/* ---------------- CTA band ---------------- */
.cta {
  position: relative;
  background: var(--ink);
  color: #fff;
  border-radius: 22px;
  padding: clamp(44px, 6vw, 80px);
  overflow: hidden;
}

.cta__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -140px;
  background: radial-gradient(circle, rgba(11, 122, 117, 0.5), transparent 65%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  max-width: 560px;
}

.cta__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 18px;
}

.cta__title {
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.cta__sub {
  margin-top: 14px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.72);
}

.cta__actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------------- page hero (sub pages) ---------------- */
.page-hero {
  padding-block: clamp(64px, 9vw, 120px) clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}

.page-hero__inner {
  max-width: 720px;
}

.page-hero__title {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.page-hero__sub {
  margin-top: 22px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 600px;
}

/* ---------------- services detail (services page) ---------------- */
.detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-block: clamp(56px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}

.detail:last-child {
  border-bottom: none;
}

.detail:nth-child(even) {
  grid-template-columns: 0.9fr 1.1fr;
}

.detail__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.detail__title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.detail__sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}

.detail__desc {
  font-size: 16px;
  color: var(--ink-2);
}

.points {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
}

.points__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}

.points__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}

.points__item:last-child {
  border-bottom: none;
}

.points__check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.points__check svg {
  width: 12px;
  height: 12px;
}

/* ---------------- about page ---------------- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about-intro__title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.about-intro__title span {
  color: var(--accent);
}

.about-intro__text p + p {
  margin-top: 18px;
}

.about-intro__text p {
  font-size: 16px;
  color: var(--ink-2);
}

/* values */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.value:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.value__cn {
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.22;
  margin-bottom: 18px;
  display: block;
}

.value__title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}

.value__desc {
  font-size: 15px;
  color: var(--ink-2);
}

/* process (about page) */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: none;
}

.process__step {
  position: relative;
  padding: 36px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s ease;
}

.process__step:hover {
  transform: translateY(-6px);
  border-color: rgba(11, 122, 117, 0.4);
  box-shadow: var(--shadow);
}

.process__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.process__num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.process__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.process__desc {
  font-size: 15px;
  color: var(--ink-2);
}

.process__tags {
  display: inline-block;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------------- error pages (404 / 50x) ---------------- */
.error-page {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(64px, 10vw, 120px);
  overflow: hidden;
}

.error-page__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

.error-page__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(11, 122, 117, 0.14), transparent 65%);
  pointer-events: none;
}

.error-page__inner {
  position: relative;
  max-width: 560px;
}

.error-page__icon {
  position: relative;
  width: clamp(88px, 14vw, 128px);
  height: clamp(88px, 14vw, 128px);
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(11, 122, 117, 0.08), 0 0 0 24px rgba(11, 122, 117, 0.05);
}

.error-page__icon svg {
  width: 46%;
  height: 46%;
}

.error-page__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-top: 12px;
}

.error-page__desc {
  margin-top: 16px;
  font-size: 16px;
  color: var(--ink-2);
}

.error-page__hint {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.error-page__actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------------- footer ---------------- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  padding-block: 48px 28px;
}

.footer__inner {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand {
  display: inline-block;
  line-height: 0;
}

.footer__brand img {
  width: 150px;
  height: auto;
}

.footer__tagline {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 520px;
}

.footer__bottom {
  padding-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer__sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.25);
}

.footer__icp {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer__icp:hover {
  color: #fff;
}

/* ---------------- back link ---------------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 36px;
  transition: color 0.25s ease, gap 0.25s ease;
}

.back-link:hover {
  color: var(--accent);
  gap: 12px;
}

/* ---------------- responsive ---------------- */
@media (max-width: 920px) {
  .cards,
  .values,
  .numbers,
  .process {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail,
  .detail:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

@media (max-width: 720px) {
  .header__inner {
    gap: 12px;
  }

  .brand__name {
    font-size: 16px;
    min-width: 0;
  }

  .lang {
    display: none;
  }

  .lang-pop {
    display: block;
  }

  .nav {
    gap: 10px;
  }

  .nav__list {
    display: none;
  }

  .nav__toggle {
    display: block;
  }

  .nav.open .nav__list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 16px 4%;
  }

  .nav.open .nav__link {
    display: block;
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
  }

  .nav.open .nav__link::after {
    display: none;
  }

  .nav.open .nav__toggle span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
  }

  .nav.open .nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav.open .nav__toggle span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
  }

  .cards,
  .values,
  .numbers,
  .process {
    grid-template-columns: 1fr;
  }

  .cta {
    border-radius: 16px;
  }
}
