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

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

body {
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1A1A2E;
  background-color: #F4F6F9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #0B3D5F;
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: #FF6B35;
}

a:focus-visible {
  outline: 2px solid #00B4D8;
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

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

button:focus-visible {
  outline: 2px solid #00B4D8;
  outline-offset: 2px;
}

/* ===== CSS Variables ===== */
:root {
  --color-primary: #0B3D5F;
  --color-accent: #FF6B35;
  --color-accent-blue: #00B4D8;
  --color-warning: #E63946;
  --color-bg: #F4F6F9;
  --color-bg-alt: #ffffff;
  --color-text: #1A1A2E;
  --color-text-secondary: #8B9BB4;
  --color-border: #8B9BB4;
  --color-sidebar-bg: #0B3D5F;
  --color-sidebar-text: #ffffff;
  --color-footer-bg: #072438;
  --font-heading: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sidebar-width: 280px;
  --max-width: 1200px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --shadow-card: 0 2px 12px rgba(11, 61, 95, 0.08);
  --shadow-hover: 0 6px 24px rgba(11, 61, 95, 0.14);
  --border-thin: 1px solid rgba(139, 155, 180, 0.3);
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 10000;
  padding: 12px 24px;
  background: #FF6B35;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0 0 4px 0;
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* ===== Layout: Sidebar + Main ===== */
.site-header {
  position: relative;
  z-index: 1000;
}

.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-sidebar-bg);
  color: var(--color-sidebar-text);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.site-sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px 24px 24px;
}

/* Brand */
.site-brand {
  margin-bottom: 40px;
}

.site-brand__link {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  color: #fff;
  letter-spacing: 0.02em;
  transition: opacity 0.25s ease;
}

.site-brand__link:hover {
  color: #fff;
  opacity: 0.88;
}

.site-brand__desc {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
}

/* Sidebar Navigation */
.nav-side {
  position: relative;
  flex: 1;
}

.nav-side__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-side__item {
  position: relative;
}

.nav-side__link {
  display: block;
  padding: 12px 16px 12px 24px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  transition: all var(--transition-base);
  position: relative;
  border-left: 3px solid transparent;
}

.nav-side__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(0, 180, 216, 0.5);
}

.nav-side__link:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #00B4D8;
}

.nav-side__link[aria-current="page"] {
  color: #fff;
  font-weight: 700;
  border-left-color: #FF6B35;
  background: rgba(255, 107, 53, 0.12);
}

.nav-side__indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 44px;
  background: #FF6B35;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
  transition: transform var(--transition-base) cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
}

.nav-side__indicator.is-visible {
  opacity: 1;
}

/* Sidebar Meta */
.site-sidebar__meta {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-sidebar__lang {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* ===== Mobile Header ===== */
.site-header-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-primary);
  z-index: 1002;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(11, 61, 95, 0.2);
}

.site-brand-mobile {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.375rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.site-brand-mobile:hover {
  color: #fff;
  opacity: 0.88;
}

.site-header-mobile__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Nav Toggle (Hamburger) ===== */
.nav-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 4px;
  background: transparent;
  transition: background 0.2s ease;
}

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

.nav-toggle__line {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all var(--transition-base);
  transform-origin: center;
}

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

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

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

/* ===== Mobile Drawer ===== */
.site-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 36, 56, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform var(--transition-base) cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  visibility: hidden;
}

.site-drawer[data-open] {
  transform: translateX(0);
  visibility: visible;
}

.site-drawer__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 80px 32px 32px;
}

.nav-drawer__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-drawer__link {
  display: block;
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: all var(--transition-base);
}

.nav-drawer__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-left-color: rgba(0, 180, 216, 0.5);
}

.nav-drawer__link:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #00B4D8;
}

.nav-drawer__link[aria-current="page"] {
  color: #fff;
  font-weight: 700;
  border-left-color: #FF6B35;
  background: rgba(255, 107, 53, 0.12);
}

.site-drawer__meta {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-drawer__lang {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #FF6B35, #00B4D8);
  z-index: 10000;
  transition: width 0.1s linear;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-footer-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 32px;
  position: relative;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand__link {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.footer-brand__link:hover {
  color: #FF6B35;
}

.footer-brand__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  max-width: 360px;
}

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

.footer-column__heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 8px;
}

.footer-column__heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: #FF6B35;
  border-radius: 1px;
}

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

.footer-column__list a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-column__list a:hover {
  color: #FF6B35;
  transform: translateX(4px);
}

.footer-column__list a:focus-visible {
  outline: 2px solid #00B4D8;
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-contact__divider {
  color: rgba(255, 255, 255, 0.2);
}

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

.footer-icp {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-trust {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
  max-width: 600px;
  text-align: right;
  line-height: 1.5;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #fff;
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 16px rgba(11, 61, 95, 0.25);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition-base);
}

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

.back-to-top:hover {
  background: #FF6B35;
  border-color: #FF6B35;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.3);
}

.back-to-top:focus-visible {
  outline: 2px solid #00B4D8;
  outline-offset: 2px;
}

.back-to-top__icon {
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

/* ===== Generic Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 6px;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid #00B4D8;
  outline-offset: 2px;
}

.btn--primary {
  background: #FF6B35;
  color: #fff;
  border-color: #FF6B35;
}

.btn--primary:hover {
  background: #e55a28;
  border-color: #e55a28;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.btn--secondary {
  background: transparent;
  color: #00B4D8;
  border-color: #00B4D8;
}

.btn--secondary:hover {
  background: rgba(0, 180, 216, 0.08);
  transform: translateY(-1px);
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 12-Column Grid ===== */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* ===== Skew Section ===== */
.skew-section {
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 0 100%);
  padding: 60px 0;
  margin-bottom: 30px;
}

.skew-section--reverse {
  clip-path: polygon(0 30px, 100% 0, 100% 100%, 0 100%);
}

/* ===== Card ===== */
.card {
  background: #ffffff;
  border: var(--border-thin);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding: 12px 0;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: #FF6B35;
}

.breadcrumb__separator {
  color: rgba(139, 155, 180, 0.5);
  font-size: 0.75rem;
}

/* ===== Tag ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
  background: rgba(0, 180, 216, 0.1);
  color: #00B4D8;
  border: 1px solid rgba(0, 180, 216, 0.2);
}

.tag--accent {
  background: rgba(255, 107, 53, 0.1);
  color: #FF6B35;
  border-color: rgba(255, 107, 53, 0.2);
}

.tag--warning {
  background: rgba(230, 57, 70, 0.1);
  color: #E63946;
  border-color: rgba(230, 57, 70, 0.2);
}

/* ===== Responsive ===== */

/* Tablet & below: <1024px */
@media (max-width: 1023px) {
  .site-sidebar {
    display: none;
  }

  .site-header-mobile {
    display: flex;
  }

  .site-drawer {
    display: block;
  }

  .site-footer {
    padding: 40px 0 24px;
  }

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

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

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

  .footer-trust {
    text-align: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
  }
}

/* Mobile: <768px */
@media (max-width: 767px) {
  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-contact {
    flex-direction: column;
    gap: 6px;
  }

  .footer-contact__divider {
    display: none;
  }

  .grid-12 {
    gap: 16px;
  }

  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    grid-column: span 12;
  }

  .card {
    padding: 16px;
  }

  .skew-section {
    clip-path: none;
    padding: 40px 0;
    margin-bottom: 0;
  }

  .skew-section--reverse {
    clip-path: none;
  }
}

/* Small Mobile: <480px */
@media (max-width: 479px) {
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-drawer__inner {
    padding: 72px 20px 24px;
  }

  .nav-drawer__link {
    font-size: 1.125rem;
    padding: 14px 16px;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Focus Visible for all interactive ===== */
:focus-visible {
  outline: 2px solid #00B4D8;
  outline-offset: 2px;
}

/* ===== Image Container Placeholder ===== */
.img-placeholder {
  background: linear-gradient(135deg, #e0e5ec 0%, #f0f2f5 100%);
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 300;
  border: var(--border-thin);
  overflow: hidden;
  position: relative;
}

.img-placeholder::after {
  content: "📷 图片区域";
  opacity: 0.4;
}

.img-placeholder--portrait {
  aspect-ratio: 3 / 4;
}

.img-placeholder--square {
  aspect-ratio: 1 / 1;
}

.img-placeholder--wide {
  aspect-ratio: 21 / 9;
}

/* ===== Utility ===== */
.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;
}

.text-accent {
  color: #FF6B35;
}

.text-blue {
  color: #00B4D8;
}

.text-secondary {
  color: var(--color-text-secondary);
}

/* ===== Responsive sidebar gap for main content ===== */
body {
  padding-left: var(--sidebar-width);
}

@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-top: 60px;
  }
}

/* ===== Main content target scroll margin ===== */
#main-content {
  scroll-margin-top: 72px;
}

@media (max-width: 1023px) {
  #main-content {
    scroll-margin-top: 80px;
  }
}
