:root {
  --primary: #2457c5;
  --primary-dark: #173b8b;
  --primary-light: #eef4ff;
  --success: #1f8f4d;
  --danger: #c93535;
  --text-primary: #172033;
  --text-secondary: #5d6678;
  --text-muted: #8a93a5;
  --border: #e4e8f0;
  --bg: #f6f8fb;
  --bg-white: #fff;
  --shadow: 0 8px 24px rgba(18, 33, 66, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1180px;
  --nav-height: 66px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; }

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--nav-height);
  background: rgb(12, 9, 114);
  border-bottom: none;
}
.logo-icon { background: rgba(255,255,255,0.2); color: #fff; }
.nav-user { color: #fff; }
.nav-toggle { color: #fff; border-color: rgba(255,255,255,0.3); }
.nav .btn-primary { background: #fff; color: rgb(12,9,114); }
.nav .btn-primary:hover { background: rgba(255,255,255,0.85); }
.nav .btn-ghost { color: rgba(255,255,255,0.8); }
.nav .btn-ghost:hover { color: #fff; }
.nav.scrolled { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25); }

/* Light nav variant for white sections */
.nav-light { background: #fff; border-bottom: 1px solid var(--border); }
.nav-light .nav-logo { color: var(--text-primary); }
.nav-light .logo-icon { background: var(--text-primary); color: #fff; }
.nav-light .nav-links a { color: var(--text-secondary); }
.nav-light .nav-links a:hover,
.nav-light .nav-links a.active { color: var(--primary); background: var(--primary-light); }
.nav-light .nav-user { color: var(--text-secondary); }
.nav-light .nav-toggle { color: var(--text-primary); border-color: var(--border); }
.nav-light .btn-primary { background: var(--primary); color: #fff; }
.nav-light .btn-primary:hover { background: var(--primary-dark); }
.nav-light .btn-ghost { color: var(--text-secondary); }
.nav-light .btn-ghost:hover { color: var(--text-primary); }
.nav-light.scrolled { box-shadow: 0 4px 18px rgba(18, 33, 66, 0.06); }
.nav-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 700;
  color: #fff;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text-primary);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 6px;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.20);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
  color: var(--text-primary);
  border-color: #b8c1d4;
  background: #fff;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { color: var(--text-secondary); background: transparent; }
.btn-sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.btn-lg { min-height: 48px; padding: 12px 24px; font-size: 15px; }

.hero {
  min-height: 690px;
  padding: 150px 24px 80px;
  background: rgb(12, 9, 114);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy { max-width: 680px; }
.hero .eyebrow { color: rgba(255,255,255,0.7); }
.hero h1 { color: #fff; }
.hero .hero-copy p { color: #fff; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.4); }
.hero .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

.section-dark { background: rgb(12, 9, 114); }
.section-dark .eyebrow { color: rgba(255,255,255,0.7); }
.section-dark .section-header h2 { color: #fff; }
.section-dark .ad-type-card { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.18); }
.section-dark .ad-type-card h4 { color: #fff; font-size: 22px; }
.section-dark .ad-type-card p { color: #fff; font-size: 17px; }
.section-dark .ad-type-icon { background: rgba(255,255,255,0.15); color: #fff; }

.eyebrow {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.hero h1,
.page-hero h1 {
  font-size: 48px;
  line-height: 1.18;
  font-weight: 760;
  letter-spacing: 0;
  margin-bottom: 60px;
}
.hero p,
.page-hero p {
  color: var(--text-primary);
  font-size: 20px;
  max-width: 720px;
  font-weight: 500;
}
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.hero-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px;
}
.panel-header,
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.panel-header span,
.metric-row span { color: var(--text-secondary); }
.panel-header strong { color: var(--text-primary); font-size: 13px; }
.metric-row strong { font-size: 22px; }
.mini-chart {
  height: 130px;
  margin-top: 22px;
  display: flex;
  align-items: end;
  gap: 12px;
}
.mini-chart span {
  flex: 1;
  min-width: 20px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #5b82dc, #d8e3ff);
}

.hero-stats {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.stat-item {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: 0; }
.stat-value {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 760;
  color: var(--text-primary);
}
.stat-label {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.section {
  padding: 84px 24px;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-header {
  text-align: center;
  max-width: 960px;
  margin: 0 auto 44px;
}
.section-header.align-left {
  text-align: left;
  margin-left: 0;
}
.section-header h2,
.cta-inner h2,
.about-layout h2,
.contact-layout h2 {
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 14px;
}
.section-header p:not(.eyebrow),
.about-layout p,
.contact-layout p {
  color: var(--text-secondary);
  font-size: 16px;
}
.cta-inner p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 680px;
}
.bg-gray { background: var(--bg); }

.features-list {
  border-top: 1px solid var(--border);
}
.feature-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}
.feature-icon {
  color: var(--primary);
  font-weight: 760;
  font-size: 28px;
}
.feature-text h3 {
  font-size: 28px;
  margin-bottom: 10px;
}
.feature-text p {
  max-width: 820px;
  color: var(--text-primary);
  font-size: 18px;
}

.ad-types-grid,
.steps-grid,
.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.steps-grid {
  grid-template-columns: 1fr;
}
.ad-type-card,
.capability-grid article,
.model-card,
.contact-form,
.about-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.ad-type-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 18px;
}
.ad-type-icon svg { display: block; }
.ad-type-card h4,
.capability-grid h3,
.model-card h3 {
  font-size: 19px;
  margin-bottom: 9px;
}
.step-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ad-type-card p,
.model-card p,
.model-card li {
  color: var(--text-secondary);
  font-size: 15px;
}
.capability-grid p {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 500;
}
.step-card span {
  color: rgb(12, 9, 114);
  font-weight: 760;
  font-size: 28px;
}
.cta-section {
  padding: 0 24px 40px;
  background: #fff;
  color: var(--text-primary);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.cta-inner h2 { color: var(--text-primary); }

.page-main { padding-top: var(--nav-height); position: relative; z-index: 1; }
.page-hero {
  padding: 120px 24px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.page-hero p { margin: 0 auto; }
.page-hero-canvas {
  position: relative;
  overflow: visible;
  max-width: none;
  background: transparent;
}
.page-hero-canvas h1 { color: #fff !important; }
.page-hero-canvas p { color: #fff !important; margin: 0 auto; }
.ph-bg-canvas {
  position: absolute;
  top: -66px;
  left: 0;
  width: 100%;
  height: calc(100% + 66px);
  z-index: -1;
  pointer-events: none;
}
.product-block {
  display: grid;
  grid-template-columns: 1fr 540px;
  align-items: center;
  gap: 28px;
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}
.product-block:first-child { padding-top: 0; }
.product-block.reverse { grid-template-columns: 540px 1fr; }
.product-block.reverse > div:first-child { order: 2; }
.product-block h2 {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 12px 0;
}
.product-block p {
  font-size: 22px;
  color: var(--text-primary);
  margin: 0 0 20px 0;
  line-height: 1.5;
}
.product-visual {
  min-height: 340px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 760;
}
.product-visual span {
  padding: 8px 12px;
  background: rgba(255,255,255,.86);
  border-radius: 6px;
}

.plain-list li,
.model-card li {
  position: relative;
  padding-left: 18px;
  margin: 0;
  font-size: 20px;
  color: var(--text-primary);
}
.plain-list li::before,
.model-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.model-tabs {
  display: flex;
  width: fit-content;
  margin: 0 auto 34px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.model-tab {
  padding: 10px 20px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 600;
}
.model-tab.active {
  background: var(--primary);
  color: #fff;
}
.model-content { display: none; }
.model-content.active { display: block; }
.model-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.model-card ul { margin-top: 18px; }

.about-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: start;
}
.about-layout p + p { margin-top: 14px; }
.about-card dl div {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.about-card dl div:first-child { padding-top: 0; }
.about-card dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.about-card dt {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 4px;
}
.about-card dd { color: var(--text-primary); }
.contact-list {
  margin-top: 30px;
  display: grid;
  gap: 18px;
}
.contact-list h4 { font-size: 16px; }
.contact-form .btn { width: 100%; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}
.form-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  background: #fff;
}
.form-input:focus {
  border-color: var(--primary);
}
textarea.form-input { min-height: 118px; resize: vertical; }

.footer {
  padding: 54px 24px 28px;
  background: rgb(12, 9, 114);
  color: #fff;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-logo {
  color: #fff;
  font-size: 24px;
  font-weight: 760;
  margin-bottom: 10px;
}
.footer h4 {
  color: #fff;
  font-size: 17px;
  margin-bottom: 12px;
}
.footer p,
.footer a {
  color: #fff;
  font-size: 16px;
  line-height: 2;
}
.footer a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-size: 15px;
}

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 11px 22px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
}
.toast.success { border-color: #b7dfc4; color: var(--success); }
.toast.error { border-color: #efb6b6; color: var(--danger); }
.toast.info { border-color: #b9c9f0; color: var(--primary); }

.dashboard-page {
  padding-top: calc(var(--nav-height) + 24px);
  min-height: 100vh;
  background: var(--bg);
}
.dash-inner { max-width: var(--max-width); margin: 0 auto; padding: 24px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dash-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.dash-card, .dash-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.dash-card .label { color: var(--text-muted); font-size: 13px; }
.dash-card .value { color: var(--text-primary); font-size: 27px; font-weight: 760; }
.dash-card .change { font-size: 12px; margin-top: 5px; }
.dash-card .change.up { color: var(--success); }
.dash-card .change.down { color: var(--danger); }
.dash-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 24px; }
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th, .dash-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.dash-table th { color: var(--text-muted); font-weight: 600; }
.hidden { display: none !important; }

@media (max-width: 1024px) {
  .hero-inner,
  .about-layout,
  .contact-layout,
  .product-block,
  .product-block.reverse {
    grid-template-columns: 1fr;
  }
  .product-block.reverse > div:first-child { order: 0; }
  .stats-grid,
  .ad-types-grid,
  .capability-grid,
  .dash-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .model-cards { grid-template-columns: 1fr; }
  .dash-charts { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--nav-height);
    background: rgb(12,9,114);
    border-bottom: none;
    padding: 12px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: grid; gap: 4px; }
  .hero { min-height: auto; padding: 118px 18px 56px; }
  .hero-inner { gap: 34px; }
  .hero h1, .page-hero h1 { font-size: 34px; }
  .hero p, .page-hero p { font-size: 16px; }
  .section { padding: 58px 18px; }
  .page-hero { padding: 58px 18px 44px; }
  .stats-grid,
  .ad-types-grid,
  .capability-grid,
  .dash-cards,
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .stat-item { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: 0; }
  .feature-row { grid-template-columns: 1fr; gap: 8px; }
  .section-header h2,
  .cta-inner h2,
  .about-layout h2,
  .contact-layout h2 {
    font-size: 30px;
  }
  .cta-inner { align-items: flex-start; flex-direction: column; }
  .model-tabs { width: 100%; }
  .model-tab { flex: 1; padding-left: 10px; padding-right: 10px; }
}
