/* Inter — self-hosted (SIL Open Font License) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/inter-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-bg-page: #120d1c;
  --color-bg-page-soft: #171024;
  --color-bg-hero: #0f0a19;
  --color-bg-surface: rgba(255, 255, 255, 0.04);
  --color-line: rgba(255, 255, 255, 0.10);
  --color-line-soft: rgba(255, 255, 255, 0.06);
  --color-text: #f4f5fb;
  --color-text-soft: #b8b9c9;
  --color-primary: #7a76ff;
  --color-primary-hover: #6b66f3;
  --shadow-card: 0 16px 32px rgba(0, 0, 0, 0.22);
  --shadow-hero: 0 34px 86px rgba(0, 0, 0, 0.40);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  background:
    radial-gradient(circle at 80% 20%, rgba(110, 74, 255, 0.14), transparent 18%),
    radial-gradient(circle at 76% 40%, rgba(88, 145, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #120d1c 0%, #150f20 36%, #171124 72%, #140f20 100%);
  color: var(--color-text);
}

body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--container), calc(100% - 28px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(18, 13, 28, 0.76);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-line-soft);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

.site-header__inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  flex: 1 1 auto;
}

.site-brand__link { display: inline-flex; align-items: center; }

.site-brand__mark {
  width: 122px;
  height: 30px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.site-brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.site-nav__link {
  color: var(--color-text-soft);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link--active { color: var(--color-text); }

.site-header__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s ease;
}

.site-header__toggle:hover,
.site-header__toggle:focus-visible { background: rgba(255, 255, 255, 0.08); }

.site-header__toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header__toggle-bar::before,
.site-header__toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.site-header__toggle-bar::before { top: -6px; }
.site-header__toggle-bar::after { top: 6px; }

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar { background: transparent; }
.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

.site-header__mobile-panel {
  display: none;
  position: fixed;
  inset: 78px 0 0;
  z-index: 55;
  background: rgba(12, 8, 20, 0.96);
  backdrop-filter: blur(18px);
  padding: 24px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.site-header__mobile-panel.is-open {
  opacity: 1;
  visibility: visible;
}

.site-nav--mobile .site-nav__list {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.site-nav--mobile .site-nav__item { border-bottom: 1px solid var(--color-line-soft); }

.site-nav--mobile .site-nav__link {
  display: block;
  padding: 16px 4px;
  font-size: 16px;
}

.site-header__mobile-lang {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line-soft);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: 0.2s ease;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.lang-switch svg { flex: 0 0 auto; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.button--primary {
  background: linear-gradient(135deg, #7a76ff 0%, #629eff 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(87, 96, 255, 0.22);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: linear-gradient(135deg, #6e6af2 0%, #5a92f1 100%);
  transform: translateY(-1px);
}

.button--secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--color-line);
  color: var(--color-text);
}

.button--secondary:hover,
.button--secondary:focus-visible { background: rgba(255, 255, 255, 0.08); }

/* Footer */
.site-footer {
  padding: 20px 0 34px;
  background: transparent;
}

.site-footer__inner {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.site-footer__column-title {
  margin: 0 0 14px;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.02em;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.site-footer__links a,
.site-footer__links span,
.site-footer__text {
  color: var(--color-text-soft);
  font-size: 14px;
  line-height: 1.8;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible { color: #fff; }

.site-footer__text { max-width: 260px; }

/* Subpage shared */
.page-hero {
  padding: 72px 0 48px;
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-line-soft);
  color: #ddd8f2;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 18px;
}

.page-hero__title {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 820px;
}

.page-hero__description {
  margin: 20px 0 0;
  color: var(--color-text-soft);
  font-size: 16px;
  line-height: 1.9;
  max-width: 760px;
}

.page-content {
  padding: 24px 0 64px;
}

.page-content__section {
  margin-bottom: 40px;
}

.page-content__section h2 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.page-content__section p {
  margin: 0 0 12px;
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.9;
}

.page-content__card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-line);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
}

.page-content__card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--color-text-soft);
}

.breadcrumb a:hover { color: var(--color-text); }

.breadcrumb__sep { opacity: 0.5; }

.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 0;
}

.error-page__code {
  margin: 0;
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 800;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, #7a76ff, #629eff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page__title {
  margin: 12px 0 0;
  font-size: 24px;
}

.error-page__description {
  margin: 16px auto 28px;
  max-width: 480px;
  color: var(--color-text-soft);
  line-height: 1.8;
}

@media (max-width: 1080px) {
  .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .site-header__right,
  .site-nav--desktop,
  .site-header__right > .lang-switch { display: none; }

  .site-header__toggle { display: inline-flex; }

  .site-header__mobile-panel { display: block; }
}

@media (max-width: 760px) {
  .container { width: min(var(--container), calc(100% - 20px)); }

  .site-footer__inner { grid-template-columns: 1fr; }
}
