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

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

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: #0B1D3A;
  background-color: #F0F4F8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

ul, ol {
  list-style: none;
}

:focus-visible {
  outline: 3px solid #FF6B35;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== CSS Variables ===== */
:root {
  --color-primary: #0B1D3A;
  --color-accent: #FF6B35;
  --color-accent-light: #FF9A66;
  --color-background: #F0F4F8;
  --color-text-primary: #0B1D3A;
  --color-text-secondary: #4A5568;
  --color-neutral-light: #E2E8F0;
  --color-neutral-dark: #2D3748;
  --color-success: #48BB78;
  --color-warning: #ED8936;
  --color-error: #F56565;
  --color-white: #FFFFFF;
  --font-family: Inter, sans-serif;
  --heading-weight: 700;
  --body-weight: 400;
  --body-size: 1rem;
  --body-line-height: 1.6;
  --accent-weight: 600;
  --accent-size: 0.875rem;
  --header-height: 72px;
  --content-max-width: 1200px;
  --nav-track-width: 64px;
  --transition-base: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background: #0B1D3A;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 6px 6px;
  transition: top 0.25s ease;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.skip-link:focus {
  top: 0;
  clip: auto;
  overflow: visible;
}

/* ===== Site Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #0B1D3A;
  color: #FFFFFF;
  height: var(--header-height);
  box-shadow: 0 2px 20px rgba(11, 29, 58, 0.3);
}

.header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #FFFFFF;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand-accent {
  color: #FF6B35;
  font-weight: 700;
}

/* ===== Navigation ===== */
.nav-track {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  transition: color var(--transition-base), background var(--transition-base);
  letter-spacing: 0.01em;
  position: relative;
}

.nav-link:hover {
  color: #FFFFFF;
  background: rgba(255, 107, 53, 0.15);
}

.nav-link:focus-visible {
  outline: 2px solid #FF6B35;
  outline-offset: 2px;
  color: #FFFFFF;
}

.nav-link[aria-current="page"] {
  color: #FF6B35;
  font-weight: 600;
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: #FF6B35;
  border-radius: 1px;
}

/* ===== Header Actions ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: #FF6B35;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: 4px;
  transition: background var(--transition-base), transform var(--transition-base);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-cta:hover {
  background: #FF9A66;
  transform: translateY(-1px);
}

.btn-cta:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* ===== Nav Toggle (Mobile) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  gap: 5px;
  padding: 10px;
  transition: border-color var(--transition-base);
}

.nav-toggle:hover {
  border-color: #FF6B35;
}

.nav-toggle:focus-visible {
  outline: 2px solid #FF6B35;
  outline-offset: 2px;
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background: #FFFFFF;
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #FF6B35, #FF9A66);
  transition: width 0.1s linear;
  will-change: width;
}

/* ===== Main Content ===== */
#main-content {
  min-height: calc(100vh - var(--header-height));
  padding-top: var(--header-height);
}

/* ===== Site Footer ===== */
.site-footer {
  background: #0B1D3A;
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF6B35, #FF9A66, #FF6B35);
  background-size: 200% 100%;
  animation: footerShimmer 4s linear infinite;
}

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

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .brand-text {
  font-size: 1.75rem;
  color: #FFFFFF;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #FF6B35;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-base), padding-left var(--transition-base);
  padding: 0.15rem 0;
}

.footer-link:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.footer-link:focus-visible {
  outline: 2px solid #FF6B35;
  outline-offset: 2px;
  color: #FFFFFF;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact-list li {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.contact-label {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  flex-shrink: 0;
}

.contact-value {
  color: rgba(255, 255, 255, 0.85);
  word-break: break-all;
}

.footer-contact-list a.contact-value:hover {
  color: #FF6B35;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  gap: 0.75rem;
}

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

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

/* ===== Page Section (通用章节容器) ===== */
.page-section {
  padding: 4rem 1.5rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
  position: relative;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: #FF6B35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: #0B1D3A;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #4A5568;
  margin-top: 0.5rem;
  font-weight: 400;
}

/* ===== Card 基础 ===== */
.card {
  background: #FFFFFF;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(11, 29, 58, 0.06);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(11, 29, 58, 0.1);
  transform: translateY(-2px);
}

.card-accent {
  border-left: 4px solid #FF6B35;
}

.card-image {
  width: 100%;
  height: 200px;
  background: #E2E8F0;
  border-radius: 4px;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Grid 系统 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1.5rem;
}

/* ===== 切角装饰 ===== */
.chip-corner {
  position: relative;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.chip-corner-inverse {
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 12px 100%);
}

/* ===== 斜线装饰 ===== */
.diagonal-line {
  position: relative;
}

.diagonal-line::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, transparent 50%, #FF6B35 50%);
  opacity: 0.08;
  pointer-events: none;
}

/* ===== 侧边轨道导航指示器 (桌面) ===== */
.side-track {
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: 0;
  width: var(--nav-track-width);
  background: #0B1D3A;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
  gap: 0.25rem;
}

.side-track-indicator {
  width: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  flex: 1;
  position: relative;
  max-height: 200px;
}

.side-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: #FF6B35;
  border-radius: 2px;
  transition: height 0.2s ease;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0B1D3A;
  color: #FFFFFF;
  border: 2px solid rgba(255, 107, 53, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-base);
  font-size: 1.25rem;
}

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

.back-to-top:hover {
  background: #FF6B35;
  border-color: #FF6B35;
}

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

/* ===== 响应式 ===== */
@media (max-width: 1023px) {
  .header-inner {
    padding: 0 1rem;
  }

  .nav-track {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: #0B1D3A;
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .nav-track[data-open] {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }

  .nav-link {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 6px;
    width: 100%;
  }

  .nav-link[aria-current="page"]::after {
    left: 1rem;
    right: 1rem;
    bottom: 4px;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .page-section {
    padding: 2.5rem 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

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

  .side-track {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  
  .header-inner {
    padding: 0 2rem;
  }
}

@media (min-width: 1280px) {
  .header-inner {
    padding: 0 2.5rem;
  }
}

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

  .scroll-progress {
    transition: none;
  }

  .card:hover {
    transform: none;
  }

  .btn-cta:hover {
    transform: none;
  }

  .back-to-top {
    transition: opacity 0.01ms ease, transform 0.01ms ease;
  }

  .site-footer::before {
    animation: none;
    background: #FF6B35;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .site-header {
    position: static;
    box-shadow: none;
  }

  .nav-toggle, .btn-cta, .scroll-progress, .back-to-top {
    display: none !important;
  }

  .site-footer {
    break-inside: avoid;
  }
}
