/* Profine — landing page styles */
:root {
  --bg: #0B0F14;
  --bg-2: #0E141B;
  --surface: #131A22;
  --steel: #2A2F36;
  --steel-2: #1B2128;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.10);
  --text: #E6ECF1;
  --text-dim: #8A95A3;
  --text-faint: #5B6573;
  --accent: #00D1C7;
  --accent-soft: rgba(0, 209, 199, 0.14);
  --accent-glow: rgba(0, 209, 199, 0.35);
  --red: #FF5D6C;
  --green: #38E1A8;

  /* Density (overridden by tweaks) */
  --pad-section: 110px;
  --pad-block: 24px;
  --type-base: 16px;
  --type-h1: clamp(44px, 5.6vw, 84px);
  --type-h2: clamp(30px, 3.2vw, 48px);
  --type-eyebrow: 12px;
}

[data-density="compact"] {
  --pad-section: 76px;
  --pad-block: 18px;
  --type-base: 15px;
  --type-h1: clamp(36px, 4.8vw, 68px);
  --type-h2: clamp(26px, 2.6vw, 38px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", "Geist Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: var(--type-base);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.mono {
  font-family: "Geist Mono", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-feature-settings: "zero", "ss02";
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  position: relative;
  padding-top: var(--pad-section);
  padding-bottom: var(--pad-section);
}

.eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: var(--type-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.022em; }
h1 { font-size: var(--type-h1); line-height: 1.02; }
h2 { font-size: var(--type-h2); line-height: 1.05; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 500; }

p { margin: 0; color: var(--text-dim); }

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

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: backdrop-filter 0.3s, background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(11, 15, 20, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 16px;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), #57f6e8 80%);
  position: relative;
  box-shadow: 0 0 14px var(--accent-glow);
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 2px;
  background: var(--bg);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 1px;
  background: var(--accent);
}
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #04221F;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px -8px var(--accent-glow);
}
.btn-primary:hover {
  background: #1cdfd5;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 32px -8px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.03); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.2s;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(11,15,20,0.85) 0%, transparent 50%),
    radial-gradient(70% 50% at 50% 50%, transparent 0%, var(--bg) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero h1 {
  margin-top: 22px;
  max-width: 960px;
}
.hero h1 .accent {
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.hero-telemetry {
  width: min(680px, 100%);
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(13,20,27,0.64), rgba(9,13,18,0.48));
  backdrop-filter: blur(12px);
}
.telemetry-cell {
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.telemetry-cell:last-child {
  border-right: 0;
}
.telemetry-value {
  display: block;
  color: #dffffb;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(0,209,199,0.28);
}
.telemetry-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-sub {
  margin-top: 26px;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-dim);
}
.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 56px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  max-width: 760px;
}
.hero-meta .stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-meta .stat-num {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  font-family: "Geist Mono", monospace;
}
.hero-meta .stat-num em { font-style: normal; color: var(--accent); }
.hero-meta .stat-label {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Geist Mono", monospace;
}
@media (max-width: 820px) {
  .hero-telemetry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .telemetry-cell:nth-child(2) {
    border-right: 0;
  }
  .telemetry-cell:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* ── Section header pattern ─────────────────────────────── */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  margin-bottom: 56px;
  align-items: end;
}
.section-head h2 { max-width: 520px; }
.section-head p { font-size: 17px; max-width: 520px; }
@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}

/* ── How it works ───────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.step {
  background: var(--bg-2);
  padding: 36px 32px 40px;
  position: relative;
  transition: background 0.3s;
}
.step:hover { background: #111821; }
.step-num {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}
.step-icon {
  width: 100%;
  height: 140px;
  margin: 22px 0 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.step h3 { margin-bottom: 10px; }
.step p { font-size: 15px; }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
}

/* step icon visuals (CSS-only diagrams) */
.viz-profile, .viz-rewrite, .viz-measure {
  position: absolute;
  inset: 0;
}
.viz-profile {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
}
.viz-profile .bar {
  position: absolute;
  bottom: 18px;
  width: 8px;
  background: var(--steel);
  border-radius: 2px 2px 0 0;
  transform-origin: bottom;
  transition: background 0.25s, transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.step:hover .viz-profile .bar { transform: scaleY(0.85); }
.step:hover .viz-profile .bar.hot { transform: scaleY(1.18); background: #57f6e8; box-shadow: 0 0 18px var(--accent-glow); }
.viz-profile .bar.hot { background: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }

.viz-rewrite {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 18px;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  background-image:
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 6px);
}
.viz-rewrite .row-line {
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  align-items: center;
  gap: 10px;
}
.viz-rewrite .row-line .from {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-color: rgba(255,93,108,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viz-rewrite .row-line .to {
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viz-rewrite .row-line .arr {
  color: var(--text-faint);
  text-align: center;
  font-size: 11px;
}

.viz-measure {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.viz-measure .baseline,
.viz-measure .optimized {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--text-faint);
}
.viz-measure .track {
  flex: 1;
  height: 6px;
  background: var(--steel-2);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.viz-measure .fill {
  height: 100%;
  border-radius: 3px;
}
.viz-measure .baseline .fill { background: var(--steel); width: 100%; }
.viz-measure .optimized .fill {
  background: linear-gradient(90deg, var(--accent), #5dffec);
  width: 12%;
  box-shadow: 0 0 12px var(--accent-glow);
}
.viz-measure .label-w { width: 56px; }
.viz-measure .val { width: 36px; text-align: right; color: var(--text-dim); }
.viz-measure .optimized .val { color: var(--accent); }

/* ── Code diff ──────────────────────────────────────────── */
.diff-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.diff-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
}
.diff-bar .dots { display: flex; gap: 6px; }
.diff-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.diff-bar .file { color: var(--text-dim); }
.diff-bar .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.diff-bar .badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 209, 199, 0.5); }
  100% { box-shadow: 0 0 0 10px rgba(0, 209, 199, 0); }
}
.diff-body {
  font-family: "Geist Mono", monospace;
  font-size: 13.5px;
  line-height: 1.7;
  padding: 18px 0;
  position: relative;
  overflow-x: auto;
}
.diff-line {
  display: grid;
  grid-template-columns: 56px 22px 1fr;
  align-items: baseline;
  padding: 0 18px;
  position: relative;
  white-space: pre;
  transition: background 0.3s;
}
.diff-line .ln { color: var(--text-faint); user-select: none; text-align: right; padding-right: 18px; }
.diff-line .sign { color: var(--text-faint); }
.diff-line.ctx .code { color: var(--text-dim); }
.diff-line.del { background: rgba(255, 93, 108, 0.06); }
.diff-line.del .sign { color: var(--red); }
.diff-line.del .code { color: #f9b3ba; }
.diff-line.add { background: rgba(56, 225, 168, 0.07); }
.diff-line.add .sign { color: var(--green); }
.diff-line.add .code { color: #b5f5db; }
.diff-line .kw { color: #b18cff; }
.diff-line .fn { color: var(--accent); }
.diff-line .str { color: #ffd17a; }
.diff-line .num { color: #ffd17a; }
.diff-line .com { color: var(--text-faint); }
.diff-line.hidden { display: none; }
.diff-line.appearing {
  animation: lineIn 0.45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes lineIn {
  from { opacity: 0; transform: translateY(-4px); background: rgba(0,209,199,0.18); }
  to   { opacity: 1; transform: translateY(0); }
}

.diff-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
}
.diff-foot .changes span { margin-right: 14px; }
.diff-foot .changes .plus { color: var(--green); }
.diff-foot .changes .minus { color: var(--red); }

/* ── Metrics ────────────────────────────────────────────── */
.metrics-band {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(0,209,199,0.10), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.metrics-head {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.metrics-head .label {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.metrics-head .target {
  font-size: 15px;
  color: var(--text);
}
.metrics-head .target b { color: var(--text); font-weight: 500; }
.metrics-head .target .gpu { color: var(--accent); }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.metric-cell {
  background: var(--bg-2);
  padding: 36px 32px 38px;
}
.metric-cell .name {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.metric-cell .big {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 22px;
  color: var(--text);
}
.metric-cell .big .num {
  font-family: "Geist Mono", monospace;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.metric-cell .big .unit {
  font-family: "Geist Mono", monospace;
  font-size: 18px;
  color: var(--accent);
}
.metric-cell .compare {
  display: grid;
  grid-template-columns: 88px 1fr 60px;
  gap: 10px;
  align-items: center;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
}
.metric-cell .compare .track {
  height: 6px;
  border-radius: 3px;
  background: var(--steel-2);
  overflow: hidden;
  position: relative;
}
.metric-cell .compare .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
  width: 0;
}
.metric-cell .compare.row-baseline .fill { background: var(--steel); }
.metric-cell .compare.row-profine .fill {
  background: linear-gradient(90deg, var(--accent), #6cffee);
  box-shadow: 0 0 12px var(--accent-glow);
}
.metric-cell .compare .val { text-align: right; color: var(--text-dim); }
.metric-cell .compare.row-profine .val { color: var(--accent); }
.metric-cell .compare.row-profine .name-c { color: var(--text); }

@media (max-width: 820px) {
  .metrics-grid { grid-template-columns: 1fr; }
}

.metrics-foot {
  padding: 22px 32px;
  border-top: 1px solid var(--line);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
}
.metrics-foot a { color: var(--text-dim); }
.metrics-foot a:hover { color: var(--accent); }

/* ── CTA / Footer ───────────────────────────────────────── */
.cta-band {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 64px 48px;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(0,209,199,0.10), transparent 60%),
    var(--bg-2);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 60% at 50% 50%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, black, transparent 80%);
  opacity: 0.6;
}
.cta-band > * { position: relative; }
.cta-band h2 { max-width: 720px; margin: 0 auto 16px; }
.cta-band p { max-width: 520px; margin: 0 auto 32px; font-size: 17px; }

.email-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.2s;
}
.email-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.email-form input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
}
.email-form input::placeholder { color: var(--text-faint); }
.email-form .btn { padding: 9px 16px; }
.cta-status {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  margin-top: 14px;
  min-height: 16px;
  letter-spacing: 0.04em;
}

footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 80px;
}
.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--text-faint);
}
.foot-links { display: flex; gap: 24px; }
.foot-links a:hover { color: var(--text); }

/* ── Reveal on scroll ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1); will-change: transform, opacity; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal-x { opacity: 0; transform: translateX(-18px); transition: opacity 0.9s cubic-bezier(.2,.8,.2,1), transform 0.9s cubic-bezier(.2,.8,.2,1); }
.reveal-x.in { opacity: 1; transform: none; }

/* Magnetic primary CTA glow follow */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  width: 80px; height: 80px;
  left: var(--mx, -40px); top: var(--my, -40px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.45), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover::before { opacity: 1; }

/* ── Subtle grain ───────────────────────────────────────── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}


/* ── Pipeline (flow band) ───────────────────────────────── */
.flow-band {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(50% 100% at 50% 0%, rgba(0,209,199,0.08), transparent 60%),
    var(--bg-2);
  padding: 32px 28px 36px;
  overflow: hidden;
}
.flow-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 100%;
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  pointer-events: none;
}

.flow-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(11,15,20,0.6);
  margin-bottom: 28px;
  position: relative;
}
.flow-mode button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.005em;
  transition: color 0.2s, background 0.2s;
}
.flow-mode button:hover { color: var(--text); }
.flow-mode button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.flow-mode button.on .dot-loop,
.flow-mode button.on .dot-manual { box-shadow: 0 0 8px currentColor; }
.flow-mode .tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.dot-loop, .dot-manual {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block;
  background: var(--accent);
  color: var(--accent);
}
.dot-manual { background: #ffd17a; color: #ffd17a; }

.flow-rail-wrap {
  position: relative;
  padding: 30px 12px 26px;
}
.flow-rail {
  position: absolute;
  left: calc(8.333% + 12px);
  right: calc(8.333% + 12px);
  top: 56px;
  height: 2px;
  pointer-events: none;
}
.rail-bg {
  position: absolute; inset: 0;
  background: linear-gradient(to right, transparent, var(--line-2) 8%, var(--line-2) 92%, transparent);
}
.rail-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(to right, transparent, var(--accent) 6%, var(--accent) 94%, transparent);
  box-shadow: 0 0 14px var(--accent-glow);
  transition: width 1.6s cubic-bezier(.2,.8,.2,1);
}
.flow-band.lit .rail-fill { width: 100%; }

.rail-tokens {
  position: absolute; inset: 0;
  pointer-events: none;
}
.rail-tokens .tok {
  position: absolute;
  top: -2px;
  width: 22px; height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  filter: blur(0.4px);
  opacity: 0;
  animation: tokRun 4.8s linear infinite;
}
@keyframes tokRun {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { transform: translateX(calc(100cqw - 22px)); opacity: 0; }
}
.flow-rail { container-type: inline-size; }

.flow-stages {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  position: relative;
}
.flow-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  opacity: 0;
  transform: translateY(8px);
  animation: stageIn 0.6s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i) * 0.12s + 0.15s);
}
.flow-band:not(.lit) .flow-stage { animation: none; opacity: 0; }
@keyframes stageIn {
  to { opacity: 1; transform: none; }
}

.stage-node {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  transition: color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  z-index: 2;
}
.flow-band.lit .stage-node {
  color: var(--accent);
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(0,209,199,0.06), 0 0 22px rgba(0,209,199,0.12);
}
.flow-stage:hover .stage-node {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,209,199,0.12), 0 0 28px var(--accent-glow);
}
.node-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(0,209,199,0.25);
  opacity: 0;
  transition: opacity 0.3s;
  animation: nodeSpin 16s linear infinite;
}
.flow-band.lit .node-ring { opacity: 1; }
@keyframes nodeSpin {
  to { transform: rotate(360deg); }
}
.node-core {
  display: grid;
  place-items: center;
}
.node-num {
  position: absolute;
  bottom: -22px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.stage-meta {
  margin-top: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stage-label {
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.005em;
  text-transform: lowercase;
  font-weight: 500;
}
.stage-sub {
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* loopback arc — only visible in loop mode */
.flow-loopback {
  position: absolute;
  left: 0; right: 0; bottom: -20px;
  height: 80px;
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.flow-band.mode-loop.lit .flow-loopback { opacity: 1; }
.flow-band.mode-manual .flow-loopback { opacity: 0; }

.flow-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  font-size: 12px;
  color: var(--text-faint);
  flex-wrap: wrap;
}
.flow-foot .dot-loop, .flow-foot .dot-manual { margin-right: 6px; }
.flow-foot .kbd {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--accent);
}

.hot-bar { stroke: var(--accent); }

@media (max-width: 820px) {
  .flow-stages { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .flow-rail { display: none; }
  .flow-loopback { display: none; }
  .flow-stage::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -18px;
    height: 18px;
    width: 1px;
    background: var(--line-2);
    transform: translateX(-50%);
  }
}

/* Tighter pairing: pipeline → github */
#flow { padding-bottom: calc(var(--pad-section) * 0.4); }
#github { padding-top: calc(var(--pad-section) * 0.4); }

/* ── GitHub CTA ─────────────────────────────────────────── */
.gh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 30px 0 24px;
  text-align: left;
}
@media (max-width: 820px) {
  .gh-grid { grid-template-columns: 1fr; }
}
.gh-card {
  position: relative;
  padding: 28px 28px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.gh-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(0,209,199,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.gh-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 30px 60px -30px rgba(0,209,199,0.18);
}
.gh-card:hover::before { opacity: 1; }
.gh-card.gh-cli::before {
  background: radial-gradient(80% 60% at 100% 0%, rgba(255,209,122,0.08), transparent 60%);
}
.gh-card.gh-cli:hover { border-color: rgba(255,209,122,0.3); box-shadow: 0 30px 60px -30px rgba(255,209,122,0.18); }
.gh-card > * { position: relative; }

.gh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg);
}
.gh-card header h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 14px 0 8px;
  color: var(--text);
}
.gh-card header p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 46ch;
  margin: 0;
}

.gh-cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  cursor: copy;
  transition: border-color 0.2s, background 0.2s;
  user-select: all;
}
.gh-cmd:hover { border-color: var(--accent-soft); background: rgba(0,209,199,0.03); }
.gh-cmd .prompt { color: var(--accent); }
.gh-cmd .cmd { flex: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-cmd .cmd-dim { color: var(--text-faint); }
.gh-cmd .copy {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 3px 7px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.gh-cmd:hover .copy { color: var(--accent); border-color: var(--accent-soft); }

.gh-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.gh-bullets li {
  position: relative;
  padding-left: 22px;
}
.gh-bullets li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 8px; height: 1px;
  background: var(--accent);
}

.gh-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.gh-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-faint);
  flex-wrap: wrap;
}
.gh-foot a { color: var(--text-dim); }
.gh-foot a:hover { color: var(--accent); }
