/* ============================================================
   Visual Mockup Sections
   ============================================================ */

/* ── Shared mockup frame ── */
.mockup-frame {
  background: #0d0d14;
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.titlebar-dots {
  display: flex;
  gap: 6px;
}

.titlebar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.titlebar-dot.red    { background: #ff5f57; }
.titlebar-dot.yellow { background: #febc2e; }
.titlebar-dot.green  { background: #28c840; }

.titlebar-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  font-family: monospace;
}

/* ============================================================
   n8n Workflow Mockup
   ============================================================ */
.n8n-section {
  padding: 100px 0;
  background: var(--bg-card-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.n8n-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: center;
}

.n8n-text h2 { margin-bottom: 16px; }
.n8n-text p  { margin-bottom: 24px; font-size: 0.975rem; line-height: 1.8; }
.n8n-text .btn { margin-top: 8px; }

.n8n-canvas {
  padding: 24px;
  min-height: 340px;
  position: relative;
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(0, 212, 255, 0.04) 0%, transparent 70%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 40px);
}

/* n8n nodes */
.n8n-nodes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  flex-wrap: nowrap;
}

.n8n-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.n8n-node-box {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 2px solid rgba(255,255,255,0.08);
  position: relative;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.n8n-node-box:hover {
  transform: scale(1.08);
}

.n8n-node-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-align: center;
  max-width: 80px;
  line-height: 1.3;
}

/* Node colors */
.node-trigger  .n8n-node-box { background: linear-gradient(135deg, #1a2a1a, #0f1a0f); border-color: #2ecc71; box-shadow: 0 0 20px rgba(46,204,113,0.2); }
.node-email    .n8n-node-box { background: linear-gradient(135deg, #1a1a2a, #0f0f1a); border-color: #3498db; box-shadow: 0 0 20px rgba(52,152,219,0.2); }
.node-ai       .n8n-node-box { background: linear-gradient(135deg, #2a1a2a, #1a0f1a); border-color: #9b59b6; box-shadow: 0 0 20px rgba(155,89,182,0.2); }
.node-crm      .n8n-node-box { background: linear-gradient(135deg, #2a1a1a, #1a0f0f); border-color: #e74c3c; box-shadow: 0 0 20px rgba(231,76,60,0.2); }
.node-pdf      .n8n-node-box { background: linear-gradient(135deg, #1a2a2a, #0f1a1a); border-color: #00d4ff; box-shadow: 0 0 20px rgba(0,212,255,0.2); }
.node-send     .n8n-node-box { background: linear-gradient(135deg, #2a2a1a, #1a1a0f); border-color: #f39c12; box-shadow: 0 0 20px rgba(243,156,18,0.2); }

/* Connection arrows between nodes */
.n8n-connector {
  display: flex;
  align-items: center;
  padding: 0 4px;
  margin-top: -20px;
}

.n8n-connector-line {
  height: 2px;
  width: 32px;
  background: linear-gradient(90deg, rgba(0,212,255,0.4), rgba(0,212,255,0.1));
  position: relative;
}

.n8n-connector-line::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid rgba(0,212,255,0.6);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* Animated flow dot */
.flow-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 6px var(--cyan);
  animation: flowAnim 2s infinite linear;
}

@keyframes flowAnim {
  0%   { left: 0; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

/* Status badges on nodes */
.node-status {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-card-2);
}

.node-status.ok     { background: #2ecc71; }
.node-status.active { background: #f39c12; animation: statusPulse 1.5s infinite; }

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243,156,18,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(243,156,18,0); }
}

/* Workflow row 2 */
.n8n-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.n8n-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* execution log */
.n8n-log {
  margin-top: 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-line { display: flex; gap: 10px; }
.log-time { color: rgba(0,212,255,0.5); flex-shrink: 0; }
.log-ok   { color: #2ecc71; }
.log-info { color: rgba(255,255,255,0.4); }

/* ============================================================
   Claude Code Terminal Mockup
   ============================================================ */
.claude-section {
  padding: 100px 0;
}

.claude-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: center;
}

.claude-text h2 { margin-bottom: 16px; }
.claude-text p  { margin-bottom: 16px; font-size: 0.975rem; line-height: 1.8; }

.terminal {
  padding: 20px;
  overflow-x: hidden;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  min-height: 360px;
}

.term-line {
  display: flex;
  gap: 8px;
  margin-bottom: 2px;
}

.term-prompt { color: var(--cyan); flex-shrink: 0; }
.term-cmd    { color: rgba(255,255,255,0.9); }
.term-out    { color: rgba(255,255,255,0.5); padding-left: 0; }
.term-ok     { color: #2ecc71; }
.term-ai     { color: #b47fff; }
.term-file   { color: #f39c12; }
.term-dim    { color: rgba(255,255,255,0.25); }
.term-cyan   { color: var(--cyan); }

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--cyan);
  vertical-align: middle;
  animation: blink 1.2s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================================
   Automation Example Section (Before/After)
   ============================================================ */
.automation-example-section {
  padding: 100px 0;
  background: var(--bg-card-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.example-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 48px;
}

.example-tab {
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: var(--transition);
}

.example-tab.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-glow);
}

.example-content {
  display: none;
}

.example-content.active {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}

.before-after-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ba-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ba-header.before {
  background: rgba(231,76,60,0.08);
  border-bottom: 1px solid rgba(231,76,60,0.15);
  color: #e74c3c;
}

.ba-header.after {
  background: rgba(46,204,113,0.08);
  border-bottom: 1px solid rgba(46,204,113,0.15);
  color: #2ecc71;
}

.ba-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ba-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ba-dot-red   { width: 8px; height: 8px; border-radius: 50%; background: #e74c3c; flex-shrink: 0; margin-top: 5px; }
.ba-dot-green { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; flex-shrink: 0; margin-top: 5px; }

.ba-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.arrow-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  writing-mode: horizontal-tb;
}

.arrow-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #e74c3c, var(--cyan), #2ecc71);
  border-radius: 2px;
  position: relative;
}

.arrow-line::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid #2ecc71;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.ba-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border);
}

.ba-time-val {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
}

.ba-time-val.red   { color: #e74c3c; }
.ba-time-val.green { color: #2ecc71; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .n8n-layout   { grid-template-columns: 1fr; gap: 40px; }
  .claude-layout { grid-template-columns: 1fr; gap: 40px; }
  .n8n-node-box { width: 60px; height: 60px; font-size: 1.3rem; }
  .n8n-connector-line { width: 20px; }
}

@media (max-width: 768px) {
  .example-content.active { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); }
  .n8n-canvas { padding: 16px; }
  .n8n-node-box { width: 52px; height: 52px; font-size: 1.1rem; border-radius: 10px; }
  .n8n-connector-line { width: 12px; }
  .n8n-node-label { font-size: 0.62rem; max-width: 58px; }
}
