/* ===== 0. Variables ===== */
:root {
  --bg-primary: #0B1B3D;
  --bg-secondary: #12264D;
  --bg-dark: #0A1220;
  --accent-green: #39FF14;
  --accent-orange: #FF6B00;
  --text-primary: #E8F0FE;
  --text-secondary: #8A9DC0;
  --border-blue: #1F3A68;
  --success: #21C45D;
  --warning: #FFC24B;
  --container-width: 1280px;
  --header-height: 48px;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, 'Roboto Mono', 'Courier New', monospace;
  --fs-hero: clamp(34px, 5vw, 60px);
  --fs-section: clamp(24px, 3vw, 32px);
  --fs-body: 16px;
  --fs-small: 12px;
  --transition: 0.3s ease;
}

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

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul, ol {
  list-style: none;
}

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

/* ===== 2. Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-family: var(--font-sans);
  text-shadow: 2px 2px 0 rgba(255, 107, 0, 0.12);
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-section); }

.mono, .data-value, .section-index, .nav-index, .footer-icp, .contact-label {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
}

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

.grid {
  display: grid;
  gap: 24px;
}

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

.section {
  padding: 96px 0;
  background: var(--bg-primary);
}

.section-alt {
  background: var(--bg-secondary);
}

.section-dark {
  background: var(--bg-dark);
}

.section-header {
  max-width: 720px;
  margin-bottom: 48px;
  border-left: 3px solid var(--accent-orange);
  padding-left: 16px;
}

.section-index {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.section-kicker {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-green);
  margin-bottom: 8px;
}

.section-title {
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 15px;
}

.page-header {
  position: relative;
  padding: 56px 0 48px;
  background-color: var(--bg-primary);
  background-image:
    repeating-linear-gradient(90deg, transparent 0, transparent 127px, rgba(31, 58, 104, 0.22) 127px, rgba(31, 58, 104, 0.22) 128px),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-blue);
}

.page-title {
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-family: var(--font-mono);
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.breadcrumb .separator {
  color: var(--border-blue);
}

/* ===== 4. Buttons ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: rgba(232, 240, 254, 0.06);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-blue);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: filter 0.3s ease, background 0.3s ease, color 0.3s ease;
  overflow: hidden;
}

.btn:hover {
  filter: brightness(1.15);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent-green);
  color: #0A1220;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--accent-green);
  box-shadow: inset 0 0 0 1px var(--accent-green);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px transparent;
}

/* ===== 5. Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-blue);
  height: var(--header-height);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 1100;
  padding: 8px 16px;
  background: var(--accent-orange);
  color: #0A1220;
  font-weight: 700;
  font-size: 13px;
  transition: top 0.3s ease;
}

.skip-link:focus-visible {
  top: 8px;
}

.header-inner {
  position: relative;
  max-width: var(--container-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-orange);
  color: #0A1220;
  font-weight: 900;
  font-size: 14px;
  font-family: var(--font-mono);
}

.brand-text {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-region {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
}

.site-nav {
  margin-left: 24px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-green);
  background: rgba(57, 255, 20, 0.06);
}

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

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--accent-orange);
}

.nav-index {
  font-size: 10px;
  color: var(--accent-orange);
  line-height: 1;
}

.btn-install {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 900;
  font-family: var(--font-sans);
  line-height: 1.2;
  background: var(--accent-green);
  color: #0A1220;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: filter 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-install:hover {
  filter: brightness(1.12);
}

.btn-install:active {
  transform: translateY(1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--border-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-bar {
  width: 16px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* ===== 6. Footer ===== */
.site-footer {
  background: var(--bg-dark);
  border-top: 3px solid var(--border-blue);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 1.2fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer-logo {
  display: inline-block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-logo-region {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 420px;
}

.footer-icp {
  display: inline-block;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid rgba(31, 58, 104, 0.6);
  padding: 4px 10px;
}

.footer-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-green);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.footer-nav-list {
  display: grid;
  gap: 10px;
}

.footer-nav-list a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-nav-list a:hover {
  color: var(--accent-orange);
  padding-left: 4px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-item {
  display: grid;
  gap: 2px;
}

.contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.contact-value {
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-all;
}

.footer-service-time {
  margin-top: 16px;
  font-size: 13px;
  color: var(--warning);
  border-left: 2px solid var(--warning);
  padding-left: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(31, 58, 104, 0.6);
}

.footer-bottom-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.copyright {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--accent-orange);
}

/* ===== 7. Components ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  background: rgba(232, 240, 254, 0.08);
  color: var(--text-primary);
  border-left: 2px solid var(--accent-orange);
}

.tag-green { border-left-color: var(--accent-green); color: var(--accent-green); }
.tag-orange { border-left-color: var(--accent-orange); color: var(--accent-orange); }
.tag-blue { border-left-color: var(--text-secondary); color: var(--text-secondary); }
.tag-yellow { border-left-color: var(--warning); color: var(--warning); }

.data-panel {
  background: var(--bg-secondary);
  padding: 28px;
  border-left: 3px solid var(--accent-green);
  position: relative;
}

.data-grid {
  display: grid;
  gap: 24px;
}

.data-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.data-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent-green);
}

.data-unit {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
}

.data-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.img-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  border: 1px solid var(--border-blue);
  overflow: hidden;
}

.img-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.06) 0%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 16px;
  background: rgba(232, 240, 254, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-blue);
  font-size: 13px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  background: rgba(255, 107, 0, 0.15);
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

[hidden] {
  display: none !important;
}

/* ===== 8. Decorative ===== */
.cut-corner-tr {
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}

.cut-corner-br {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}

.cut-corner-all {
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.skew-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-blue) 30%, var(--accent-orange) 50%, transparent 70%);
  transform: skewX(-20deg);
  border: none;
  margin: 0;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple-anim 0.5s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}

@keyframes ripple-anim {
  to { transform: scale(1); opacity: 0; }
}

/* ===== 9. Responsive ===== */
@media (max-width: 1023px) {
  .brand-region {
    display: none;
  }

  .nav-link {
    padding: 6px 8px;
    font-size: 12px;
  }

  .nav-index {
    display: none;
  }

  .btn-install {
    padding: 5px 12px;
    font-size: 13px;
  }

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

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

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

@media (max-width: 767px) {
  .site-header {
    height: auto;
    min-height: var(--header-height);
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 6px 16px;
    min-height: var(--header-height);
    gap: 8px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .btn-install {
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-blue);
    max-height: 0;
    overflow: hidden;
    margin-left: 0;
    transition: max-height 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(10, 18, 32, 0.5);
  }

  .site-nav[data-open] {
    max-height: 480px;
  }

  .nav-list {
    flex-direction: column;
    padding: 4px 0;
    gap: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(31, 58, 104, 0.4);
  }

  .nav-index {
    display: inline;
    font-size: 11px;
    margin-right: 8px;
  }

  .nav-link[aria-current="page"] {
    color: var(--accent-orange);
    background: rgba(255, 107, 0, 0.08);
  }

  .nav-link[aria-current="page"]::after {
    display: none;
  }

  .section {
    padding: 64px 0;
  }

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

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

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

  .page-header {
    padding: 40px 0 32px;
  }
}

/* ===== 10. Accessibility ===== */
:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

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