/* ===== BOYA ARCHIVE · SITE CORE ===== */
:root {
  --deep-space: #0D1126;
  --void-navy: #151B36;
  --panel-slate: #1C2447;
  --electric-blue: #00D1FF;
  --ultraviolet: #8B5CF6;
  --energy-orange: #FF8A00;
  --signal-green: #00E5A0;
  --text-primary: #F2F5FF;
  --text-secondary: #A5AFCB;
  --line-faint: rgba(255,255,255,0.12);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --container: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --header-height: 76px;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% -4%, rgba(0, 209, 255, 0.13), transparent 38%),
    radial-gradient(circle at 34% 4%, rgba(139, 92, 246, 0.12), transparent 32%),
    radial-gradient(circle at 14% 96%, rgba(255, 138, 0, 0.05), transparent 30%),
    var(--deep-space);
}

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

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

ul,
ol {
  list-style: none;
}

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

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.18;
}

:focus-visible {
  outline: 2px solid var(--electric-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

::selection {
  background: rgba(0, 209, 255, 0.28);
  color: var(--text-primary);
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 32px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
}

.content-layout__main {
  min-width: 0;
}

.content-layout__index {
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(21, 27, 54, 0.82);
  border: 1px solid var(--line-faint);
  backdrop-filter: blur(10px);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--electric-blue);
  color: #0A0E20;
}

.btn-primary:hover {
  box-shadow: 0 0 28px rgba(0, 209, 255, 0.4);
  background: #33DCFF;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-faint);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: rgba(0, 209, 255, 0.55);
  background: rgba(0, 209, 255, 0.08);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.82rem;
}

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag--blue {
  color: var(--electric-blue);
  background: rgba(0, 209, 255, 0.12);
}

.tag--purple {
  color: var(--ultraviolet);
  background: rgba(139, 92, 246, 0.14);
}

.tag--orange {
  color: var(--energy-orange);
  background: rgba(255, 138, 0, 0.14);
}

/* ===== CARDS & SHELF ===== */
.card {
  background: var(--void-navy);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition:
    border-color 0.22s var(--ease),
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}

.card:hover {
  border-color: rgba(0, 209, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.card__title {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.card__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 209, 255, 0.3) transparent;
}

/* ===== ACCORDION ===== */
.accordion {
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-lg);
  background: var(--void-navy);
  overflow: hidden;
}

.accordion__item + .accordion__item {
  border-top: 1px solid var(--line-faint);
}

.accordion__button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  color: var(--text-primary);
  transition: background-color 0.2s var(--ease);
}

.accordion__button:hover {
  background: rgba(255, 255, 255, 0.03);
}

.accordion__icon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: var(--electric-blue);
  border-radius: 1px;
}

.accordion__icon::before {
  left: 3px;
  right: 3px;
  top: 7px;
  height: 2px;
}

.accordion__icon::after {
  top: 3px;
  bottom: 3px;
  left: 7px;
  width: 2px;
}

.accordion__button[aria-expanded="true"] .accordion__icon {
  transform: rotate(45deg);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--electric-blue);
  transition: color 0.18s var(--ease);
}

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

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.3);
}

/* ===== SECTION (for page use) ===== */
.section {
  padding-block: 72px;
}

.section-head {
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  color: var(--text-primary);
}

.section-sub {
  max-width: 620px;
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ===== MEDIA FRAME ===== */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-faint);
  background:
    linear-gradient(135deg, rgba(0, 209, 255, 0.06), rgba(139, 92, 246, 0.1)),
    var(--void-navy);
  aspect-ratio: 16 / 9;
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--portrait {
  aspect-ratio: 3 / 4;
}

.media-frame[data-label]::after {
  content: attr(data-label);
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(10, 14, 32, 0.76);
  color: var(--text-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

/* ===== SKIP LINK & SCROLL PROGRESS ===== */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 999;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--electric-blue);
  color: #0A0E20;
  font-weight: 700;
  font-size: 0.82rem;
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible {
  top: 12px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--electric-blue), var(--ultraviolet));
  box-shadow: 0 0 12px rgba(0, 209, 255, 0.55);
  pointer-events: none;
}

/* ===== SITE HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 38, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-faint);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 209, 255, 0.45), rgba(139, 92, 246, 0.4), transparent);
  pointer-events: none;
}

.header-top {
  border-bottom: 1px solid var(--line-faint);
}

.header-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
}

/* ===== BRAND ===== */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 209, 255, 0.18), rgba(139, 92, 246, 0.24));
  border: 1px solid rgba(0, 209, 255, 0.45);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--electric-blue);
  box-shadow: 0 0 16px rgba(0, 209, 255, 0.14);
}

.brand-mark--solid {
  background: linear-gradient(135deg, var(--electric-blue), var(--ultraviolet));
  color: #0A0E20;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 209, 255, 0.26);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.brand-desc {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ===== HEADER META ===== */
.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-faint);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.meta-chip--status {
  color: var(--signal-green);
  border-color: rgba(0, 229, 160, 0.25);
  background: rgba(0, 229, 160, 0.08);
}

.meta-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal-green);
  box-shadow: 0 0 10px rgba(0, 229, 160, 0.7);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ===== NAV TOGGLE ===== */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  transition:
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: rgba(0, 209, 255, 0.5);
  color: var(--text-primary);
}

.nav-toggle_icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle_icon::before,
.nav-toggle_icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s 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 {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle_icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== HEADER LOWER / NAV ===== */
.header-lower {
  position: relative;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: var(--nav-height);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  display: inline-block;
  padding: 12px 2px 10px;
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--electric-blue), var(--ultraviolet));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease);
}

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

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--text-primary);
  text-shadow: 0 0 18px rgba(0, 209, 255, 0.35);
}

.nav-info {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-align: right;
  opacity: 0.7;
}

/* ===== SITE FOOTER ===== */
.site-footer {
  position: relative;
  overflow: hidden;
  background: #0A0E20;
  border-top: 1px solid var(--line-faint);
  padding-top: 64px;
  margin-top: 96px;
}

.site-footer::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -140px;
  top: -200px;
  background: radial-gradient(circle, rgba(0, 209, 255, 0.08), transparent 66%);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  left: -120px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 66%);
  pointer-events: none;
}

.footer-primary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-faint);
}

.brand-lockup--footer {
  gap: 12px;
}

.footer-desc {
  margin-top: 20px;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 360px;
}

.footer-support {
  margin-top: 16px;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-code {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--electric-blue);
}

.footer-links-group,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-heading {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  text-transform: uppercase;
  padding-bottom: 4px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition:
    color 0.18s var(--ease),
    padding-left 0.18s var(--ease);
}

.footer-links a:hover {
  color: var(--electric-blue);
  padding-left: 4px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.6;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line-faint);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.legal-link {
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: color 0.18s var(--ease);
}

.legal-link:hover {
  color: var(--electric-blue);
}

.footer-legal-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer-trust {
  position: relative;
  z-index: 1;
  padding-block: 18px 24px;
  font-size: 0.72rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.46);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .footer-primary {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
  }

  .footer-contact {
    grid-column: span 3;
  }

  .header-meta {
    display: none;
  }

  .nav-list {
    gap: 22px;
  }
}

@media (max-width: 820px) {
  .container {
    padding-inline: 20px;
  }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .content-layout__index {
    position: static;
  }

  .header-top__inner {
    min-height: 64px;
  }

  .brand-desc {
    display: none;
  }

  .header-actions .btn {
    display: none;
  }

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

  .header-lower {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13, 17, 38, 0.98);
    border-bottom: 1px solid rgba(0, 209, 255, 0.2);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
      max-height 0.28s var(--ease),
      opacity 0.22s var(--ease),
      visibility 0.22s,
      transform 0.22s var(--ease);
  }

  .header-lower[data-open] {
    max-height: 74vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px 20px 28px;
    min-height: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--line-faint);
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-info {
    display: none;
  }

  .footer-primary {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 8px;
  }

  .footer-contact {
    grid-column: auto;
  }

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

@media (max-width: 520px) {
  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .section {
    padding-block: 48px;
  }

  .shelf {
    grid-auto-columns: minmax(240px, 300px);
  }
}

/* ===== 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 !important;
    transform: none !important;
  }
}

/* ===== JS-ENABLED REVEAL ===== */
.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease);
}

.js-enabled [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
