/* ================================================================
   奇异果体育中国官方主页 · 共享样式系统
   版本 1.0 · 使用前请保证 HTML 分级标签对应
   ================================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --c-primary: #0B3D2E;
  --c-accent: #FF6B35;
  --c-highlight: #C9A227;
  --c-bg-deep: #05261D;
  --c-surface: #0F5140;
  --c-ink: #111111;
  --c-muted: #6B7470;
  --c-line: #2E5A4D;
  --c-card: #FFFFFF;
  --c-light-bg: #F2F5F4;

  --font-head: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-num: 'JetBrains Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  --header-top: 18px;
  --header-h: 64px;
  --content-top-pad: calc(var(--header-top) + var(--header-h) + 22px);

  --container-w: 1240px;
  --radius-pill: 999px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 6px;

  --shadow-float: 0 8px 30px rgba(0, 0, 0, 0.26);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.08);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.3s var(--ease);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-ink);
  background-color: var(--c-light-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-top: var(--content-top-pad);
}

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

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

ul,
ol {
  list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--c-ink);
}

/* ---------- 可访问性 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: 5000;
  transform: translateY(-200%);
  background: var(--c-accent);
  color: var(--c-bg-deep);
  padding: 12px 22px;
  border-radius: 0 0 14px 14px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.25s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

.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;
}

/* ---------- 内容容器 ---------- */
.container {
  width: min(var(--container-w), calc(100% - 32px));
  margin-inline: auto;
}

/* ---------- 章节 ---------- */
.section {
  padding: 72px 0;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 8px;
  position: relative;
  padding-left: 22px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  height: 84%;
  width: 6px;
  background: var(--c-accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 50% 50%, 0 0);
  border-radius: 2px;
}

.section-lead {
  font-size: 17px;
  max-width: 700px;
  color: var(--c-muted);
  margin-bottom: 32px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
    box-shadow var(--transition), transform 0.15s var(--ease);
}

.btn-accent {
  background: var(--c-accent);
  color: var(--c-bg-deep);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}

.btn-accent:hover {
  background: #ff7f4d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
}

.btn-outline {
  border-color: var(--c-line);
  background: transparent;
  color: var(--c-primary);
}

.btn-outline:hover {
  border-color: var(--c-primary);
  background: var(--c-primary);
  color: #fff;
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  font-size: 14px;
  color: var(--c-muted);
}

.breadcrumb a {
  color: var(--c-primary);
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--c-accent);
}

.breadcrumb-current {
  color: var(--c-muted);
}

.breadcrumb-sep {
  display: inline-block;
  width: 16px;
  text-align: center;
  color: var(--c-line);
  font-size: 12px;
}

/* ---------- 图片容器基础规则 ---------- */
.image-placeholder,
.image-ready {
  position: relative;
  overflow: hidden;
  background: var(--c-surface);
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 9;
}

.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.image-placeholder::after,
.image-ready::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.4s infinite;
  pointer-events: none;
}

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

.image-ready:hover img {
  transform: scale(1.04);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--c-accent), var(--c-highlight));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 3000;
  pointer-events: none;
  transition: transform 0.08s linear;
}

/* ---------- 头部 · 悬浮胶囊导航 ---------- */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  width: min(calc(100% - 32px), var(--container-w));
  background: rgba(11, 61, 46, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 107, 53, 0.22);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  transition: background var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.site-header:hover {
  background: rgba(11, 61, 46, 0.96);
  border-color: rgba(255, 107, 53, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px 10px 20px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px 12px 12px 4px;
  background: linear-gradient(135deg, var(--c-accent) 10%, #ff8b5c 100%);
  color: var(--c-bg-deep);
  font-family: var(--font-head);
  font-weight: 900;
  font-style: italic;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
}

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

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

.nav-item {
  position: relative;
  white-space: nowrap;
}

.nav-link {
  display: inline-block;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link[aria-current="page"] {
  color: var(--c-accent);
  font-weight: 700;
  background: rgba(255, 107, 53, 0.12);
}

/* 头部操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-cta {
  padding: 10px 22px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  margin: 2px 0;
  background: #ffffff;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

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

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

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

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--c-bg-deep);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--c-accent),
    var(--c-highlight),
    var(--c-primary)
  );
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: 56px 0 40px;
}

.footer-brand-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-accent) 10%, #ff8b5c 100%);
  border-radius: 14px 14px 14px 4px;
  color: var(--c-bg-deep);
  font-family: var(--font-head);
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}

.footer-tagline {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
}

.footer-heading {
  font-size: 15px;
  font-weight: 700;
  font-style: normal;
  color: var(--c-highlight);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  display: inline-block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s, transform 0.2s;
}

.footer-links a:hover {
  color: var(--c-accent);
  transform: translateX(3px);
}

.footer-contact .contact-line {
  font-size: 14px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-copy,
.footer-icp {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  font-family: var(--font-num);
}

/* ---------- 响应式 · 平板 ---------- */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .header-inner {
    gap: 12px;
  }

  .nav-link {
    padding: 10px 8px;
    font-size: 14px;
  }
}

/* ---------- 响应式 · 移动端 ---------- */
@media (max-width: 768px) {
  :root {
    --header-top: 12px;
    --header-h: 58px;
  }

  .site-header {
    width: calc(100% - 24px);
    border-radius: 20px;
  }

  .header-inner {
    padding: 8px 12px 8px 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 18px;
    border-radius: 10px 10px 10px 3px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-sub {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--c-primary);
    border: 1px solid rgba(255, 107, 53, 0.18);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-float);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
      visibility 0.25s;
  }

  .header-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

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

  .nav-item + .nav-item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-link {
    display: block;
    padding: 14px 16px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-md);
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

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

  .btn-cta {
    padding: 9px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

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

  .footer-tagline {
    max-width: 100%;
  }

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

  .section {
    padding: 48px 0;
  }

  .container {
    width: min(100% - 24px, var(--container-w));
  }
}

/* ---------- 响应式 · 小屏手机 ---------- */
@media (max-width: 480px) {
  .brand-name {
    font-size: 15px;
  }

  .header-actions .btn-cta {
    max-width: 112px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

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

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ---------- 减弱动效偏好 ---------- */
@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;
  }

  .scroll-progress {
    transition: none;
  }
}
