/* ==========================================================
   KAIYUN Site Kit — 共享样式 /assets/site.css
   深墨赛场 · 聚光灯金橙 · 电光数据蓝
   ========================================================== */

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

html,
body {
  margin: 0;
  padding: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

/* ---------- CSS Variables ---------- */
:root {
  --ink-900: #0b0e14;
  --ink-800: #10141d;
  --ink-700: #141a24;
  --ink-600: #1c2433;
  --gold: #f5a623;
  --gold-soft: #ffc25e;
  --blue: #00c2ff;
  --paper: #f5e6c8;
  --text: #f0f4f8;
  --text-2: #a0b0c0;
  --font-head: 'Impact', 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --container: 90rem;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-1: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 24px 50px rgba(0, 0, 0, 0.5);
  --dur: 240ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

/* ---------- Base Typography ---------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(ellipse 900px 420px at 88% -80px, rgba(0, 194, 255, 0.05), transparent 70%),
    radial-gradient(ellipse 700px 380px at 8% 105%, rgba(245, 166, 35, 0.04), transparent 70%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text);
  letter-spacing: 0.5px;
}

h1 { font-size: clamp(42px, 6vw, 64px); }
h2 { font-size: clamp(30px, 4vw, 42px); }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 17px; }
h6 { font-size: 15px; }

p { margin: 0 0 1em; }

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(245, 166, 35, 0.35);
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--blue);
  text-decoration-color: var(--blue);
}

strong {
  font-weight: 700;
  color: #ffffff;
}

::selection {
  background: var(--gold);
  color: var(--ink-900);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.content-wrap {
  padding: 56px 0 96px;
}

.section { padding: 64px 0; }
.section--tight { padding: 32px 0; }

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--gold);
  color: var(--ink-900);
  box-shadow: 0 4px 22px rgba(245, 166, 35, 0.3);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--gold-soft);
  color: var(--ink-900);
  box-shadow: 0 10px 30px rgba(245, 166, 35, 0.42);
}

.btn--secondary {
  border-color: rgba(0, 194, 255, 0.5);
  color: var(--blue);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: rgba(0, 194, 255, 0.12);
  border-color: var(--blue);
  color: var(--blue);
}

.btn--ghost {
  border-color: rgba(240, 244, 248, 0.25);
  color: var(--text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- Cards ---------- */
.card {
  background: var(--ink-700);
  border: 1px solid #1c2635;
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 166, 35, 0.4);
  box-shadow: var(--shadow-1);
}

/* ---------- Chips / Tags ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 194, 255, 0.08);
  border: 1px solid rgba(0, 194, 255, 0.3);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.chip--gold {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.32);
  color: var(--gold);
}

.chip--paper {
  background: rgba(245, 230, 200, 0.1);
  border-color: rgba(245, 230, 200, 0.25);
  color: var(--paper);
}

/* ---------- Section Heading ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--gold);
}

.section-title {
  margin-bottom: 16px;
}

.lead {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 64ch;
}

/* ---------- Figure Placeholder ---------- */
.figure {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(140deg, var(--ink-600), var(--ink-700));
  border: 1px solid #1e2935;
  border-radius: var(--radius);
}

.figure--ratio-16x9 { aspect-ratio: 16 / 9; }
.figure--ratio-4x3 { aspect-ratio: 4 / 3; }
.figure--ratio-1x1 { aspect-ratio: 1 / 1; }
.figure--ratio-2x1 { aspect-ratio: 2 / 1; }

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.figure:hover img {
  transform: scale(1.04);
}

.figure__caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(11, 14, 20, 0.82);
  color: var(--paper);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--gold);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-2);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: '/';
  margin: 0 10px;
  color: var(--text-2);
  opacity: 0.5;
}

.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Page Hero ---------- */
.page-hero {
  padding: 56px 0 24px;
}

.page-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--blue);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.page-hero__label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--blue);
}

.page-hero__title {
  margin-bottom: 16px;
}

.page-hero__intro {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -72px;
  left: 16px;
  z-index: 1100;
  background: var(--gold);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  transition: top var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.skip-link:hover,
.skip-link:focus-visible {
  color: var(--ink-900);
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 0;
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(11, 14, 20, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 166, 35, 0.12);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 520px 220px at 8% -120px, rgba(245, 166, 35, 0.16), transparent 70%),
    radial-gradient(ellipse 480px 200px at 92% -120px, rgba(0, 194, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.site-header.is-scrolled {
  background: rgba(11, 14, 20, 0.97);
  border-bottom-color: rgba(245, 166, 35, 0.24);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: linear-gradient(140deg, var(--gold-soft) 0%, var(--gold) 58%, #d98716 100%);
  color: var(--ink-900);
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transform: rotate(-8deg);
  transition: transform 0.3s var(--ease);
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  transform: rotate(8deg) scale(1.06);
}

.brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text);
}

.brand__sub {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.2;
  color: var(--blue);
  margin-top: 4px;
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(240, 244, 248, 0.22);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 166, 35, 0.08);
}

.nav-toggle__text {
  font-size: 14px;
  font-weight: 500;
}

.nav-toggle__icon {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background-color 0.2s;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { top: 0; transform: rotate(-45deg); }

/* ---------- Main Nav ---------- */
.main-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.main-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.main-nav__link:hover,
.main-nav__link:focus-visible {
  color: var(--gold);
  text-decoration: none;
}

.main-nav__num {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  transition: color var(--dur) var(--ease);
}

.main-nav__link:hover .main-nav__num,
.main-nav__link:focus-visible .main-nav__num {
  color: var(--gold);
}

.main-nav__link[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.main-nav__link[aria-current="page"] .main-nav__num {
  color: var(--gold);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  padding: 64px 0 28px;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 32%, var(--blue) 72%, var(--gold) 100%);
  opacity: 0.55;
}

.site-footer::after {
  content: '';
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(0, 194, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 48px 40px;
  padding-bottom: 48px;
}

.footer-col--brand {
  max-width: 360px;
}

.footer-col--contact .contact-item {
  grid-template-columns: 56px 1fr;
}

.brand--footer {
  margin-bottom: 18px;
}

.brand--footer .brand__name {
  font-size: 26px;
}

.brand--footer .brand__mark {
  width: 38px;
  height: 38px;
  font-size: 22px;
}

.footer-desc {
  margin: 0;
  max-width: 320px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

.footer-heading {
  margin: 0 0 20px;
  padding-bottom: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(245, 166, 35, 0.16);
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 28px;
  height: 2px;
  background: var(--blue);
}

.footer-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.footer-link {
  position: relative;
  display: inline-block;
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.footer-link::before {
  content: '\203A';
  position: absolute;
  left: -10px;
  color: var(--blue);
  opacity: 0;
  transition: opacity var(--dur) var(--ease), left var(--dur) var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--gold);
  padding-left: 10px;
  text-decoration: none;
}

.footer-link:hover::before,
.footer-link:focus-visible::before {
  opacity: 1;
  left: 0;
}

.footer-contact {
  display: grid;
  gap: 14px;
  list-style: none;
}

.contact-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.contact-item__label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-top: 2px;
}

.contact-item__value {
  color: var(--text-2);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(240, 244, 248, 0.08);
  padding-top: 22px;
  font-size: 13px;
  color: var(--text-2);
}

.footer-copy {
  margin: 0;
}

.footer-icp {
  margin: 0;
  color: var(--text-2);
  letter-spacing: 0.5px;
}

.footer-watermark {
  position: absolute;
  right: 1%;
  bottom: -40px;
  font-family: var(--font-head);
  font-size: clamp(8rem, 20vw, 16rem);
  line-height: 1;
  color: rgba(245, 166, 35, 0.04);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(245, 166, 35, 0.45);
  border-radius: 50%;
  background: rgba(11, 14, 20, 0.88);
  color: var(--gold);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-900);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: rgba(16, 20, 29, 0.98);
    border-bottom: 1px solid rgba(245, 166, 35, 0.2);
    box-shadow: var(--shadow-2);
    padding: 10px 24px 18px;
  }

  .main-nav[data-open="true"] {
    display: block;
  }

  .main-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .main-nav__link {
    display: flex;
    align-items: center;
    padding: 13px 10px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid rgba(240, 244, 248, 0.06);
    border-left: 3px solid transparent;
  }

  .main-nav__link[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--gold);
    background: rgba(245, 166, 35, 0.05);
  }

  .main-nav__num {
    width: 30px;
  }
}

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

  .brand__name {
    font-size: 22px;
    letter-spacing: 1px;
  }

  .brand__sub {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .content-wrap {
    padding: 40px 0 72px;
  }

  .section {
    padding: 48px 0;
  }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-hero {
    padding: 40px 0 16px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .card:hover {
    transform: none;
    box-shadow: none;
  }

  .brand:hover .brand__mark {
    transform: rotate(-8deg) scale(1);
  }

  .footer-link:hover {
    padding-left: 0;
  }
}
