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

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

body {
  font-family: 'Noto Sans SC', 'Source Han Sans SC', 'Microsoft YaHei', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  background-color: #0B1D2E;
  color: #EDF2F7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial Black', sans-serif;
  font-weight: 800;
  line-height: 1.25;
  color: #FFFFFF;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: #4DD0E1; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #D4AF37; }

ul, ol { list-style: none; }

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

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

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

/* ===== CSS VARIABLES ===== */
:root {
  --red: #D32F2F;
  --navy: #0B1D2E;
  --gold: #D4AF37;
  --teal: #0F3D3E;
  --wine: #6E1423;
  --light: #EDF2F7;
  --muted: #A0AAB5;
  --glass: rgba(255,255,255,0.08);
  --cyan: #4DD0E1;
  --yellow: #FFC107;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 4.5rem;
  --max-width: 1280px;
  --transition: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html[data-theme="light"] {
  --navy: #f4f7fc;
  --light: #0B1D2E;
  --muted: #3a4a5a;
  --glass: rgba(11,29,46,0.05);
}

html[data-theme="light"] body { background-color: var(--navy); color: var(--light); }
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6 { color: #0B1D2E; }

/* ===== CONTAINER & GRID ===== */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 4.5rem 0; }
.section-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(212,175,55,0.3); padding-bottom: 0.75rem; }
.section-header .section-index { font-family: 'Roboto Mono', 'SF Mono', monospace; font-size: 0.85rem; color: var(--red); letter-spacing: 0.1em; }
.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  will-change: transform;
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #b8962e);
  color: #0B1D2E;
  box-shadow: 0 4px 20px rgba(212,175,55,0.25);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(212,175,55,0.35); }

.btn-outline-red {
  border: 1.5px solid #D32F2F;
  color: #D32F2F;
  background: transparent;
}
.btn-outline-red:hover { background: rgba(211,47,47,0.1); transform: translateY(-2px); }

/* ===== GLASS & DATA CARDS ===== */
.glass-card {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.glass-card:hover { border-color: rgba(212,175,55,0.4); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }

.data-card {
  background: linear-gradient(145deg, rgba(11,29,46,0.9), rgba(15,61,62,0.7));
  border: 1px solid rgba(77,208,225,0.15);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition), transform var(--transition);
}
.data-card:hover { border-color: rgba(77,208,225,0.5); transform: translateY(-3px); }

.data-value {
  font-family: 'Roboto Mono', 'SF Mono', monospace;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  color: #4DD0E1;
  letter-spacing: -0.02em;
}
.data-value.accent-red { color: #D32F2F; }
.data-value.accent-gold { color: #D4AF37; }

.data-label { font-size: 0.8rem; color: #A0AAB5; margin-top: 0.5rem; letter-spacing: 0.05em; }

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.tag.tag-live { background: rgba(211,47,47,0.2); color: #ff6b6b; border: 1px solid rgba(211,47,47,0.4); }
.tag.tag-gold { background: rgba(212,175,55,0.15); color: #D4AF37; border: 1px solid rgba(212,175,55,0.3); }

/* ===== IMAGE CONTAINERS ===== */
.image-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #0F3D3E, #0B1D2E);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.08);
}
.image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,29,46,0.2) 0%, rgba(11,29,46,0.8) 100%);
  z-index: 1;
}
.image-container > * { position: relative; z-index: 2; }

.image-container-hero {
  aspect-ratio: auto;
  min-height: 420px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 80% 20%, rgba(211,47,47,0.3), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(77,208,225,0.2), transparent 50%),
    linear-gradient(145deg, #0F3D3E, #0B1D2E);
}

.image-container-wide { aspect-ratio: 21 / 9; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,29,46,0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212,175,55,0.25);
}
html[data-theme="light"] .site-header { background: rgba(244,247,252,0.9); border-bottom-color: rgba(211,47,47,0.15); }

.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }

.nav-brand { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.brand-mark {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial Black', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: #0B1D2E;
  background: linear-gradient(135deg, #D4AF37, #f3d97a);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  line-height: 1;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(212,175,55,0.3);
}
html[data-theme="light"] .brand-mark { color: #0B1D2E; }
.brand-text { font-weight: 800; font-size: 1.1rem; color: #EDF2F7; }
.brand-sub { font-family: 'Roboto Mono', 'SF Mono', monospace; font-size: 0.65rem; color: #A0AAB5; letter-spacing: 0.2em; text-transform: uppercase; align-self: flex-end; margin-bottom: 0.2rem; }
html[data-theme="light"] .brand-text { color: #0B1D2E; }

.nav-menu { display: flex; align-items: center; gap: 0.75rem; }
.nav-menu a {
  position: relative;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #EDF2F7;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
html[data-theme="light"] .nav-menu a { color: #0B1D2E; }
.nav-menu a:hover { color: #D4AF37; background: rgba(212,175,55,0.1); }
.nav-menu a[aria-current="page"] { color: #D4AF37; }
.nav-menu a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.15rem;
  height: 2px;
  background: #D32F2F;
  border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.nav-icon-btn {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  color: #EDF2F7;
  font-size: 0.9rem;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
html[data-theme="light"] .nav-icon-btn { border-color: rgba(11,29,46,0.2); color: #0B1D2E; }
.nav-icon-btn:hover { border-color: #D4AF37; color: #D4AF37; background: rgba(212,175,55,0.1); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 0.6rem; border-radius: var(--radius-sm); }
.nav-toggle .bar { width: 22px; height: 2px; background: #EDF2F7; border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
html[data-theme="light"] .nav-toggle .bar { background: #0B1D2E; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #D32F2F, #D4AF37, #4DD0E1);
  z-index: 10;
  transition: width 0.1s linear;
}

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(180deg, #0B1D2E 0%, #0F3D3E 100%);
  border-top: 2px solid #D4AF37;
  margin-top: 4rem;
  position: relative;
  padding-top: 0;
}
html[data-theme="light"] .site-footer { background: linear-gradient(180deg, #f4f7fc, #eef2f7); }

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}

.footer-brand .brand-lockup {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Arial Black', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #D4AF37;
  letter-spacing: 0.05em;
  border-left: 3px solid #D32F2F;
  padding-left: 0.8rem;
  margin-bottom: 1rem;
}
.footer-slogan { font-size: 1.2rem; font-weight: 700; color: #EDF2F7; margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.85rem; color: #A0AAB5; max-width: 22rem; }

.footer-title {
  font-size: 0.85rem;
  color: #D4AF37;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-nav { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-nav a { color: #EDF2F7; font-size: 0.9rem; padding: 0.2rem 0; transition: color var(--transition), padding-left var(--transition); }
.footer-nav a:hover { color: #D4AF37; padding-left: 0.4rem; }
html[data-theme="light"] .footer-nav a { color: #0B1D2E; }

.footer-contact { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; color: #EDF2F7; }
.footer-contact p { margin: 0; }
.footer-contact-link { color: #4DD0E1; font-weight: 600; margin-bottom: 0.5rem; }
html[data-theme="light"] .footer-contact { color: #0B1D2E; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-size: 0.8rem; color: #A0AAB5; }
html[data-theme="light"] .footer-bottom { border-top-color: rgba(11,29,46,0.1); }
.footer-bottom .copyright { margin-right: auto; font-family: 'Roboto Mono', 'SF Mono', monospace; }
.footer-bottom .icp { border: 1px solid rgba(212,175,55,0.3); padding: 0.2rem 0.6rem; border-radius: 4px; color: #D4AF37; }
.trust-statement { flex-basis: 100%; font-size: 0.75rem; line-height: 1.5; color: #A0AAB5; margin-top: 0.5rem; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #D4AF37;
  color: #0B1D2E;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 6px 0;
  font-weight: 700;
  z-index: 1000;
  transition: left 0.2s ease;
}
.skip-link:focus { left: 0; }

/* ===== REVEAL MOTION ===== */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.25,0.46,0.45,0.94), transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }

  .header-inner { min-height: 4rem; }
  .brand-text { display: none; }
  .brand-sub { display: none; }
  .brand-mark { font-size: 1.2rem; }

  .nav-actions { gap: 0.3rem; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(11,29,46,0.98);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212,175,55,0.4);
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  }
  html[data-theme="light"] .nav-menu { background: rgba(244,247,252,0.98); }
  .nav-menu[data-open] { display: flex; }
  .nav-menu a { padding: 0.8rem 1rem; font-size: 1rem; border-radius: var(--radius-sm); }
  .nav-menu a:hover { background: rgba(212,175,55,0.1); }
  .nav-menu a[aria-current="page"] { background: rgba(212,175,55,0.1); }
  .nav-menu a[aria-current="page"]::after { display: none; }

  .nav-toggle { display: flex; }

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

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { margin-bottom: 1rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .footer-bottom .copyright { margin-right: 0; }

  .image-container-hero { min-height: 300px; }
}

/* ===== 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;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .btn, .glass-card, .data-card, .nav-menu a { transition: none; }
}
