/* Bento Orbs — dark animated-metrics design system
   Tokens first: one accent family (purple), one success (green), monochrome ink. */

:root {
  --bg: #0B0B0E;
  --tile: #131318;
  --tile-2: #17171D;
  --line: rgba(255, 255, 255, 0.07);
  --ink: #F4F4F5;
  --muted: #9B9BA4;
  --faint: #6B6B74;
  --accent: #8B7CF6;
  --accent-soft: #A78BFA;
  --accent-dim: #5B4FB8;
  --success: #4ADE80;
  --radius: 18px;
  --pad: 22px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

/* ---------- header ---------- */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* ---------- bento grid ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 14px;
}

.tile {
  position: relative;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tile:hover { background: var(--tile-2); }

.label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.tile h2, .orbs-section h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
}

.tile-foot { margin-top: auto; padding-top: 14px; }

/* layout (desktop) */
.t-revenue      { grid-column: 1 / 5; grid-row: 1; }
.t-map          { grid-column: 5 / 7; grid-row: 1 / 3; }
.t-integrations { grid-column: 1 / 3; grid-row: 2 / 4; }
.t-growth       { grid-column: 3 / 5; grid-row: 2; }
.t-spark        { grid-column: 3 / 7; grid-row: 3; }

/* ---------- revenue tile ---------- */

.big-number-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 14px 0 10px;
}

.big-number {
  font-size: clamp(34px, 4.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.delta {
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.delta.up { color: var(--success); }
.delta.down { color: #F87171; }

.chart-bars { width: 100%; height: 120px; display: block; }

/* ---------- map tile ---------- */

.chart-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.t-map .tile-foot { position: relative; }
.t-map { min-height: 300px; }

/* ---------- integrations ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
  color: var(--ink);
  animation: chip-float 5s ease-in-out infinite;
}
.chip:nth-child(2n) { animation-delay: -1.6s; }
.chip:nth-child(3n) { animation-delay: -3.1s; }

.chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  box-shadow: 0 0 8px var(--c, var(--accent));
}

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---------- growth tile ---------- */

.t-growth {
  justify-content: center;
  background:
    radial-gradient(120% 140% at 30% 0%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(120% 160% at 70% 100%, rgba(139, 124, 246, 0.20), transparent 55%),
    var(--tile);
}

.huge {
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #FFFFFF, #B9C8F0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(139, 124, 246, 0.35);
}

.huge-sub {
  margin: 6px 0 14px;
  font-size: 14px;
  color: var(--muted);
}

.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.stat {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  color: var(--ink);
  backdrop-filter: blur(4px);
}

/* ---------- sparkline ---------- */

.chart-spark { width: 100%; height: 130px; display: block; }

/* ---------- orbs section ---------- */

.orbs-section { margin-top: 44px; }

.orbs-head { margin-bottom: 18px; }

.orbs-live {
  flex-direction: row;
  align-items: center;
  gap: 22px;
  margin-bottom: 14px;
  background:
    radial-gradient(90% 160% at 12% 50%, rgba(139, 124, 246, 0.10), transparent 60%),
    var(--tile);
}

.live-status {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.orbs-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 10px;
}

.orb-cell {
  margin: 0;
  padding: 14px 8px 10px;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.orb-cell figcaption {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.orb { display: block; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .t-revenue, .t-map, .t-integrations, .t-growth, .t-spark {
    grid-column: auto / span 2;
    grid-row: auto;
  }
  .t-map { min-height: 260px; }
  .orbs-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .t-revenue, .t-map, .t-integrations, .t-growth, .t-spark { grid-column: auto; }
  .orbs-live { flex-direction: column; align-items: flex-start; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .chip { animation: none; }
}
