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

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

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #1A1A1A;
  background-color: #F4F7F3;
  padding-top: 96px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-locked {
  overflow: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: "Noto Serif SC", Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: inherit;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  list-style: none;
}

a {
  color: #FF7A00;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #e06e00;
}

:root {
  --color-primary: #0B3D2E;
  --color-accent: #FF7A00;
  --color-dark: #0A1F17;
  --color-light: #F4F7F3;
  --color-text: #1A1A1A;
  --color-text-invert: #E8F0EB;
  --color-muted: #6A8A7D;
  --color-accent-soft: #FFC79A;
  --color-border-light: #D0DAD3;
  --color-border-dark: #1F4637;

  --font-display: "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "Roboto Mono", "Courier New", monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  --container: 1200px;
  --radius: 8px;
  --radius-pill: 999px;
  --shadow-1: 0 2px 8px rgba(10, 31, 23, 0.1);
  --shadow-2: 0 8px 32px rgba(10, 31, 23, 0.2);
  --transition: 0.3s ease-out;
}

/* ============ Focus Accessibility ============ */
:focus-visible {
  outline: 3px solid #FF7A00;
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2000;
  padding: 0.5rem 1.25rem;
  background: #FF7A00;
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.skip-link:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ============ Layout Containers ============ */
.container, .container-wide, .container-narrow {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container {
  max-width: 1200px;
}

.container-wide {
  max-width: 1400px;
}

.container-narrow {
  max-width: 860px;
}

/* ============ Scroll Progress ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #FF7A00;
  transform: scaleX(0);
  transform-origin: left top;
  z-index: 1500;
  will-change: transform;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  pointer-events: none;
}

.capsule-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.4rem 0.5rem 0.4rem 1.5rem;
  background: rgba(11, 61, 46, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  border: 1px solid rgba(232, 240, 235, 0.14);
  box-shadow: 0 8px 32px rgba(10, 31, 23, 0.35);
  pointer-events: auto;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 0;
}

.brand-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: #E8F0EB;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #6A8A7D;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #E8F0EB;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.16);
  border: 1px solid rgba(255, 122, 0, 0.45);
  color: #FFC79A;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(232, 240, 235, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

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

.toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #E8F0EB;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
  transform: translateY(7px) 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(-7px) rotate(-45deg);
}

/* ============ Footer ============ */
.site-footer {
  background: #0A1F17;
  color: #E8F0EB;
  margin-top: 6rem;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF7A00 0%, #FF7A00 65%, #1F4637 65%, #1F4637 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 3rem;
  padding-top: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #1F4637;
}

.footer-brand-col .brand {
  margin-bottom: 1.25rem;
}

.brand-invert .brand-logo {
  color: #E8F0EB;
}

.brand-invert .brand-tagline {
  color: #6A8A7D;
}

.footer-trust {
  font-size: 0.85rem;
  line-height: 1.8;
  color: #6A8A7D;
  max-width: 34em;
  margin-bottom: 0;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #FF7A00;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1F4637;
}

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

.footer-list li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #E8F0EB;
}

.footer-list a {
  color: #6A8A7D;
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: #FF7A00;
}

.footer-label {
  display: inline-block;
  min-width: 2.8em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #6A8A7D;
}

.footer-contact-col .footer-list li {
  margin-bottom: 0.35rem;
}

.footer-note {
  font-size: 0.78rem;
  color: #6A8A7D;
  padding-top: 0.35rem;
  border-top: 1px dashed #1F4637;
  margin-top: 0.5rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem 0 2rem;
  font-size: 0.8rem;
  color: #6A8A7D;
}

.footer-copyright {
  margin: 0;
}

.footer-icp {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-accent {
  background: #FF7A00;
  color: #ffffff;
}

.btn-accent:hover {
  background: #ff8d24;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 122, 0, 0.35);
}

.btn-outline-light {
  background: transparent;
  border: 1px solid #E8F0EB;
  color: #E8F0EB;
}

.btn-outline-light:hover {
  background: rgba(232, 240, 235, 0.1);
  color: #ffffff;
}

/* ============ Tags & Data ============ */
.tag {
  display: inline-block;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 122, 0, 0.12);
  color: #FF7A00;
  border: 1px solid rgba(255, 122, 0, 0.35);
}

.data-number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ============ Panels & Decoration ============ */
.panel-chamfer {
  background: var(--color-light);
  clip-path: polygon(
    20px 0,
    100% 0,
    100% calc(100% - 20px),
    calc(100% - 20px) 100%,
    0 100%,
    0 20px
  );
  padding: 2rem;
}

.section-dark .panel-chamfer {
  background: var(--color-primary);
  color: var(--color-text-invert);
}

.arc-decoration {
  position: relative;
  width: 160px;
  height: 80px;
  border: 3px solid #FF7A00;
  border-bottom: none;
  border-left: none;
  border-radius: 160px 160px 0 0;
  transform: rotate(-12deg);
  opacity: 0.65;
  pointer-events: none;
}

.arc-decoration::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #FF7A00;
  border-radius: 50%;
}

.stripes-diagonal {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(255, 122, 0, 0.14) 10px,
    rgba(255, 122, 0, 0.14) 12px
  );
}

.divider {
  height: 1px;
  border: none;
  background: var(--color-border-light);
  margin: 3rem 0;
}

.section-dark .divider,
.section-deep .divider {
  background: var(--color-border-dark);
}

/* ============ Sections ============ */
.section {
  padding: var(--space-6) 0;
}

.section-dark {
  background: var(--color-dark);
  color: var(--color-text-invert);
}

.section-light {
  background: var(--color-light);
}

.section-deep {
  background: var(--color-primary);
  color: var(--color-text-invert);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #FF7A00;
  margin-bottom: 1.25rem;
}

.section-label::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: #FF7A00;
}

/* ============ Grid ============ */
.grid {
  display: grid;
  gap: var(--space-4);
}

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

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

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

/* ============ Image Frame ============ */
.image-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--color-dark);
  border-radius: var(--radius);
  overflow: hidden;
}

.image-frame::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 14px,
    rgba(255, 255, 255, 0.03) 14px,
    rgba(255, 255, 255, 0.03) 16px
  );
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 1rem 0;
}

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

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

.breadcrumb span[aria-hidden="true"] {
  color: var(--color-muted);
  opacity: 0.6;
}

/* ============ Expand / Accordion ============ */
.expand-pane {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.expand-pane[data-open="true"] {
  max-height: 600px;
}

/* ============ Reveal Animation ============ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

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

@media (max-width: 900px) {
  body {
    padding-top: 80px;
  }

  .site-header {
    padding: 0.75rem 1rem;
  }

  .brand-tagline {
    display: none;
  }

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

@media (max-width: 768px) {
  .site-header {
    padding: 0.5rem 1rem;
  }

  .capsule-nav {
    padding: 0.4rem 0.5rem 0.4rem 1rem;
    gap: 0.75rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--color-primary);
    border: 1px solid var(--color-border-dark);
    border-radius: 16px;
    padding: 0.6rem;
    box-shadow: var(--shadow-2);
    z-index: 10;
  }

  .nav-links[data-open="true"] {
    display: flex;
  }

  .nav-link {
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--color-text-invert);
  }

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

  .nav-link[aria-current="page"] {
    background: var(--color-accent);
  }

  .version-badge {
    display: none;
  }

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

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: var(--space-5) 0;
  }
}

/* ============ Reduced Motion ============ */
@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;
  }

  .expand-pane {
    transition: none;
  }

  .nav-toggle .toggle-bar {
    transition: none;
  }
}
