/* ── Design Tokens ── */
:root {
  --bg: #ffffff;
  --surface: #f4f8fc;
  --surface-strong: #e8f0fa;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0b4fd4;
  --primary-dark: #083a9e;
  --primary-soft: #e8f0ff;
  --accent: #059669;
  --accent-soft: #d1fae5;
  --teal: #0d9488;
  --border: #dbe4f0;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 80px rgba(15, 23, 42, 0.12);
  --radius: 20px;
  --radius-lg: 28px;
  --header-h: 72px;
  --transition: 0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Typography ── */
.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-header h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ── Buttons ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(11, 79, 212, 0.35);
}

.button-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 28px rgba(11, 79, 212, 0.4);
}

.button-secondary {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--border);
}

.button-secondary:hover {
  background: var(--primary-soft);
  border-color: rgba(11, 79, 212, 0.2);
}

.button-white {
  background: #fff;
  color: var(--primary);
}

.button-white:hover {
  box-shadow: var(--shadow-md);
}

.button-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.button-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.main-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 64px) 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(11, 79, 212, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(5, 150, 105, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-desc {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-item strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-item span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Mock Dashboard ── */
.mock-dashboard {
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mock-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(90deg, #f0f5ff, #f8fbff);
  border-bottom: 1px solid var(--border);
}

.mock-dots {
  display: flex;
  gap: 6px;
}

.mock-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.mock-dots span:first-child { background: #ff5f57; }
.mock-dots span:nth-child(2) { background: #febc2e; }
.mock-dots span:nth-child(3) { background: #28c840; }

.mock-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.mock-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.mock-content {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.chart-area {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 500;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}

.legend-retailer { background: #0b4fd4; }
.legend-wholesaler { background: #059669; }
.legend-distributor { background: #d97706; }
.legend-manufacturer { background: #7c3aed; }

#hero-chart {
  width: 100%;
  height: auto;
  display: block;
}

.order-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  border: 1px solid rgba(11, 79, 212, 0.15);
}

.order-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.order-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.order-value.bump {
  transform: scale(1.08);
}

.order-trend {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.order-trend.up {
  background: var(--accent-soft);
  color: var(--accent);
}

.order-trend.down {
  background: #fee2e2;
  color: #dc2626;
}

/* ── Sections ── */
.section {
  padding: 96px 0;
}

.section-light {
  background: var(--surface);
}

.section-white {
  background: var(--bg);
}

/* ── Feature Cards ── */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-card h3 {
  margin: 20px 0 12px;
  font-size: 1.2rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.icon-wrap svg {
  width: 26px;
  height: 26px;
}

.icon-blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-green {
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-teal {
  background: #ccfbf1;
  color: var(--teal);
}

/* ── Feature Grid ── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-box {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition);
}

.feature-box:hover {
  transform: translateY(-3px);
  border-color: rgba(11, 79, 212, 0.25);
}

.feature-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(11, 79, 212, 0.12);
  line-height: 1;
  margin-bottom: 16px;
}

.feature-box h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.feature-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Scene Cards ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.scene-card {
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.scene-card-alt {
  background: linear-gradient(160deg, #f0f5ff 0%, #fff 60%);
  border-color: rgba(11, 79, 212, 0.15);
}

.scene-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.scene-card h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.scene-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.scene-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.scene-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Process ── */
.process-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.process-step {
  flex: 1;
  max-width: 220px;
  text-align: center;
  padding: 0 12px;
}

.step-circle {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(11, 79, 212, 0.3);
}

.process-step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.process-connector {
  flex: 0 0 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin-top: 26px;
  opacity: 0.3;
}

/* ── CTA ── */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
}

.cta-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Footer ── */
.site-footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .brand {
  margin-bottom: 16px;
  color: #fff;
}

.footer-brand p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-grid h4 {
  margin: 0 0 20px;
  color: #fff;
  font-size: 0.95rem;
}

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

.footer-grid a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.contact-list li {
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.45);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-panel {
    order: -1;
  }

  .feature-cards,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    flex-wrap: wrap;
    gap: 24px;
  }

  .process-connector {
    display: none;
  }

  .process-step {
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions .button-primary {
    display: none;
  }

  .feature-cards,
  .grid-4,
  .grid-2,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .process-step {
    max-width: 100%;
  }

  .hero-stats {
    gap: 20px;
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .cta-actions {
    width: 100%;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
}
