/* =========================================
   博乐潮玩 · 全站共享样式
   文件位置 /assets/site.css
   ========================================= */

/* ---------- 1. CSS 变量 ---------- */
:root {
  --c-deep: #0B1E3A;
  --c-orange: #FF6B2C;
  --c-cyan: #00E5FF;
  --c-ink: #050A18;
  --c-fog: #F5F7FA;
  --c-silver: #9AA7B8;
  --c-amber: #FFB300;
  --c-violet: #7B5DFF;

  --font-head: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --container-w: 1200px;
  --header-h: 72px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 300ms var(--ease);
  --t-mid: 500ms var(--ease);

  --shadow-fab: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- 2. 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: 16px;
  line-height: 1.7;
  color: var(--c-fog);
  background-color: var(--c-deep);
  background-image:
    radial-gradient(ellipse at 85% 15%, rgba(123, 93, 255, 0.09), transparent 55%),
    radial-gradient(ellipse at 10% 85%, rgba(0, 229, 255, 0.05), transparent 45%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.01em;
}

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

a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--c-orange);
}

ul,
ol {
  list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-fog);
}

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

::selection {
  background: var(--c-orange);
  color: var(--c-ink);
}

/* ---------- 3. 工具类 ---------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#main-content {
  display: block;
  padding-top: calc(var(--header-h) + 28px);
  min-height: 60vh;
}

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  background: var(--c-orange);
  color: var(--c-ink);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  transition: top var(--t-fast);
}

.skip-link:focus {
  top: 0;
  color: var(--c-ink);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--c-orange);
  color: var(--c-ink);
  box-shadow: 0 4px 20px rgba(255, 107, 44, 0.35);
}

.btn-primary:hover {
  background: #ff8148;
  color: var(--c-ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 107, 44, 0.45);
}

.btn-outline {
  border-color: rgba(0, 229, 255, 0.6);
  color: var(--c-cyan);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--c-cyan);
  color: var(--c-cyan);
  transform: translateY(-2px);
}

.btn-compact {
  padding: 10px 20px;
  font-size: 13px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ---------- 6. 页头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 20px 0;
  transition: padding var(--t-fast);
}

.site-header[data-scrolled] {
  padding-top: 8px;
}

.header-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(5, 10, 24, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 999px;
  padding: 8px 8px 8px 24px;
  box-shadow: var(--shadow-fab);
  transition: background var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}

.site-header[data-scrolled] .header-inner {
  background: rgba(5, 10, 24, 0.95);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.5);
  border-color: rgba(0, 229, 255, 0.2);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
  color: var(--c-fog);
  line-height: 1;
}

.brand:hover {
  color: var(--c-fog);
}

.brand-word {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-flare {
  color: var(--c-orange);
}

.brand-type {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-silver);
  letter-spacing: 0.16em;
}

/* 导航 */
.site-nav {
  position: static;
}

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

.nav-link {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-silver);
  transition: color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--c-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.nav-link[aria-current="page"] {
  color: var(--c-fog);
  background: rgba(255, 107, 44, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 44, 0.32);
}

/* 页头工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-cta {
  box-shadow: 0 4px 16px rgba(255, 107, 44, 0.3);
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.22);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.nav-toggle:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--c-cyan);
}

.toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-fog);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast), background var(--t-fast);
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  background: var(--c-cyan);
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  background: var(--c-cyan);
}

/* ---------- 7. 顶部进度条 ---------- */
.site-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-cyan), var(--c-violet));
  z-index: 2000;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ---------- 8. 区块与版式 ---------- */
.content-section {
  padding: 72px 0;
}

.content-container {
  max-width: 860px;
  margin: 0 auto;
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--c-cyan);
  margin-bottom: 14px;
}

.section-kicker::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--c-orange);
  display: inline-block;
  transform: skewX(-20deg);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--c-silver);
  max-width: 46em;
  line-height: 1.7;
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  margin-bottom: 32px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-silver);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: rgba(154, 167, 184, 0.4);
}

.breadcrumb-link {
  color: var(--c-silver);
  transition: color var(--t-fast);
}

.breadcrumb-link:hover {
  color: var(--c-cyan);
}

.breadcrumb-item[aria-current="page"] {
  color: var(--c-fog);
  font-weight: 500;
}

/* ---------- 10. 栅格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---------- 11. 卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(0, 229, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-cyan));
  opacity: 0;
  transition: opacity var(--t-fast);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: rgba(0, 229, 255, 0.28);
}

.card:hover::before {
  opacity: 1;
}

.card-notch {
  border-radius: 4px 22px 22px 22px;
}

.card-title {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-text {
  font-size: 14px;
  color: var(--c-silver);
  line-height: 1.7;
}

.card-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(154, 167, 184, 0.12);
  font-size: 13px;
  color: var(--c-silver);
}

/* ---------- 12. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(154, 167, 184, 0.12);
  color: var(--c-silver);
  letter-spacing: 0.03em;
}

.tag-green {
  background: rgba(0, 229, 255, 0.12);
  color: var(--c-cyan);
}

.tag-orange {
  background: rgba(255, 107, 44, 0.15);
  color: var(--c-orange);
}

.tag-amber {
  background: rgba(255, 179, 0, 0.12);
  color: var(--c-amber);
}

/* ---------- 13. 图片容器 ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06), rgba(123, 93, 255, 0.1), rgba(255, 107, 44, 0.06));
  border: 1px solid rgba(0, 229, 255, 0.08);
}

.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.image-frame-16x9 {
  aspect-ratio: 16 / 9;
}

.image-frame-4x3 {
  aspect-ratio: 4 / 3;
}

.image-frame-square {
  aspect-ratio: 1;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-mid);
}

.image-frame:hover img {
  transform: scale(1.03);
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--c-ink);
  color: var(--c-silver);
  margin-top: 96px;
  padding-top: 64px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-orange) 0%, var(--c-cyan) 55%, var(--c-violet) 100%);
  opacity: 0.75;
}

.site-footer::after {
  content: "";
  position: absolute;
  bottom: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(123, 93, 255, 0.13), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 0.8fr 0.8fr;
  gap: 48px;
  padding-bottom: 56px;
  position: relative;
  z-index: 1;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-inverse .brand-word {
  color: var(--c-fog);
}

.brand-inverse .brand-flare {
  color: var(--c-orange);
}

.brand-inverse .brand-type {
  color: var(--c-silver);
}

.footer-mission {
  font-size: 14px;
  color: var(--c-silver);
  line-height: 1.8;
  max-width: 32em;
  border-left: 2px solid var(--c-orange);
  padding-left: 16px;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-fog);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(154, 167, 184, 0.15);
  position: relative;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 36px;
  height: 1px;
  background: var(--c-cyan);
}

.footer-contact-list,
.footer-link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(154, 167, 184, 0.6);
}

.footer-contact-value {
  color: var(--c-fog);
  line-height: 1.5;
  word-break: break-all;
}

.footer-link-list a {
  display: inline-block;
  color: var(--c-silver);
  font-size: 14px;
  transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer-link-list a:hover {
  color: var(--c-cyan);
  padding-left: 4px;
}

.footer-legal {
  border-top: 1px solid rgba(154, 167, 184, 0.14);
  padding: 20px 0;
  position: relative;
  z-index: 1;
}

.footer-legal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy,
.footer-icp {
  font-size: 13px;
  color: rgba(154, 167, 184, 0.75);
}

/* ---------- 15. 返回顶部 ---------- */
.back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 107, 44, 0.92);
  color: var(--c-fog);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all var(--t-fast);
  box-shadow: 0 4px 20px rgba(255, 107, 44, 0.35);
}

.back-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--c-orange);
  color: var(--c-ink);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(255, 107, 44, 0.5);
}

.back-top:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
}

/* ---------- 16. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-mid), transform var(--t-mid);
}

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

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 991px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(5, 10, 24, 0.97);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: opacity var(--t-mid), transform var(--t-mid), visibility var(--t-mid);
    box-shadow: var(--shadow-fab);
  }

  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

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

  .nav-link {
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 16px;
    text-align: center;
  }

  .nav-link[aria-current="page"] {
    background: rgba(255, 107, 44, 0.16);
  }

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

  .content-section {
    padding: 56px 0;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding-left: 18px;
  }

  .header-cta {
    padding: 9px 14px;
    font-size: 12px;
  }

  .brand-word {
    font-size: 23px;
  }

  .brand-type {
    font-size: 12px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 40px;
  }

  .footer-legal-row {
    flex-direction: column;
    text-align: center;
  }

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

/* ---------- 18. 无障碍与降级 ---------- */
@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;
  }

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

  .site-progress {
    transition: none;
  }
}
