:root {
  color-scheme: dark;
  --bg: #0b1220;
  --text: #eef2f8;
  --text-soft: #b7c0d0;
  --muted: #7f8aa0;
  --line: rgba(238, 242, 248, 0.1);
  --panel: rgba(18, 26, 43, 0.78);
  --accent-a: #1a6cf6;
  --accent-b: #00c4a7;
  --warn: #e0b35a;
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-brand: 'Syncopate', ui-sans-serif, system-ui, sans-serif;

  /* Layout system */
  --page-max: 1120px;
  --page-gutter: clamp(1.25rem, 3vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6rem);
  --stack-sm: 0.75rem;
  --stack-md: 1.25rem;
  --stack-lg: 2rem;
  --stack-xl: 2.75rem;
  --header-h: 4.5rem;
  --radius: 1rem;
  --radius-sm: 0.625rem;
  --col-gap: clamp(1.25rem, 2.5vw, 2rem);
  --card-pad: clamp(1.25rem, 2vw, 1.5rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(100% - (var(--page-gutter) * 2), var(--page-max));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.brand__mark {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, var(--accent-a) 0%, var(--accent-b) 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.brand__mark-dot {
  position: absolute;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #fff;
  top: 0.38rem;
  left: 50%;
  transform: translateX(-50%);
}

.brand__mark-bar {
  position: absolute;
  width: 1.05rem;
  height: 0.18rem;
  border-radius: 999px;
  background: #fff;
  bottom: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
}

.brand__word {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
}

.site-nav {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  min-width: 0;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.header-cta {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.45);
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease;
}

.header-cta:hover {
  border-color: rgba(238, 242, 248, 0.24);
  background: rgba(26, 108, 246, 0.12);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: max(36rem, calc(100svh - var(--header-h)));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 75% 35%, rgba(26, 108, 246, 0.28), transparent 60%),
    radial-gradient(ellipse 55% 45% at 15% 75%, rgba(0, 196, 167, 0.18), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #101a2e 50%, #0b1220 100%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite;
}

.hero__glow--a {
  width: min(48vw, 480px);
  height: min(48vw, 480px);
  top: 6%;
  right: 4%;
  background: radial-gradient(circle, rgba(26, 108, 246, 0.65), transparent 70%);
}

.hero__glow--b {
  width: min(40vw, 380px);
  height: min(40vw, 380px);
  left: 4%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(0, 196, 167, 0.5), transparent 70%);
  animation-delay: -7s;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(238, 242, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 242, 248, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 88%);
}

.hero__signal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  opacity: 0.4;
  pointer-events: none;
}

.hero__signal-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  font-family: var(--font-brand);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(238, 242, 248, 0.35);
  animation: marquee 28s linear infinite;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - (var(--page-gutter) * 2), var(--page-max));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3.5rem, 8vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--stack-xl);
  align-items: center;
}

.hero__copy {
  min-width: 0;
  max-width: 36rem;
}

.hero__badge {
  margin: 0 0 var(--stack-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 108, 246, 0.35);
  background: rgba(26, 108, 246, 0.12);
  color: #9fd0ff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: rise 0.9s ease both;
}

.hero__badge::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--accent-b);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero__brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  letter-spacing: 0.16em;
  background: linear-gradient(120deg, #ffffff 8%, #9fd0ff 48%, #7ef0d8 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.9s ease 0.05s both;
}

.hero__headline {
  margin: 0 0 var(--stack-md);
  max-width: 100%;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  animation: rise 0.9s ease 0.1s both;
}

.hero__headline-em {
  background: linear-gradient(120deg, #9fd0ff 0%, #7ef0d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__support {
  margin: 0 0 var(--stack-lg);
  max-width: 34rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.6;
  animation: rise 0.9s ease 0.16s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s ease 0.24s both;
}

.hero__panel {
  width: 100%;
  min-width: 0;
  animation: rise 1s ease 0.28s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
  box-shadow: 0 10px 30px rgba(26, 108, 246, 0.25);
}

.btn--primary:hover {
  opacity: 0.95;
}

.btn--ghost {
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.35);
  backdrop-filter: blur(8px);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: rgba(238, 242, 248, 0.22);
}

/* ─── Sections ─── */
.section {
  width: min(100% - (var(--page-gutter) * 2), var(--page-max));
  margin: 0 auto;
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--stack-xl);
}

.section__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--stack-lg);
  align-items: stretch;
}

.section__copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0;
}

.section__eyebrow {
  margin: 0 0 var(--stack-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-b);
}

.section h2 {
  margin: 0 0 var(--stack-md);
  max-width: 20ch;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section__lead {
  margin: 0;
  max-width: 38rem;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.section__note {
  margin: var(--stack-md) 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.section--cta {
  text-align: left;
  justify-items: start;
}

.section--cta h2 {
  max-width: 22ch;
}

.section--cta .btn {
  margin-top: 0.25rem;
}

/* ─── Viz panels / charts ─── */
.section__media,
.hero__panel .viz-panel {
  min-width: 0;
}

.viz-panel {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.125rem);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  padding: 1.15rem 1.2rem 1.25rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.85rem;
  backdrop-filter: blur(10px);
}

.viz-panel--compact {
  grid-template-rows: auto auto auto;
}

.viz-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.viz-panel__live {
  color: var(--accent-b);
  flex-shrink: 0;
}

.viz-panel__live::before {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: var(--accent-b);
  vertical-align: middle;
}

.chart-frame {
  width: 100%;
  min-width: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.chart-frame--area {
  aspect-ratio: 16 / 7;
}

.chart-frame--bars {
  aspect-ratio: 16 / 5;
}

.chart-frame--radar {
  aspect-ratio: 10 / 7;
  max-width: 16rem;
  margin-inline: auto;
}

.chart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart__grid {
  stroke: rgba(238, 242, 248, 0.08);
  stroke-width: 1;
  fill: none;
}

.chart__line {
  fill: none;
  stroke: #7eb6ff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart__bar {
  fill: rgba(126, 182, 255, 0.35);
}

.chart__bar--accent {
  fill: rgba(26, 108, 246, 0.75);
}

.chart__bar--teal {
  fill: rgba(0, 196, 167, 0.75);
}

.chart__radar-grid {
  fill: none;
  stroke: rgba(238, 242, 248, 0.12);
  stroke-width: 1;
}

.chart__radar-fill {
  fill: rgba(26, 108, 246, 0.22);
  stroke: rgba(126, 182, 255, 0.85);
  stroke-width: 1.5;
}

.chart__radar-dot {
  fill: #7eb6ff;
}

.chart__radar-dot.teal {
  fill: var(--accent-b);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding-top: 0.15rem;
}

.metric-strip > div {
  min-width: 0;
}

.metric-strip__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.metric-strip__value {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-strip__value--ok,
.metric-strip__value--teal {
  color: var(--accent-b);
}

.bar-chart {
  display: grid;
  gap: 0.8rem;
}

.bar-chart__row {
  display: grid;
  grid-template-columns: minmax(0, 7.25rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.bar-chart__row > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-chart__track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(238, 242, 248, 0.08);
  overflow: hidden;
  min-width: 0;
}

.bar-chart__track i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-a), #7eb6ff);
}

.bar-chart__track i.is-low {
  background: linear-gradient(90deg, rgba(127, 138, 160, 0.7), rgba(127, 138, 160, 0.35));
}

.bar-chart__track i.is-warn {
  background: linear-gradient(90deg, #c4892f, var(--warn));
}

.flow-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, auto));
  align-items: center;
  justify-content: start;
  gap: 0.35rem;
  min-width: 0;
}

.flow-chart__node {
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.flow-chart__node.is-accent {
  border-color: rgba(26, 108, 246, 0.45);
  color: #9fd0ff;
  background: rgba(26, 108, 246, 0.14);
}

.flow-chart__node.is-teal {
  border-color: rgba(0, 196, 167, 0.4);
  color: #7ef0d8;
  background: rgba(0, 196, 167, 0.12);
}

.flow-chart__arrow {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ─── Feature cards ─── */
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--col-gap);
  align-items: stretch;
}

.feature-grid > li {
  position: relative;
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: var(--card-pad);
  padding-right: calc(var(--card-pad) + 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 26, 43, 0.4);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.feature-grid > li:hover {
  border-color: rgba(126, 182, 255, 0.28);
  background: rgba(18, 26, 43, 0.58);
  transform: translateY(-2px);
}

.feature-grid strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  padding-right: 0.5rem;
}

.feature-grid .card__text {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1 1 auto;
}

.icon-tile {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(26, 108, 246, 0.28);
  background: linear-gradient(160deg, rgba(26, 108, 246, 0.18), rgba(0, 196, 167, 0.08));
  color: #9fd0ff;
  flex-shrink: 0;
}

.icon-tile svg {
  width: 1.2rem;
  height: 1.2rem;
}

.step-index {
  position: absolute;
  top: var(--card-pad);
  right: var(--card-pad);
  font-family: var(--font-brand);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(238, 242, 248, 0.22);
  line-height: 1;
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 2.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.mini-bars i {
  display: block;
  width: 0.4rem;
  height: var(--h);
  border-radius: 999px;
  background: linear-gradient(180deg, #7eb6ff, var(--accent-b));
  opacity: 0.85;
}

/* ─── Footer ─── */
.site-footer {
  width: min(100% - (var(--page-gutter) * 2), var(--page-max));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--stack-md);
}

.site-footer__brand {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
}

.site-footer__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.brand--footer .brand__word {
  font-size: 0.85rem;
}

.site-footer__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2vw, 1.5vh, 0) scale(1.05);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

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

/* ─── Breakpoints ─── */
@media (min-width: 720px) {
  .feature-grid,
  .feature-grid--steps,
  .feature-grid--pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid--audiences {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .site-nav {
    display: flex;
  }

  .header-cta {
    margin-left: 0;
  }

  /* Hero: ~58% copy / 42% viz */
  .hero__content {
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .hero__copy {
    max-width: none;
  }

  /* Section intro: ~60% copy / 40% media */
  .section__intro {
    grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr);
    gap: clamp(1.75rem, 3vw, 2.75rem);
    align-items: center;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (max-width: 719px) {
  .flow-chart {
    grid-template-columns: repeat(4, minmax(0, auto));
    row-gap: 0.45rem;
  }

  .flow-chart__arrow:nth-of-type(3) {
    display: none;
  }

  .metric-strip__value {
    font-size: 0.74rem;
  }

  .bar-chart__row {
    grid-template-columns: minmax(0, 6.25rem) minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__glow,
  .hero__signal-track,
  .hero__badge,
  .hero__brand,
  .hero__headline,
  .hero__support,
  .hero__actions,
  .hero__panel,
  .hero__badge::before,
  .feature-grid > li {
    animation: none;
    transition: none;
  }
}
