/* ==========================================================
   JN 江南官网中国频道 —— 共享样式 /assets/site.css
   ========================================================== */

/* ---------- 1. Reset 与基础变量 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0A192F;
  --navy-soft: #112240;
  --warm-paper: #F5F1E8;
  --warm-paper-deep: #EBE4D6;
  --signal-orange: #FF6B35;
  --teal: #00C9A7;
  --violet: #8A2BE2;
  --violet-end: #6A3DE8;
  --data-cyan: #00B8D9;
  --ink-navy: #0A192F;
  --ink-muted: #4A5A6A;
  --line-warm: #D6D0C4;

  --font-head: "Montserrat", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Roboto", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Roboto Mono", "Courier New", monospace;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-section: clamp(48px, 8vw, 88px);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--warm-paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(0, 201, 167, 0.06) 0%, transparent 30%),
    linear-gradient(90deg, rgba(10, 25, 47, 0.028) 1px, transparent 1px),
    linear-gradient(rgba(10, 25, 47, 0.028) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  color: var(--ink-navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}

#main-content {
  display: block;
  scroll-margin-top: 12px;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-navy);
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--ink-navy);
  text-decoration: underline;
  text-decoration-color: rgba(10, 25, 47, 0.28);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--signal-orange);
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- 2. 内容容器 ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 3. 可访问跳转 ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--signal-orange);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
  transition: top 0.2s ease-out;
}

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

/* ---------- 4. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(0, 201, 167, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 201, 167, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 16px rgba(10, 25, 47, 0.35);
}

.site-header__top {
  background-color: rgba(4, 12, 22, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.site-header__top-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 7px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__tagline {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.site-header__tagline::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--teal);
  transform: translateY(-1px);
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px 5px 12px;
  background: var(--signal-orange);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-header__cta:hover {
  background: var(--teal);
  color: var(--navy);
}

.site-header__cta-dot {
  width: 6px;
  height: 6px;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(10, 25, 47, 0.35);
}

.site-header__cta:hover .site-header__cta-dot {
  background: var(--navy);
  box-shadow: none;
}

.site-header__cta-arrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.site-header__cta:hover .site-header__cta-arrow {
  transform: translateX(3px);
}

.site-header__main-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--signal-orange) 0%, var(--signal-orange) 60%, var(--teal) 60%, var(--teal) 100%);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, 100% 0, 100% 76%, 78% 100%, 0 100%);
  transition: transform 0.2s ease;
}

.site-brand:hover .site-brand__mark {
  transform: rotate(-4deg);
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.site-brand__title {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-brand__sub {
  color: rgba(255, 255, 255, 0.52);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  list-style: none;
}

.site-nav__link {
  display: inline-block;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav__link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.site-nav__link[aria-current="page"] {
  background: var(--signal-orange);
  color: var(--navy);
  font-weight: 700;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
}

.site-nav__link[aria-current="page"]:hover {
  background: var(--teal);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--teal);
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-toggle__label {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.nav-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 14px;
}

.nav-toggle__icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

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

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

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

.site-header__progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.site-header__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--signal-orange) 0%, var(--teal) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.site-header__edge {
  height: 5px;
  background: linear-gradient(90deg, var(--signal-orange) 0%, var(--teal) 55%, var(--violet-end) 100%);
}

/* ---------- 5. 页脚 ---------- */
.site-footer {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(0, 201, 167, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 201, 167, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer__edge {
  height: 5px;
  background: linear-gradient(90deg, var(--violet-end) 0%, var(--teal) 50%, var(--signal-orange) 100%);
}

.site-footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 52px var(--gutter) 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
}

.site-footer__brand-col {
  max-width: 40rem;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
}

.site-footer__brand:hover {
  text-decoration: none;
}

.site-footer__mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal) 55%, var(--violet) 55%, var(--violet) 100%);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 100% 76%, 78% 100%, 0 100%);
  transition: transform 0.2s ease;
}

.site-footer__brand:hover .site-footer__mark {
  transform: rotate(-4deg);
}

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

.site-footer__brand-text strong {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-footer__brand-text small {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.site-footer__note {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--teal);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  line-height: 1.75;
}

.site-footer__meta {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.9;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.site-footer__title {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-head);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.site-footer__title::before {
  content: "/";
  margin-right: 6px;
  color: var(--signal-orange);
  font-family: var(--font-mono);
}

.site-footer__title--alt {
  margin-top: 26px;
}

.site-footer__links li + li {
  margin-top: 9px;
}

.site-footer__links a {
  display: inline-block;
  padding: 2px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer__links a:hover {
  color: var(--signal-orange);
  border-bottom-color: var(--signal-orange);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(4, 12, 22, 0.35);
}

.site-footer__bottom-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.site-footer__copyright,
.site-footer__icp {
  margin: 0;
}

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--ink-navy);
  background: transparent;
  color: var(--ink-navy);
  font-family: var(--font-head);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: rgba(10, 25, 47, 0.06);
  text-decoration: none;
}

.btn--primary {
  padding-left: 22px;
  padding-right: 26px;
  border-color: var(--signal-orange);
  background: var(--signal-orange);
  color: var(--navy);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.btn--primary:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--navy);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}

.btn--ghost:hover {
  border-color: var(--signal-orange);
  background: rgba(255, 107, 53, 0.1);
  color: var(--signal-orange);
}

.btn--small {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* ---------- 7. 基础组件 ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--signal-orange);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.section-label::before {
  content: "";
  width: 18px;
  height: 3px;
  background: var(--signal-orange);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--line-warm);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
}

.tag--teal {
  border-color: rgba(0, 201, 167, 0.55);
  background: rgba(0, 201, 167, 0.1);
  color: #00766A;
}

.tag--orange {
  border-color: rgba(255, 107, 53, 0.55);
  background: rgba(255, 107, 53, 0.1);
  color: #A33B12;
}

.tag--outline {
  background: transparent;
}

.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line-warm);
  border-top: 3px solid var(--ink-navy);
  background: #FFFDF7;
  box-shadow: 0 1px 0 rgba(10, 25, 47, 0.04);
}

.card__title {
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
}

.card__meta {
  margin: 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.media-slot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--navy);
  background-image: linear-gradient(135deg, rgba(255, 107, 53, 0.18) 0%, transparent 38%);
}

.media-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 22% 26%, rgba(0, 201, 167, 0.42) 0%, transparent 48%),
    radial-gradient(ellipse at 78% 68%, rgba(138, 43, 226, 0.4) 0%, transparent 46%),
    radial-gradient(ellipse at 65% 22%, rgba(0, 184, 217, 0.28) 0%, transparent 42%);
  mix-blend-mode: screen;
}

.media-slot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(to top, rgba(10, 25, 47, 0.7) 0%, transparent 100%);
}

.media-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.data-num {
  color: var(--ink-navy);
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.data-num--orange {
  color: var(--signal-orange);
}

.data-num--teal {
  color: #007A69;
}

/* ---------- 8. 面包屑与网格 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

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

.breadcrumb a:hover {
  color: var(--signal-orange);
}

.breadcrumb li + li::before {
  content: "/";
  display: inline-block;
  margin-right: 8px;
  color: var(--line-warm);
}

.grid {
  display: grid;
  gap: clamp(16px, 3vw, 32px);
}

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

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

/* ---------- 9. 响应式调整 ---------- */
@media (min-width: 900px) and (max-width: 1080px) {
  .site-nav__link {
    padding: 8px 9px;
    font-size: 0.84rem;
  }

  .site-brand__title {
    font-size: 0.98rem;
  }
}

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

  .site-nav {
    display: none;
    width: 100%;
    margin-left: 0;
  }

  .site-nav[data-open] {
    display: block;
    animation: site-nav-in 0.28s ease-out;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav__link {
    display: block;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 1rem;
  }

  .site-nav__link:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .site-nav__link[aria-current="page"] {
    padding-left: 8px;
    border-left: 4px solid var(--signal-orange);
    background: transparent;
    color: var(--signal-orange);
    font-weight: 700;
    clip-path: none;
  }

  .site-header__main-inner {
    padding-block: 8px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 40px;
  }
}

@media (max-width: 560px) {
  .site-header__tagline {
    display: none;
  }

  .site-header__top-inner {
    justify-content: flex-end;
    padding-block: 5px;
  }

  .site-brand__mark {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
  }

  .site-brand__title {
    font-size: 0.96rem;
  }

  .site-brand__sub {
    display: none;
  }

  .site-footer__cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

@keyframes site-nav-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 10. 减少动态偏好 ---------- */
@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;
  }

  .site-header__progress-bar {
    transition: none;
  }
}
