/* CubeAPM Profiles Preview — presentation HTML
   single-page scroll, dark default, mobile-first */

:root {
  --bg: #0a0c10;
  --bg-soft: #11141b;
  --bg-card: #161a23;
  --bg-card-hover: #1c2230;
  --border: #232a3a;
  --border-strong: #2f3a52;
  --text: #e7eaf0;
  --text-dim: #9aa2b5;
  --text-faint: #5d6680;
  --accent: #ff9332;
  --accent-soft: rgba(255, 147, 50, 0.12);
  --accent-strong: #ffb46d;
  --java: #f0a040;
  --go: #79d3df;
  --python: #5da9ff;
  --node: #a8d36b;
  --ruby: #ef5a5a;
  --dotnet: #b076e6;
  --php: #9b85d8;
  --native: #6d7891;
  --good: #58d68d;
  --warn: #ffd24a;
  --bad: #f87171;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.45), 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, monospace;
  font-feature-settings: 'ss02' 0, 'calt' 1, 'liga' 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 200ms ease;
}
a:hover { border-bottom-color: var(--accent); }

/* ---------- top nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.nav-brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #ff5a3b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #1a1004;
  font-weight: 800;
}
.nav-brand-flame {
  width: 22px;
  height: 22px;
  display: inline-block;
  filter: drop-shadow(0 0 8px rgba(255, 147, 50, 0.45));
  animation: flame-flicker 3.4s ease-in-out infinite;
  transform-origin: 50% 80%;
}
@keyframes flame-flicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  35%      { transform: scale(1.04, 0.97) rotate(-1deg); }
  65%      { transform: scale(0.97, 1.04) rotate(1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-brand-flame { animation: none; }
}
.nav-brand-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  margin-left: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 13px;
}
.nav-links a {
  color: var(--text-dim);
  border-bottom: none;
}
.nav-links a:hover { color: var(--text); border-bottom: none; }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- layout ---------- */
.section {
  padding: 120px 24px 100px;
  max-width: var(--maxw);
  margin: 0 auto;
  scroll-margin-top: 80px;
}
.section.compact { padding: 80px 24px 60px; }
.section.hero { padding-top: 160px; padding-bottom: 80px; }

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

h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  background: linear-gradient(180deg, #fff 0%, #c0c8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
p { color: var(--text-dim); margin: 0 0 18px; }
p.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  max-width: 760px;
}

/* ---------- hero ---------- */
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent) 0%, #ff5a3b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 36px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 60px;
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  transition: border-color 200ms ease, transform 200ms ease;
}
.stat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* mini animated flame */
.hero-flame {
  margin: 60px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 110px;
  filter: drop-shadow(0 4px 20px rgba(255, 147, 50, 0.25));
}
.hero-flame-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent), #d04a1f 80%);
  border-radius: 3px 3px 0 0;
  animation: flame-pulse 2.8s ease-in-out infinite;
  transform-origin: bottom;
  opacity: 0.85;
}
@keyframes flame-pulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.78); }
}

/* ---------- generic cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.card:hover { border-color: var(--border-strong); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- feature blocks ---------- */
.feature {
  margin-bottom: 100px;
}
.feature-head {
  margin-bottom: 28px;
  max-width: 780px;
}
.feature-num {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.feature-shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-2);
  margin: 28px 0;
}
.feature-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.feature-shot-caption {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}

/* gallery for grids of small screenshots */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
}
@media (max-width: 880px) {
  .gallery { grid-template-columns: 1fr; }
}
.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease;
}
.gallery-item:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}
.gallery-item-label {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gallery-item-label .badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* runtime gallery with per-runtime accents */
.runtime-card {
  position: relative;
}
.runtime-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rt-color, var(--accent));
  z-index: 1;
}
.runtime-card[data-rt="java"]     { --rt-color: var(--java); }
.runtime-card[data-rt="go"]       { --rt-color: var(--go); }
.runtime-card[data-rt="python"]   { --rt-color: var(--python); }
.runtime-card[data-rt="node"]     { --rt-color: var(--node); }
.runtime-card[data-rt="ruby"]     { --rt-color: var(--ruby); }
.runtime-card[data-rt="dotnet"]   { --rt-color: var(--dotnet); }
.runtime-card[data-rt="php"]      { --rt-color: var(--php); }
.runtime-card[data-rt="native"]   { --rt-color: var(--native); }
.runtime-card .gallery-item-label .badge {
  background: rgba(255, 255, 255, 0.04);
  color: var(--rt-color);
}

/* ---------- code blocks ---------- */
.code-block {
  background: #06080d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: #d8dee9;
  overflow-x: auto;
  position: relative;
  white-space: pre;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}
.code-block::-webkit-scrollbar { height: 6px; }
.code-block::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.code-block .kw { color: #ff9d6e; }
.code-block .str { color: #a3d7a3; }
.code-block .num { color: #88c0d0; }
.code-block .cm { color: var(--text-faint); font-style: italic; }
.code-block .key { color: #e4c07a; }

.code-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 200ms;
}
.code-copy:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.code-copy.copied { background: var(--good); color: #062b14; border-color: var(--good); }

/* ---------- diagrams ---------- */
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 28px 0;
}
.flow-node {
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 13px;
  min-width: 120px;
}
.flow-node strong { display: block; margin-bottom: 4px; color: var(--text); }
.flow-node span { color: var(--text-dim); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.flow-arrow {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}
@media (max-width: 720px) {
  .flow-arrow { transform: rotate(90deg); }
  .flow-diagram { flex-direction: column; }
}

/* ---------- tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-card);
}
.table tr:hover td { background: var(--bg-card); }
.table .mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.tag-good { background: rgba(88, 214, 141, 0.12); color: var(--good); }
.tag-warn { background: rgba(255, 210, 74, 0.12); color: var(--warn); }
.tag-bad  { background: rgba(248, 113, 113, 0.12); color: var(--bad); }

/* ---------- callout ---------- */
.callout {
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%);
  border: 1px solid var(--accent);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  color: var(--text);
}
.callout strong { color: var(--accent-strong); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.2, 0.6, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
.footer p { color: var(--text-faint); margin: 6px 0; }
.footer .mono { color: var(--text-dim); }

/* ---------- utilities ---------- */
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.spacer { height: 40px; }
.spacer-lg { height: 80px; }
.text-mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-dim); }
.muted { color: var(--text-dim); }
.center { text-align: center; }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 50%, transparent);
  margin: 60px 0;
}

/* small pill list for "what ships" */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}
.pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--good);
}
.pill.warn::before { background: var(--warn); }
.pill.dim::before { background: var(--text-faint); }
.pill.dim { color: var(--text-dim); }
