/* ═══════════════════════════════════════════════
   MemMe — Neural Cartography
   Dark observatory meets memory architecture
   ═══════════════════════════════════════════════ */

:root {
  --bg:          #faf9f7;
  --bg-surface:  #f2f0ed;
  --bg-card:     #ffffff;
  --bg-elevated: #f7f5f2;
  --bg-code:     #1a1a2e;
  --text:        #1a1a2e;
  --text-secondary: #5c5a6e;
  --text-tertiary:  #9794a8;
  --accent:      #8b7cf6;
  --accent-glow: rgba(139, 124, 246, 0.1);
  --accent-dim:  #a99bf7;
  --green:       #0d9488;
  --blue:        #3b82f6;
  --red:         #ef4444;
  --orange:      #e97316;
  --purple:      #9333ea;
  --border:      rgba(0, 0, 0, 0.08);
  --border-hover:rgba(0, 0, 0, 0.15);
  --radius:      14px;
  --radius-sm:   8px;
  --font-display:'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body:   'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --max-width:   1120px;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ═══════════ NOISE OVERLAY ═══════════ */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.nav-logo:hover { opacity: 0.8; }

.nav-logo-icon { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.25s;
  position: relative;
}

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

.nav-links a.active { color: var(--accent); }

.nav-gh {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  opacity: 0.35;
  transition: opacity 0.2s;
}

.nav-gh:hover { opacity: 0.8; }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 2rem;
  animation: heroFadeIn 1.2s var(--ease-out) both;
}

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

.hero-badge {
  display: inline-block;
  padding: 0.3rem 1.1rem;
  border: 1px solid rgba(139, 124, 246, 0.25);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  background: rgba(139, 124, 246, 0.06);
  animation: heroFadeIn 1.2s var(--ease-out) 0.2s both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 14vw, 11rem);
  font-weight: 400;
  color: var(--text);
  line-height: 0.88;
  margin-bottom: 2.5rem;
  letter-spacing: -0.03em;
  animation: heroFadeIn 1.2s var(--ease-out) 0.3s both;
}

.hero-title-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 4rem;
  line-height: 1.85;
  font-weight: 300;
  animation: heroFadeIn 1.2s var(--ease-out) 0.5s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  animation: heroFadeIn 1.2s var(--ease-out) 0.7s both;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
}

.stat-value small {
  font-size: 0.5em;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 300;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  animation: scrollCue 2s ease-in-out infinite;
}

@keyframes scrollCue {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.7; transform: translateX(-50%) translateY(6px); }
}

.scroll-dot {
  animation: scrollDotBounce 2s ease-in-out infinite;
}

@keyframes scrollDotBounce {
  0%, 100% { cy: 7; }
  50% { cy: 14; }
}

/* ═══════════ SECTIONS ═══════════ */
.section {
  position: relative;
  padding: 8rem 0 6rem;
  overflow: visible;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.section-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.07;
  pointer-events: none;
}

.section-orb--amber { background: var(--accent); top: -200px; right: -200px; }
.section-orb--blue  { background: var(--blue);   top: -100px; left: -300px; }
.section-orb--green { background: var(--green);  bottom: -200px; right: -200px; }
.section-orb--red   { background: var(--red);    top: -200px; left: -200px; }
.section-orb--purple{ background: var(--purple);  bottom: -200px; left: -200px; }

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.section-number {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 400;
  color: var(--accent);
  opacity: 0.06;
  position: absolute;
  top: -4.5rem;
  left: -0.5rem;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3.5rem;
  max-width: 580px;
  font-weight: 300;
  position: relative;
  z-index: 1;
}

/* Scroll reveal */
.section .section-inner {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.section.visible .section-inner {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════ 01 PIPELINE — Flow Strip ═══════════ */
.pipe-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  overflow: visible;
  padding: 1.5rem 1rem 1rem;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

/* ── Stage Card ── */
.pipe-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.6rem 0.6rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  min-width: 78px;
  position: relative;
  transition: all 0.35s var(--ease-out);
  flex-shrink: 0;
}

.pipe-icon {
  width: 28px;
  height: 28px;
  color: var(--text-tertiary);
  transition: color 0.3s, transform 0.3s var(--ease-out);
}

.pipe-name {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

.pipe-num {
  position: absolute;
  top: -6px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
}

/* Hover */
.pipe-stage:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.pipe-stage:hover .pipe-icon { color: var(--text-secondary); }
.pipe-stage:hover .pipe-name { color: var(--text-secondary); }

/* Active */
.pipe-stage.active {
  border-color: var(--accent);
  background: var(--bg-card);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 28px rgba(139, 124, 246, 0.12), 0 0 0 3px var(--accent-glow);
}

.pipe-stage.active .pipe-icon {
  color: var(--accent);
  transform: scale(1.1);
}

.pipe-stage.active .pipe-name {
  color: var(--accent);
}

.pipe-stage.active .pipe-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Visited */
.pipe-stage.visited {
  border-color: rgba(139, 124, 246, 0.2);
}

.pipe-stage.visited .pipe-icon { color: var(--accent-dim); }
.pipe-stage.visited .pipe-name { color: var(--accent-dim); }

.pipe-stage.visited .pipe-num {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #fff;
}

/* ── Connector ── */
.pipe-connector {
  width: 36px;
  height: 2px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

/* Data packet animation */
.pipe-packet {
  position: absolute;
  top: -2px;
  left: -8px;
  width: 8px;
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(139, 124, 246, 0.6);
  opacity: 0;
  transition: none;
}

.pipe-connector.firing .pipe-packet {
  opacity: 1;
  animation: packetTravel 0.4s var(--ease-out) forwards;
}

@keyframes packetTravel {
  0% { left: -8px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% + 2px); opacity: 0; }
}

/* Visited connector fills */
.pipe-connector.visited {
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-dim));
}

/* Detail card */
.pipeline-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px var(--radius) var(--radius) 2px;
  padding: 2.5rem;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(139, 124, 246, 0.06);
}

.pipeline-detail h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.pipeline-detail .detail-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(139, 124, 246, 0.15);
}

.pipeline-detail p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.pipeline-detail .detail-code {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #b0adc4;
  overflow-x: auto;
  line-height: 1.7;
}

.detail-code .kw { color: #a78bfa; }
.detail-code .fn { color: #5eead4; }
.detail-code .str { color: #fb923c; }
.detail-code .cmt { color: #6b6880; }

/* Transform before/after */
.detail-transform {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: stretch;
  margin: 1.25rem 0;
}

.transform-box {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.transform-box small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.transform-in {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.transform-in small { color: var(--text-tertiary); }

.transform-out {
  background: rgba(139, 124, 246, 0.05);
  border: 1px solid rgba(139, 124, 246, 0.15);
  color: var(--text);
}

.transform-out small { color: var(--accent); }

.transform-content {
  word-break: break-word;
  white-space: pre-wrap;
}

.transform-arrow {
  display: flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.detail-top p {
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .detail-transform {
    grid-template-columns: 1fr;
  }
  .transform-arrow {
    justify-content: center;
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }
}

/* Pipeline Controls */
.pipeline-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.ctrl-play {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
}

.ctrl-play:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.ctrl-play.playing {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.controls-center {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
}

.controls-dim { color: var(--text-tertiary); }

.controls-right {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.speed-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transition: all 0.2s;
}

.speed-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border);
}

.speed-btn.active {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(0, 0, 0, 0.03);
}

/* ═══════════ 02 SEARCH ═══════════ */
.search-channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.channel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.channel-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--ch-color);
  border-radius: 3px 0 0 3px;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.channel:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.channel:hover .channel-bar { opacity: 1; }

.channel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.channel-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.channel-icon span {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ch-color);
}

.channel h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.channel-weight {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.channel p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 300;
}

.channel-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* RRF Fusion */
.rrf-fusion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.rrf-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.rrf-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
  position: relative;
}

.rrf-formula {
  margin-bottom: 1.25rem;
  position: relative;
}

.rrf-formula code {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: #e0dff0;
  background: var(--bg-code);
  padding: 0.6rem 2rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.rrf-desc {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 1.5rem;
  font-size: 0.9rem;
  font-weight: 300;
  position: relative;
}

.rrf-params {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
}

.rrf-param {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  background: rgba(0, 0, 0, 0.02);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.rrf-param em {
  color: var(--text-secondary);
  font-style: normal;
  font-weight: 500;
}

/* ═══════════ 03 MEDITATION ═══════════ */
.meditation-phases {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phase {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  transition: all 0.35s var(--ease-out);
  position: relative;
}

.phase:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.phase-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  min-width: 44px;
  line-height: 1;
  padding-top: 0;
  opacity: 0.2;
  transition: opacity 0.3s;
}

.phase:hover .phase-number { opacity: 0.5; }

.phase-content { flex: 1; }

.phase-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.phase-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.phase-code {
  margin-top: 0.5rem;
}

.phase-code code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #a78bfa;
  background: var(--bg-code);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid var(--border);
}

.phase-note {
  font-size: 0.78rem !important;
  color: var(--text-tertiary) !important;
  font-style: italic;
}

.phase-example {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 0.75rem;
}

.phase-input, .phase-output {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.phase-input small, .phase-output small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.phase-arrow {
  text-align: center;
  color: var(--accent-dim);
  padding: 0.3rem 0;
}

.phase-output ul {
  list-style: none;
  padding: 0;
}

.phase-output li {
  padding: 0.15rem 0;
  color: var(--green);
  font-size: 0.85rem;
}

.phase-output li::before {
  content: '+ ';
  font-weight: 600;
}

.recon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.recon-item {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.recon-desc {
  color: var(--text-tertiary);
  font-family: var(--font-body);
  margin-left: auto;
  font-size: 0.72rem;
}

.recon-item.add    { background: rgba(94, 234, 212, 0.08); color: var(--green); }
.recon-item.add .recon-dot { background: var(--green); }
.recon-item.update { background: rgba(96, 165, 250, 0.08); color: var(--blue); }
.recon-item.update .recon-dot { background: var(--blue); }

.phase-graph {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.graph-node {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
}

.graph-node.person  { background: rgba(96, 165, 250, 0.1); color: var(--blue);   border: 1px solid rgba(96, 165, 250, 0.25); }
.graph-node.concept { background: rgba(139, 124, 246, 0.08); color: var(--accent); border: 1px solid rgba(139, 124, 246, 0.2); }
.graph-node.place   { background: rgba(94, 234, 212, 0.08);  color: var(--green);  border: 1px solid rgba(94, 234, 212, 0.2); }

.graph-edge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.graph-edge span {
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--text-tertiary);
  position: relative;
}

.graph-edge span::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  border-left: 4px solid var(--text-tertiary);
  border-top: 2.5px solid transparent;
  border-bottom: 2.5px solid transparent;
}

/* ═══════════ 04 FORGETTING CURVE ═══════════ */
.forgetting-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.forgetting-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

#forgettingCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.chart-controls {
  margin-top: 1.25rem;
}

.chart-controls label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.control-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  min-width: 85px;
}

.chart-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  height: 3px;
  cursor: pointer;
}

.control-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  min-width: 24px;
  text-align: right;
}

.forgetting-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.formula-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.formula-card h4 {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.formula-main {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #e0dff0;
  display: block;
  background: var(--bg-code);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.formula-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.formula-params em {
  color: var(--text-secondary);
  font-style: normal;
  font-family: var(--font-mono);
}

.formula-card p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  font-weight: 300;
}

/* ═══════════ 05 ARCHITECTURE ═══════════ */
.arch-legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--dot-color);
}

.arch-treemap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.treemap-item {
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all 0.3s var(--ease-out);
  cursor: default;
  border: 1px solid;
}

.treemap-item:hover { transform: scale(1.02); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); }

.treemap-item.core     { background: rgba(139, 124, 246, 0.06); border-color: rgba(139, 124, 246, 0.15); grid-row: span 2; }
.treemap-item.provider { background: rgba(94, 234, 212, 0.05);  border-color: rgba(94, 234, 212, 0.12); }
.treemap-item.binding  { background: rgba(96, 165, 250, 0.05); border-color: rgba(96, 165, 250, 0.12); }
.treemap-item.server   { background: rgba(248, 113, 113, 0.05);  border-color: rgba(248, 113, 113, 0.12); }

.treemap-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.treemap-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 300;
}

.storage-schema h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.schema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.6rem;
}

.schema-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 300;
  transition: border-color 0.2s;
}

.schema-table:hover { border-color: var(--border-hover); }

.schema-table strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}

.schema-table.primary {
  border-color: rgba(139, 124, 246, 0.2);
}

/* ═══════════ 06 BINDINGS ═══════════ */
.bindings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.binding-card {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.35s var(--ease-out);
}

.binding-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.binding-lang {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.binding-card p {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  font-weight: 300;
}

/* Terminal chrome */
.terminal {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.terminal-chrome {
  display: flex;
  gap: 5px;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--border);
}

.terminal-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
}

.terminal-chrome span:first-child { background: rgba(248, 113, 113, 0.6); }
.terminal-chrome span:nth-child(2) { background: rgba(251, 146, 60, 0.5); }
.terminal-chrome span:nth-child(3) { background: rgba(94, 234, 212, 0.5); }

.terminal pre {
  padding: 0.75rem;
  margin: 0;
  overflow-x: auto;
}

.terminal code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #b0adc4;
  line-height: 1.6;
}

.tk-kw  { color: #a78bfa; }
.tk-fn  { color: #5eead4; }
.tk-str { color: #fb923c; }

/* ═══════════ 07 SECURITY ═══════════ */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.8rem;
}

.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all 0.3s var(--ease-out);
}

.security-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.security-card h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.security-card h4 .sec-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.security-card p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 300;
  line-height: 1.5;
}

.security-card .sec-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  margin-top: 0.5rem;
}

.sec-tag.api { background: rgba(94, 234, 212, 0.1); color: var(--green); }
.sec-tag.internal { background: rgba(0, 0, 0, 0.03); color: var(--text-tertiary); }

/* ═══════════ 08 BACKUP ═══════════ */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
}

.backup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all 0.3s var(--ease-out);
}

.backup-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.backup-card h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.backup-card p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 300;
  line-height: 1.5;
}

.backup-card code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-code);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.backup-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.backup-flow .flow-step {
  background: rgba(139, 124, 246, 0.06);
  border: 1px solid rgba(139, 124, 246, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.backup-flow .flow-arrow {
  color: var(--accent-dim);
}

/* ═══════════ 09 BENCHMARK ═══════════ */
.benchmark-chart {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.bench-category {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.bench-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
  min-width: 110px;
  text-align: right;
}

.bench-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bench-bar {
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  width: 0;
  transition: width 1.4s var(--ease-out);
}

.bench-bar.memme {
  background: linear-gradient(90deg, rgba(139, 124, 246, 0.2), rgba(139, 124, 246, 0.06));
  border: 1px solid rgba(139, 124, 246, 0.25);
  color: var(--accent);
}

.bench-bar.baseline {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
}

.bench-bar.baseline--alt {
  background: rgba(0, 0, 0, 0.015);
  border: 1px dashed var(--border);
  color: var(--text-tertiary);
  opacity: 0.75;
}

.bench-overall {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.08), rgba(139, 124, 246, 0.02));
  border: 1px solid rgba(139, 124, 246, 0.15);
  border-radius: var(--radius);
}

.bench-overall-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--accent);
  line-height: 1;
}

.bench-overall-value small {
  font-size: 1.5rem;
  opacity: 0.7;
}

.bench-overall-label {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
  font-weight: 300;
}

.bench-note {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-align: center;
}

/* ═══════════ FOOTER ═══════════ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-dim);
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-secondary); }

/* ═══════════ STAGGERED CHILDREN ═══════════ */
.section.visible .channel,
.section.visible .phase,
.section.visible .binding-card,
.section.visible .schema-table,
.section.visible .security-card,
.section.visible .backup-card,
.section.visible .bench-category {
  animation: staggerIn 0.6s var(--ease-out) both;
}

.section.visible .channel:nth-child(1),
.section.visible .phase:nth-child(1),
.section.visible .binding-card:nth-child(1),
.section.visible .security-card:nth-child(1),
.section.visible .backup-card:nth-child(1),
.section.visible .bench-category:nth-child(1) { animation-delay: 0.05s; }

.section.visible .channel:nth-child(2),
.section.visible .phase:nth-child(2),
.section.visible .binding-card:nth-child(2),
.section.visible .security-card:nth-child(2),
.section.visible .backup-card:nth-child(2),
.section.visible .bench-category:nth-child(2) { animation-delay: 0.12s; }

.section.visible .channel:nth-child(3),
.section.visible .phase:nth-child(3),
.section.visible .binding-card:nth-child(3),
.section.visible .security-card:nth-child(3),
.section.visible .backup-card:nth-child(3),
.section.visible .bench-category:nth-child(3) { animation-delay: 0.19s; }

.section.visible .channel:nth-child(4),
.section.visible .phase:nth-child(4),
.section.visible .binding-card:nth-child(4),
.section.visible .security-card:nth-child(4),
.section.visible .backup-card:nth-child(4),
.section.visible .bench-category:nth-child(4) { animation-delay: 0.26s; }

.section.visible .phase:nth-child(5),
.section.visible .binding-card:nth-child(5),
.section.visible .security-card:nth-child(5),
.section.visible .backup-card:nth-child(5) { animation-delay: 0.33s; }

.section.visible .binding-card:nth-child(6),
.section.visible .security-card:nth-child(6),
.section.visible .backup-card:nth-child(6) { animation-delay: 0.40s; }

.section.visible .security-card:nth-child(7),
.section.visible .backup-card:nth-child(7) { animation-delay: 0.47s; }

.section.visible .security-card:nth-child(8),
.section.visible .backup-card:nth-child(8) { animation-delay: 0.54s; }

.section.visible .security-card:nth-child(9) { animation-delay: 0.61s; }

.section.visible .security-card:nth-child(10) { animation-delay: 0.68s; }

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

/* Pre-animation state */
.channel,
.phase,
.binding-card,
.security-card,
.backup-card,
.bench-category {
  opacity: 0;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  .search-channels { grid-template-columns: 1fr; }
  .bindings-grid { grid-template-columns: 1fr 1fr; }
  .recon-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero-content { padding: 0 1.5rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-divider { width: 40px; height: 1px; }
  .section { padding: 4rem 0; }
  .section-inner { padding: 0 1.5rem; }

  .forgetting-layout { grid-template-columns: 1fr; }

  .arch-treemap {
    grid-template-columns: 1fr 1fr;
  }
  .arch-treemap .treemap-item.core {
    grid-column: span 2;
    grid-row: span 1;
  }

  .bindings-grid { grid-template-columns: 1fr; }

  .bench-category {
    flex-direction: column;
    align-items: flex-start;
  }
  .bench-label { text-align: left; }

  .nav-links a:not(.nav-gh) { display: none; }

  .pipe-flow {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pipe-flow::-webkit-scrollbar { height: 0; }

  .pipe-stage { min-width: 62px; padding: 0.5rem 0.4rem 0.45rem; }
  .pipe-connector { width: 16px; }
  .pipe-icon { width: 20px; height: 20px; }
  .pipe-name { font-size: 0.58rem; }

  .phase {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
  }
  .phase-number { font-size: 1.6rem; }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section-number { font-size: 5rem; top: -3rem; }
}

/* ═══════════ MICRO-INTERACTIONS ═══════════ */

/* Nav: compact on scroll */
.nav.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  transition: height 0.3s var(--ease-out);
}

.nav.scrolled .nav-inner {
  height: 52px;
}

/* Hero badge shimmer */
.hero-badge {
  position: relative;
  overflow: hidden;
}

.hero-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 124, 246, 0.15), transparent);
  animation: badgeShimmer 4s ease-in-out 2s infinite;
}

@keyframes badgeShimmer {
  0% { left: -100%; }
  40% { left: 150%; }
  100% { left: 150%; }
}

/* Active stage pulse */
.pipe-stage.active {
  animation: stagePulse 2.5s ease-in-out infinite;
}

@keyframes stagePulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(139, 124, 246, 0.12), 0 0 0 3px var(--accent-glow); }
  50% { box-shadow: 0 8px 28px rgba(139, 124, 246, 0.18), 0 0 0 5px rgba(139, 124, 246, 0.06); }
}

/* Graph node subtle float */
.phase-graph .graph-node {
  animation: nodeFloat 3s ease-in-out infinite;
}

.phase-graph .graph-node:nth-child(1) { animation-delay: 0s; }
.phase-graph .graph-node:nth-child(3) { animation-delay: 0.4s; }
.phase-graph .graph-node:nth-child(5) { animation-delay: 0.8s; }

@keyframes nodeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Graph edges pulse */
.graph-edge span {
  position: relative;
  overflow: hidden;
}

.graph-edge span::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  animation: edgePulse 2.5s ease-in-out infinite;
}

@keyframes edgePulse {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Terminal cursor blink */
.terminal pre::after {
  content: '\2588';
  color: var(--accent);
  opacity: 0;
  animation: cursorBlink 1.2s step-end infinite;
  font-size: 0.75rem;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.7; }
}

/* RRF glow pulse */
.rrf-glow {
  animation: rrfPulse 4s ease-in-out infinite;
}

@keyframes rrfPulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

/* Benchmark bar hover glow */
.bench-bar.memme {
  transition: width 1.4s var(--ease-out), box-shadow 0.3s ease;
}

.bench-bar.memme:hover {
  box-shadow: 0 0 20px rgba(139, 124, 246, 0.15);
}

/* Card hover: spring shadow */
.channel,
.binding-card,
.phase,
.formula-card,
.treemap-item {
  transition: transform 0.35s var(--ease-out), border-color 0.25s, box-shadow 0.35s var(--ease-out);
}

.binding-card:hover,
.formula-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Recon items hover */
.recon-item {
  transition: transform 0.2s var(--ease-out);
}

.recon-item:hover {
  transform: translateX(4px);
}

/* Schema table hover lift */
.schema-table {
  transition: transform 0.25s var(--ease-out), border-color 0.2s, box-shadow 0.25s;
}

.schema-table:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Stat value count-up feel via scale */
.hero-content .stat {
  animation: statPop 0.5s var(--ease-out) both;
}

.hero-content .stat:nth-child(1) { animation-delay: 0.8s; }
.hero-content .stat:nth-child(3) { animation-delay: 0.95s; }
.hero-content .stat:nth-child(5) { animation-delay: 1.1s; }
.hero-content .stat:nth-child(7) { animation-delay: 1.25s; }

@keyframes statPop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Speed button click feedback */
.speed-btn:active,
.ctrl-btn:active {
  transform: scale(0.92);
}

/* Pipeline detail directional swap */
.pipeline-detail {
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    scroll-behavior: auto !important;
  }

  .hero-canvas { display: none; }
  .connector-pulse { display: none; }
  .noise { display: none; }

  .section .section-inner {
    opacity: 1;
    transform: none;
  }

  .channel, .phase, .binding-card, .security-card, .backup-card, .bench-category {
    opacity: 1;
  }

  .bench-bar {
    transition: none !important;
  }
}

/* ═══════════ HERO CTA (product entry) ═══════════ */
.hero-cta {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0 2.6rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
}

.cta-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(139, 124, 246, 0.55);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(139, 124, 246, 0.65);
}

.cta-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.cta-secondary:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ═══════════ QUICK START ═══════════ */
.qs-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 2.4rem;
}

.qs-step {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  position: relative;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.qs-step:hover { border-color: var(--border-hover); transform: translateY(-3px); }

.qs-step h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0.8rem 0 0.9rem;
}

.qs-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.qs-note {
  margin-top: 0.9rem;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.qs-note code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

.qs-alt {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.qs-alt code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

.qs-alt a { color: var(--accent); text-decoration: none; }
.qs-alt a:hover { text-decoration: underline; }

/* ═══════════ WHAT IT GUARANTEES ═══════════ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.4rem;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.why-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }

.why-icon { font-size: 26px; margin-bottom: 0.9rem; }

.why-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.why-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ═══════════ BINDING STATUS TAGS ═══════════ */
.binding-status {
  display: inline-block;
  margin: 0.4rem 0 0.5rem;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.binding-status.ok {
  background: rgba(13, 148, 136, 0.1);
  color: var(--green);
}

.binding-status.warn {
  background: rgba(233, 115, 22, 0.12);
  color: var(--orange);
}

/* ═══════════ PETMEMBENCH ═══════════ */
.pmb-card {
  max-width: 560px;
  margin: 2.4rem auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
}

.pmb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pmb-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 600;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.pmb-table td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
}

.pmb-table td:first-child {
  font-family: var(--font-body);
  color: var(--text-secondary);
}

.pmb-table tr:last-child td { border-bottom: none; }

.pmb-note {
  margin-top: 1.1rem;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pmb-links {
  margin-top: 1rem;
  display: flex;
  gap: 1.2rem;
}

.pmb-links a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.pmb-links a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .qs-steps, .why-grid { grid-template-columns: 1fr; }
}
