/* ===== 1. Tokens & Reset ===== */
:root {
  --bg: #070B14;
  --bg-panel: #0E1726;
  --bg-elevated: #111D32;
  --cream: #F3EFE6;
  --ink: #201A15;
  --gold: #D4A84B;
  --gold-light: #F0CC78;
  --red: #E85B3C;
  --ice: #A7C6FF;
  --neon-blue: #4A9FFF;
  --neon-purple: #8F5BFF;
  --font-display: 'Archivo Black', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-data: 'JetBrains Mono', 'Noto Sans SC', monospace;
  --container: 1440px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 84px;
  --header-h-mobile: 62px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 2px;
}

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

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

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(212, 168, 75, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 168, 75, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  position: relative;
}

main {
  flex: 1;
  width: 100%;
}

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

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

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
}

address {
  font-style: normal;
}

/* ===== 2. Container & Grid ===== */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  width: 100%;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2.4vw, 36px);
}

.col-wide { grid-column: span 9; }
.col-narrow { grid-column: span 3; }
.col-half { grid-column: span 6; }
.col-third { grid-column: span 4; }
.col-quarter { grid-column: span 3; }

@media (max-width: 1024px) {
  .col-wide, .col-narrow, .col-half, .col-third, .col-quarter { grid-column: span 12; }
}

.gold-rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 168, 75, 0.25) 55%, transparent 100%);
}

/* ===== 3. Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: rgba(212, 168, 75, 0.7);
  color: var(--gold);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(212, 168, 75, 0.08);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

/* ===== 4. Typography ===== */
.page-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-wrap: balance;
}

.lede {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.8;
  color: var(--ice);
  max-width: 65ch;
}

.data-num {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.section-num {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-data);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.section-num::before {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(212, 168, 75, 0.15));
  flex-shrink: 0;
}

.section-watermark {
  font-family: var(--font-data);
  font-weight: 900;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 1;
  color: var(--gold);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold);
  border: 1px solid rgba(212, 168, 75, 0.45);
  border-radius: 999px;
  background: rgba(212, 168, 75, 0.06);
}

.tag--red {
  color: var(--red);
  border-color: rgba(232, 91, 60, 0.5);
  background: rgba(232, 91, 60, 0.06);
}

.tag--ice {
  color: var(--ice);
  border-color: rgba(167, 198, 255, 0.3);
  background: rgba(167, 198, 255, 0.04);
}

/* ===== 5. Cards ===== */
.card {
  background: var(--bg-panel);
  border: 1px solid rgba(167, 198, 255, 0.12);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  position: relative;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card:hover {
  border-color: rgba(212, 168, 75, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 168, 75, 0.08);
}

.card--cream {
  background: var(--cream);
  color: var(--ink);
  border-color: rgba(32, 26, 21, 0.08);
}

.card--cream .card-text,
.card--cream p {
  color: rgba(32, 26, 21, 0.75);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.3;
  color: var(--cream);
  margin-bottom: 12px;
}

.card--cream .card-title {
  color: var(--ink);
}

.card-text {
  color: rgba(167, 198, 255, 0.7);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.card--cream .card-text {
  color: rgba(32, 26, 21, 0.7);
}

/* ===== 6. Image Frame ===== */
.image-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-panel) 0%, var(--bg-elevated) 100%);
  border: 1px solid rgba(167, 198, 255, 0.14);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
}

.image-frame[data-ratio="4:3"] { aspect-ratio: 4 / 3; }
.image-frame[data-ratio="1:1"] { aspect-ratio: 1 / 1; }

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

.image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(143, 91, 255, 0.08) 100%);
  pointer-events: none;
}

/* ===== 7. Breadcrumb ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: var(--ice);
}

.breadcrumb a {
  color: var(--ice);
  transition: color 0.3s var(--ease);
}

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

.breadcrumb-sep {
  color: rgba(212, 168, 75, 0.5);
}

.breadcrumb-current {
  color: var(--gold);
}

/* ===== 8. Skip Link ===== */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.3s var(--ease);
}

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

/* ===== 9. Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(167, 198, 255, 0.1);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(212, 168, 75, 0.4) 0%, rgba(212, 168, 75, 0.08) 70%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 2;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 60%, var(--neon-blue) 100%);
  pointer-events: none;
  transition: width 0.12s linear;
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.12), rgba(212, 168, 75, 0.02));
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: -0.04em;
  border-radius: var(--radius);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.brand-link:hover .brand-mark {
  background: rgba(212, 168, 75, 0.18);
  box-shadow: 0 0 20px rgba(212, 168, 75, 0.12);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--cream);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold-light);
  background: rgba(212, 168, 75, 0.04);
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(232, 91, 60, 0.8);
  flex-shrink: 0;
  animation: pulse-dot 2s var(--ease) infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  gap: 4px;
  border: 1px solid rgba(167, 198, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(14, 23, 38, 0.7);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--gold);
}

.nav-toggle-label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--ice);
  text-transform: uppercase;
  line-height: 1;
}

.nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 12px;
  display: block;
}

.nav-toggle-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle-icon span:nth-child(1) { top: 0; }
.nav-toggle-icon span:nth-child(2) { top: 5px; }
.nav-toggle-icon span:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

.site-nav[data-open="true"] .nav-toggle-icon span { background: var(--gold-light); }

.nav-link {
  position: relative;
  color: var(--ice);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  transition: color 0.3s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(212, 168, 75, 0.2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-link:hover {
  color: var(--gold-light);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--gold);
  font-weight: 600;
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (min-width: 1025px) {
  .site-nav {
    border: 1px solid rgba(212, 168, 75, 0.2);
    border-radius: var(--radius);
    padding: 0 6px;
    background: rgba(14, 23, 38, 0.4);
  }

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

  .nav-item {
    position: relative;
  }

  .nav-link {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 15px 12px;
  }

  .nav-index {
    font-family: var(--font-data);
    font-size: 0.6rem;
    color: var(--gold);
    opacity: 0.55;
    font-weight: 500;
  }

  .nav-toggle {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    height: var(--header-h-mobile);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .header-badge {
    display: none;
  }

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

  .header-right {
    gap: 10px;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7, 11, 20, 0.98);
    border-bottom: 1px solid rgba(212, 168, 75, 0.25);
    padding: 12px var(--gutter) 28px;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0.3s;
  }

  .site-nav[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--header-h-mobile));
    overflow-y: auto;
  }

  .nav-item {
    border-bottom: 1px solid rgba(167, 198, 255, 0.08);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 6px;
    font-size: 1rem;
    border-radius: var(--radius);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover {
    background: rgba(212, 168, 75, 0.05);
    color: var(--gold);
  }

  .nav-link[aria-current="page"] {
    background: rgba(212, 168, 75, 0.06);
    color: var(--gold);
  }

  .nav-index {
    font-family: var(--font-data);
    font-size: 0.7rem;
    color: var(--gold);
    opacity: 0.5;
    min-width: 26px;
  }
}

/* ===== 10. Footer ===== */
.site-footer {
  position: relative;
  background: var(--bg);
  border-top: 3px solid var(--gold);
  margin-top: auto;
  overflow: hidden;
}

.site-footer::before {
  content: '9BO';
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-family: var(--font-data);
  font-weight: 900;
  font-size: clamp(8rem, 18vw, 15rem);
  line-height: 1;
  color: var(--gold);
  opacity: 0.035;
  pointer-events: none;
  letter-spacing: -0.06em;
  user-select: none;
}

.site-footer::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-blue) 0%, var(--neon-purple) 50%, transparent 100%);
  opacity: 0.45;
}

.footer-top {
  max-width: var(--container);
  margin-inline: auto;
  padding: 72px var(--gutter) 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: clamp(32px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold);
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
  border-radius: var(--radius);
  background: rgba(212, 168, 75, 0.06);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.footer-about {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--ice);
  max-width: 42ch;
  margin-bottom: 14px;
}

.footer-trust {
  font-size: 0.75rem;
  line-height: 1.7;
  color: rgba(167, 198, 255, 0.5);
  max-width: 46ch;
}

.footer-heading {
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 168, 75, 0.2);
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 42px;
  height: 1px;
  background: var(--gold);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--ice);
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--gold-light);
  padding-left: 6px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-item dt {
  font-family: var(--font-data);
  font-size: 0.72rem;
  color: rgba(167, 198, 255, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-item dd {
  font-size: 0.875rem;
  color: var(--cream);
  line-height: 1.6;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(167, 198, 255, 0.08);
}

.footer-bottom-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(167, 198, 255, 0.55);
}

.footer-icp {
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: rgba(167, 198, 255, 0.4);
  letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 52px;
  }
}

@media (min-width: 1025px) and (max-width: 1280px) {
  .footer-top {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 28px;
  }
}

/* ===== 11. Motion / Reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 12. Focus & A11y ===== */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: rgba(212, 168, 75, 0.3);
  color: var(--cream);
}

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

  .badge-dot {
    animation: none;
  }

  .nav-toggle-icon span {
    transition: none;
  }

  .scroll-progress {
    transition: none;
  }
}
