:root {
  --bg: #07070f;
  --bg-elev: #0e0e1a;
  --panel: #12121f;
  --panel-2: #171728;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5fb;
  --muted: #9b9bb3;
  --purple: #6d5efc;
  --purple-2: #8b7cff;
  --purple-deep: #4f46e5;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --cyan: #22d3ee;
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --shadow: 0 40px 100px rgba(80, 60, 200, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 10px 14px;
  background: #fff;
  color: #000;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.bg-waves {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-waves canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.site {
  position: relative;
  z-index: 2;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 16px 0 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--purple), var(--purple-deep));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(109, 94, 252, 0.45);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-text {
  background: transparent;
  color: var(--muted);
  min-height: auto;
  padding: 8px 10px;
}

.btn-text:hover {
  color: var(--text);
  transform: none;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(139, 124, 255, 0.35);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(109, 94, 252, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-glass:hover {
  border-color: rgba(139, 124, 255, 0.6);
  box-shadow: 0 0 24px rgba(109, 94, 252, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-2), var(--purple));
  color: #fff;
  box-shadow: 0 12px 32px rgba(109, 94, 252, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 16px 40px rgba(109, 94, 252, 0.55);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 48px 0 28px;
  text-align: center;
}

.hero h1 {
  margin: 0 auto;
  max-width: 16ch;
  font-size: clamp(2.4rem, 5.2vw, 3.85rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 750;
}

.hero-lead {
  margin: 18px auto 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Product stage */
.stage {
  position: relative;
  padding: 36px 0 80px;
}

.stage-glow {
  position: absolute;
  left: 50%;
  top: 35%;
  width: min(900px, 90vw);
  height: 420px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(109, 94, 252, 0.45), rgba(79, 70, 229, 0.12) 45%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: glow-pulse 5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.app-shell {
  position: relative;
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 620px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #12121f, #0c0c16);
  box-shadow: var(--shadow), 0 0 0 1px rgba(109, 94, 252, 0.08);
  overflow: hidden;
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  animation: stage-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes stage-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.play-orb {
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 5;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(12, 12, 22, 0.55);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(109, 94, 252, 0.4);
  animation: play-pulse 2.4s ease-out infinite;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-orb:hover {
  transform: scale(1.06);
  background: rgba(109, 94, 252, 0.35);
}

.play-orb svg {
  margin-left: 3px;
}

@keyframes play-pulse {
  0% {
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(109, 94, 252, 0.45);
  }
  70% {
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45), 0 0 0 22px rgba(109, 94, 252, 0);
  }
  100% {
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(109, 94, 252, 0);
  }
}

.app-shell.is-playing .play-orb {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  background: rgba(255, 255, 255, 0.015);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.side-brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--purple);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 550;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.side-nav a.is-active {
  color: #fff;
  background: rgba(109, 94, 252, 0.18);
  box-shadow: inset 3px 0 0 var(--purple);
}

.side-nav .ico {
  width: 18px;
  opacity: 0.85;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.search {
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.86rem;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #6366f1);
}

.profile strong {
  display: block;
  font-size: 0.84rem;
}

.profile span {
  color: var(--muted);
  font-size: 0.72rem;
}

.app-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpi {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 14px;
  padding: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.kpi:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 124, 255, 0.35);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kpi-top span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.kpi-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(109, 94, 252, 0.16);
  color: var(--purple-2);
  font-size: 0.85rem;
}

.kpi strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.kpi .delta {
  margin-top: 4px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
}

.charts {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 12px;
}

.chart-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 14px;
  padding: 16px;
}

.chart-card h3 {
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 650;
}

.bars {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 180px;
  padding-top: 8px;
}

.bar {
  flex: 1;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--purple-2), rgba(109, 94, 252, 0.25));
  transform-origin: bottom;
  transform: scaleY(0.08);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.bar.is-on {
  transform: scaleY(1);
}

.bar span {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  min-height: 200px;
}

.donut {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(
    var(--purple) 0 38%,
    var(--cyan) 38% 62%,
    var(--amber) 62% 74%,
    #64748b 74% 86%,
    var(--red) 86% 100%
  );
  mask: radial-gradient(circle 46px, transparent 98%, #000 100%);
  -webkit-mask: radial-gradient(circle 46px, transparent 98%, #000 100%);
  animation: donut-spin 12s linear infinite;
}

@keyframes donut-spin {
  to {
    filter: hue-rotate(12deg);
  }
}

.legend {
  display: grid;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

/* Features */
.section {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 40px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--purple-2);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.section-head p {
  margin: 12px 0 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 124, 255, 0.35);
  box-shadow: 0 20px 50px rgba(80, 60, 200, 0.18);
}

.feature .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(109, 94, 252, 0.16);
  color: var(--purple-2);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Logos */
.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  opacity: 0.55;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.7);
}

/* CTA */
.cta-band {
  margin: 20px 0 80px;
  padding: 48px;
  border-radius: 24px;
  border: 1px solid rgba(139, 124, 255, 0.25);
  background:
    radial-gradient(ellipse at 80% 20%, rgba(109, 94, 252, 0.35), transparent 50%),
    linear-gradient(145deg, #12121f, #0a0a14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-band h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.cta-band p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 36ch;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 28px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}

.site-footer .logo {
  color: var(--text);
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.85rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

/* Page */
.page-hero {
  padding: 64px 0 28px;
  text-align: center;
}

.page-hero h1 {
  margin: 0 auto;
  max-width: 16ch;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 14px auto 0;
  max-width: 38rem;
  color: var(--muted);
}

.form-panel {
  max-width: 480px;
  margin: 0 auto 80px;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  padding: 0 14px;
  outline: none;
}

.field textarea {
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

.form-success {
  display: none;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  margin-bottom: 14px;
}

.form.is-sent .form-success {
  display: block;
}

.form.is-sent .form-fields {
  display: none;
}

/* Motion system */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.hero-copy > * {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-copy > *:nth-child(1) {
  animation-delay: 0.05s;
}
.hero-copy > *:nth-child(2) {
  animation-delay: 0.18s;
}
.hero-copy > *:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(109, 94, 252, 0.18), transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
  mix-blend-mode: screen;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-copy > *,
  .reveal,
  .app-shell,
  .stage-glow,
  .play-orb,
  .donut,
  .bar {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .cursor-glow {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .kpis,
  .charts,
  .feature-grid,
  .footer-grid,
  .donut-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .cta-band {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 820px) {
  .menu-btn {
    display: grid;
  }

  .nav {
    display: none;
  }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 20px;
    right: 20px;
    flex-direction: column;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(10, 10, 18, 0.96);
  }

  .header-actions .btn-text {
    display: none;
  }

  .site-header {
    position: relative;
  }
}
