/* ════════════════════════════════════════════════════════════════
   Meterflow — Home (Premium Redesign)
   Owns the visual system for the landing page.
   Requires: shared.css (design tokens + nav + buttons).
   Replaces: previous home.css, home-hero.css, premium.css.
   ════════════════════════════════════════════════════════════════ */

/* ─── Page scaffolding ─── */
html { scroll-behavior: smooth; }
body { background: var(--bg); letter-spacing: -0.005em; }

[id] { scroll-margin-top: 96px; }

main, section, footer, nav { position: relative; z-index: 1; }

/* ─── Free Access top bar ─── */
.free-access-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 20px;
  background: rgba(var(--accent-rgb), 0.08);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.free-access-topbar-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(var(--accent-rgb), 0); }
}
.free-access-topbar-text { color: var(--text-dim); }
.free-access-topbar-text strong { color: var(--accent); font-weight: 600; }
.free-access-topbar-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  background: var(--accent);
  color: #f8fafc;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.free-access-topbar-btn:hover { background: var(--accent-2); }
body.free-access-active nav { top: 0; }
body.free-access-active .hero { padding-top: clamp(168px, 18vh, 200px); }
@media (max-width: 768px) {
  .free-access-topbar { font-size: 11px; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
}

/* ════════════════════════════════════════════════════════════════
   HERO — centered, signature italic, clean gradient
   ════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(150px, 16vh, 190px) 24px clamp(28px, 4vh, 44px);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Subtle spotlight wash from top of hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 60% at 50% -15%, rgba(var(--accent-rgb), 0.08), transparent 65%),
    radial-gradient(50% 40% at 50% 0%, rgba(255, 255, 255, 0.03), transparent 70%);
  z-index: 0;
}

/* Particle field canvas — sits behind content */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* Hide old hero ornaments */
.hero-bg,
.hero-bg-grid,
.hero-dots,
.hero-falling-pattern,
.hero-grid-bg,
.hero-glow {
  display: none !important;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  gap: 0;
}

.hero-text { display: contents; }

/* Eyebrow chip */
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  margin-bottom: 36px;
  box-shadow: none;
}
.hero-label:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: none;
}
.hero-label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.hero-label .arrow { color: var(--accent); }

/* The signature headline */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 80px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 28px;
  max-width: 800px;
  text-wrap: balance;
}

.hero-headline .accent,
.hero-headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  -webkit-text-fill-color: currentColor;
  background: none;
  text-shadow: none;
  animation: none;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 580px;
  margin: 0;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Tab strip — small product tags under hero CTAs */
.hero-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.hero-tab.active,
.hero-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.hero-tab-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

/* Hide the legacy dashboard mock + chips from old hero */
.hero-panel,
.hero-chips,
.hero-trust { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   PRODUCT SHOWCASE — tabs + dashboard surface (zauth-style)
   ════════════════════════════════════════════════════════════════ */

/* Tabs row above the frame */
.showcase-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0 16px 28px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.showcase-tabs::-webkit-scrollbar { display: none; }
.showcase-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  scroll-snap-align: center;
}
.showcase-tab .stab-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.showcase-tab.active {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.18);
  color: var(--text);
}
.showcase-tab.active .stab-code { color: var(--accent); }
.showcase-tab:hover { color: var(--text); }
.showcase-tab:hover .stab-code { color: var(--accent); }

/* Frame */
.showcase {
  position: relative;
  padding: 0 16px clamp(100px, 12vh, 140px);
  display: flex;
  justify-content: center;
}
.showcase-frame {
  position: relative;
  width: 100%;
  max-width: 1080px;
  border-radius: 16px;
  background: linear-gradient(180deg, #161619, #111114);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 40px 100px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* Top status bar */
.showcase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.012);
}
.showcase-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
}
.showcase-status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}
.showcase-status .status-label { color: var(--text); font-weight: 500; }
.showcase-status .status-sep,
.showcase-status .status-detail { color: var(--text-muted); font-weight: 400; }

.showcase-score {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.showcase-score strong { color: var(--accent); font-weight: 600; margin-left: 6px; }

/* Progress bar — animates on reveal */
.showcase-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}
.showcase-progress .bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  transform: scaleX(0.04);
  transition: transform 1.4s var(--ease-out-expo);
}
.showcase.in .showcase-progress .bar { transform: scaleX(1); }

/* Body grid */
.showcase-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 360px;
}

/* ── Left: file tree ── */
.showcase-tree {
  padding: 18px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.85;
  overflow-x: hidden;
}
.tree-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.tree-head .tree-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.tree-head .tree-code.tree-code-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}
.tree-head-meta { margin-left: auto; color: var(--text-muted); font-size: 10.5px; }

.tree-folder-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  color: var(--text-dim);
  font-size: 12px;
}
.tree-folder-row .tree-chev {
  display: inline-block;
  width: 12px;
  color: var(--text-muted);
  font-size: 10px;
}
.tree-folder-row .tree-folder-icon {
  color: var(--accent);
  font-size: 11px;
  margin-right: 2px;
}
.tree-folder-row .tree-meta {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-muted);
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 26px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-dim);
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
}
.tree-item.nested { padding-left: 30px; }
.tree-item.top { padding-left: 4px; }
.tree-item.dim { color: var(--text-muted); }
.tree-item.dim .tree-meta { color: var(--text-muted); }
.tree-item .tree-file {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}
.tree-item .tree-file.ctrl { background: var(--warm); opacity: 0.9; }
.tree-item .tree-name { flex: 1; }
.tree-item .tree-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.tree-item .tree-meta.ok { color: var(--accent); }
.tree-item .tree-meta.warn { color: var(--warm); }

.tree-item.active {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent);
}
.tree-item.active .tree-file { background: var(--accent); opacity: 1; box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.7); }

.tree-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
  margin: 12px 4px 10px;
}

/* ── Right: two panes ── */
.showcase-detail {
  padding: 18px 18px 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.showcase-pane {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.012);
}
.pane-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pane-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.pane-meta.ok { color: var(--accent); }

.pane-code {
  margin: 0;
  padding: 14px 14px 14px 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--text-dim);
  white-space: pre;
  overflow-x: auto;
}
.pane-code .ln {
  display: inline-block;
  width: 18px;
  text-align: right;
  margin-right: 14px;
  color: var(--text-muted);
  opacity: 0.55;
  user-select: none;
}
.pane-code .kw { color: var(--accent); }
.pane-code .key { color: var(--accent-2); }
.pane-code .fn { color: var(--text); }
.pane-code .str { color: var(--sky-2); }
.pane-code .num { color: var(--warm); }
.pane-code .punct { color: var(--text-muted); }
.pane-code .ok { color: var(--sky); }
.pane-code .c { color: var(--text-muted); font-style: italic; }

.pane-rows {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  flex: 1;
}
.pane-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
  gap: 12px;
}
.pane-row:last-child { border-bottom: none; }
.pr-k { color: var(--text-muted); }
.pr-v { color: var(--text); text-align: right; }
.pr-v.is-muted { color: var(--text-muted); }
.pr-v.mono { font-family: var(--font-mono); }
.pr-v .check { color: var(--sky); margin-left: 6px; font-weight: 700; }

.pane-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
}
.pane-foot .sparkline {
  flex: 1;
  height: 28px;
  color: var(--sky);
  display: block;
}
.pane-foot .sparkline svg { width: 100%; height: 100%; }
.pane-foot-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Mobile layout ── */
@media (max-width: 880px) {
  .showcase-tabs { justify-content: flex-start; padding: 0 16px 22px; }
  .showcase-body { grid-template-columns: 1fr; min-height: 0; }
  .showcase-tree {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    max-height: 220px;
    overflow-y: auto;
  }
  .showcase-detail { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .pane-code { font-size: 11px; }
}
@media (max-width: 480px) {
  .showcase-bar { padding: 11px 14px; gap: 10px; }
  .showcase-status { font-size: 12px; gap: 6px; min-width: 0; }
  .showcase-status .status-detail {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 36vw;
  }
  .showcase-score { font-size: 10.5px; white-space: nowrap; }
  .showcase-tree { padding: 14px 12px; font-size: 12px; }
  .pane-head { padding: 8px 12px; }
  .pane-code { padding: 12px 12px 12px 6px; font-size: 10.5px; }
  .pane-code .ln { width: 14px; margin-right: 8px; }
  .pane-rows { font-size: 11px; padding: 6px 12px; }
}

/* ════════════════════════════════════════════════════════════════
   SECTION SCAFFOLDING
   ════════════════════════════════════════════════════════════════ */
.section {
  padding: clamp(72px, 10vh, 120px) 24px;
  position: relative;
}
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
.section-header {
  margin-bottom: 56px;
  max-width: 720px;
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.section-eyebrow-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0 0 18px;
  text-wrap: balance;
}
.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.section-sub {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════
   TRUSTED BY — clean brand strip
   ════════════════════════════════════════════════════════════════ */
.trusted {
  padding: 56px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.trusted-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}
.trusted-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.trusted-items {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.trusted-item {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: -0.005em;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.trusted-item:hover { opacity: 1; color: var(--text); }

/* ════════════════════════════════════════════════════════════════
   STATS — recharts-style card panels + bar charts
   ════════════════════════════════════════════════════════════════ */
.stats {
  padding: clamp(80px, 12vh, 140px) 24px;
}
.stats-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.stats-group {
  margin-bottom: 72px;
}
.stats-group:last-child { margin-bottom: 0; }

.stats-group-head {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stats-group-head .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
}
.stats-group-head .badge.emerald {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}
.stats-group-head .badge.sky {
  background: rgba(var(--sky-rgb), 0.12);
  color: oklch(78.9% .154 211.53);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  margin-bottom: 56px;
}
.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.032em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stats-group.sky-group .stat-number { color: oklch(78.9% .154 211.53); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ─── Bar chart ─── */
.chart-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.chart {
  position: relative;
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0 0 30px;
}

/* Horizontal grid lines via CSS gradient — plot area only */
.chart::before {
  content: '';
  position: absolute;
  inset: 0 0 30px 0;
  background:
    linear-gradient(to top, transparent 24.3%, rgba(255,255,255,0.045) 24.8%, transparent 25.3%),
    linear-gradient(to top, transparent 49.3%, rgba(255,255,255,0.045) 49.8%, transparent 50.3%),
    linear-gradient(to top, transparent 74.3%, rgba(255,255,255,0.045) 74.8%, transparent 75.3%),
    linear-gradient(to top, transparent 98.5%, rgba(255,255,255,0.08) 99%, transparent 99.5%);
  pointer-events: none;
  z-index: 0;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top,
    var(--accent-deep),
    var(--accent-2)
  );
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  position: relative;
  z-index: 1;
  opacity: 0.78;
  transform-origin: bottom;
  transform: scaleY(0.04);
  transition: transform 0.85s var(--ease-out-expo), opacity 0.18s ease, background 0.18s ease;
  cursor: default;
}
.chart.in .chart-bar { transform: scaleY(1); }
.chart .chart-bar:nth-child(2n)  { transition-delay: 0.03s; }
.chart .chart-bar:nth-child(3n)  { transition-delay: 0.06s; }
.chart .chart-bar:nth-child(5n)  { transition-delay: 0.10s; }
.chart .chart-bar:nth-child(7n)  { transition-delay: 0.14s; }
.chart .chart-bar:nth-child(11n) { transition-delay: 0.18s; }

.stats-group.sky-group .chart-bar {
  background: linear-gradient(to top,
    oklch(50% .134 242.749),
    oklch(78.9% .154 211.53)
  );
}

.chart-bar:hover {
  opacity: 1;
  background: linear-gradient(to top,
    var(--accent),
    #d9ecff
  );
}
.stats-group.sky-group .chart-bar:hover {
  background: linear-gradient(to top,
    oklch(58.8% .158 241.966),
    oklch(82.8% .111 230.318)
  );
}

.chart-empty {
  align-items: center;
  justify-content: center;
}

.chart-empty-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(156, 184, 220, 0.14);
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.74);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.chart-empty-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.48);
}

.sky-group .chart-empty-label::before {
  background: oklch(78.9% .154 211.53);
}

/* Tooltip — single per chart, JS-positioned */
.chart-tip {
  position: absolute;
  transform: translateX(-50%);
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.chart-tip.vis { opacity: 1; }

.chart-x {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

@media (max-width: 720px) {
  .stat-row { grid-template-columns: 1fr; gap: 24px; margin-bottom: 32px; }
  .chart { height: 130px; }
}

/* ════════════════════════════════════════════════════════════════
   TOOLS — 3-column product cards, hover lift
   ════════════════════════════════════════════════════════════════ */
.tools {
  padding: clamp(80px, 12vh, 140px) 24px;
}
.tools-inner {
  max-width: 1080px;
  margin: 0 auto;
}
/* ════════════════════════════════════════════════════════════════
   FAN STACK — Six Surfaces interactive carousel
   Replaces the flat tools-grid with a perspective card fan.
   ════════════════════════════════════════════════════════════════ */
:root {
  --fan-card-w: 400px;
  --fan-card-h: 284px;
}

.tools-fan-wrap {
  margin-top: 56px;
}

.tools-fan-stage {
  position: relative;
  height: calc(var(--fan-card-h) + 88px);
  perspective: 1100px;
  perspective-origin: 50% 50%;
  overflow: visible;
  outline: none;
}

/* All cards share an absolute center-anchor; JS applies offset transforms */
.fan-card {
  --fc-rgb: var(--accent-rgb); /* default; overridden by inline style per card */
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--fan-card-w);
  height: var(--fan-card-h);
  margin-top: calc(var(--fan-card-h) * -0.5);
  margin-left: calc(var(--fan-card-w) * -0.5);
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(var(--fc-rgb), 0.12);
  background:
    linear-gradient(160deg,
      rgba(var(--fc-rgb), 0.07) 0%,
      rgba(var(--fc-rgb), 0.02) 40%,
      transparent 70%
    ),
    var(--surface-2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 22px 60px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  will-change: transform, opacity;
  transform-style: preserve-3d;
  transition:
    transform 0.44s cubic-bezier(0.2, 0.65, 0.3, 1),
    opacity 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  text-decoration: none;
  color: inherit;
}

.fan-card--active {
  border-color: rgba(var(--fc-rgb), 0.32);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 0 1px rgba(var(--fc-rgb), 0.10),
    0 32px 80px rgba(0, 0, 0, 0.56),
    0 0 52px rgba(var(--fc-rgb), 0.09);
  cursor: grab;
}

.fan-card--active:active { cursor: grabbing; }

/* Large decorative watermark glyph */
.fan-card-wm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: min(160px, calc(var(--fan-card-h) * 0.58));
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: rgba(var(--fc-rgb), 0.055);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.fan-card-body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
}

.fan-card-hd {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fan-card-badge-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(var(--fc-rgb), 0.12);
  color: rgb(var(--fc-rgb));
  border: 1px solid rgba(var(--fc-rgb), 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.fan-card-badge-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}

.fan-card-desc {
  flex: 1;
  margin-top: 20px;
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.fan-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgb(var(--fc-rgb));
  text-decoration: none;
  opacity: 0.75;
  flex-shrink: 0;
  transition: gap 0.22s ease, opacity 0.22s ease;
}
.fan-card-cta:hover { gap: 10px; opacity: 1; }
.fan-card-cta svg { width: 11px; height: 11px; }

/* Navigation dots */
.tools-fan-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 26px;
}

.fan-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.22s ease, width 0.22s ease;
  outline: none;
}
.fan-dot:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.7);
  outline-offset: 3px;
}
.fan-dot.active {
  background: var(--accent);
  width: 20px;
}
.fan-dot:hover:not(.active) { background: rgba(255, 255, 255, 0.36); }

@media (max-width: 900px) {
  :root { --fan-card-w: 340px; --fan-card-h: 268px; }
}
@media (max-width: 540px) {
  :root { --fan-card-w: 290px; --fan-card-h: 252px; }
  .tools-fan-stage { perspective: 800px; }
  .fan-card-desc { -webkit-line-clamp: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .fan-card { transition: opacity 0.2s ease; }
}

/* ════════════════════════════════════════════════════════════════
   HOW IT WORKS — 3 steps, large italic numerals
   ════════════════════════════════════════════════════════════════ */
.how {
  padding: clamp(80px, 12vh, 140px) 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.how-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}
.how-step {
  display: flex;
  flex-direction: column;
}
.how-step-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 22px;
  letter-spacing: -0.02em;
}
.how-step-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0 0 12px;
  color: var(--text);
}
.how-step-desc {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}
@media (max-width: 820px) {
  .how-steps { grid-template-columns: 1fr; gap: 36px; }
}

/* ════════════════════════════════════════════════════════════════
   CTA card — clean, minimal glow
   ════════════════════════════════════════════════════════════════ */
.cta {
  padding: clamp(100px, 14vh, 160px) 24px;
}
.cta-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  padding: clamp(60px, 8vw, 90px) clamp(36px, 6vw, 72px);
  background: linear-gradient(180deg, #161619, #101013);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  text-align: left;
  overflow: hidden;
}
.cta-inner::before {
  content: '';
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(400px 280px at 12% 110%, rgba(var(--accent-rgb), 0.12), transparent 70%),
    radial-gradient(320px 220px at 90% -10%, rgba(var(--sky-rgb), 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.cta-inner > * { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0 0 16px;
  max-width: 640px;
}
.cta-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.cta-sub {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 0 30px;
}
.cta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════════
   FOOTER — topographic SVG lines + faded wordmark
   ════════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  min-height: 330px;
  padding: clamp(76px, 10vh, 116px) 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bg-deep);
  overflow: hidden;
}
.site-footer::before,
.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 200% 100%;
  will-change: transform;
}
.site-footer::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 600' preserveAspectRatio='none'><g fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.06'><path d='M0 540 C 200 480 360 460 520 480 S 880 540 1080 500 S 1440 460 1600 480'/><path d='M0 500 C 200 440 360 420 520 440 S 880 500 1080 460 S 1440 420 1600 440'/><path d='M0 460 C 200 400 360 380 520 400 S 880 460 1080 420 S 1440 380 1600 400'/><path d='M0 420 C 200 360 360 340 520 360 S 880 420 1080 380 S 1440 340 1600 360'/><path d='M0 380 C 200 320 360 300 520 320 S 880 380 1080 340 S 1440 300 1600 320'/><path d='M0 340 C 200 280 360 260 520 280 S 880 340 1080 300 S 1440 260 1600 280'/><path d='M0 300 C 200 240 360 220 520 240 S 880 300 1080 260 S 1440 220 1600 240'/><path d='M0 260 C 200 200 360 180 520 200 S 880 260 1080 220 S 1440 180 1600 200'/></g></svg>");
  opacity: 0.86;
  animation: footerWaveField 36s linear infinite;
}
.site-footer::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 600' preserveAspectRatio='none'><g fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.035'><path d='M0 520 C 220 470 380 450 540 470 S 900 530 1100 490 S 1460 460 1600 480'/><path d='M0 470 C 220 420 380 400 540 420 S 900 480 1100 440 S 1460 410 1600 430'/><path d='M0 420 C 220 370 380 350 540 370 S 900 430 1100 390 S 1460 360 1600 380'/><path d='M0 370 C 220 320 380 300 540 320 S 900 380 1100 340 S 1460 310 1600 330'/><path d='M0 320 C 220 270 380 250 540 270 S 900 330 1100 290 S 1460 260 1600 280'/><path d='M0 270 C 220 220 380 200 540 220 S 900 280 1100 240 S 1460 210 1600 230'/></g></svg>");
  animation: topoDriftB 108s linear infinite;
  mix-blend-mode: screen;
}

@keyframes topoDriftA {
  0%   { transform: translate3d(-2%,  0, 0); }
  50%  { transform: translate3d( 2%, -4px, 0); }
  100% { transform: translate3d(-2%,  0, 0); }
}
@keyframes topoDriftB {
  0%   { transform: translate3d( 2%,  0, 0); }
  50%  { transform: translate3d(-2%,  4px, 0); }
  100% { transform: translate3d( 2%,  0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .site-footer::before,
  .site-footer::after { animation: none; transform: none; }
}
.site-footer-wordmark {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(120px, 18vw, 220px);
  font-weight: 400;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: rgba(255, 255, 255, 0.034);
  pointer-events: none;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 0;
  line-height: 1;
  animation: footerWordmarkFloat 14s var(--ease-in-out) infinite;
}
.site-footer-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.site-footer-logo .brand-mark { width: 22px; height: 22px; color: var(--accent); }
.site-footer-tagline {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
  max-width: 320px;
}
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.2s ease;
}
.status-indicator:hover { color: var(--text); }
.status-indicator-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.5);
}
.status-indicator.degraded .status-indicator-dot { background: var(--warm); box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.status-indicator.offline .status-indicator-dot { background: var(--text-muted); box-shadow: none; }

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.site-footer-col a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-footer-col a:hover { color: var(--text); }

.site-footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.site-footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text-dim);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.site-footer-social svg { width: 14px; height: 14px; fill: currentColor; }
.site-footer-social:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}
.site-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: 12px;
  transition: gap 0.25s ease;
}
.site-footer-cta:hover { gap: 10px; }

.site-footer-bottom {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.site-footer-bottom-meta { color: var(--text-muted); }

@media (max-width: 920px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .site-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer-inner { grid-template-columns: 1fr; }
  .site-footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ════════════════════════════════════════════════════════════════
   FLOAT CTA — clean bottom-right launcher
   ════════════════════════════════════════════════════════════════ */
.float-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #0a0a0c;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.3);
  z-index: 100;
  transition: transform 0.25s ease, background 0.25s ease;
}
.float-cta:hover { transform: translateY(-2px); background: var(--accent-2); }
.float-cta .pulse {
  width: 6px; height: 6px;
  background: #04140d;
  border-radius: 50%;
  opacity: 0.7;
}
.float-cta svg { width: 14px; height: 14px; }
.float-cta.visible { display: inline-flex; }
@media (max-width: 600px) {
  .float-cta { bottom: 16px; right: 16px; font-size: 12px; padding: 9px 14px; }
}

/* ════════════════════════════════════════════════════════════════
   Scroll reveal — gentle fade-up
   ════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ════════════════════════════════════════════════════════════════
   Mobile refinements
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .hero { padding: clamp(112px, 14vh, 140px) 22px 28px; }
  .hero-headline {
    font-size: clamp(32px, 9vw, 52px);
    line-height: 1.08;
    margin-bottom: 22px;
  }
  .hero-sub { font-size: 15px; margin-bottom: 0; }
  .hero-actions { gap: 10px; margin-bottom: 0; }
  .hero-label { margin-bottom: 28px; font-size: 10.5px; }
  .section-title { font-size: clamp(28px, 7vw, 38px); }
  .section-header { margin-bottom: 36px; }
  .btn-primary, .btn-secondary { padding: 12px 22px; font-size: 13.5px; }
  .stats-group { margin-bottom: 56px; }
  .stat-row { gap: 36px; margin-bottom: 36px; }
  .stat-number { font-size: clamp(40px, 11vw, 56px); }
  .how-step-num { font-size: 44px; }
}

@media (max-width: 440px) {
  .hero-headline { font-size: clamp(28px, 9vw, 42px); }
  .hero-sub { font-size: 14.5px; }
  .stat-number { font-size: clamp(36px, 12vw, 48px); }
}
