/* ============================================================
   adbyte 门户 demo — style.css
   科技蓝主色 + 玻璃拟态 + 圆角卡片，与 finance/appstack 站同源
   ============================================================ */

:root {
  --primary: #0064C8;
  --primary-2: #1677FF;
  --primary-hover: #0050a0;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-faint: #9ca3af;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-tint: #ebf2ff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .05);
  --shadow-lg: 0 20px 40px -12px rgba(0, 50, 120, .18), 0 8px 16px -8px rgba(0, 0, 0, .08);
  --radius: 16px;
  --font-head: 'Inter', system-ui, -apple-system, 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
  --maxw: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ===================== Nav ===================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z: 100;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled {
  border-color: var(--border);
  background: rgba(255, 255, 255, .85);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 64px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; font-family: var(--font-head); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff; font-weight: 800; font-size: 18px;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px -2px rgba(0, 100, 200, .5);
  font-family: var(--font-head);
}
.brand-mark.small { width: 24px; height: 24px; font-size: 14px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--text-light); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-gh { font-weight: 600; color: var(--text) !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== Hero ===================== */
.hero { position: relative; padding: 140px 24px 90px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z: 0;
  background:
    radial-gradient(50% 60% at 50% -8%, rgba(22, 119, 255, .20) 0%, transparent 72%),
    radial-gradient(38% 46% at 12% 8%, rgba(124, 58, 237, .12) 0%, transparent 62%),
    radial-gradient(38% 46% at 88% 6%, rgba(0, 100, 200, .14) 0%, transparent 62%),
    linear-gradient(180deg, #f3f7ff 0%, #ffffff 55%, var(--bg-soft) 100%);
}
/* 科技点阵底纹：顶部可见，向下渐隐 */
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(22, 119, 255, .10) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(75% 55% at 50% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(75% 55% at 50% 0%, #000 0%, transparent 80%);
}
/* 顶部细发光线 */
.hero-bg::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22, 119, 255, .35) 50%, transparent);
}
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--primary); letter-spacing: .08em;
  background: rgba(22, 119, 255, .08); border: 1px solid rgba(22, 119, 255, .18);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(34px, 5.2vw, 56px); line-height: 1.15;
  color: #111827; letter-spacing: -.02em; margin-bottom: 22px;
}
.hero-title .grad {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-2) 50%, #6ea8ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 640px; margin: 0 auto 12px;
  font-size: clamp(15px, 2vw, 18px); color: var(--text-light);
}
.hero-sub-en {
  max-width: 600px; margin: 0 auto 36px;
  font-size: 13px; color: var(--text-faint); font-family: var(--font-head);
  letter-spacing: .01em;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .2s, box-shadow .2s, background .2s; cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff; box-shadow: 0 10px 24px -8px rgba(0, 100, 200, .6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(0, 100, 200, .7); }
.btn-ghost { color: var(--text); border: 1px solid var(--border); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.hero-stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: 36px; color: var(--primary); line-height: 1; }
.stat-label { font-size: 14px; color: var(--text-faint); margin-top: 6px; }

/* ===================== Section head ===================== */
.section-head { text-align: center; margin-bottom: 36px; }
.section-title {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(26px, 3.5vw, 36px);
  color: #111827; letter-spacing: -.01em;
}
.section-sub { color: var(--text-light); margin-top: 8px; font-size: 15px; }

/* ===================== Projects ===================== */
.projects { padding: 72px 24px 80px; max-width: var(--maxw); margin: 0 auto; }
/* fixed nav 高 64px，锚点滚动时让出空间，避免 nav 压住 filters/about 标题 */
#projects, #about { scroll-margin-top: 88px; }
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: #fff; border: 1px solid var(--border);
  color: var(--text-light); font-size: 14px; font-weight: 500;
  transition: all .2s; user-select: none;
}
.chip:hover { border-color: var(--primary-2); color: var(--primary); }
.chip.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(0, 100, 200, .5);
}

.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.grid.empty { display: none; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; z: 0; opacity: 0;
  background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 55%);
  transition: opacity .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 26px;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  margin-bottom: 18px;
}
.card-name { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: #111827; }
.card-tagline { color: var(--primary); font-size: 14px; font-weight: 600; margin-top: 3px; margin-bottom: 2px; }
.card-tagline-en { color: var(--text-faint); font-size: 12px; font-family: var(--font-head); margin-bottom: 12px; }
.card-desc { color: var(--text-light); font-size: 14px; line-height: 1.65; flex: 1; }
.card-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tech-badge {
  font-size: 12px; color: var(--text-light); background: var(--bg-soft);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 6px;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border);
}
.card-domain { font-size: 13px; color: var(--text-faint); font-family: var(--font-head); }
.card-go {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px; color: var(--primary);
  transition: gap .2s;
}
.card:hover .card-go { gap: 10px; }
.card-featured {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  color: #b45309; background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .3);
  padding: 3px 9px; border-radius: 999px;
}

.grid-empty { text-align: center; color: var(--text-faint); padding: 60px 0; }
.hidden { display: none !important; }

/* ===================== About ===================== */
.about { background: var(--bg-soft); padding: 80px 24px; border-top: 1px solid var(--border); }
.about-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.about-lead { font-family: var(--font-head); font-size: clamp(18px, 2.4vw, 22px); font-weight: 600; color: var(--text); margin: 18px 0 16px; }
.about-text { color: var(--text-light); font-size: 15px; line-height: 1.8; margin-bottom: 30px; }
.about-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.about-link {
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: #fff; border: 1px solid var(--border); color: var(--text-light);
  transition: all .2s;
}
.about-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ===================== Footer ===================== */
.footer { background: #0b1220; color: rgba(255, 255, 255, .65); padding: 40px 24px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-family: var(--font-head); }
.footer-brand .brand-mark { box-shadow: 0 4px 10px -2px rgba(22, 119, 255, .6); }
.footer-copy { font-size: 13px; }

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px; align-items: stretch;
  }
  .nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links.open a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 110px 20px 70px; }
  .hero-stats { gap: 28px; }
  .stat-num { font-size: 30px; }
  .projects { padding: 56px 18px 64px; }
  .grid { grid-template-columns: 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
