/* ========================
   BASE STYLES
======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0D1117;
  --surface: #161B22;
  --surface2: #1C2128;
  --border: #30363D;
  --text: #E6EDF3;
  --text-muted: #8B949E;
  --text-dim: #6E7681;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --green: #3FB950;
  --amber: #E3B341;
  --red: #F85149;
  --cream: #F5F0E8;
  --cream-dark: #E8E0D0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Instrument Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================
   NAVBAR
======================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:last-child {
  background: var(--accent);
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-links a:last-child:hover { background: var(--accent-hover); color: white; }

/* ========================
   HERO
======================== */
.hero-section {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(37,99,235,0.3);
  color: #93C5FD;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: #3FB950;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-headline {
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.headline-accent {
  background: linear-gradient(135deg, #60A5FA, #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  color: white;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-muted);
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
}

.proof-avatars {
  display: flex;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  margin-left: -8px;
}
.proof-avatars .avatar:first-child { margin-left: 0; }

.hero-social-proof span {
  font-size: 13px;
  color: var(--text-dim);
}

/* Dashboard Preview */
.hero-right {
  position: relative;
}

.dashboard-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

.preview-topbar {
  background: var(--surface2);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.preview-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #FF5F57; }
.dot.yellow { background: #FEBC2E; }
.dot.green { background: #28C840; }

.preview-title {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'Instrument Sans', sans-serif;
}

.preview-body {
  display: flex;
  height: 320px;
}

.preview-sidebar {
  width: 48px;
  background: var(--surface2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
}

.sidebar-item {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
}

.sidebar-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.preview-main {
  flex: 1;
  padding: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.kpi-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.kpi-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.kpi-value {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.kpi-trend {
  font-size: 11px;
  font-weight: 500;
}
.kpi-trend.up { color: var(--green); }
.kpi-trend.neutral { color: var(--text-dim); }
.kpi-trend.down { color: var(--red); }

.ai-panel {
  background: var(--surface2);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 10px;
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.ai-panel-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.ai-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.ai-msg {
  font-size: 11px;
  line-height: 1.5;
  padding: 6px 8px;
  border-radius: 8px;
  max-width: 90%;
}

.ai-msg.user {
  background: rgba(37,99,235,0.15);
  color: #93C5FD;
  align-self: flex-end;
}

.ai-msg.bot {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  align-self: flex-start;
  font-size: 10px;
}

.ai-input {
  margin-top: auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.ai-placeholder {
  font-size: 11px;
  color: var(--text-dim);
}

/* ========================
   CHAOS SECTION
======================== */
.chaos-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.chaos-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.chaos-text { }

.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.chaos-headline {
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}

.chaos-body {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.chaos-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chaos-diagram {
  position: relative;
  width: 320px;
  height: 320px;
}

.chaos-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 2px solid var(--red);
  border-radius: 16px;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  text-align: center;
}

.chaos-center span {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--red);
}

.chaos-node {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.chaos-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.chaos-node span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.chaos-lines {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

/* ========================
   FEATURES
======================== */
.features-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

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

.section-headline {
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(37,99,235,0.4);
  transform: translateY(-2px);
}

.feature-main {
  grid-column: span 1;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(37,99,235,0.03));
  border-color: rgba(37,99,235,0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-list li {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.feature-list li::before {
  content: '→';
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* ========================
   PRICING
======================== */
.pricing-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  position: relative;
}

.pricing-popular {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(37,99,235,0.08), var(--surface));
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 100px;
}

.plan-name {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 8px;
}

.currency {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
}

.plan-price > :not(.currency) {
  font-family: 'Syne', sans-serif;
  font-size: 52px;
  font-weight: 800;
  color: var(--text);
}

.period {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 400;
}

.plan-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.plan-features li {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.check { color: var(--green); font-weight: 700; }

.plan-cta {
  display: block;
  text-align: center;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}

.plan-cta:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.plan-cta-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.plan-cta-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: white; }

.pricing-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

/* ========================
   CLOSING
======================== */
.closing-section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closing-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(37,99,235,0.06) 0%, transparent 70%);
}

.closing-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 60%);
}

.closing-content {
  position: relative;
  z-index: 2;
}

.closing-headline {
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.closing-body {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 20px;
}

.closing-cta {
  margin-top: 40px;
}

.btn-large {
  font-size: 17px;
  padding: 18px 36px;
}

/* ========================
   FOOTER
======================== */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand { max-width: 280px; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--text-muted); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a:hover { color: var(--text-muted); }

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-right {
    order: -1;
  }
  .chaos-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto 32px;
  }
  .footer-top {
    flex-direction: column;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .hero-section { padding: 100px 0 64px; }
  .hero-headline { font-size: 36px; }
  .features-grid { grid-template-columns: 1fr; }
  .nav-links a:not(:last-child) { display: none; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-links { gap: 32px; }
  .closing-section { padding: 80px 0; }
}
