/* ============================================================================
   REPO FUNNEL — email capture + Brain newsletter modal styles
   Pure addition. No existing rules touched.
   ============================================================================ */

/* ── Floating subscribe FAB (Bottom-Right, persistent) ───────────────────── */
.repo-brain-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 12px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1a1a2e, #0f0f1c);
  border: 1px solid rgba(246, 201, 122, 0.35);
  color: #fafaf8;
  font-family: 'Onest', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.40), 0 0 0 1px rgba(246, 201, 122, 0.20);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.repo-brain-fab:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 201, 122, 0.6);
  box-shadow: 0 12px 32px rgba(0,0,0,0.50), 0 0 0 1px rgba(246, 201, 122, 0.40);
}
.repo-brain-fab:active {
  transform: translateY(0);
}

/* ── Brain modal (overlay + dialog) ─────────────────────────────────────── */
.repo-brain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.repo-brain-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.repo-brain-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #0f0f1c 0%, #1a1a2e 100%);
  border: 1px solid rgba(246, 201, 122, 0.30);
  border-radius: 18px;
  padding: 36px 28px 28px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.60);
  transform: translateY(12px) scale(0.96);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.repo-brain-overlay.is-open .repo-brain-modal {
  transform: translateY(0) scale(1);
}
.repo-brain-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #b9b0a4;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.repo-brain-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fafafa;
}
.repo-brain-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  color: #f6c97a;
  margin-bottom: 8px;
}
.repo-brain-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: #fafafa;
  margin: 0 0 12px;
  line-height: 1.1;
}
.repo-brain-lede {
  font-size: 14px;
  line-height: 1.55;
  color: #b9b0a4;
  margin: 0 0 22px;
}
.repo-brain-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}
.repo-brain-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fafafa;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.repo-brain-input:focus {
  border-color: rgba(246, 201, 122, 0.55);
  background: rgba(255, 255, 255, 0.06);
}
.repo-brain-submit {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f6c97a, #fb923c);
  border: none;
  color: #0e0e12;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}
.repo-brain-submit:hover {
  filter: brightness(1.10);
  transform: translateY(-1px);
}
.repo-brain-submit:disabled {
  filter: brightness(0.7);
  transform: none;
  cursor: default;
}
.repo-brain-fine {
  font-size: 11px;
  color: #6e6e72;
  text-align: center;
  margin: 0;
}

/* ── Email gate modal (intercepted on free download) ───────────────────── */
.repo-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.70);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.repo-gate-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.repo-gate-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #0f0f1c 0%, #1a1a2e 100%);
  border: 1px solid rgba(20, 184, 166, 0.40);
  border-radius: 18px;
  padding: 32px 28px 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.60);
  transform: translateY(12px) scale(0.96);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.repo-gate-overlay.is-open .repo-gate-modal {
  transform: translateY(0) scale(1);
}
.repo-gate-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #b9b0a4;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.repo-gate-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fafafa;
}
.repo-gate-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #14b8a6;
  margin-bottom: 8px;
}
.repo-gate-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: #fafafa;
  margin: 0 0 10px;
  line-height: 1.1;
}
.repo-gate-lede {
  font-size: 13px;
  line-height: 1.55;
  color: #b9b0a4;
  margin: 0 0 20px;
}
.repo-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}
.repo-gate-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fafafa;
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.repo-gate-input:focus {
  border-color: rgba(20, 184, 166, 0.65);
  background: rgba(255, 255, 255, 0.06);
}
.repo-gate-submit {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}
.repo-gate-submit:hover {
  filter: brightness(1.10);
  transform: translateY(-1px);
}
.repo-gate-submit:disabled {
  filter: brightness(0.7);
  cursor: default;
  transform: none;
}
.repo-gate-divider {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  color: #6e6e72;
  margin: 16px 0 12px;
}
.repo-gate-skip {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #b9b0a4;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.repo-gate-skip:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fafaf8;
}

/* ── Mobile adjustments ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .repo-brain-modal,
  .repo-gate-modal {
    max-width: 100%;
    padding: 28px 22px 22px;
  }
  .repo-brain-title,
  .repo-gate-title {
    font-size: 24px;
  }
  .repo-brain-fab {
    bottom: 14px;
    right: 14px;
    padding: 10px 14px 10px 12px;
    font-size: 13px;
  }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .repo-brain-modal,
  .repo-gate-modal,
  .repo-brain-fab {
    transition: none;
  }
}
