/* ============================================================
   BV168.CN — "Night Circuit" Design System
   Theme: Racing / Speed / Neon Nights
   Fonts: Space Grotesk + IBM Plex Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg-deep: #0a0b1a;
  --bg-surface: #111228;
  --bg-card: #181936;
  --bg-card-hover: #1f2140;
  --accent-gold: #f0b429;
  --accent-gold-dim: #b8860b;
  --accent-cyan: #22d3ee;
  --accent-cyan-dim: #0891b2;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;
  --text-primary: #e8e8f0;
  --text-secondary: #b0b0c8;
  --text-muted: #6b6b8a;
  --border: #2a2b55;
  --border-light: #3a3b65;
  --shadow: rgba(0, 0, 0, 0.4);
  --gold-glow: rgba(240, 180, 41, 0.3);
  --cyan-glow: rgba(34, 211, 238, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --max-width: 1280px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse at 15% 10%, rgba(34,211,238,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(168,85,247,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(240,180,41,0.03) 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 50%, var(--bg-deep) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-gold); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 12px;
  position: relative;
  padding-left: 40px;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 28px;
  height: 2px;
  background: var(--accent-gold);
}

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px var(--gold-glow); }
  50% { box-shadow: 0 0 40px var(--gold-glow), 0 0 60px var(--gold-glow); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.anim-fade-up { animation: fadeUp 0.7s ease forwards; }
.anim-fade-in { animation: fadeIn 0.6s ease forwards; }
.anim-slide-left { animation: slideLeft 0.7s ease forwards; }
.anim-slide-right { animation: slideRight 0.7s ease forwards; }

/* Stagger children */
.stagger > * { opacity: 0; }
.stagger > *:nth-child(1) { animation: fadeUp 0.5s ease 0.1s forwards; }
.stagger > *:nth-child(2) { animation: fadeUp 0.5s ease 0.2s forwards; }
.stagger > *:nth-child(3) { animation: fadeUp 0.5s ease 0.3s forwards; }
.stagger > *:nth-child(4) { animation: fadeUp 0.5s ease 0.4s forwards; }
.stagger > *:nth-child(5) { animation: fadeUp 0.5s ease 0.5s forwards; }
.stagger > *:nth-child(6) { animation: fadeUp 0.5s ease 0.6s forwards; }
.stagger > *:nth-child(7) { animation: fadeUp 0.5s ease 0.7s forwards; }
.stagger > *:nth-child(8) { animation: fadeUp 0.5s ease 0.8s forwards; }

/* ---------- Noise Texture Overlay ---------- */
.noise-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(10, 11, 26, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo span { color: var(--accent-gold); }
.logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-cyan));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: var(--bg-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-gold);
  background: rgba(240, 180, 41, 0.08);
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: var(--bg-deep);
  box-shadow: 0 4px 20px var(--gold-glow);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--gold-glow);
  color: var(--bg-deep);
}
.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}
.btn-outline:hover {
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--cyan-glow);
  color: var(--accent-cyan);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: rgba(240, 180, 41, 0.05);
}
.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
  position: relative;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header .section-desc {
  margin: 0 auto;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.7;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-col a,
.footer-col p {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--accent-gold); }
.footer-contact .contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 0;
}
.footer-contact .contact-item .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 16px;
}

/* ---------- Page Hero ---------- */
.page-hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.page-hero-sm {
  padding: 120px 0 60px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-cyan); }
.breadcrumb .sep { color: var(--border-light); }

/* ---------- Card Base ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.3s ease;
}
.card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--shadow);
}

/* ---------- Matomo Notice ---------- */
.matomo-notice { display: none; }

/* ---------- Particles canvas for hero ---------- */
#particle-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .page-hero { padding: 120px 0 60px; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(10, 11, 26, 0.98);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; width: 100%; }
  .mobile-toggle { display: block; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .btn { padding: 12px 24px; font-size: 14px; }
  .section-header { margin-bottom: 40px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .page-hero { padding: 100px 0 40px; }
}
