/* ==========================================================================
   Open Source / Community CTA Section
   ========================================================================== */

.opensource {
  position: relative;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 50%, var(--bg-deep) 100%);
  overflow: hidden;
}

/* Ambient background glow */
.opensource::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(46, 104, 233, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.opensource-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.opensource-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-xl);
  background: rgba(46, 104, 233, 0.1);
  border: 1px solid rgba(46, 104, 233, 0.2);
  border-radius: var(--radius-lg);
  color: var(--blue-400);
}

.opensource-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.opensource h2 {
  margin-bottom: var(--space-md);
}

.opensource p {
  margin-bottom: var(--space-2xl);
  font-size: var(--text-lg);
}

/* ── GitHub Star Button ── */
.github-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
  backdrop-filter: blur(12px);
  transition: all var(--duration-base) var(--ease-out);
}

.github-btn:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
}

.github-btn:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 4px;
}

.github-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ── Animated Code Brackets ── */
.code-brackets {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 300;
  user-select: none;
}

.bracket {
  opacity: 0.3;
  transition: opacity var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
}

.bracket:nth-child(1) { animation: bracket-fade 4s ease-in-out infinite; }
.bracket:nth-child(2) { animation: bracket-fade 4s ease-in-out 0.5s infinite; }
.bracket:nth-child(3) { animation: bracket-fade 4s ease-in-out 1s infinite; }
.bracket:nth-child(4) { animation: bracket-fade 4s ease-in-out 1.5s infinite; }

@keyframes bracket-fade {
  0%, 100% { opacity: 0.15; color: var(--text-dim); }
  50%      { opacity: 0.5; color: var(--blue-700); }
}
