*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-muted: #8b8b9e;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --green: #34d399;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 600px;
  height: 600px;
  background: var(--accent-glow);
  top: -200px;
  right: -100px;
  opacity: 0.4;
}

.bg-glow--2 {
  width: 400px;
  height: 400px;
  background: rgba(52, 211, 153, 0.15);
  bottom: 20%;
  left: -100px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}

.logo__text {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo__text small {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-muted);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.15);
}

.btn--full {
  width: 100%;
}

/* Typography */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 30%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 16px;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 160px 0 80px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero__desc {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.hero__tags {
  display: flex;
  gap: 8px;
}

.hero__tags span {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s;
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.stat-card--highlight {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
}

.stat-card__value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card--highlight .stat-card__value {
  color: var(--accent-light);
}

.stat-card__label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Overview strip */
.overview {
  position: relative;
  z-index: 1;
  padding: 0 0 80px;
}

.overview__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.overview__item {
  background: var(--bg);
  padding: 32px 24px;
  text-align: center;
}

.overview__num {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.overview__text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Metrics */
.metrics {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.metrics__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.3s;
}

.metric-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
}

.metric-card__icon {
  width: 40px;
  height: 40px;
  color: var(--accent-light);
  margin-bottom: 20px;
}

.metric-card__icon svg {
  width: 100%;
  height: 100%;
}

.metric-card__value {
  display: block;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
}

.metric-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.metric-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.metric-card__bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.metric-card__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  transition: width 1.2s ease;
}

/* Charts */
.charts {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.charts__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.chart-panel--wide {
  grid-column: 1 / -1;
}

.chart-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.chart-panel__head h3 {
  font-size: 16px;
  font-weight: 600;
}

.chart-panel__badge {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  color: var(--text-muted);
}

.chart-panel__badge--up {
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
}

/* Bar chart */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding-top: 20px;
}

.chart-bars__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bars__item::before {
  content: '';
  width: 100%;
  max-width: 40px;
  height: 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  border-radius: 6px 6px 2px 2px;
  transition: height 1s ease;
}

.chart-bars__item::after {
  content: attr(data-label);
  font-size: 11px;
  color: var(--text-muted);
}

/* Donut chart */
.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
}

.donut-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 12;
}

.donut-seg {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}

.donut-seg--1 { stroke: var(--accent); }
.donut-seg--2 { stroke: var(--accent-light); }
.donut-seg--3 { stroke: #a78bfa; }
.donut-seg--4 { stroke: rgba(255,255,255,0.2); }

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-center__value {
  font-size: 28px;
  font-weight: 700;
}

.donut-center__label {
  font-size: 11px;
  color: var(--text-muted);
}

.donut-legend {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.donut-legend li {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot--1 { background: var(--accent); }
.dot--2 { background: var(--accent-light); }
.dot--3 { background: #a78bfa; }
.dot--4 { background: rgba(255,255,255,0.2); }

/* Sparkline */
.sparkline {
  height: 80px;
  margin-bottom: 20px;
}

.sparkline svg {
  width: 100%;
  height: 100%;
}

.sparkline__line {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 2;
  stroke-linejoin: round;
}

.sparkline__area {
  fill: url(#sparkGrad);
}

.sparkline__stats {
  display: flex;
  justify-content: space-between;
}

.sparkline__label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.sparkline__val {
  font-size: 18px;
  font-weight: 600;
}

/* Modules */
.modules {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.modules__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all 0.3s;
}

.module-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
}

.module-card__num {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.module-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.module-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.module-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-card li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.module-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Contact */
.contact {
  position: relative;
  z-index: 1;
  padding: 80px 0 100px;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px;
}

.contact__info h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact__info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact__label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact__form input,
.contact__form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.contact__form input:focus,
.contact__form textarea:focus {
  border-color: var(--accent);
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: var(--text-muted);
}

.contact__form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .metrics__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts__grid {
    grid-template-columns: 1fr;
  }

  .modules__grid {
    grid-template-columns: 1fr;
  }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .overview__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics__grid {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    grid-template-columns: 1fr 1fr;
  }

  .footer__inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
