:root {
  --bg: #0d0f12;
  --bg-soft: #13161b;
  --line: #262b35;
  --text: #edf1f7;
  --text-soft: #a8b0c0;
  --accent: #84b7ff;
  --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(1200px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 15, 18, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.2rem;
}

.nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.header-link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.88rem;
}

.header-link:hover {
  color: var(--text);
}

.lang-switch {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.lang-select {
  background: #171b22;
  color: var(--text);
  border: 1px solid #323947;
  border-radius: 6px;
  font-size: 0.82rem;
  padding: 0.2rem 0.45rem;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(65% 90% at 80% 0%, rgba(101, 153, 255, 0.16), rgba(101, 153, 255, 0)),
    radial-gradient(45% 80% at 5% 15%, rgba(114, 211, 255, 0.12), rgba(114, 211, 255, 0)),
    var(--bg);
}

.hero-inner {
  min-height: clamp(470px, 72vh, 780px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
}

.hero-kicker {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 58ch;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.btn {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  transition: all 0.2s ease;
}

.btn-primary {
  color: #0a0f18;
  background: #d6e8ff;
}

.btn-primary:hover {
  background: #e7f1ff;
}

.btn-ghost {
  color: var(--text);
  border: 1px solid #3a4250;
}

.btn-ghost:hover {
  border-color: #667389;
}

.section {
  padding: clamp(2.8rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.category-row a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid #38404d;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.category-row a:hover {
  border-color: #607087;
}

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

.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product {
  border: 1px solid #2c313b;
  padding: 1rem;
}

.product h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.product p {
  margin: 0 0 0.8rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.product a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.principle-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.principle-grid article {
  border-top: 1px solid #3b4452;
  padding-top: 0.9rem;
}

.principle-grid h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.principle-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.site-footer {
  padding: 2.3rem 0 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.footer-grid h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-grid a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--accent);
}

.copyright {
  margin: 1.2rem 0 0;
  text-align: center;
  color: #8993a4;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-row {
    grid-template-columns: auto auto;
    grid-template-areas:
      "logo actions"
      "nav nav";
    padding: 0.55rem 0;
  }

  .brand {
    grid-area: logo;
  }

  .header-actions {
    grid-area: actions;
    justify-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav {
    grid-area: nav;
    justify-content: flex-start;
    padding-top: 0.2rem;
  }

  .brand__logo {
    width: 62px;
    height: 62px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
