/* ============================================
   AIC 艾瑞洁 · 公共样式文件
   设计系统 + Header + Footer + Buttons
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --ink: #0A1628;
  --ink-2: #1B2A41;
  --ink-3: #0F1E36;
  --steel: #3D4F6B;
  --mute: #6B7A95;
  --line: #E3E8F0;
  --bg: #F5F7FA;
  --bg-2: #FAFBFC;
  --white: #FFFFFF;
  --accent: #0052D9;
  --accent-deep: #003BA0;
  --accent-light: #E8F0FE;
  --accent-bright: #4A90FF;
  --warn: #FF6B00;
  --ok: #00A86B;
  --danger: #D92D20;

  /* Radius - 统一 12px */
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 12px 32px -12px rgba(10, 22, 40, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(10, 22, 40, 0.3);
  --shadow-accent: 0 16px 40px -16px rgba(0, 82, 217, 0.35);

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.25s ease;
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Container */
  --container: 1320px;
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono { font-family: "JetBrains Mono", "Courier New", monospace; }
.display { font-family: "Barlow Condensed", "Noto Sans SC", sans-serif; font-weight: 700; letter-spacing: -0.01em; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Container ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

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

.btn-sm {
  padding: 8px 16px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 15px;
}

/* ---------- Top Announcement Bar ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 9px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left {
  display: flex;
  gap: 24px;
  color: #A8B5C7;
}

.topbar-left .live {
  color: #fff;
  display: flex;
  align-items: center;
}

.topbar-left .live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00FF88;
  margin-right: 8px;
  box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
}

.topbar-right {
  display: flex;
  gap: 20px;
  color: #A8B5C7;
}

.topbar-right a:hover { color: #fff; }

/* ---------- Main Nav ---------- */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
  font-family: "Barlow Condensed", sans-serif;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-text span {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.1em;
}

.nav-menu {
  display: flex;
  gap: 38px;
  list-style: none;
}

.nav-menu a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 28px 0;
  position: relative;
  transition: color var(--t-base);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Mobile Menu Toggle ---------- */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--t-base);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.breadcrumb-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mute);
}

.breadcrumb a {
  transition: color var(--t-base);
}

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

.breadcrumb .sep {
  color: var(--line);
  font-size: 11px;
}

.breadcrumb .current {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Section Common ---------- */
section {
  scroll-margin-top: 90px;
}

.section-head {
  margin-bottom: 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.section-head .left { flex: 1; }

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.section-head h2 {
  font-family: "Barlow Condensed", "Noto Sans SC", sans-serif;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-head .desc {
  font-size: 15px;
  color: var(--mute);
  max-width: 440px;
  line-height: 1.75;
}

/* ---------- Footer ---------- */
footer {
  background: #050B16;
  color: #A8B5C7;
  padding: 64px 0 24px;
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand .logo-mark {
  background: #fff;
  color: var(--ink);
}

.footer-brand .logo-text strong,
.footer-brand .logo-text span {
  color: #fff;
}

.footer-brand p {
  font-size: 13px;
  color: #7A8AA8;
  margin-top: 18px;
  max-width: 340px;
  line-height: 1.75;
}

.footer-col h6 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  padding: 6px 0;
  font-size: 13px;
}

.footer-col a {
  transition: color var(--t-base);
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 32px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #5A6A85;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Floating Sidebar ---------- */
.float-side {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.float-btn {
  background: #fff;
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--steel);
  transition: all var(--t-base);
  gap: 3px;
  border: none;
}

.float-btn:hover {
  background: var(--accent);
  color: #fff;
}

.float-btn span { font-size: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: flex; }
  .topbar-left { display: none; }
  .float-side { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: 36px; }

  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 32px;
    border-bottom: 1px solid var(--line);
    gap: 0;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .nav-cta .btn-ghost { display: none; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .topbar-inner { padding: 9px 20px; }
  .section-head h2 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
}

/* ============================================
   Mega Menu (global, injected by main.js)
   ============================================ */
.nav-menu > li.has-mega { position: static; }

.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 74px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 40px 0 44px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 99;
}

.nav-menu > li.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-cols {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr;
  gap: 56px;
}

.mega-cols.cols-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 40px;
}

.mega-col h6 {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mega-col h6 small {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.05em;
}

.mega-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  transition: all var(--t-fast);
}

.mega-link:hover {
  background: var(--bg);
  color: var(--accent);
}

.mega-link .arrow {
  color: var(--accent);
  font-size: 10px;
}

.mega-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-left: auto;
}

.mega-tag.flagship { background: var(--ink); color: #fff; }
.mega-tag.hot { background: #FFE8DC; color: var(--warn); }
.mega-tag.new { background: #DDF6E5; color: var(--ok); }
.mega-tag.power { background: var(--accent-light); color: var(--accent); }
.mega-tag.custom { background: #FCE7F6; color: #C11574; }

.mega-feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 26px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  transition: all var(--t-base);
}

.mega-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(74,144,255,.25), transparent 60%);
  pointer-events: none;
}

.mega-feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.mega-feature > * { position: relative; }

.mf-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
}

.mega-feature h4 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mega-feature p {
  font-size: 12.5px;
  color: #B8C5DD;
  line-height: 1.65;
}

.mf-cta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-bright);
  margin-top: 4px;
}

.mf-cta::after { content: " →"; }

@media (max-width: 1024px) {
  .mega-menu { display: none; }
}
